Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
jh4747
Post subject: Error initializing XFireServlet  PostPosted: Mar 20, 2007 - 07:37 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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:


Code:
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

Code:
<?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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tomeksz
Post subject:   PostPosted: Mar 20, 2007 - 08:04 PM
Registered Member
Registered Member


Joined: Feb 27, 2007
Posts: 88

You are trying to run class compiled for Java 5 on server which runs on java 1.4 ( probably ;)
 
 View user's profile Send private message  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 20, 2007 - 08:08 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
nvenkatarao
Post subject:   PostPosted: Mar 20, 2007 - 11:21 PM



Joined: Mar 16, 2007
Posts: 20

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....
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Mar 21, 2007 - 12:39 AM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 21, 2007 - 02:55 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 21, 2007 - 03:52 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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

Code:

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


I get this when looking for the ?wsdl


Code:

 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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tomeksz
Post subject:   PostPosted: Mar 21, 2007 - 04:10 PM
Registered Member
Registered Member


Joined: Feb 27, 2007
Posts: 88

Just as error says : you dont have xalan in your classpath
 
 View user's profile Send private message  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 21, 2007 - 04:28 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 21, 2007 - 05:29 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
tomeksz
Post subject:   PostPosted: Mar 21, 2007 - 06:01 PM
Registered Member
Registered Member


Joined: Feb 27, 2007
Posts: 88

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.
 
 View user's profile Send private message  
Reply with quote Back to top
jh4747
Post subject:   PostPosted: Mar 21, 2007 - 06:50 PM
Registered Member
Registered Member


Joined: Jul 12, 2005
Posts: 70

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Mar 26, 2007 - 04:19 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23855

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.

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits