Seems the axis2 class loader caused the missing context problem. The class 
loader probably returns a copy of a class already loaded
by the tomcats WebAppClassloader. We put the WebAppClassloader into TCCL and it 
worked.
 
Does axis2 create multiple copies of a loaded class? I heard tomcat uses 
classes from servlet-api to store java:comp/env objects.
Is there any way to disable this feature? Any more ideas?

________________________________

Von: Breuer, Markus
Gesendet: Di 08.11.2011 10:11
An: java-user@axis.apache.org
Betreff: Axis2 JNDI java:comp/env not resolved



After migrating from axis2 1.4.x to axis2 1.5.1 the jndi lookup fails. The data 
sources are configured with CATALINA_HOME/conf/context.xml and run with axis2 
1.4.x. Now, with axis2 1.5.1 (also tried 1.5.6) the jndi lookup fails:

Name java:comp is not bound in this Context

 

CATALINA_HOME/conf/context.xml:

...

<Resource name="jdbc/MyDB" auth="Container"

          type="javax.sql.DataSource" 

          driverClassName="oracle.jdbc.OracleDriver"

          ...

> 

 

We are using this jndi url: java:comp/env/jdbc/MyDB

 

The access path is tomcat->axis2->axis2-service->spring->hibernate, but also 
tomcat->axis2->axis2-service fails using direct jndi lookup:

 

InitialContext ic = new ...;

ic.lookup("java:comp/env/jdbc/MyDB"); // fails

ic.lookup("java:comp/env"); // fails

ic.lookup("java:comp"); // fails

 

Very curious: it seems to be a windows problem only. Running the same 
tomcat-/axis installation under unix has no problem. (directly copied system 
from unix).

 

Setting parameter ServiceTCCL to composite (axis2.xml) has no effect.

 

Any idea what's wrong?

 

Regards,

markus

 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to