struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leon Rosenberg <struts_u...@anotheria.net>
Subject Re: Struts in Resin: 500 Servlet Exception
Date Wed, 04 May 2005 15:11:27 GMT
check the wrapper.pl in the resin-3.0.x/bin

#
# Initial classpath.  Usually filled with the environment or the command
line.
#
$CLASSPATH="";

Put you jar files therein.

Works if you use the 3.0.x version of resin of course.

If you are under windoz, you can write a batch file which calls
httpd.exe instead of calling it directly and set it there.


regards
Leon

P.S. another possibility, which would work under resin, but not under
tomcat: 
add to httpd.sh:
args="-Djava.endorsed.dirs=YOUR_PATH_WITH_JARS"



On Wed, 2005-05-04 at 07:36 -0700, T. B. wrote:
> Thanks Leon! You are right about the other jars to be
> deployed. By the way, is there a way to specify other
> paths where other jar files resides so STRUTS know
> where to look for them instead of copying them to the
> app's lib?
> 
> Thong
> 
> --- Leon Rosenberg <struts_user@anotheria.net> wrote:
> 
> > Are you sure that listen.jar has no futher
> > dependencies? 
> > It looks like something in listen.jar (a class)
> > which is initialized 
> > from JdbcUser.java:238 requires some other libs.
> > 
> > example: 
> > Class A 
> >  B = new B();
> > now B is in b.jar and in class B you have something
> > like
> > class B{
> >  private static C c;
> > }
> > 
> > if C is now in c.jar, and c.jar isn't in your libs,
> > the call new B()
> > will fail, even B is in the classpath.
> > 
> > regards
> > Leon
> > 
> > 
> > On Tue, 2005-05-03 at 17:26 -0700, T. B. wrote:
> > > Hi all,
> > > 
> > > I am new to struts and tried to write a little
> > logon
> > > application which has a LogonAction using other
> > > objects from different jar files to look up user
> > > accounts in DB via JDBC. But this is the error I
> > got
> > > when loging in:
> > > 
> > > 500 Servlet Exception
> > > 
> > > java.lang.NoClassDefFoundError
> > > 	at
> > >
> >
> com.listen.toollib.login.auth.jdbc.JdbcUser.getUser(JdbcUser.java:238)
> > > 	at
> > >
> >
> com.listen.toollib.login.auth.jdbc.JdbcUser.login(JdbcUser.java:71)
> > > 	at
> > logon.LogonAction.isUserLogon(LogonAction.java:30)
> > > 	at logon.LogonAction.execute(LogonAction.java:65)
> > > 	at
> > >
> >
> org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
> > > 	at
> > >
> >
> org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
> > > 	at
> > >
> >
> org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
> > > 	at
> > >
> >
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
> > > 	at
> > >
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
> > > 	at
> > >
> >
> javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
> > > 	at
> > >
> >
> com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
> > > 	at
> > >
> >
> com.caucho.server.http.Invocation.service(Invocation.java:315)
> > > 	at
> > >
> >
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
> > > 	at
> > >
> >
> com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)
> > > 	at
> > >
> >
> com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
> > > 	at
> > >
> >
> com.caucho.server.TcpConnection.run(TcpConnection.java:139)
> > > 	at java.lang.Thread.run(Thread.java:536)
> > > 
> > > Note that at this point, lib dir contains all the
> > jar
> > > files that this stack trace complains it can't
> > find as
> > > shown below.
> > > 
> > > webdev:/pool/113/resin/webapps/myApp/WEB-INF/lib$
> > ls
> > > -ltr
> > > total 5232
> > > -rw-r--r--    1 tbui     webdev     456709 Aug 14 
> > > 2002 struts.jar
> > > -rw-r--r--    1 tbui     webdev      65368 Aug 14 
> > > 2002 jakarta-oro.jar
> > > -rw-r--r--    1 tbui     webdev      28755 Aug 14 
> > > 2002 commons-validator.jar
> > > -rw-r--r--    1 tbui     webdev      22146 Aug 14 
> > > 2002 commons-services.jar
> > > -rw-r--r--    1 tbui     webdev      28528 Aug 14 
> > > 2002 commons-resources.jar
> > > -rw-r--r--    1 tbui     webdev      28940 Aug 14 
> > > 2002 commons-pool.jar.old
> > > -rw-r--r--    1 tbui     webdev      20357 Aug 14 
> > > 2002 commons-logging.jar
> > > -rw-r--r--    1 tbui     webdev      29461 Aug 14 
> > > 2002 commons-lang.jar
> > > -rw-r--r--    1 tbui     webdev      14416 Aug 14 
> > > 2002 commons-fileupload.jar
> > > -rw-r--r--    1 tbui     webdev      93903 Aug 14 
> > > 2002 commons-digester.jar
> > > -rw-r--r--    1 tbui     webdev      81146 Aug 14 
> > > 2002 commons-dbcp.jar
> > > -rw-r--r--    1 tbui     webdev     146737 Aug 14 
> > > 2002 commons-collections.jar
> > > -rw-r--r--    1 tbui     webdev      81171 Aug 14 
> > > 2002 commons-beanutils.jar
> > > -rw-r--r--    1 tbui     webdev      42492 Apr 21
> > > 12:06 commons-pool-1.2.jar
> > > -rw-r--r--    1 tbui     webdev       3941 May  2
> > > 11:13 newtools.jar
> > > drwxr-xr-x    2 tbui     webdev       4096 May  3
> > > 15:48 META-INF
> > > -rw-r--r--    1 tbui     webdev    2768333 May  3
> > > 16:47 listen.jar
> > > -rw-r--r--    1 tbui     webdev     731775 May  3
> > > 16:48 tools.jar
> > > -rw-r--r--    1 tbui     webdev     651224 May  3
> > > 16:48 listen-xmlbeans.jar
> > > 
> > > Also,
> > > 
> > > 1) logon.LogonAction.isUserLogon calls
> > > com.listen.toollib.login.auth.jdbc.JdbcUser.login
> > > which is in tools.jar
> > > 2)
> > >
> >
> com.listen.toollib.login.auth.jdbc.JdbcUser.getUser(JdbcUser.java:238)
> > > refers to an object in listen.jar which also
> > exists in
> > > the lib dir above
> > > 
> > > I have spent the past week trying to figure out
> > why
> > > but it has been in vain. Can anyone help me figure
> > out
> > > which dir this application expects the jar to be
> > if my
> > > set up is not correct?
> > > 
> > > Thanks so much for your help,
> > > 
> > > Thong Bui
> > > 
> > > 
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> > user-help@struts.apache.org
> > > 
> > > 
> > 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> > user-help@struts.apache.org
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message