cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Atif Khan" <ati...@gmail.com>
Subject Re: Strange error with JAX-WS and JDK 1.5
Date Fri, 21 Dec 2007 01:17:42 GMT
Thanks. Putting jaxws-api.jar in jre/lib/ext did the trick. The problem I
have is that I can not put the jar file production environment in the jre
directory. Also, loading war libs first is out of question. Is there a way
to configure Resin to load the jar from a different directory before the app
server libs?

On Dec 20, 2007 6:14 PM, Willem Jiang <willem.jiang@gmail.com> wrote:

> Hi ,
>
> I think Resin 3.1.3 may ship a earlier version of jaxws-api.jar and CXF
> need to use the jaxws-api.2.0.jar.
> As you know , JDK 1.60_02 ships with jaxws-api.2.0 jar , so Resin's
> jaxws-api jar will get no chance to be loaded.
> But there is no any jaxws-api.jar in JDK 1.5.0_06, and the Resin's
> jaxws-api is loaded.
>
> You just need to endorse the jaxws-api.jar or let the war's lib jars
> load first.
>
> Here are some documents for you [1]
>
> [1]http://cwiki.apache.org/CXF20DOC/appserverguide.html
>
> Willem.
>
> Atif Khan wrote:
> > I have a simple Hello World application that is configured following:
> >
> > HelloWorld.java Interface
> >
> > @WebService
> > public interface HelloWorld
> > {
> >   String sayHello( @WebParam(name="text") String text );
> > }
> >
> > HelloWorldImpl.java
> > @WebService(endpointInterface = "test.jws.HelloWorld")
> > public class HelloWorldImpl
> >   implements HelloWorld
> >
> > and the Spring configuration looks like:
> >
> >   <import resource="classpath:META-INF/cxf/cxf.xml" />
> >   <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >   <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >   <import resource="classpath:META-INF/cxf/cxf-extension-xml.xml" />
> >   <import resource="classpath:META-INF/cxf/cxf-
> extension-http-binding.xml"
> > />
> >   <jaxws:endpoint id="helloWorld" implementor="test.jws.HelloWorldImpl"
> > address="/HelloWorld" />
> >
> >
> > I am bundling this as a WAR and running on Caucho Resin 3.1.3. When I
> start
> > the application server under JDK 1.6.0_02, it works fine and serves
> > requests. The problem occurs while starting the application server under
> JDK
> > 1.5.0_06. I am getting the UnsupportedOperationException when Spring
> tries
> > to initialize the HelloWorldImpl bean. Here is the stack trace:
> >
> > [17:39:45.436] Could not find the configuration file cxf.xml on the
> > classpath.
> > [17:40:23.107] org.springframework.beans.factory.BeanCreationException:
> > Error creating bean with name 'helloWorld': Instantiation of bean
> failed;
> > nested exception is java.lang.ExceptionInInitializerError
> > [17:40:23.107] Caused by: java.lang.ExceptionInInitializerError
> > [17:40:23.107]     at
> > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > [17:40:23.107]     at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(
> > NativeConstructorAccessorImpl.java:39)
> > [17:40:23.107]     at
> > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> > DelegatingConstructorAccessorImpl.java:27)
> > [17:40:23.107]     at java.lang.reflect.Constructor.newInstance(
> > Constructor.java:494)
> > [17:40:23.107]     at
> org.springframework.beans.BeanUtils.instantiateClass(
> > BeanUtils.java:85)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
> > (SimpleInstantiationStrategy.java:87)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor
> > (ConstructorResolver.java:186)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor
> > (AbstractAutowireCapableBeanFactory.java:795)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance
> > (AbstractAutowireCapableBeanFactory.java:713)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
> > (AbstractAutowireCapableBeanFactory.java:386)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
> > AbstractBeanFactory.java:249)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
> > (DefaultSingletonBeanRegistry.java:155)
> > [17:40:23.107]     at
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> > AbstractBeanFactory.java:246)
> > [17:40:23.107]     at
> > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> > AbstractBeanFactory.java:160)
> > [17:40:23.107]     at
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
> > (DefaultListableBeanFactory.java:291)
> > [17:40:23.107]     at
> > org.springframework.context.support.AbstractApplicationContext.refresh(
> > AbstractApplicationContext.java:352)
> > [17:40:23.107]     at
> >
> org.springframework.web.context.ContextLoader.createWebApplicationContext(
> > ContextLoader.java:245)
> > [17:40:23.107]     at
> > org.springframework.web.context.ContextLoader.initWebApplicationContext(
> > ContextLoader.java:188)
> > [17:40:23.107]     at
> > org.springframework.web.context.ContextLoaderListener.contextInitialized
> (
> > ContextLoaderListener.java:49)
> > [17:40:23.107]     at com.caucho.server.webapp.WebApp.start(WebApp.java
> > :1793)
> > [17:40:23.107]     at
> com.caucho.server.deploy.DeployController.startImpl(
> > DeployController.java:646)
> > [17:40:23.107]     at
> > com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(
> > StartAutoRedeployAutoStrategy.java:72)
> > [17:40:23.107]     at
> com.caucho.server.deploy.DeployController.startOnInit(
> > DeployController.java:528)
> > [17:40:23.107]     at com.caucho.server.deploy.DeployContainer.start(
> > DeployContainer.java:163)
> > [17:40:23.107]     at com.caucho.server.webapp.WebAppContainer.start(
> > WebAppContainer.java:675)
> > [17:40:23.107]     at com.caucho.server.host.Host.start(Host.java:437)
> > [17:40:23.107]     at
> com.caucho.server.deploy.DeployController.startImpl(
> > DeployController.java:646)
> > [17:40:23.107]     at
> > com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(
> > StartAutoRedeployAutoStrategy.java:72)
> > [17:40:23.107]     at
> com.caucho.server.deploy.DeployController.startOnInit(
> > DeployController.java:528)
> > [17:40:23.107]     at com.caucho.server.deploy.DeployContainer.start(
> > DeployContainer.java:163)
> > [17:40:23.107]     at com.caucho.server.host.HostContainer.start(
> > HostContainer.java:479)
> > [17:40:23.107]     at com.caucho.server.cluster.Server.start(Server.java
> > :1151)
> > [17:40:23.107]     at com.caucho.server.cluster.Cluster.startServer(
> > Cluster.java:719)
> > [17:40:23.107]     at
> com.caucho.server.cluster.ClusterServer.startServer(
> > ClusterServer.java:455)
> > [17:40:23.107]     at com.caucho.server.resin.Resin.start(Resin.java
> :694)
> > [17:40:23.107]     at com.caucho.server.resin.Resin.initMain(Resin.java
> > :1114)
> > [17:40:23.107]     at com.caucho.server.resin.Resin.main(Resin.java
> :1316)
> > [17:40:23.107] Caused by: java.lang.UnsupportedOperationException
> > [17:40:23.107]     at javax.xml.ws.WebServicePermission.<init>(
> > WebServicePermission.java:40)
> > [17:40:23.107]     at org.apache.cxf.jaxws.EndpointImpl.<clinit>(
> > EndpointImpl.java:60)
> > [17:40:23.107]     ... 37 more
> >
> >
> >
>
>


-- 
Regards
Atif Khan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message