You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Krystian Lider <kr...@gryfsoft.pl> on 2007/06/04 17:51:24 UTC

buildServiceFromWSDL - long processing

Hi

In my WAR file I have Spring configuration file which defines collection 
(about 10) of endpoints (<jaxws:endpoint>).
In every endpoint there is wsdlLocation attribute which defines path to 
WSDL file.
Unfortunately it takes about 3 minutes to publish all my services.
I suppose that the same wsdl file (which is quite complex) is parsed as 
many times as number of endpoints.

Is there any option to make this process faster, eg. if every time it is 
the same file?
Thanks

-- 
Best Regards,
Krystian Lider



Re: buildServiceFromWSDL - long processing

Posted by Jim Ma <em...@iona.com>.
Hi Krystian,

I think CXF does not parse the same wsdl file for several times.  The 
WSDLManager will cache the wsdl definition with same URL.
(see 
http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceFactory.java 
around line 82)
But we do not cache the serviceInfos built by same definition. It will 
build the same service model for several times. It need to enhance. 
Thank you
for reporting this.

Cheers
Jim.

Krystian Lider wrote:
> Hi Willem
>
> Thank you for the replay.
> Please see my comments below.
>
>
> On 6/5/2007 8:42 AM,User Willem Jiang wrote:
>
>> Hi Krystian,
>>
>> Is there only one wsdl that contains all the endpoints information.
>
> In that specific situation yes
>
>>
>> CXF did not cache the wsdl information for the endpoints , it will 
>> build all service model from the wsdl and then look up a right 
>> definition for the publishing endpoint each time.
>
> Don’t you think that it would be a good idea to cache the wsdl 
> information, to avoid parsing the same file several times?
>
>> So it takes 10 times time to reparse the quite complex wsdl .
>> I think you can broke down you wsdl for each endpoint ,
>
> It could be a solution but there are reasons why I don’t want to do that
>
>> or you can try the build service from class you just do not specify 
>> the wsdlLocation attribute to walk around that.
>
>
> I tried that.
> When I removed wsdlLocation attribute from the configuration file, 
> then information about localization of the wsdl files was taken from 
> implementor class and again service was build from wsdl.
> After removing from annotation buildServiceFromClass was started.
> Unfortunately I got following exception and creating of service was 
> failed.
>
>
> NFO: Could not find the configuration file cxf.xml on the classpath.
> 2007-06-05 10:13:17 org.apache.cxf.configuration.spring.ConfigurerImpl 
> getBeanName
> INFO: Could not determine bean name for instance of class 
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.
> 2007-06-05 10:13:17 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
> buildServiceFromClass
> INFO: Creating Service <here name of the service> from class
> <here class name>
> 2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
> WARNING: failed cxf
> javax.servlet.ServletException: Error creating bean with name 
> '<here_bean_id>': Invocation of init method failed; nested exception 
> is java.lang.IllegalArgumentException: An operation with name [<here 
> name of the operation>] already exists in this service
> at 
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:437) 
>
> at 
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617) 
>
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
>
> at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:210)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>
> ……
>
> 2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
> SEVERE: Nested in javax.servlet.ServletException: Error creating bean 
> with name '<here bean id>': Invocation of init method failed; nested 
> exception is java.lang.IllegalArgumentException: An operation with 
> name [<here nam of the opartion>] already exists in this service:
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name '<here bean id>': Invocation of init method 
> failed; nested exception is java.lang.IllegalArgumentException: An 
> operation with name [<here operation id>] already exists in this service
> Caused by: java.lang.IllegalArgumentException: An operation with name 
> [<here operation id>] already exists in this service
> at 
> org.apache.cxf.service.model.InterfaceInfo.addOperation(InterfaceInfo.java:71) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:346) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:338) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:217) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:246) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:135) 
>
> at 
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82) 
>
> at 
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84) 
>
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:280)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:178)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:361)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) 
>
> at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) 
>
> at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279) 
>
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360) 
>
> at 
> org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:186) 
>
> at 
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:156) 
>
> at org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java:95)
> at 
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) 
>
> at 
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617) 
>
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
>
> at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:210)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>
>
>
>
> I will try to send more information about that problem when I look 
> into cxf sources and try to investigate the problem.
>
>>
>> And for CXF, we need to find a way to cache the built up service 
>> model for the endpoint somewhere.
>>
>>
>> Cheers,
>> Willem.
>
>
>

