Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » JNDI setting ignored(It seems I cannot use a jndi datasource)
JNDI setting ignored [message #693492] Wed, 06 July 2011 15:07 Go to next message
Cyril Rognon is currently offline 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 #694039 is a reply to message #693492] Thu, 07 July 2011 17:05 Go to previous messageGo to next message
Rob  is currently offline Rob
Messages: 12
Registered: July 2009
Junior Member
I am not a "power user", but this is what we set our odaJndiName when running BIRT under WebSphere:

java:comp/env/jdbc/xxx

xxx is the JNDI Name configured in WebSphere.

It's been a long time since I looked at this, but I thought the string was Application Server dependent (but I've been wrong before!).

Good luck

RobR
Re: JNDI setting ignored [message #694042 is a reply to message #694039] Thu, 07 July 2011 17:12 Go to previous messageGo to next message
Cyril Rognon is currently offline Cyril Rognon
Messages: 24
Registered: July 2010
Junior Member
hello Rob

thank you for the answer

you are right it is

java:comp/env/jdbc/xxx already.

the urljndi I was referring to is valued this way. Still no jndi connection used.
Can you provide the datasource definition you are using ?

Anyone else have some idea ?

Regards
Cyril
Re: JNDI setting ignored [message #694050 is a reply to message #694042] Thu, 07 July 2011 17:30 Go to previous messageGo to next message
Rob  is currently offline Rob
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 Go to previous message
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
Previous Topic:Accumulations in CrossTabs 2
Next Topic:"Out of Memory" issue in BIRT 3.6.2
Goto Forum:
  


Current Time: Sat Oct 25 08:53:52 GMT 2014

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

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