JNDI setting ignored [message #693492] |
Wed, 06 July 2011 15:07 |
Cyril Rognon Messages: 24 Registered: July 2010 |
Junior Member |
|
|
Hello all power users.
I have been fooled by Birt. I thought I had successfully used jndi settings but it is the report that has always been holding sufficient info to use standard jdbc connection.
I am using Birt 3.6.2 and Birt 3.7, either on windows or linux.
I have been trying to set a jndi url for my datasource.
Like anyone else I have been told to set url and some jdbc info and that jndi would be first to be checked on server.
It looks like it is not.
to avoid issues related to connection profiles I have set back to regular org.eclipse.birt.report.data.oda.jdbc connection.
I have set
odaDriverClass
odaURL
odaUser
odaPassword
odaJndiName
the jdbc is used
then I have been trying to clear some other property and found that url cannot be empty and drivermanager cannot parse jndi url, etc.
I also have tried to use java:comp/urljndi or the plain urljndi (which is jdbc/mysource). No luck so far.
I have tried to checkout hte code and to look at DriverManager but it seems that jndi lacks some info to work. Some initial context ? something else ? I cannot tell because the exception is never related to jndi. Only some "The Network Adapter could not establish the connection" or "driver cannot parse"
Could any one point me to a working jndi setup ?
How could I help to make this work, even if it means patching 3.7 code ?
Thanks for any info on that issue.
Regards
Cyril
[Updated on: Wed, 06 July 2011 15:09] Report message to a moderator
|
|
|
|
|
Re: JNDI setting ignored [message #694050 is a reply to message #694042] |
Thu, 07 July 2011 17:30 |
RobR Mising name Messages: 12 Registered: July 2009 |
Junior Member |
|
|
Cyrill:
What Application server are you using? What version?
I think you just need the one property to make use of JNDI, but here is the info in our reports:
<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="XXX_Profile" id="6">
<property name="odaDriverClass">oracle.jdbc.driver.OracleDriver</property>
<property name="odaURL">jdbc:oracle:thin:@My_DB_Server_DNS_Name:MyOracleSID</property>
<property name="odaUser">My_Oracle_user_id</property>
<encrypted-property name="odaPassword">My_password</encrypted-property>
<property name="odaJndiName">java:comp/env/jdbc/xxx</property>
</oda-data-source>
But I will make a slight correction to my previous post:
In WebSphere the value in odaJndiName is a Resource Reference which is then bound to the JNDI Name.
So in the web.xml I have:
<resource-ref id="ResourceRef_1">
<res-ref-name>jdbc/xxx</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
And in the ibm-web-bnd.xmi I have this:
<resRefBindings xmi:id="ResourceRefBinding_2" jndiName="jdbc/prod/xxx">
<bindingResourceRef href="WEB-INF/web.xml#ResourceRef_1"/>
</resRefBindings>
So the actual JNDI name is: jdbc/prod/xxx
Sorry for any confusion this might have caused.
RobR
[Updated on: Thu, 07 July 2011 18:17] Report message to a moderator
|
|
|
Re: JNDI setting ignored [message #694588 is a reply to message #694050] |
Fri, 08 July 2011 22:37 |
Linda Chan Messages: 845 Registered: July 2009 |
Senior Member |
|
|
Cyril,
This seems like a configuration issue. Is the JNDI URL that you are using proven to work, like in other applications?
If you set the BIRT logging level to FINER, it will generate more informative trace logging on the JNDI processing.
If you want to grab the plugin source to debug, that would obviously be the most direct way to see what triggers the exception. Use the debugger to step thru the source in the JndiDataSource#getConnection method.
Linda
|
|
|
Powered by
FUDForum. Page generated in 0.04936 seconds