Jasper Integration Errors

Create your own tidbits here. Drinks on the house. Ash-trays provided.

Jasper Integration Errors

Postby mir_shajahan » Wed Oct 20, 2004 3:10 pm

Hello Red1,
I just integrated Jasper Report with Compiere. I follow the manual I get from Compiere Utils: http://sourceforge.net/project/showfile ... _id=260196

But everytime I run the report I get this error:

VTreePanel.setSelectedNode = myJasper
AMenu => 1000019 myJasper
ProcessDialog - Process=1000009; SOTrx=false
ProcessCtl.process - WindowNo=2 - ProcessInfo[myJasper,Process_ID=1000009,Error=false,Summary=,Log=0]
ProcessCtl.getInstanceID = 1000774
ProcessCtl.run - AD_PInstance_ID=1000774, Record_ID=0
ProcessCtl.startClass - org.mycompiere.report.ReportStarter - ProcessInfo[myJasper,Process_ID=1000009,AD_PInstance_ID=1000774,Error=false,Summary=,Log=0]
===========> ReportStarter.startProcess: Can not run report - java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerError: Unexpected Error; nested exception is:
java.lang.ExceptionInInitializerError > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) > sun.rmi.transport.Transport$1.run(Transport.java:148) > java.security.AccessController.doPrivileged(Native Method) > sun.rmi.transport.Transport.serviceCall(Transport.java:144) > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701) > java.lang.Thread.run(Thread.java:534) > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) > sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) > sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) > org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source) > org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:135) > org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:96) > org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46) > org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45) > org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100) > org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85) > $Proxy3.runReport(Unknown Source) > org.mycompiere.report.ReportStarter.startProcess(ReportStarter.java:56) > org.compiere.apps.ProcessCtl.startClass(ProcessCtl.java:168) > org.compiere.apps.ProcessCtl.run(ProcessCtl.java:338)
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerError: Unexpected Error; nested exception is:
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at MLookupCache: cacheReset - WindowNo=2 - 0 -> 0

How can I successfully integrated Compiere and Jasper Report?
What should actually happen when I click the report process- {Should the report just like the one like I create using iReport and view in pdf format it directly print to printer.}

Any help and suggestion is appreciated..Thank you..


<< aMir >>
Posts: 30
Joined: Wed Aug 11, 2004 9:34 pm

Postby mir_shajahan » Thu Oct 21, 2004 11:48 am

I have fix this problem, I just modify the classpath.... the error is not appearing anymore...

but nothing happen when I click the report..... so after investingating...

I stop the compiere service and RUN_Server2 and it start fine... But when I run the report, alot of error pop in RUN_Server2.. So I still trying to figure out where could be the problem...

If you have any suggestion plz tell me. Thank you....

<< aMir >>
Posts: 30
Joined: Wed Aug 11, 2004 9:34 pm

Postby red1 » Thu Oct 21, 2004 12:49 pm

thanks for the info, and its great to hear u are becoming like a hacker! :)

U should explain exactly what error message u got. Then i can try to guess.

But since this is not the main issue for compiere i will delete this post. ok?

I can only cater for compiere specific matters.

JasperReports has its own support forum. Its best you try there.


Site Admin
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby mir_shajahan » Thu Oct 21, 2004 2:30 pm

Hai Red1,
Eventhough JasperReport is not part of Compiere, but I think it is an important tools for compiere to produce complex report, so that Compiere look more outstanding.

But if say, compiere is going to come out with it's own powerfull reporting tools to produce complex report, then, JasperReport can be consider not important to compiere.

Imagine, what will the client say, if they see just the normal Compiere report which cannt even make a box to make the report more readable.. and only separated by lines..? {Plz forgive me, if compiere capable of producing shape in the report} For the 215d release, I see there is graphic tab, in print format... but not dare to try yet....

So, my conclusion, is JasperReport is an important tools as an add on to compire reporting.

There are JasperReport Forum, iReport for JasperReport Forum and Compiere Utils Forum.... and I guess help still available at there....

So, I will try my best to make ur forum specially for compiere directly issues and problems...Thank you.


<< aMir >>
Posts: 30
Joined: Wed Aug 11, 2004 9:34 pm

Postby red1 » Fri Oct 22, 2004 1:43 am

JasperReports is not the only 3rd party tool that can drill into the Oracle Database.
Excel is one very good tool. Its just that Excel is licensed and JasperReports is free.
I rather use something that doesnt cost much and produce valuable info quicly thus earning me money instead of saving money but wasting much time which is more loss of money.
Do u understand? Thus Compiere is already fantastic enough. We cannot be extreme in trying to be too idealistic. Ths customers will understand. Thats why most customers still use Microsoft (85% of the world) because its productivity that is the concern.

Again, even if u still believe in using JasperReport its ok, but i cannot support it technically, as i m focussing on a different segment of the industry.

