facebook

Error initializing XFireServlet

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

    I’m following the Code First example: http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webservices/index.html

    I’ve set java compatibility to 5.0 in the project. I get the following when I start tomcat:

    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]: Initialization of bean failed; nested exception is java.lang.UnsupportedClassVersionError: com/att/nocem/IMaoMooService (Unsupported major.minor version 49.0)
    java.lang.UnsupportedClassVersionError: com/att/nocem/IMaoMooService (Unsupported major.minor version 49.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
        at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1653)
        at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:883)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1333)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1213)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:219)
        at org.springframework.util.ClassUtils.forName(ClassUtils.java:108)
        at org.springframework.beans.propertyeditors.ClassEditor.setAsText(ClassEditor.java:63)
        at org.springframework.beans.BeanWrapperImpl.doTypeConversionIfNecessary(BeanWrapperImpl.java:771)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:584)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:469)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:626)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:653)
        at org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:642)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1023)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:824)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
        at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:107)
        at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:41)
        at org.codehaus.xfire.transport.http.XFireConfigurableServlet.loadConfig(XFireConfigurableServlet.java:86)
        at org.codehaus.xfire.transport.http.XFireConfigurableServlet.createXFire(XFireConfigurableServlet.java:54)
        at org.codehaus.xfire.transport.http.XFireServlet.init(XFireServlet.java:45)
        at javax.servlet.GenericServlet.init(GenericServlet.java:256)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:887)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3948)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4271)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:850)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:316)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:859)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:723)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:393)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:816)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
        at org.apache.catalina.core.StandardService.start(StandardService.java:519)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:2343)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        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:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)

    My services.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://xfire.codehaus.org/config/1.0">
    
        <service>
            <name>MaoMooService</name>
            <serviceClass>com.att.nocem.IMaoMooService</serviceClass>
            <implementationClass>
                com.att.nocem.MaoMooServiceImpl
            </implementationClass>
            <style>wrapped</style>
            <use>literal</use>
            <scope>application</scope>
        </service></beans>

    Lee

    #267748 Reply

    tomeksz
    Member

    You are trying to run class compiled for Java 5 on server which runs on java 1.4 ( probably 😉

    #267749 Reply

    @tomeksz wrote:

    You are trying to run class compiled for Java 5 on server which runs on java 1.4 ( probably 😉

    I’m running on tomcat5 — is there a config file/setting I need to check?

    Lee

    #267771 Reply

    nvenkatarao
    Member

    Check your service.xml file, in that your service beans are given proper package names or not ..please check once your service.xml file

    next check your Tomcat5 using which version of Jdk and your environment is under which JDK….

    #267778 Reply

    Riyad Kalla
    Member

    tomeksz is right, you need to run Tomcat with JDK 1.5 or later, the issue is that you are running it with a 1.4 VM, so when it goes to load your actual project code, the VM goes “what the heck kind of byte code is this?!” and coughs up that error.

    #267798 Reply

    @support-rkalla wrote:

    tomeksz is right, you need to run Tomcat with JDK 1.5 or later, the issue is that you are running it with a 1.4 VM, so when it goes to load your actual project code, the VM goes “what the heck kind of byte code is this?!” and coughs up that error.

    Installing Java 5 jdk right now. Then do I mererly change the java_home environment variable — or is there a tomcat config I need to change?

    Lee

    #267806 Reply

    Ok….java 5 installed — Tomcat 5 configured to use it. On to the next error:

    
     javax.xml.transform.TransformerFactoryConfigurationError: Provider org.apache.xalan.processor.TransformerFactoryImpl not found
    

    I get this when looking for the ?wsdl

    
     http://localhost:8080/HelloWorld/services
    

    Brings up a page with two services (which is correct) and links to the wdsl. Clicking on either link returns that error.

    Lee

    #267812 Reply

    tomeksz
    Member

    Just as error says : you dont have xalan in your classpath

    #267818 Reply

    @tomeksz wrote:

    Just as error says : you dont have xalan in your classpath

    Ok….perhaps I missed the part of the tutorial that said to add XALAN to the class path. I went to project propoerties, add lib, and viewed the MyEclipse libraries — saw xfire and hibernate — but no xalan. Is this something I have to download separately?

    Lee

    #267823 Reply

    Thanks….I found xalan jar’s in another project of mine, added them, and the service works. Did I miss the step in the tutorial that said to download and install xalan?

    Lee

    #267829 Reply

    tomeksz
    Member

    This problem occur sometimes on tomcat, because of some changes in jdk package naming (if i remember correctly 🙂 . If you run tomcat on java 1.4 everything should work fine w/o adding new jars, but on java 5 you need to do some additional steps.

    #267837 Reply

    @tomeksz wrote:

    This problem occur sometimes on tomcat, because of some changes in jdk package naming (if i remember correctly 🙂 . If you run tomcat on java 1.4 everything should work fine w/o adding new jars, but on java 5 you need to do some additional steps.

    I don’t envy you folk in the task you have of documenting all these things. I would hope that as these exceptions are discovered that the tutorials could be updated.

    Lee

    #268006 Reply

    Riyad Kalla
    Member

    Lee,
    I need to check with the folks that did that tutorial because AFAIK it’s as-stated, we didn’t have to do anything special… weird.

Viewing 13 posts - 1 through 13 (of 13 total)
Reply To: Error initializing XFireServlet

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