Hi Yoav,
Thank's for your advice. I put the .jar in a WEB-INF/lib that I created and it's working.
Thank's for your help
NzM
Shapira, Yoav wrote:
Hi, The CLASSPATH environment variable is meaningless to Tomcat: it's ignored. You need to put the class (the compiled .class file) in WEB-INF/classes, or a jar containing the class in WEB-INF/lib. If you just put the class in WEB-INF/classes, make sure to do so in the appropriate subdirectory, e.g. WEB-INF/classes/net/sourceforge/jradius. And make sure all its dependencies are available in the same repository (WEB-INF/lib or WEB-INF/classes).
Yoav Shapira http://www.yoavshapira.com
and-----Original Message----- From: Mohamed Ganna [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 10:58 AM To: [EMAIL PROTECTED] Subject: java.lang.NoClassDefFoundError
Hi there,
I'm newbie to Tomcat. I'm using Tomcat 4.1.31 under Linux RedHat9.0,
I set up all the necessary CLASSPATH and sample servlets are runningworks
great. I built up a Servlet for user's authentication using freeradius
0.9.2 and a Java based radius client (jradius-client). The servlet
fine with JSWDK + freeradius + jradius-client, but I wanted to encryptServletForm
the information exchanged between the user's form and the webserver
using SSL (https based form), that I couldn't do with JSWDK. So, I've
installed tomcat and tried to use the same servlet (I've made all the
necessary changes in server.xml, I think so!!!). I've put my
java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)class in $CATALINA_HOME$/webapps/ROOT/WEB-INF/classes and the html form in $CATALINA_HOME$/webapps/ROOT/. I access the form using https://localhost:8443/ (the form called index.html), but when running the servlet I get this error:
java.lang.NoClassDefFoundError:
net/sourceforge/jradiusclient/RadiusAttribute
at java.lang.Class.getDeclaredConstructors0(Native Method)
at
at java.lang.Class.getConstructor0(Class.java:1922)va:8
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.ja
56)621)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:
at.jav
org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet
a:369)169)
at
org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:
at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)atio
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
nFilterChain.java:200)terC
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
hain.java:146)ve.j
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ava:209)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:596)433)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
atve.j
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ava:144)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:596)ava:
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.j
199)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:594)433)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
at58)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
ata:13
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
3)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:596)alve
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
.java:118)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:594)a:11
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
6)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:594)433)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
at.jav
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
a:127)invo
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
keNext(StandardPipeline.java:596)433)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
at99)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
atConn
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
ection(Http11Protocol.java:705)77)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
atl.ja
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
va:683) at java.lang.Thread.run(Thread.java:534)
I've set up the CLASSPATH for net.sourceforge.jradiusclient.RadiusAttribute. Can anyone help figure out what's the pb?
Thank's a lot
NzM
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]