facebook

Deployment of top-down web service to Tomcat 5.5 fails:CNFEx

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #267185 Reply

    erjablow
    Member

    Using 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?

    #267213 Reply

    Riyad Kalla
    Member

    Did 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…

    #267252 Reply

    tomeksz
    Member

    Make sure you have xfire-jaxb2 in your class path.

    #267257 Reply

    erjablow
    Member

    @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.

    #267258 Reply

    tomeksz
    Member

    This can be also a problem with service.xml , like some white spaces in factory name ( at beginning or end )

    #267268 Reply

    erjablow
    Member

    @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.

    #267272 Reply

    erjablow
    Member

    That 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.

    #267275 Reply

    tomeksz
    Member

    This is the way how xbean-spring parses xml :/

    #267289 Reply

    Riyad Kalla
    Member

    tomeksz,
    Great catch. This bug is fixed in 5.5 M2 internally and should be available soon.

    #267302 Reply

    tomeksz
    Member

    Internaly ? , you mean inside myeclipse code ? or this is a fix for xbean-spring ? 🙂

    #267315 Reply

    Riyad Kalla
    Member

    I mean it should be available in our 5.5 M2 release.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Deployment of top-down web service to Tomcat 5.5 fails:CNFEx

You must be logged in to post in the forum log in