[ https://issues.apache.org/jira/browse/CXF-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680636#action_12680636 ]
Sergey Beryozkin commented on CXF-2085: --------------------------------------- It's an interesting comment which made me think that equally there could be an application code there depending on whatever xml parser provided by the container environment. That said I've decided to introduce a property, which, if set, will lead to a thread context loader set to that of the resource class loader, name of the property is "org.apache.cxf.serviceloader-context", I could not think of a shorter/better name can be set up like this : <jaxrs:server address="/"> <jaxrs:properties> <entry key="org.apache.cxf.serviceloader-context" value="true"/> </jaxrs:properties> </jaxrs:server> I think it's a reasonable compromise > Applications classloader should be set during method invocations. > ----------------------------------------------------------------- > > Key: CXF-2085 > URL: https://issues.apache.org/jira/browse/CXF-2085 > Project: CXF > Issue Type: Bug > Affects Versions: 2.2 > Reporter: Chaitanya Choleti > Assignee: Sergey Beryozkin > Fix For: 2.2 > > Attachments: cl_test.war, new_cl_test.war, new_sources.zip, > sources.zip > > > Invocation of a JAX-RS method may depend on some application classes which > may not be loaded already, they will be loaded during invocation. But during > invocation the classloader will be CXF war application classloader, this will > lead to NoClassDefFoundErrors. To avoid this root resource class' classloader > should be set on the current thread. > Similar fix should be applied to provider methods such as readFrom, writeTo > etc. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.