Where do I set library.path in BIRT [message #1024133] |
Mon, 25 March 2013 18:10  |
Eclipse User |
|
|
|
Hello,
Could anybody suggest where in BIRT I can specify the -Djava.library.path to have BIRT load the intergrated authentication driver. is it in eclipse.ini file? if so, what would the syntax be: -Djava.library.path = c:\...\ ?
I connect to any database from BIRT RCP's GUI just fine - not a single problem. However when I try to execute SQL statements in the script environment, that is where BIRT does not do integrated authentication.
So far, I have attempted the following:
1) placing the .dll (*_auth.dll) in the eclipse's root folder
2) placing the .dll (*_auth.dll) in the c:\windows\system32
3) placing the .dll (*_auth.dll) in the \jdk1.7\bin
4) specifying the classpath option in the computer's environmental variables
5) adding the -vm argument in the eclipses java's configuration (Window// Preferences// Java// BuildPath// installed JRE// Default VM arguments )
None of these options appear to work. I tried it both with MS-JDBC and JTDS-JDBC drivers. The error behaviour is the same. At best, I was able to get BIRT to pull the data from teh database. However, it would only not throw an error on the first run of the script. If I try to re-run the script, the same (authentication) error persists.
The error that I am getting is listed below:
java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:621)
at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:369)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:183)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ..... blah blah
I will be very thankful if anyone can steer me in the right direction.
Thanks,
[Updated on: Mon, 25 March 2013 18:12] by Moderator
|
|
|
|
Re: Where do I set library.path in BIRT [message #1027922 is a reply to message #1027375] |
Wed, 27 March 2013 11:52   |
Eclipse User |
|
|
|
Jason,
Thanks for your reply. The links were very useful. yesterday I ended up 'starting from scratch', where I removed all of the references and instances to sqljdbc4.jar and sqljdbc_auth.dll.
I went into eclipse.ini and added:
-Djava.library.path=C:/Program Files/Microsoft JDBC Driver 4.0 for SQL Server/sqljdbc_4.0/enu/auth/x64
under the line.
when I re-loaded the eclipse, I am now able to see the proper java.library.path value, see below:
java.awt.printerjob=sun.awt.windows.WPrinterJob
java.class.path=C:\Eclipse_Juno_JEE_64bit\\plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
java.class.version=51.0
java.endorsed.dirs=C:\Program Files\Java\jre7\lib\endorsed
java.ext.dirs=C:\Program Files\Java\jre7\lib\ext;C:\windows\Sun\Java\lib\ext
java.home=C:\Program Files\Java\jre7
java.io.tmpdir=C:\Users\ELOBAC~1\AppData\Local\Temp\
java.library.path=C:/Program Files/Microsoft JDBC Driver 4.0 for SQL Server/sqljdbc_4.0/enu/auth/x64
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.7.0_07-b11
java.specification.name=Java Platform API Specification
java.specification.vendor=Oracle Corporation
java.specification.version=1.7
java.vendor=Oracle Corporation
java.vendor.url=http://java.oracle.com/
java.vendor.url.bug=http://bugreport.sun.com/bugreport/
java.version=1.7.0_07
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Oracle Corporation
java.vm.specification.version=1.7
java.vm.vendor=Oracle Corporation
java.vm.version=23.3-b01
line.separator=
I am now able to connect to a mssql database via the scripting environment ('Script tab'),
Creating Connection String ... jdbc:sqlserver://myDBserver;databaseName=myDB; integratedSecurity=true;
Connecting to a Database ... SUCCESS!!
Creating a Statement Object ... SUCCESS!!
Executing the query ...
select count(distinct UserID) from myTable
2659
END
2659 is the actual (and correct) result returned from the database....
However, this only works once before another error pops up. When I click on the 'REFRESH' button in the 'PREVIEW' window, I get the following error output to a console:
...
Connecting to a Database ...Mar 27, 2013 10:44:40 AM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll cause : Native Library C:\Program Files\Microsoft JDBC Driver 4.0 for SQL Server\sqljdbc_4.0\enu\auth\x64\sqljdbc_auth.dll already loaded in another classloader
How do I overcome this error? This error totally makes sense to me. Since the .dll has been loaded during the first run, the JVM is not going to load the same library twice. I can not figure out how to get passed this error. Is there any way to get BIRT passed this error?
Many thanks!!
[Updated on: Wed, 27 March 2013 11:53] by Moderator
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03138 seconds