|
|
|
|
|
|
|
|
|
|
|
|
Re: annot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile [message #639716 is a reply to message #636240] |
Wed, 17 November 2010 10:15   |
Eclipse User |
|
|
|
Hello, I'm back!
I tried the solutions proposed by Linda in the page
http://www.eclipse.org/forums/index.php?t=msg&goto=36893 9& .
Expecially I think this one fits best in my case:
Quote: | 1) The JavaScript expression can refer to any BIRT config[] variable. For example,
config[ "birt.viewer.working.path" ] + "../../data/myProfiles.dat"
|
So in "Edit Data Source", in "Property Binding", as "JDBC Driver JAR List" I put config[ "birt.viewer.working.path" ] + "jt400.jar" .
Debugging config["birt.viewer.working.path"], I saw that, working in the Eclipse designer, its " C:\Users\xxx\workspace-eclipse\.metadata\.plugins\org.eclips e.birt.report.viewer ". I put my jt400.jar there.
Unfortunately I had to specify a JAR List path for my driver. So In the same window, in "JDBC Driver and Connection Details" I clicked in the triangle button; in the new window in the "JAR List" tab I added the entry "C:/temp/jt400.jar". I placed another copy of my jar in that folder, hoping not to use it.
I saved. Ran preview and worked, ran the report in birt-viewer and worked. But if I remove jt400.jar from "C:/temp" it doesn't work. It seems it doesn't care of our config[ "birt.viewer.working.path" ] + "jt400.jar" I tried adding a slash/backslash before "jt400.jar" or putting it in a nested folder... nothing.
I hope you can help me. Thanks!
|
|
|
Re: annot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile [message #639773 is a reply to message #639716] |
Wed, 17 November 2010 12:42   |
Eclipse User |
|
|
|
In the expression for the property binding could you add something like:
importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/checkpath.txt", true ) );
out.println( config[ "birt.viewer.working.path" ] + "jt400.jar");
out.close();
add this to the top of the expression. Expressions always return the
last line. You may also want to try setting the value in the beforeOpen
script of the datasource.
var rp = config[ "birt.viewer.working.path" ]+ "/jt400.jar";
this.setExtensionProperty("jarList",rp);
Jason
On 11/17/2010 10:15 AM, bluish wrote:
> Hello, I'm back!
> I tried the solutions proposed by Linda in the page
> http://www.eclipse.org/forums/index.php?t=msg&goto=36893 9& .
> Expecially I think this one fits best in my case:
> Quote:
>> 1) The JavaScript expression can refer to any BIRT config[] variable.
>> For example, config[ "birt.viewer.working.path" ] +
>> "../../data/myProfiles.dat"
>
>
> So in "Edit Data Source", in "Property Binding", as "JDBC Driver JAR
> List" I put config[ "birt.viewer.working.path" ] + "jt400.jar".
> Debugging config["birt.viewer.working.path"], I saw that, working in the
> Eclipse designer, its "
> C:\Users\xxx\workspace-eclipse\.metadata\.plugins\org.eclips
> e.birt.report.viewer ". I put my jt400.jar there.
>
> Unfortunately I had to specify a JAR List path for my driver. So In the
> same window, in "JDBC Driver and Connection Details" I clicked in the
> triangle button; in the new window in the "JAR List" tab I added the
> entry "C:/temp/jt400.jar". I placed another copy of my jar in that
> folder, hoping not to use it.
>
> I saved. Ran preview and worked, ran the report in birt-viewer and
> worked. But if I remove jt400.jar from "C:/temp" it doesn't work. It
> seems it doesn't care of our config[ "birt.viewer.working.path" ] +
> "jt400.jar" I tried adding a slash/backslash before "jt400.jar" or
> putting it in a nested folder... nothing.
>
> I hope you can help me. Thanks!
|
|
|
|
|
Re: annot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.dbprofile [message #639975 is a reply to message #639892] |
Thu, 18 November 2010 10:02  |
Eclipse User |
|
|
|
Thanks for posting the solution.
Jason
On 11/18/2010 5:00 AM, bluish wrote:
> I'm happy to tell you I found the solution!
>
> My way of creating a data source was using "JDBC Database Connection for
> Query Builder". In this way I must specify a location for the jar
> containing the driver.
>
> Instead if I use the way "JDBC Data Source" I only have to indicate the
> driver class, that is "com.ibm.as400.access.AS400JDBCDriver" in my case.
>
> The other step (maybe it comes first) is putting jt400.jar in
> C:\Program Files
> (x86)\eclipse-reporting-helios-SR1-win32-x86_64\eclipse\plug ins\org.eclipse.birt.report.data.oda.jdbc_2.6.1.v20100909\dr iversfor
> the Eclipse birt-viewer plugin
>
> and into
> C:\Program Files\Apache Software Foundation\Tomcat
> 7.0\webapps\birt-viewer\WEB-INF\libfor the birt-viewer web application.
>
> These 2 environments search in these places for DB drivers, this is what
> seems to happen.
>
> I'm so happy I found the solution. I hope this could help someone else.
> Thanks to everyone!
|
|
|
Powered by
FUDForum. Page generated in 0.05040 seconds