- This topic has 12 replies, 4 voices, and was last updated 17 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
Lee HarringtonMemberI’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
tomekszMemberYou are trying to run class compiled for Java 5 on server which runs on java 1.4 ( probably 😉
Lee HarringtonMember@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
nvenkataraoMemberCheck 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….
Riyad KallaMembertomeksz 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.
Lee HarringtonMember@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
Lee HarringtonMemberOk….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
tomekszMemberJust as error says : you dont have xalan in your classpath
Lee HarringtonMember@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
Lee HarringtonMemberThanks….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
tomekszMemberThis 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.
Lee HarringtonMember@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
Riyad KallaMemberLee,
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. -
AuthorPosts