Including a jar

0

Withdrawing the question.



Post Edited by rlfisher at 08/04/2011 22:13
rlfisher's picture
196
Joined: Oct 24 2008 - 9:56am
Last seen: 3 months 1 week ago

Hello Oliver, hello Community ,

I have the same problem as you while including the UniqueCategoryLabel.jar in JasperReportStudio 6.1 and JasperReportServer 6.0.
After the change of <field name="charge" class="java.lang.String"/>  to <field name="charge" class="java.lang.UniqueCategoryLabel"/>
I always get the error :

Description Resource Path Location Type
java.lang.ClassNotFoundException: java.lang.UniqueCategoryLabel --- net.sf.jasperreports.engine.design.JRDesignField@d094e3c ic_charge_messdatumV3.4.jrxml /MyReports/01 Kundenreports/entwurf/pg_lokal/R&R line 0 JRXML Problem.
 
I have added the jar-file to the buildpath:
 
 
I appreciate any help to this problem.
 
Thanks 
Rainer

 

rainer.brodhagen - 3 years 9 months ago

19 Answers:

1

 

In Jaspersoft Studio there is no longer a big unique classpath for the whole application like in iReport.

Each report is supposed to be part of a project. The project has a classpath, and here is where you should add the jars you need.

All is done by opening the projects view and right click the project folder with which you are working on. By default, new reports are created in the project My Reports (this is the standalone RCP version).

Giulio

giulio's picture
20736
Joined: Jan 2 2007 - 4:15pm
Last seen: 3 months 1 week ago
0

Thanks Giulio -

As I mentioned to you separately, I eventually realized that my eclipse project of jrxmls was just a svn checkout (sufficient when using iReport).  I will have to reorganize my project into a java project so that I can affect the buildpath.

rlfisher's picture
196
Joined: Oct 24 2008 - 9:56am
Last seen: 3 months 1 week ago
0

Hi,

checkout your project as a Java Project, configure your java build path, and commit .project .classpath files into the repository, now when you will checkout projects into eclipse, all your project configuration will be available

best regards,

Slavic

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 10 months 3 weeks ago
-1

Hi,

I tried the way you describe but that didn't work. Added all needed jars to the "My Procects - Build Path - Configure Build Path". There are still lots of errors generated from "classes not found" allthough they are in the classpath.

Is that a bug or am I doing wrong? The other thing is that I get errors (e.g. "Errors 31 items") but there is no way to get detailled information about the errors.

Any idea?

Best,

Volker

vgruber's picture
Joined: Nov 10 2011 - 1:58am
Last seen: 7 years 6 months ago
0

 I tried to add the jar of my chart template as an external jar to my Java Project (right click on project folder > properties > java build path > libraries). But I still get an error message. Can somebody shed some light onto how this is supposed to be done?

diddy's picture
34
Joined: Nov 15 2011 - 2:35am
Last seen: 6 years 6 months ago
0

try to upgrade to 1.0.7 for chart templates,

I tested it works on sample reports

 

Slavic

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 10 months 3 weeks ago
1

I have updated JS Studio to 1.0.7.   Reports that do not need/reference my external jar file work properly.

My jar is contained in the Java Build Path (and confirmed in .classpath) for the project.  If I rename the <import> to something misspelled, that misspelling is not noticed by the compiler.  Is the <import> somehow being ignored?  Every reference to its methods "cannot be resolved."

I can't believe that I am the only person so far trying to incorporate an external jar into a report run under the Studio.  The report works properly under iReport, so I know that my <import> directive is correct.

Sorry for the lack of precision in my problem description - I am not that conversant in eclipse java projects.

Post Edited by rlfisher at 01/19/2012 19:13

Really?  Nobody can help me?  It seems to be ignoring my jar.



Post Edited by rlfisher at 02/08/2012 18:33
rlfisher's picture
196
Joined: Oct 24 2008 - 9:56am
Last seen: 3 months 1 week ago
0

 I upgraded my Eclipse plugin to the latest version. I tried to add the chart theme jar as well to the class path (Using Add External Jar) and then my report still doesn't work. The same report works in iReport though.



Post Edited by diddy at 01/20/2012 13:55
diddy's picture
34
Joined: Nov 15 2011 - 2:35am
Last seen: 6 years 6 months ago
0

 I'm using 1.0.8, and I have the same issue - I am unable to get my scriptlet jar classes to resolve to a type. My project has a Jasper nature, and a java nature. I have the Jasper builder and the Java builder. I have a .classpath file, and in it is an entry for the jar files. This does not work, and all of my reports that utilize any of my custom Scriptlets are littered with errors.

