You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Ray <ja...@yahoo.com> on 2011/07/18 19:57:38 UTC
CXF on Eclipse-WS Indigo in pain
My environment is Eclipse Indigo with CXF 2.4.1 and Tomcat 6.0.26. The eclipse
WS tool for generating servlet and java class files from a wsdl and xsd's
failed. The problem here, I think, is that the eclipse-ws tool is ignoring my
endorsed jars and trying to build using JAXS 2.1 instead of 2.2.1 used by CXF
2.4.1. So I manually created using wsdl2java which succeeded and manually
created a web.xml using the web site user's guide.
Now I'm trying to run the service but I have Tomcat startup errors that I can't
figure out. Everything is still fairly simple and seems to be named correctly.
I'm not sure what else to try. Please advise. Thanks
beans.xml:
<jaxws:endpoint xmlns:tns="http://usdoj.gov/leisp/lexs/searchretrieve/3.1/ws"
id="lexssearchretrieveporttype"
implementor="gov.usdoj.leisp.lexs.searchretrieve_3_1.
ws.LEXSSearchRetrievePortTypeImpl"
wsdlLocation="wsdl/SRWebService.wsdl" endpointName="tns:SRWebServiceBean"
serviceName="tns:SRWebService" address="/SRWebServiceBean">
</jaxws:endpoint>
WebService annotation;
@javax.jws.WebService(serviceName = "SRWebService",
portName="SRWebServiceBean",
targetNamespace = "http://usdoj.gov/leisp/lexs/searchretrieve
/3.1/ws",
wsdlLocation = "http://localhost:8080/Coplink_LEXS_Service/services
/SRWebServiceBean?wsdl",
endpointInterface = "gov.usdoj.leisp.lexs.searchretrieve_3_1.
ws.LEXSSearchRetrievePortType")
Partial Tomcat stack trace:
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'lexssearchretrieveporttype': Invocation of init method failed; nested
exception is javax.xml.ws.WebServiceException: java.lang.NullPointerException
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
createBean(AbstractAutowireCapableBeanFactory.java:456)
at
Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
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:1544)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 27 more
Re: CXF on Eclipse-WS Indigo in pain
Posted by Daniel Kulp <dk...@apache.org>.
On Thursday, July 28, 2011 9:42:03 PM Ray Ramos wrote:
> Daniel Kulp <dk...@...> writes:
> > Is there more to that stack trace? There should be at least one more
> > "Caused by" at the end of that where the actual location of the NPE
> > should be found. Right now, I have no idea.
> >
> > In regards to removing the wsdlLocation attribute from <jaxws:endpoint>,
> > in that case, it would be picking it up from the @WebService annotation
> > and you have it defined as:
> >
> > http://localhost:8080/Coplink_LEXS_Service/services/SRWebServiceBean?wsd
> > l
> >
> > Thus, it's trying to load it from there, but tomcat likely hasn't even
> > started the 8080 port yet. If it has, it's likely looping trying to
> > start the service which needs the wsdl so it starts the service,
> > etc....
>
> I traced this all the way down to a bug in Class.getEnumConstants()
>
> See bug 7068755.
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7068755
Wow! That's an interesting bug. :-)
Nice job tracking that one down. Nothing CXF/JAXB can really do about that
though. :-(
Dan
>
> Unfortunately, the perception CXF/JAXB/Java in my small world has already
> been damaged. The opinion of some now is that CXF/JAXB/Java can't handle
> large web services. Thanks for taking the time to look into this.
>
> -Ray
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com
Re: CXF on Eclipse-WS Indigo in pain
Posted by Ray Ramos <ja...@yahoo.com>.
Daniel Kulp <dk...@...> writes:
>
>
> Is there more to that stack trace? There should be at least one more
> "Caused by" at the end of that where the actual location of the NPE should be
> found. Right now, I have no idea.
>
> In regards to removing the wsdlLocation attribute from <jaxws:endpoint>, in
> that case, it would be picking it up from the @WebService annotation and you
> have it defined as:
>
> http://localhost:8080/Coplink_LEXS_Service/services/SRWebServiceBean?wsdl
>
> Thus, it's trying to load it from there, but tomcat likely hasn't even started
> the 8080 port yet. If it has, it's likely looping trying to start the
> service which needs the wsdl so it starts the service, etc....
>
I traced this all the way down to a bug in Class.getEnumConstants()
See bug 7068755.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7068755
Unfortunately, the perception CXF/JAXB/Java in my small world has already been
damaged. The opinion of some now is that CXF/JAXB/Java can't handle large web
services. Thanks for taking the time to look into this.
-Ray
Re: CXF on Eclipse-WS Indigo in pain
Posted by Daniel Kulp <dk...@apache.org>.
Is there more to that stack trace? There should be at least one more
"Caused by" at the end of that where the actual location of the NPE should be
found. Right now, I have no idea.
In regards to removing the wsdlLocation attribute from <jaxws:endpoint>, in
that case, it would be picking it up from the @WebService annotation and you
have it defined as:
http://localhost:8080/Coplink_LEXS_Service/services/SRWebServiceBean?wsdl
Thus, it's trying to load it from there, but tomcat likely hasn't even started
the 8080 port yet. If it has, it's likely looping trying to start the
service which needs the wsdl so it starts the service, etc....
Dan
On Monday, July 18, 2011 5:57:38 PM Ray wrote:
> My environment is Eclipse Indigo with CXF 2.4.1 and Tomcat 6.0.26. The
> eclipse WS tool for generating servlet and java class files from a wsdl and
> xsd's failed. The problem here, I think, is that the eclipse-ws tool is
> ignoring my endorsed jars and trying to build using JAXS 2.1 instead of
> 2.2.1 used by CXF 2.4.1. So I manually created using wsdl2java which
> succeeded and manually created a web.xml using the web site user's guide.
>
> Now I'm trying to run the service but I have Tomcat startup errors that I
> can't figure out. Everything is still fairly simple and seems to be named
> correctly. I'm not sure what else to try. Please advise. Thanks
>
>
> beans.xml:
> <jaxws:endpoint
> xmlns:tns="http://usdoj.gov/leisp/lexs/searchretrieve/3.1/ws"
> id="lexssearchretrieveporttype"
> implementor="gov.usdoj.leisp.lexs.searchretrieve_3_1.
> ws.LEXSSearchRetrievePortTypeImpl"
> wsdlLocation="wsdl/SRWebService.wsdl"
> endpointName="tns:SRWebServiceBean" serviceName="tns:SRWebService"
> address="/SRWebServiceBean">
> </jaxws:endpoint>
>
>
> WebService annotation;
> @javax.jws.WebService(serviceName = "SRWebService",
> portName="SRWebServiceBean",
> targetNamespace = "http://usdoj.gov/leisp/lexs/searchretrieve
> /3.1/ws",
> wsdlLocation = "http://localhost:8080/Coplink_LEXS_Service/services
> /SRWebServiceBean?wsdl",
> endpointInterface = "gov.usdoj.leisp.lexs.searchretrieve_3_1.
> ws.LEXSSearchRetrievePortType")
>
>
> Partial Tomcat stack trace:
> SEVERE: Context initialization failed
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'lexssearchretrieveporttype': Invocation of init method failed;
> nested exception is javax.xml.ws.WebServiceException:
> java.lang.NullPointerException at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> . initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> . doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> . createBean(AbstractAutowireCapableBeanFactory.java:456)
> at
> Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
> at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:350)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:239)
> at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:509)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
> 9) 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:1544) at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> . invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
> at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory
> . initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
> ... 27 more
--
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com
Re: CXF on Eclipse-WS Indigo in pain
Posted by Ray <ja...@yahoo.com>.
I changed the javaws:endpoing config to be just this
id="lexssearchretrieveporttype"
implementor="gov.usdoj.leisp.lexs.searchretrieve_3_1.ws
.LEXSSearchRetrievePortTypeImpl"
and Tomcat hangs until it times out.