cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grange, John" <john.gra...@bluefinger.com>
Subject jndi datasource lookup from cocoon 2.0.4 on weblogic 7
Date Wed, 06 Aug 2003 08:00:34 GMT
I am trying to get the j2ee jndi datasource lookup working under weblogic 7,
without success.  My xsp page fails with a null pointer exception in
EsqlQuery.java:99 and produces a malformed xml document (no closing tags)

Has anybody else had this problem - if so, how have they resolved it?  If
this is not the correct list to report this to, can you please let me know
where to report it.

It appears (looking in the excalibur code) that java:comp/env is prepended
to the jndi name when performing a lookup, this is not required under
weblogic, and as such fails if it is included.

The following code DOES NOT work under WebLogic
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/jdbc/"+"myDataSourceName");

The following code DOES work under WebLogic
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("myDataSourceName");

My setup configuration is as follows:

cocoon.xconf:
	<datasources>
		<j2ee name="reportDataSource">
			<dbname>jdbc/reportsDS</dbname>
		</j2ee>
	</datasources>

web.xml:
	<resource-ref>
       <res-ref-name>jdbc/reportsDS</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>


weblogic.xml:
<weblogic-web-app>
	<description>
		Cocoon App
	</description>
	<reference-descriptor>
		<resource-description>
			<res-ref-name>jdbc/reportsDS</res-ref-name>
	
<jndi-name>com.lv.jdbc.oracle.ReportsTxDataSource</jndi-name>
		</resource-description>
	</reference-descriptor>
</weblogic-web-app>



John Grange 
Software Team Leader 
Tel: +44 (0) 1749 834922 
Email: john.grange@bluefinger.com 

BlueFinger Limited 
Underwood Business Park, Wookey Hole Road, Wells, Somerset, BA5 1AF, UK 
Tel: +44 (0) 1749 834900
Fax: +44 (0) 1749 834902 
Mobile: +44 (0) 7876 038058 
web: www.bluefinger.com 

Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple Quay,
BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee only. If
you are not the intended recipient, please notify us immediately. You should
not use, disclose, distribute or copy this communication if received in
error. No binding contract will result from this e-mail until such time as a
written document is signed on behalf of the company. BlueFinger Limited
cannot accept responsibility for the completeness or accuracy of this
message as it has been transmitted over public networks.***

Mime
View raw message