- This topic has 10 replies, 3 voices, and was last updated 17 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
erjablowMemberUsing Eclipse 3.2.2, MyEclipse 5.1.1GA, and Tomcat 5.5, I have successfully run the HelloWorldService tutorial. Now, I am trying to write develop a web service by the top-down method; I created a WSDL file using the MyEclipseIDE tools, used the web services wizard to generate a skeleton service, and filled in the missing parts.
When I deploy the project to Tomcat 5.5, I get ClassNotFoundExceptions, the first of which is:
SEVERE: Error initializing XFireServlet. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.codehaus.xfire.spring.ServiceBean' defined in class path resource [META-INF/xfire/services.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyAccessExceptionsException: PropertyAccessExceptionsException (1 errors); nested propertyAccessExceptions are: [org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [org.codehaus.xfire.service.ServiceFactory] for property 'serviceFactory'; nested exception is java.lang.IllegalArgumentException: Could not load service factory: org.codehaus.xfire.jaxb2.JaxbServiceFactory . Nested exception is java.lang.ClassNotFoundException: org.codehaus.xfire.jaxb2.JaxbServiceFactory ]
I checked the exploded webapp directory under my Tomcat installation; the appropriate XFire jar files are there. How can I use top-down techniques to create and deploy a web service?
Riyad KallaMemberDid you by chance not paste the entire error? You mention ClassNotFoundExceptions but what I see above is something different, it looks like you are trying to set a String in a place of a ServiceFactory instance…
tomekszMemberMake sure you have xfire-jaxb2 in your class path.
erjablowMember@tomeksz wrote:
Make sure you have xfire-jaxb2 in your class path.
That jar file is in the project build path, and it appears in the lib directory of the exploded application on the server.
I sent support-rkalla the full error message in a PM; it had been longer than I felt comfortable posting in the forum. I’d be rude if I had posted 300 lines.
tomekszMemberThis can be also a problem with service.xml , like some white spaces in factory name ( at beginning or end )
erjablowMember@tomeksz wrote:
This can be also a problem with service.xml , like some white spaces in factory name ( at beginning or end )
Ah, shoot. I reformatted my services.xml file. I’ll undo that and try again.
erjablowMemberThat was it, tomeksz. I had reformatted the file to look like
<serviceFactory> org.codehaus.xfire.jaxb2.JaxbServiceFactory </serviceFactory>
You’d think the XML schema would be ask the parser to ignore that kind of whitespace, but it didn’t.
tomekszMemberThis is the way how xbean-spring parses xml :/
Riyad KallaMembertomeksz,
Great catch. This bug is fixed in 5.5 M2 internally and should be available soon.
tomekszMemberInternaly ? , you mean inside myeclipse code ? or this is a fix for xbean-spring ? 🙂
Riyad KallaMemberI mean it should be available in our 5.5 M2 release.
-
AuthorPosts