It is jaxb jar issue . FYI : http://forums.java.net/jive/message.jspa?messageID=212259 .

-Jim

Jeff Yu wrote:
Hi,

The simple way to verify whether it is the JAXB jar issue, you can put the jaxb-api, jaxb-impl in the $JBoss_HOME/lib/endorsed folder,
and then see if it works or not.
If it is the issue, you might need to refer to the this [1] to see how to configure a scoped classloader in JBoss to resolve classloader stuff.

Hope This Helps.
Jeff

[1] http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

shaminda perera wrote:
Yes, i put the CXF libraries in the war file. and then use maven to deploy a
EAR file which contains the war file.

Does JBoss have a JAXB jar file? if so where can i locate it?

On 10/18/07, Jeff Yu <[EMAIL PROTECTED]> wrote:
Hi,

When I see the "ClassCastException", the "ClassLoader issue" would pop
up in my mind.. ;-), I  stuck with the classloader issues these days.

Can you show how you deploy the cxf libraries? put the required jars in
the war, and then deploy the war to JBoss with scoping classloader? I am guessing it might be conflict with the JAXB jar that JBoss had with the
CXF's.

Thanks
Jeff

shaminda perera wrote:
Hi Jim,
Thanks again,,

updating the spring version to 2.0.6 did the trick..
now that error is not coming...
however,, now i am getting the following error:

11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic
eFromClass
INFO: Creating Service {

http://server.webservice.search.services.company.com}CompanySearchServicefrom
class
com.company.services.search.webservice.server.CompanySearchServiceImpl
11:50:42,876 INFO  [STDOUT] 11:50:42,876
INFO  [DefaultListableBeanFactory]
Destroying singletons in org.springframework
[EMAIL PROTECTED]: defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
g.BindingFactoryManager,
org.apache.cxf.transport.DestinationFactoryManager,
org.apache.cxf.transport.ConduitInitiatorMana
ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,org.apac
he.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleMa
nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,
org.apache.cxf.catalog.OASISCatalogManager,org.ap
ache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.cu
stomEditorConfigurer,
org.apache.cxf.transport.servlet.ServletTransportFactory
,ricallTrackSearch];
root of factory hierar
chy
11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean
with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is java.lang.ClassCastException:
com.company.services.search.webservice.server.Mai
nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
com.sun.xml.bind.v2.runtime.reflect.Accessor
Caused by:
java.lang.ClassCastException:

com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc
annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
        at

com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate
(OptimizedAccessorFactory.java:15
1)
        at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:143)
        at
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
Accessor.java:204)
        at
com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty
.<init>(SingleElementLeafProperty.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java
:513)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(
PropertyFactory.java:88)

I think this is something to do with a library/jar issue, since when i
publish this same web service to Jetty HTTP server using
Endpoint.publish()
, it is working fine. I mean i was also able to access the WSDL using
the
URL.

Please help.

On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:

Jim, yes I have those files in the classpath. I mean they are inside

the

spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
classpath.



These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd  is
also packaged into this jar file. Can you
confirm this jar file on your classpath ?

CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring
version
to 2.0.6.

-Jim




Reply via email to