Re: buildServiceFromWSDL - long processing

Posted by Willem Jiang <ni...@iona.com>.
Hi  Krystian,

Comments in the mail.

Krystian Lider wrote:
> Hi Willem
>
> Thank you for the replay.
> Please see my comments below.
>
>
> On 6/5/2007 8:42 AM,User Willem Jiang wrote:
>
>> Hi Krystian,
>>
>> Is there only one wsdl that contains all the endpoints information.
>
> In that specific situation yes
>
>>
>> CXF did not cache the wsdl information for the endpoints , it will 
>> build all service model from the wsdl and then look up a right 
>> definition for the publishing endpoint each time.
>
> Don’t you think that it would be a good idea to cache the wsdl 
> information, to avoid parsing the same file several times?
>
Yes, we should add the wsdl cache for building service from wsdl. 
Current we have a WSDLManager can cache the wsdl definition, but I did 
not find the code that use it,  I had fill a JIRA for it.

Please monitor this issue.  https://issues.apache.org/jira/browse/CXF-699
>> So it takes 10 times time to reparse the quite complex wsdl .
>> I think you can broke down you wsdl for each endpoint ,
>
> It could be a solution but there are reasons why I don’t want to do that
>
>> or you can try the build service from class you just do not specify 
>> the wsdlLocation attribute to walk around that.
>
>
> I tried that.
> When I removed wsdlLocation attribute from the configuration file, 
> then information about localization of the wsdl files was taken from 
> implementor class and again service was build from wsdl.
> After removing from annotation buildServiceFromClass was started.
> Unfortunately I got following exception and creating of service was 
> failed.
>
>
> NFO: Could not find the configuration file cxf.xml on the classpath.
> 2007-06-05 10:13:17 org.apache.cxf.configuration.spring.ConfigurerImpl 
> getBeanName
> INFO: Could not determine bean name for instance of class 
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.
> 2007-06-05 10:13:17 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
> buildServiceFromClass
> INFO: Creating Service <here name of the service> from class
> <here class name>
> 2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
> WARNING: failed cxf
> javax.servlet.ServletException: Error creating bean with name 
> '<here_bean_id>': Invocation of init method failed; nested exception 
> is java.lang.IllegalArgumentException: An operation with name [<here 
> name of the operation>] already exists in this service
> at 
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:437) 
>
> at 
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617) 
>
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
>
> at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:210)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>
> ……
>
> 2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
> SEVERE: Nested in javax.servlet.ServletException: Error creating bean 
> with name '<here bean id>': Invocation of init method failed; nested 
> exception is java.lang.IllegalArgumentException: An operation with 
> name [<here nam of the opartion>] already exists in this service:
> org.springframework.beans.factory.BeanCreationException: Error 
> creating bean with name '<here bean id>': Invocation of init method 
> failed; nested exception is java.lang.IllegalArgumentException: An 
> operation with name [<here operation id>] already exists in this service
> Caused by: java.lang.IllegalArgumentException: An operation with name 
> [<here operation id>] already exists in this service
> at 
> org.apache.cxf.service.model.InterfaceInfo.addOperation(InterfaceInfo.java:71) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:346) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:338) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:217) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:246) 
>
> at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:135) 
>
> at 
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82) 
>
> at 
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84) 
>
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:280)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:178)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:361)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
>
> at java.lang.reflect.Method.invoke(Method.java:597)
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145) 
>
> at 
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251) 
>
> at 
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248) 
>
> at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160) 
>
> at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279) 
>
> at 
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360) 
>
> at 
> org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:186) 
>
> at 
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:156) 
>
> at org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java:95)
> at 
> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) 
>
> at 
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617) 
>
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) 
>
> at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) 
>
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at 
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:210)
> at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>
>
>
>
> I will try to send more information about that problem when I look 
> into cxf sources and try to investigate the problem.

It look some name conflicts of the operation names when build up the 
service model from class.
Can you send your jaxws:endpoints xml to list or just check the 
<jaxws:endpoint id="***" ?

BTW
You can write a simple standalone server just like the samples hello 
world does. It could be much easy for you debug. 
>
>>
>> And for CXF, we need to find a way to cache the built up service 
>> model for the endpoint somewhere.
>>
>>
>> Cheers,
>> Willem.
>
>
>


Re: buildServiceFromWSDL - long processing

Posted by Krystian Lider <kr...@gryfsoft.pl>.
Hi Willem

