[ https://issues.apache.org/jira/browse/CXF-2085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680429#action_12680429 ]
Sergey Beryozkin commented on CXF-2085: --------------------------------------- Hi - my problem is to make sure things work well for a user :-) Would you agree that by doing Thread.currentThread().getContextClassLoader() a user code actually becomes more aware of how things work under the hood ? IMHO, User.class.getClassLoader() is more neutral and is likely to work better, especially given that you do expect the loader of User class (which is the same loader which loaded Hello/Bye service class) be equal to Thread.currentThread().getContextClassLoader(). Dan, others - any comments ? I've not seen JAXWSInvoker setting a Thread.currentThread().getContextClassLoader() to that of the class to be invoked... > 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 > 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.