Any advice would be appreciated

heading back to iReport...

europe72's picture
Joined: Jul 22 2009 - 1:16pm
Last seen: 6 years 5 months ago
0

can you attach sample files to test

 

thank you

Veaceslav Chicu

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 10 months 3 weeks ago
0

 Hello and thank you for your reply.

I'm not sure what type of file you would want to test exactly? The jrxml files are well formed and work in iReport  when I include my scriptlet jars in the classpath in preferences. The only other file might be the .project or .classpath, and both of those look right to me based on my experience using Eclipse to develop Java.

Please advise.

europe72's picture
Joined: Jul 22 2009 - 1:16pm
Last seen: 6 years 5 months ago
0
Happy to see that this thread is again engaging JS! I have been unable to use JS Studio because all of our reports (which work properly under iReport and the JasperSoft Server) reference our jars, which appear to be ignored.
rlfisher's picture
196
Joined: Oct 24 2008 - 9:56am
Last seen: 3 months 1 week ago
0

the same here, too. We are unable to use JS Studio because all of our reports (they work properly under iReport) need our jarfiles, which are ignored.

atosscsd's picture
Joined: May 3 2007 - 10:08pm
Last seen: 12 years 2 weeks ago
0

I'm experiencing the same issue I think.

In my case a QueryExecuterFactory included in a jar in the project's build path cannot be found.



Post Edited by roded at 03/16/2012 14:56
roded's picture
13
Joined: Aug 17 2011 - 12:52am
Last seen: 7 years 9 months ago
0

1.1.1 cleared this issue for me.

rlfisher's picture
196
Joined: Oct 24 2008 - 9:56am
Last seen: 3 months 1 week ago
0

can you retest with Jaspersoft 1.1.1 please

 

Veaceslav Chicu

chicuslavic's picture
Joined: Apr 19 2010 - 3:18am
Last seen: 10 months 3 weeks ago
0

I am using 1.1.1 and having the same problem I have the scriptlet included on the project build path, however any reference to it simply returns null. There are no errors reported during build or preview, is there any way of increasing the logging level so I can try and see what is going on?

EDIT

ok have tested the scriptlet in iReport and it is working as expected I am getting the attached stack trace in studio with the attached .classpath



Post Edited by daveianstanley at 07/06/2012 13:56
daveianstanley's picture
Joined: Jul 6 2012 - 6:12am
Last seen: 7 months 1 week ago
0

Hi,
could you please attach your current .project?
We verified a bug, fixed in version 1.1.2 (next release), that led to missing compilation of sources in project folders (java.lang.NoClassDefFoundError exceptions).

So have a look if you have the following lines in bold: 

<buildSpec>
   <buildCommand>
       <name>org.eclipse.jdt.core.javabuilder</name>
       <arguments></arguments>
   </buildCommand>

   <buildCommand>
       <name>net.sf.jasperreports.builder</name>
       <arguments></arguments>
   </buildCommand>
</buildSpec>

Just in case try to add them.

Regards,
Massimo.
 

 

 

mrabbi's picture
6510
Joined: Oct 31 2011 - 9:20am
Last seen: 1 hour 16 min ago

Having same problem with 5.6....except that I've never used iReport so have no basis for comparison. The instructions on adding a custom Jar to JS Studio are sketchy at best, though maybe it's my lack of familiarity with the product (which honestly I don't like at all) and with Java. I posted a question here but have had 0 responses (8 views) so far, so apparently I'm not the only one who still doesn't know how to do this. This is likely the most frustrating piece of software I've ever used, and I've been forced to use some doozies in my 32 years of working in IT.

drummer54 - 4 years 11 months ago
0

I've been using iReport 4.0 where I could find a way to add my custom jars.

Using the actual v5.6.0 of Jasperstudio is killing me. Like drummer54, I can't find a way to have them taken into account while designing.

Any help would greatly be appreciated.

Thanks in advance,


EDIT: After sooo much efforts to get something to work, I found out that referencing external class path with .class file may work. Though you may consider refreshing project/files to have new modification taken into account. To me it seems that classpath is not taken into account as immediatly as in a standard Java project.

Hope this can help

olivier.romand's picture
Joined: Jan 30 2014 - 1:17pm
Last seen: 4 years 9 months ago
Feedback