I am not deleting this post because i want others to read it and understand my views too.

Its also unwise to post support requests to more places that doesn't concern it. It is considered noise and doesnt guarantee attention. You will not get help and your actions will be misunderstood and disliked. :cry:

This is my sincere opinion. I m not like a person who just ignore another's zeal to succeed, but there are proper and more effective ways. And there is no substitute for hard work, at least half way. :wink:

You can also refer to the compilo document that has info on JasperReport integration.

Site Admin
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby azaharizaman » Fri Nov 26, 2004 3:37 pm

Hi there. Compilo has its own 3 page information on how to integrate Jasper with compiere. But the steps provided is quite brief and some people might get misled. I have been trying to integrate Jasper+compiere using the compilo documentation for a week now, and only last two days, i finally get to run the report. So just to share with amir and u guys out there (not that i want to abuse this forum with my itsy-bitsy-tiny success on integrating jasper+compiere) i will explain the steps slowly. If you get lost, or u need further assistance, please check compilo documentations at http://compilo.sourceforge.net

1. the first thing is u must get youself a copy of compilo tested compiere source at
http://prdownloads.sourceforge.net/comp ... p?download

2. extract this to somewhere. Extracted will be the source file and some Jasper Integration source and jars. You wont be needing much of these things, so dont busy yourself with the other stuff. If this is the first time you are running compiere and didn't do any modification to it yet, you can directly use this source. It is actually Compiere 251f and integrated with jasper. For my case, since i am using 251d, i will just need certain items, which is the folder NNCompiereJR, and a jar NNCompiereJR.jar inside the lib folder of the compiere source root (not the lib folder inside NNCompiereJR folder.).

3. Now copy the NNCompiereJR folder into you compiere source directory and the NNCompiereJR.jar into the Compiere source lib directory. If you notice, inside the NNCompiereJR/lib forlder, there is a jar for jasper report. If you need to upgrade/downgrade the jasper, just replace this jar.

4. Now, you need to modify certain files. Open up utils/compiereDirectTemplate.jnlp and modified it by including this line..

<property name="ru.compiere.report.path" value="../report" />
<j2se version ....

the value for the property name is the location of you report folder. In my case, i use the CompiereSource_Root/report folder

5. Open ServerRoot/src/web/compiere.jnlp and modify it by adding this line

<property name="ru.compiere.report.path" value="../report" />

6. Now you need to edit the client/build.xml file by adding these two lines.

<srcfiles dir="..\extend" includes="Extend.jar" />
<srcfiles dir="..\NNCompiereJR" includes="Extend.jar" />
<unjar src="..\extend\Extend.jar" dest="${build.dir}" />
<unjar src="..\NNCompiereJR\dist\NNCompiereJR.jar" dest="${build.dir}" />

7. Now open the file utils_dev/build.xml and add these two lines

<ant inheritAll="false" dir="extend" />
<ant inheritAll="false" dir="NNCompiereJR" />
<ant inheritAll="false" dir ="extend" target="clean" />
<ant inheritAll="false" dir ="NNCompierJR" target="clean" />

8. Now go to the file NNCompiereJR/src/ru/compiere/report/RusReportStarter.java. You can use eclipse to modify this. Just change the line to match this one

if (reportPath == null) {
REPORT_HOME = new File( System.getProperty("COMPIERE_HOME")+"/reports");
} else {
REPORT_HOME = new File( reportPath);

This line indicates where the report are stored, in my example, it is in the source_root/reports folder.

9. Now you are ready to edit you AD. Build your source and restart you compiere service. run Compiere and login as System Adminstrator and create a new column for AD_Process table, and name it JasperReport and the type is string 200 character. Use the Name element for this. Now add this new column into the Report&Processes window inside the Process Tab. If you are not sure how to do this, refer to compiere documentation.

10. Compilo has provided a sample report inside their distribution. you can download this from compilo. the jasper report is named JRBPartnerOrder.xml. copy the files into your report folder that you have specified earlier. If you dont currently have this folder, please create it. this report will read order for a specific BPartner using C_BPartner_ID. Before you can run this report, you need to create a view for it. Since the report use a view called NN_BPartnerOrder_V, we have to create it first. The easiest way to do this is by using the SQLPlus Worksheet provided by oracle.

You can find this in you start menu Oracle OraHome > Application Development. Connect to you appropriate database, and once connected, execute this command inside the SQLPlus worksheet. If you dont know how to do this, please refer to oracle documentation.

create or replace view NN_BPartnerOrder_V
select C_BPartner_ID, Name, GrandTotal, DateOrdered
from C_Order join C_BPartner using (C_BPartner_ID);

11. Now go back to your compiere and create a new process, name it Test_BPartner_Order. Do not select the report checkbox. Fill in the fields, and for the classname field, enter "ru.compiere.report.RusReportStarter" (without the quote) and the JasperReport field, enter "JRBPartnerOrder.xml" (without the qoute) and add a parameter to this report. Name the parameter Business Partner, and DB_Column Name is C_BPartner_ID and the type is TableDir. Having done this, add the created report to you compiere menu. Please refer to compiere documentation if you dont know how to do this.

12. We are now ready to start testing the report. Login to compiere using Garden World admin and execute the report. It will prompt you to select a Business Partner, and you will see a report listing orders from the selected Business Partner.

13. If you have problem running the report, check you log. Make sure you have place your report into the correct folder as specified in step 4, 5 and 8. The sample report has an image for barcode, and since we dont implement this, you might see some errors in you log, although the report run correctly, and you can ignore these errors.

That is about all the steps that i have follow through and get the jasper report running. For more details, you can read compiere, compilo and jasper documentation. For creating the report, you can use the iReport reporting tool. If you still have problems, please email me, and please dont post it here, or Mr Red1 might get pissed off... :)

