Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Where do I set library.path in BIRT(can not get BIRT to do integrated authentication)
Where do I set library.path in BIRT [message #1024133] Mon, 25 March 2013 22:10 Go to next message
andrew smith is currently offline andrew smithFriend
Messages: 43
Registered: February 2012
Member
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 22:12]

Report message to a moderator

Re: Where do I set library.path in BIRT [message #1027375 is a reply to message #1024133] Tue, 26 March 2013 22:49 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you looked at:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=297956 and
http://stackoverflow.com/questions/4219968/java-sql-sqlexception-i-o-error-sso-failed-native-sspi-library
Re: Where do I set library.path in BIRT [message #1027922 is a reply to message #1027375] Wed, 27 March 2013 15:52 Go to previous messageGo to next message
andrew smith is currently offline andrew smithFriend
Messages: 43
Registered: February 2012
Member
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
-vmargs
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 15:53]

Report message to a moderator

Re: Where do I set library.path in BIRT [message #1029770 is a reply to message #1027922] Sat, 30 March 2013 05:21 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Andrew

As a test could you move both the jar and the dll. Move the jar to your java_home/jre/lib directory and the dll to your java_home/jre/bin directory?

Re: Where do I set library.path in BIRT [message #1031411 is a reply to message #1029770] Mon, 01 April 2013 18:05 Go to previous messageGo to next message
andrew smith is currently offline andrew smithFriend
Messages: 43
Registered: February 2012
Member
Hi, Jason:

I hope you had a great holiday weekend!

I placed those two files into the suggested folders and unfortunately the bahaviour is the same:
Connecting to a Database ...Apr 01, 2013 12:54:27 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll cause : Native Library C:\Program Files\Java\jre7\bin\sqljdbc_auth.dll already loaded in another classloader


The only difference now is that the path to the .dll is now different.

Thanks,

Re: Where do I set library.path in BIRT [message #1032172 is a reply to message #1031411] Tue, 02 April 2013 16:55 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

And you're using the jTDS driver vs sqljdbc4 one? I had worked with someone with this same issue before that switching to the jTDS driver solved it.

Michael

Developer Evangelist, Silanis
Re: Where do I set library.path in BIRT [message #1032353 is a reply to message #1032172] Tue, 02 April 2013 22:46 Go to previous messageGo to next message
andrew smith is currently offline andrew smithFriend
Messages: 43
Registered: February 2012
Member
Michael,

Actually, both drivers are producing the same error. It's not the drivers that are producing this error. I think it is how eclipse/BIRT is loading .dlls into the JVM. Please see the discussion above.

Thanks,
Re: Where do I set library.path in BIRT [message #1033724 is a reply to message #1032353] Thu, 04 April 2013 15:07 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

My mistake. I skimmed right over the line about you trying both drivers. I've not seen another solution to this, other than the ones given. If I find anything, I'll post it in here.

Michael

Developer Evangelist, Silanis
Re: Where do I set library.path in BIRT [message #1036782 is a reply to message #1033724] Mon, 08 April 2013 20:13 Go to previous message
andrew smith is currently offline andrew smithFriend
Messages: 43
Registered: February 2012
Member
Thanks, Michael:

I guess the first step would be to find out if this is BIRT or ECLIPSE that generates this type of error. Do you know how I can isolate which environment is causing the problem?

Thanks,
Previous Topic:How to export a birt report to xlsx?
Next Topic:Disable on-click listener in chart via script
Goto Forum:
  


Current Time: Tue Mar 19 04:19:17 GMT 2024

Powered by FUDForum. Page generated in 0.04027 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top