Thank you for the replay.
Please see my comments below.


On 6/5/2007 8:42 AM,User Willem Jiang wrote:

> Hi Krystian,
>
> Is there only one wsdl that contains all the endpoints information.

In that specific situation yes

>
> CXF did not cache the wsdl information for the endpoints , it will 
> build all service model from the wsdl and then look up a right 
> definition for the publishing endpoint each time.

Don’t you think that it would be a good idea to cache the wsdl 
information, to avoid parsing the same file several times?

> So it takes 10 times time to reparse the quite complex wsdl .
> I think you can broke down you wsdl for each endpoint ,

It could be a solution but there are reasons why I don’t want to do that

> or you can try the build service from class you just do not specify 
> the wsdlLocation attribute to walk around that.


I tried that.
When I removed wsdlLocation attribute from the configuration file, then 
information about localization of the wsdl files was taken from 
implementor class and again service was build from wsdl.
After removing from annotation buildServiceFromClass was started.
Unfortunately I got following exception and creating of service was failed.


NFO: Could not find the configuration file cxf.xml on the classpath.
2007-06-05 10:13:17 org.apache.cxf.configuration.spring.ConfigurerImpl 
getBeanName
INFO: Could not determine bean name for instance of class 
org.apache.cxf.jaxws.JaxWsServerFactoryBean.
2007-06-05 10:13:17 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
buildServiceFromClass
INFO: Creating Service <here name of the service> from class
<here class name>
2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
WARNING: failed cxf
javax.servlet.ServletException: Error creating bean with name 
'<here_bean_id>': Invocation of init method failed; nested exception is 
java.lang.IllegalArgumentException: An operation with name [<here name 
of the operation>] already exists in this service
at 
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:437)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)

……

2007-06-05 10:13:18 sun.reflect.NativeMethodAccessorImpl invoke0
SEVERE: Nested in javax.servlet.ServletException: Error creating bean 
with name '<here bean id>': Invocation of init method failed; nested 
exception is java.lang.IllegalArgumentException: An operation with name 
[<here nam of the opartion>] already exists in this service:
org.springframework.beans.factory.BeanCreationException: Error creating 
bean with name '<here bean id>': Invocation of init method failed; 
nested exception is java.lang.IllegalArgumentException: An operation 
with name [<here operation id>] already exists in this service
Caused by: java.lang.IllegalArgumentException: An operation with name 
[<here operation id>] already exists in this service
at 
org.apache.cxf.service.model.InterfaceInfo.addOperation(InterfaceInfo.java:71)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:346)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:338)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:217)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:246)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:135)
at 
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:82)
at 
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:84)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:280)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:178)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:361)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1214)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1179)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145)
at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:279)
at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)
at 
org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:186)
at 
org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:156)
at org.apache.cxf.transport.servlet.CXFServlet.init(CXFServlet.java:95)
at 
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:617)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
at 
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at 
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at 
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.jetty.Server.doStart(Server.java:210)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)




I will try to send more information about that problem when I look into 
cxf sources and try to investigate the problem.

>
> And for CXF, we need to find a way to cache the built up service model 
> for the endpoint somewhere.
>
>
> Cheers,
> Willem.



-- 
Best Regards,
Krystian Lider



Re: buildServiceFromWSDL - long processing

Posted by Willem Jiang <ni...@iona.com>.
Hi Krystian,

Is there only one wsdl that contains all the endpoints  information.

CXF did not cache the wsdl information for the endpoints , it will build 
all service model from the wsdl and then look up a right definition for 
the publishing endpoint each time.
So it takes 10 times time to reparse the quite complex wsdl .
I think you can broke down you wsdl for each endpoint ,or you can try 
the build service from class you just do not specify the wsdlLocation 
attribute to walk around that.

And for CXF, we need to find a way to cache the built up service model 
for the endpoint somewhere.


Cheers,
Willem.
 

Krystian Lider wrote:
> Hi
>
> In my WAR file I have Spring configuration file which defines 
> collection (about 10) of endpoints (<jaxws:endpoint>).
> In every endpoint there is wsdlLocation attribute which defines path 
> to WSDL file.
> Unfortunately it takes about 3 minutes to publish all my services.
> I suppose that the same wsdl file (which is quite complex) is parsed 
> as many times as number of endpoints.
>
> Is there any option to make this process faster, eg. if every time it 
> is the same file?
> Thanks
>