Thank you.
Posts: 17
Joined: Tue Sep 21, 2004 3:36 pm
Location: Sarawak

Postby red1 » Fri Nov 26, 2004 3:48 pm

Hi Z'man,
Such posting is greatly encouraged as u improve on someone else work. And you have written quite nicely i can almost cry. So i will not get pissed off.
I will when u do not contribute :cry:

I will ask Marco to check your part and if its better, then your name will be in there as a contributor!

Pls get into 2nd gear. I am on neutral. ;)

Site Admin
Posts: 2762
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby marlom9000 » Fri Nov 26, 2004 10:59 pm

Hi Z'man,
I do not check already your code.
Actually I test it. but maybe there are still some errors.

Also we at Compilo are looking for contributors :D
With red1 yestday we was speaking about moving Compilo source file on the CVS so contrib. can post patches.

Right now I was alone in writing texinfo so no need for CVS. And also Red1 prefer Word :-(

As I told to red1 one day I would like to see one, good, compreensive Compiere Developer's GUIDE. On Compilo or somewhere else do not matter.

Let me know.

Compilo subAdministrator
Harmony is action without effort.
Posts: 5
Joined: Sun Oct 10, 2004 3:18 am
Location: Lucca, Italy.

Postby azaharizaman » Mon Nov 29, 2004 6:47 pm

Hi there,

thanx Mr Red1 for not getting pissed off, and actually there was nothing to cry about ( a friend of mine quote "save the tears for moments when you want to cry but you cant"..i dont really know what it means .. :) " ), but nevertheless, i appreciate it, all i want to do is helping people, and about being a contrib, there is really no need for that but i truely appreciate it.

To Mr Marlom, yes there might still be errors. One that i figured out is when running compiere on remote site where one is not in the perimeter of the local network. If i may refered to my previous post on step 5, the value specifies the location of the xml file of the report, in this case its a folder reports. The folder ( or the value ) can also be a shared folder like "//compiereServer/reports", but if i am on a remote site ( access via web start or web ) and i do not have any access to the local network, my RusReportStarter would issue an error that it cant find the reports ( I never try it though, but I believe that will be the case ). I am not suggesting or asking a solution here, since this is not a jasper forum, but just want to highlight the issue in reply to what Mr Marlom has posted. Maybe after this i have to check jasper forum :).

And about putting compilo on CVS, i think its a good thought. I am sure there are a lot of Compiere developers out there wanted to share their skills, and maybe one day we will have a solid Compiere Developer Giude.

Thanx and see ya...

p/s: In my previous post, in step 3, copying NNCompiereJR.jar is not compulsary. The jar will be automaticaly generated and copied to the lib directory once you build the source.
Posts: 17
Joined: Tue Sep 21, 2004 3:36 pm
Location: Sarawak

Postby harinder_kaur » Sat Jul 30, 2005 6:29 pm

Hi azaharizaman,

I have made a report as described by you in steps.
I have created a report nd Process using AD.When i run that process I got the error starting class ru.compiere.report.rusReportStarter

But i found that this is already in NNCompiereJR.jar file.

Help me Please...

Harinder Kaur
Posts: 12
Joined: Fri Jul 29, 2005 2:54 pm
Location: INDIA

my 2c worth

Postby neilg » Fri Sep 02, 2005 12:27 am

This Jasper reports is really a great tool. But it can be confusing too when someone has already written an integration because as a developer we fail to start from first principles.

When you write a Jasper Report in Compiere start from first principles. You will see how simple it is to integrate with Java and from there into Compiere. You can do this just by looking at the jasper report site. My favourite front end is iReport. :D

You can see a code snippet for a standalone jasper report in Contributors Corner.

Also please remember that modifying the Compiere code directly is a mistake and with the new >> Version 2.5.2D instructions given in the postings above may change drastically.
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Return to Open Forum

Who is online

Users browsing this forum: No registered users and 2 guests