tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remacle, F \(Francois\)" <f.rema...@dl.ac.uk>
Subject Odd problem with Java Web service deployment
Date Mon, 03 Jul 2006 09:49:47 GMT
Hi everyone,

I am writing to this mailing list as my last chance because I am
completely stuck and cannot find solution to my problem anywhere on FAQ,
internet or other webresources.

Here is the problem, I am trying to deploy a very simple webservice
because I am new to webservice so I wanted to start simply. However when
I deploy it it won't start. My web.xml file is as follow:
------------------------------------------------------------------------
-------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
        <display-name>Hegemonie Acces Base de Donnees</display-name>
    <listener>
 
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextLi
stener</listener-class>
    </listener>
        <servlet>
                <servlet-name>HegeWebService</servlet-name>
	
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-
class>
        </servlet>
        <servlet-mapping>
         <display-name>Hegemonie Acces Base de Donnees</display-name>
                <servlet-name>HegeWebService</servlet-name>
                <url-pattern>/webinterface</url-pattern>
        </servlet-mapping>
</web-app>
------------------------------------------------------------------------
-------------------------------
The problem comes from the reference to the classes in
"com.sun.xml.ws.transport.http.servlet.*" which import classes from
"javax.servlet.*" 

When trying to start the service I got : 
------------------------------------------------------------------------
-------------------------------
03-Jul-2006 10:13:51 org.apache.catalina.core.StandardHostDeployer start
INFO: standardHost.start /HegeWebService
03-Jul-2006 10:13:51 org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Skipped installing application listeners due to previous
error(s)
03-Jul-2006 10:13:51 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
03-Jul-2006 10:13:51 org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
------------------------------------------------------------------------
-------------------------------

When looking the server log file is due to :
------------------------------------------------------------------------
-------------------------------
2006-07-03 10:13:51 StandardContext[/HegeWebService]Error configuring
applicatio
n listener of class
com.sun.xml.ws.transport.http.servlet.WSServletContextListen
er
java.lang.NoClassDefFoundError:
javax/servlet/ServletContextAttributeListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	  ......
------------------------------------------------------------------------
-------------------------------

Now the things which is odd is that on the server there are other
services using their own context listener that import the same classes
and they start without any problem!! 

For example:
------------------------------------------------------------------------
-------------------------------
2006-07-03 10:13:48 StandardContext[/jsp-examples]ContextListener:
contextInitia
lized()
2006-07-03 10:13:48 StandardContext[/jsp-examples]SessionListener:
contextInitia
lized()
2006-07-03 10:13:49 StandardContext[/servlets-examples]ContextListener:
contextI
nitialized()
2006-07-03 10:13:49 StandardContext[/servlets-examples]SessionListener:
contextI
nitialized()
------------------------------------------------------------------------
-------------------------------

According to all different things I have seen on the internet they
sometimes talks about the classpath, however even if I add explicitely
the servlet-api.jar that is in $CATALINA_HOME/common/lib on the
classpath inside catalina.sh or on the system classpath that does not
change anything. And I doubt the problem comes from there since other
examples using classes relying on this packages works fine, only mine
crashes down not finding these classes.

I am completely stuck by this and cannot find any way out of it...

Any suggestion?

Thanks

Francois Remacle


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message