Importing .jar files into BIRT [message #803330] |
Tue, 21 February 2012 02:43  |
Eclipse User |
|
|
|
Hi, all:
I hope this post finds you all well. What is the best way to include .jar files into BIRT project thus making its classes visible to the scipt?
I have some logic contained in Java .jar files ie bunch of data processing classes that I would like to invoke through BIRT. They all work flawlessly in Java. I ran them in pure Java, Matlab, Netbeans, etc.
I use the importPackage command:
importPackage(Packages.database.connectors.jdbc.MsSQLserver);
however, I get the following message:
Function importPackage must be called with a package; had "[JavaClass database.connectors.jdbc.MsSQLserver]" instead. (/report/method[@name="initialize"]#1)
I added .jar file already as an external JAR (ProjectProperies->Classpath ). Also I tried sticking it in the /WEB-INF/lib folder as well as using the Import Wizard. Same error prevails...
What am I doing wrong?
Thank you,
Andrew
|
|
|
Re: Importing .jar files into BIRT [message #803695 is a reply to message #803330] |
Tue, 21 February 2012 12:06   |
Eclipse User |
|
|
|
Take a look at this:
http://birtworld.blogspot.com/2009/12/birt-designer-classpath-changes.html
That post shows the preference to use in the designer. You can also
click on resources for the report and add a jar there, but the jar will
have to be available in the resource folder in the designer and deployed
viewer
If you added the jar to the designer classpath,
when you deploy the report to the viewer (3.7 or >) just put the jar in
the web-inf/lib.
Jason
On 2/21/2012 2:43 AM, andrew smith wrote:
> Hi, all:
>
> I hope this post finds you all well. What is the best way to include
> .jar files into BIRT project thus making its classes visible to the scipt?
> I have some logic contained in Java .jar files ie bunch of data
> processing classes that I would like to invoke through BIRT. They all
> work flawlessly in Java. I ran them in pure Java, Matlab, Netbeans, etc.
>
> I use the importPackage command:
> importPackage(Packages.database.connectors.jdbc.MsSQLserver);
>
> however, I get the following message:
>
> Function importPackage must be called with a package; had "[JavaClass
> database.connectors.jdbc.MsSQLserver]" instead.
> (/report/method[@name="initialize"]#1)
>
> I added .jar file already as an external JAR
> (ProjectProperies->Classpath ). Also I tried sticking it in the
> /WEB-INF/lib folder as well as using the Import Wizard. Same error
> prevails...
>
> What am I doing wrong?
>
> Thank you,
> Andrew
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03821 seconds