- This topic has 26 replies, 2 voices, and was last updated 17 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
EpiKgohanMemberHi, i have a problem when i try to integrate my webservice in a current tomcat project.
When i launch Tomcat i have this exception :
java.lang.ClassNotFoundException: org.codehaus.xfire.transport.http.XFireConfigurableServlet
I don’t understand because i already added XFire 1.2 Core Libs in my project.
I added (in current web.xml) these lines :<servlet> <servlet-name>XFireServlet</servlet-name> <servlet-class> org.codehaus.xfire.transport.http.XFireConfigurableServlet </servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>XFireServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping>
When i made a webservice from scratch it works, but it’s not working when i integrate webservices capabilities to an existing tomcat project.
Help me please.
Riyad KallaMemberI think you need to head back to your Libraries tab, and hit Add Library, MyEclipse Library and then add the XFire HTTP Libraries and you should be all set.
EpiKgohanMemberWell i rebuilt my project with a new WebService. I don’t have this problem anymore, but when i’m trying to add some webservices, the services.xml is edited but i have an exception on loading now :s
GRAVE: La servlet /toto a généré une exception "load()" gnu.xml.dom.DomEx: Parameter or operation isn't supported by this node. at gnu.xml.dom.DomNamedNodeMap.setNamedItemNS(DomNamedNodeMap.java:227) at gnu.xml.dom.DomElement.setAttributeNodeNS(DomElement.java:281) at gnu.xml.dom.DomElement.setAttributeNS(DomElement.java:260) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:152) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:176) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanDefinitions(XBeanXmlBeanDefinitionParser.java:807) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:78) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148) at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:103) 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:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
and this is what my services.xml looks like :
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xfire.codehaus.org/config/1.0"> <service> <name>StockManagerService</name> <serviceClass>serv.IStockManagerService</serviceClass> <implementationClass>serv.StockManagerServiceImpl</implementationClass> <style>wrapped</style> <use>literal</use> <scope>application</scope> </service> </beans>
If i comment from <service> to </service> (included) i don’t have any exceptions….
Riyad KallaMembergnu.xml.dom.DomEx
Are you running Tomcat using GCJ?
EpiKgohanMemberwell i guess no…
Riyad KallaMemberI believe you are, that is where I think gnu.xml.dom is coming from… does the Tomcat startup log give any indication of the version of Java being used?
The reason I’m trying to get to the bottom of this is that GCj is not compatible with some of these things which would explain where this strange exception is coming from.
EpiKgohanMemberWhat is GCj btw ?
when i launch tomcat i have this :
16 juin 2007 14:27:29 org.apache.catalina.core.AprLifecycleListener init INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_01\bin;C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin 16 juin 2007 14:27:30 org.apache.coyote.http11.Http11Protocol init INFO: Initialisation de Coyote HTTP/1.1 sur http-8080 16 juin 2007 14:27:30 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1104 ms 16 juin 2007 14:27:30 org.apache.catalina.core.StandardService start INFO: Démarrage du service Catalina 16 juin 2007 14:27:30 org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.13 16 juin 2007 14:27:37 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\toto\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 16 juin 2007 14:27:37 org.apache.catalina.loader.WebappClassLoader validateJarFile INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\toto\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources). log4j:WARN Please initialize the log4j system properly. 16 juin 2007 14:27:41 org.apache.catalina.core.StandardContext loadOnStartup GRAVE: La servlet /toto a généré une exception "load()" gnu.xml.dom.DomEx: Parameter or operation isn't supported by this node. at gnu.xml.dom.DomNamedNodeMap.setNamedItemNS(DomNamedNodeMap.java:227) at gnu.xml.dom.DomElement.setAttributeNodeNS(DomElement.java:281) at gnu.xml.dom.DomElement.setAttributeNS(DomElement.java:260) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:152) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanFromExtensionElement(XBeanXmlBeanDefinitionParser.java:176) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionParser.parseBeanDefinitions(XBeanXmlBeanDefinitionParser.java:807) at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions(DefaultXmlBeanDefinitionParser.java:191) at org.apache.xbean.spring.context.v1.XBeanXmlBeanDefinitionReader.registerBeanDefinitions(XBeanXmlBeanDefinitionReader.java:78) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:223) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:173) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148) at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:103) 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:212) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4042) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4348) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 16 juin 2007 14:27:41 org.apache.coyote.http11.Http11Protocol start INFO: Démarrage de Coyote HTTP/1.1 sur http-8080 16 juin 2007 14:27:41 org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 16 juin 2007 14:27:41 org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=1/58 config=null 16 juin 2007 14:27:41 org.apache.catalina.startup.Catalina start INFO: Server startup in 11655 ms
i’m running tomcat in run mode, and i specified jdk1.6.0_01
EpiKgohanMemberBTW, i’m not running tomcat with gcj (i checked) and i still don’t know where this error come from
Riyad KallaMemberThank you for the log, things look fine… it does look like your Spring Config file is invalid though from the error… if you validate it in MyEclipse (right-click, go down to MyEclipse > Run Validation, does it show it’s valid, or does it show an error?)
BTW, for what it’s worth, GCJ is an open source implementation of Java from the GCC project. I thought you were on Linux, and a lot of distro’s use it as the default Java runtime,and it doesn’t run some things well.
EpiKgohanMembernothing seems wrong, i made a run validation on the whole project. Where is the spring config file (if there is one) i didn’t find it
Riyad KallaMemberIt’s usually named something like applicationContext.xml… from your exception it looks like Spring is having a problem parsing *some* file… but from what you typed, it sounded like you weren’t even using Spring… I’m confused now.
EpiKgohanMemberyes i’m not using spring capabilities. But services.xml and applicationContext.xml have both <beans> tags (i don’t have any applicationContext.xml but i checked i a new project what was in the xml…)
I need to fix this problem before 11pm (it’s almost 7pm here :s :s :s)
School project… :/
Riyad KallaMemberNOTE: Wether you use Spring Capabilities or not, if you have Spring in your project and hooked into your web.xml file, which it looks like you do, it *will* be processed when your project starts up in your app server which is exactly what it looks like is happening.
If you aren’t using spring, try removing the hooks from your web.xml file that initialize it.
EpiKgohanMemberwell, this is my web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>Toto</display-name> <!-- Standard Action Servlet Configuration (with debugging) --> <session-config> <session-timeout>60</session-timeout> </session-config> <servlet> <servlet-name>XFireServlet</servlet-name> <servlet-class> org.codehaus.xfire.transport.http.XFireConfigurableServlet </servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet> <servlet-name>action</servlet-name> <servlet-class> org.apache.struts.action.ActionServlet </servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>3</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>3</param-value> </init-param> <load-on-startup>0</load-on-startup> </servlet> <servlet> <servlet-name>DisplayChart</servlet-name> <servlet-class> org.jfree.chart.servlet.DisplayChart </servlet-class> </servlet> <servlet-mapping> <servlet-name>XFireServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> <url-pattern>/servlet/DisplayChart</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- Struts Tag Library Descriptors --> <taglib> <taglib-uri>/tags/struts-bean</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-html</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-logic</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-nested</taglib-uri> <taglib-location>/WEB-INF/struts-nested.tld</taglib-location> </taglib> <taglib> <taglib-uri>/tags/struts-tiles</taglib-uri> <taglib-location>/WEB-INF/tiles.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/rssutils.tld</taglib-uri> <taglib-location>/WEB-INF/rssutils.tld</taglib-location> </taglib> <taglib> <taglib-uri>smproject.tld</taglib-uri> <taglib-location>/WEB-INF/smproject.tld</taglib-location> </taglib> </web-app>
Riyad KallaMemberAre you sure that the error Tomcat is throwing is pertaining to *this* project? It’s possible you have multiple projects deployed to Tomcat and the error is for a different project.
If it is this project, can you send it to me to look at? I have non idea what’s going on or why it’s not working right.
-
AuthorPosts