You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Mallik Somepalli (Updated) (JIRA)" <ji...@apache.org> on 2011/11/02 23:39:32 UTC

[jira] [Updated] (AXIS2-5175) serviceTCCL = composite breaks InitialContext lookups inside service code

     [ https://issues.apache.org/jira/browse/AXIS2-5175?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mallik Somepalli updated AXIS2-5175:
------------------------------------

    Attachment: HelloWorldTestClient.java
                sayHelloWorldRequest.xml
                context.xml
                Helloworld-Service-1.0-SNAPSHOT-sources.jar
                Helloworld-Service-1.0-SNAPSHOT.aar

1. Install Tomcat 7.0.22
2. Place exploded axis2-1.6.0 war in webapps directory.
3. Place attached context.xml file axis2/META-INF (contains a test data source configuration)
4. Place attached hello world service aar in services folder
5. Run sample request attached using soap ui (java test client attached as well). Request will fail with soap fault.
6. Open up aar archive and remove 
 <parameter name="ServiceTCCL">composite</parameter>
from service configuration.
7. Re run request, request will succeed this time.
                
> serviceTCCL = composite breaks InitialContext lookups inside service code
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-5175
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5175
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.6.0
>         Environment: Tomcat 7.0, axis2 1.6.0, Jdk 1.6.0_29
>            Reporter: Mallik Somepalli
>         Attachments: HelloWorldTestClient.java, Helloworld-Service-1.0-SNAPSHOT-sources.jar, Helloworld-Service-1.0-SNAPSHOT.aar, context.xml, sayHelloWorldRequest.xml
>
>
> Data source is configured in context.xml and a simple look up in service code for the data source returns with 
> "javax.naming.NameNotFoundException: Name java:comp is not bound in this Context"
> On initial glance, this seem to be caused by getParent() method "org.apache.axis2.classloader.MultiParentClassLoader" not returning parent class loader properly. Tomcat keeps track of jndi bindings per class loader/per thread and when serviceTCCL is configured, the bindings are not found context of MultiParentClassLoader or its parent chain (getParent breaks the chain).The java doc on this class says "This getParent method of this class will always return null, which may be interpreted by the calling code to mean that this class loader is a direct child of the system class". 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org