[
https://issues.apache.org/jira/browse/AXIS2-2012?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Davanum Srinivas resolved AXIS2-2012.
-------------------------------------
Resolution: Fixed
Please use the following tip:
http://marc.theaimsgroup.com/?l=axis-user&m=116922275721725&w=2
thanks,
dims
> XMLBeans seems not to be able to access classes within .aar files when run
> within an AXIS2 service.
> ---------------------------------------------------------------------------------------------------
>
> Key: AXIS2-2012
> URL: https://issues.apache.org/jira/browse/AXIS2-2012
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Environment: XMLBeans 2.2.0
> Apache Tomcat 5.5
> Reporter: Severin Ecker
> Priority: Minor
>
> This is s a cross post from XMLBeans!
> Since this problem only occurs when run within an AXIS2 environment/service i
> thought it might be best to let you know this as well, since i can't say for
> sure if there's a problem in AXIS2 and if so where.
> In situations where, at runtime, a compiled schema for an XML element (XML
> type name) is being looked for (this happens e.g. when the
> XmlObject.substitute() operation is invoked) a resource is loaded via
> Classloader.getResourceAsStream() (see SchemaTypeLoaderImpl.java)
> The problem is, that the Classloader of the current thread
> ('Thread.currentThread.getContextClassLoader();) is used instead the
> Classloader of an already loaded class (e.g.:
> classname.class.getClassLoader()).
> This implementation works as long as it is not used within an AXIS2 service.
> In this case all classes and resources are located in an .aar archive. At
> load time this file is in the classpath and the XML-schemas and compiled
> classes are found. But, later when a service operation is invoked, the
> classloader retrieved with 'Thread.currentThread().getContextClassLoader() is
> of type WebappClassLoader instead of
> org.apache.xmlbeans.impl.schema.SchemaTypeLoaderImpl. And this
> WebappClassLoader does NOT look within the .aar file for the schema,
> therefore substitude does not have the correct types available at runtime.
> Oh and, there is also no error message in this case stating that a class
> couldn't be found/loaded!
> Our workaround to this problem ATM is, setting the thread's
> contextClassLoader to be the class loader of a class contained in our web
> application, first thing each time an operation of our webservice is invoked.
> But a fix to this problem would of course be highly appreciated!
> ps.: I will also cross post this bugreport in XMLBeans.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]