cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martijn Brinkers <martijn.l...@gmail.com>
Subject Re: JAXBException class is not known to this context in combination with Jetty
Date Fri, 05 Sep 2008 07:11:06 GMT
suggestion 1 did it!

You saved my day :)

Thank you very much

Martijn

On Fri, 2008-09-05 at 03:01 -0400, Daniel Kulp wrote:
> Hmm... not really sure.   Bizzarre.   Interesting that it's at read time.   
> 
> Couple suggestions:
> 1) Make sure you have an asm jar on the classpath.   It looks like you don't.
> 
> 2) Add an @XmlSeeAlso annotation to the interface that points to the AdminDTO 
> class.
> 
> I have a feeling #1 will fix it though.
> 
> Dan
> 
> 
> On Thursday 04 September 2008 12:56:29 pm Martijn Brinkers wrote:
> > Same problem with 2.1.2
> >
> > Stacktrace (a bit long)
> >
> > org.apache.cxf.interceptor.Fault: Unmarshalling Error:
> > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> >         at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:5
> >59) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:4
> >65) at
> > org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:105)
> >         at
> > org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInte
> >rceptor.java:235) at
> > org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteral
> >InInterceptor.java:120) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> >n.java:220) at
> > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
> >         at org.apache.cxf.transport.http.HTTPConduit
> > $WrappedOutputStream.handleResponse(HTTPConduit.java:2029)
> >         at org.apache.cxf.transport.http.HTTPConduit
> > $WrappedOutputStream.close(HTTPConduit.java:1865)
> >         at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >         at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:593)
> >         at org.apache.cxf.interceptor.MessageSenderInterceptor
> > $MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java
> >:62) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> >n.java:220) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
> >         at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
> >         at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >         at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
> >         at $Proxy58.getAdmin(Unknown Source)
> >         at $LoginWS_11c2e49dd2b.getAdmin($LoginWS_11c2e49dd2b.java)
> >         at
> > mitm.mimesecure.web.common.security.UserDetailsServiceImpl.loadUserByUserna
> >me(UserDetailsServiceImpl.java:78) at
> > org.springframework.security.providers.dao.DaoAuthenticationProvider.retrie
> >veUser(DaoAuthenticationProvider.java:83) at
> > org.springframework.security.providers.dao.AbstractUserDetailsAuthenticatio
> >nProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:121)
> > at
> > org.springframework.security.providers.ProviderManager.doAuthentication(Pro
> >viderManager.java:195) at
> > org.springframework.security.AbstractAuthenticationManager.authenticate(Abs
> >tractAuthenticationManager.java:46) at
> > org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attem
> >ptAuthentication(AuthenticationProcessingFilter.java:82) at
> > org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(Abstr
> >actProcessingFilter.java:252) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilt
> >er.java:89) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.context.HttpSessionContextIntegrationFilter.do
> >FilterHttp(HttpSessionContextIntegrationFilter.java:235) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProx
> >y.java:174) at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegat
> >ingFilterProxy.java:183) at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFil
> >terProxy.java:138) at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> >         at
> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> >         at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >         at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> >         at
> > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> >         at
> > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol
> >lection.java:206) at
> > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:1
> >14) at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> >         at org.mortbay.jetty.Server.handle(Server.java:324)
> >         at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> >         at org.mortbay.jetty.HttpConnection
> > $RequestHandler.content(HttpConnection.java:842)
> >         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
> >         at
> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >         at
> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> >         at
> > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395
> >) at org.mortbay.thread.BoundedThreadPool
> > $PoolThread.run(BoundedThreadPool.java:450)
> > Caused by: javax.xml.bind.JAXBException:
> > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> >         at
> > com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.jav
> >a:587) at
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getBeanInfo(Unmar
> >shallerImpl.java:527) at
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmarsh
> >allerImpl.java:337) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:5
> >37) ... 53 more
> > [04 Sep 2008 16:55:12 btpool0-2] ERROR Error getting admin.
> > (mitm.mimesecure.web.common.security.UserDetailsServiceImpl)
> > javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error:
> > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> >         at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:199)
> >         at $Proxy58.getAdmin(Unknown Source)
> >         at $LoginWS_11c2e49dd2b.getAdmin($LoginWS_11c2e49dd2b.java)
> >         at
> > mitm.mimesecure.web.common.security.UserDetailsServiceImpl.loadUserByUserna
> >me(UserDetailsServiceImpl.java:78) at
> > org.springframework.security.providers.dao.DaoAuthenticationProvider.retrie
> >veUser(DaoAuthenticationProvider.java:83) at
> > org.springframework.security.providers.dao.AbstractUserDetailsAuthenticatio
> >nProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:121)
> > at
> > org.springframework.security.providers.ProviderManager.doAuthentication(Pro
> >viderManager.java:195) at
> > org.springframework.security.AbstractAuthenticationManager.authenticate(Abs
> >tractAuthenticationManager.java:46) at
> > org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attem
> >ptAuthentication(AuthenticationProcessingFilter.java:82) at
> > org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(Abstr
> >actProcessingFilter.java:252) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilt
> >er.java:89) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.context.HttpSessionContextIntegrationFilter.do
> >FilterHttp(HttpSessionContextIntegrationFilter.java:235) at
> > org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurit
> >yFilter.java:53) at org.springframework.security.util.FilterChainProxy
> > $VirtualFilterChain.doFilter(FilterChainProxy.java:371)
> >         at
> > org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProx
> >y.java:174) at
> > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(Delegat
> >ingFilterProxy.java:183) at
> > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFil
> >terProxy.java:138) at org.mortbay.jetty.servlet.ServletHandler
> > $CachedChain.doFilter(ServletHandler.java:1084)
> >         at
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> >         at
> > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> >         at
> > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> >         at
> > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> >         at
> > org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> >         at
> > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCol
> >lection.java:206) at
> > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:1
> >14) at
> > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> >         at org.mortbay.jetty.Server.handle(Server.java:324)
> >         at
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> >         at org.mortbay.jetty.HttpConnection
> > $RequestHandler.content(HttpConnection.java:842)
> >         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
> >         at
> > org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> >         at
> > org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> >         at
> > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395
> >) at org.mortbay.thread.BoundedThreadPool
> > $PoolThread.run(BoundedThreadPool.java:450)
> > Caused by: org.apache.cxf.interceptor.Fault: Unmarshalling Error:
> > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> >         at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:5
> >59) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:4
> >65) at
> > org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:105)
> >         at
> > org.apache.cxf.interceptor.DocLiteralInInterceptor.getPara(DocLiteralInInte
> >rceptor.java:235) at
> > org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteral
> >InInterceptor.java:120) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> >n.java:220) at
> > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:449)
> >         at org.apache.cxf.transport.http.HTTPConduit
> > $WrappedOutputStream.handleResponse(HTTPConduit.java:2029)
> >         at org.apache.cxf.transport.http.HTTPConduit
> > $WrappedOutputStream.close(HTTPConduit.java:1865)
> >         at
> > org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >         at
> > org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:593)
> >         at org.apache.cxf.interceptor.MessageSenderInterceptor
> > $MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java
> >:62) at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> >n.java:220) at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:296)
> >         at
> > org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:242)
> >         at
> > org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >         at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:178)
> >         ... 37 more
> > Caused by: javax.xml.bind.JAXBException:
> > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> >         at
> > com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.jav
> >a:587) at
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.getBeanInfo(Unmar
> >shallerImpl.java:527) at
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmarsh
> >allerImpl.java:337) at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:5
> >37) ... 53 more
> >
> > On Thu, 2008-09-04 at 12:41 -0400, Daniel Kulp wrote:
> > > Can you try with 2.1.2?   There was a class caching issue in 2.1 that the
> > > Geronimo folks found where the classes were being used from the wrong
> > > classloaders.
> > >
> > > Dan
> > >
> > > On Thursday 04 September 2008 9:58:15 am Martijn Brinkers wrote:
> > > > I get the follwoing exception when I deploy my web application in Jetty
> > > > (6.1.11) and start a soap request (my web app acts as a soap client)
> > > >
> > > > Caused by: javax.xml.bind.JAXBException:
> > > > mitm.application.mimesecure.ws.AdminDTO is not known to this context
> > > >
> > > > The strange thing is that my application works when deployed from
> > > > Eclipse using run-jetty-run (an Eclipse Jetty plugin). I have tried all
> > > > kinds of things but still no luck and I ran out of ideas.
> > > >
> > > > Any idea what's causing this? it must be some kind of classloading
> > > > problem?
> > > >
> > > > Thanks,
> > > >
> > > > Martijn Brinkers
> > > >
> > > > PS. I use CXF 2.1
> 
> 
> 


Mime
View raw message