tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Upgrade problem (useBean)
Date Tue, 08 Aug 2006 20:20:01 GMT


Lars Nielsen Lind wrote:

> David Smith skrev:
>
>> Usually you'd know it if it was.  By default it isn't and has to be 
>> explicitly turned on.  See 
>> http://tomcat.apache.org/tomcat-5.5-doc/security-manager-howto.html 
>> for more information.
>>
>> Here's a quick and dirty test -- insert a scriptlet in your jsp code 
>> something like:
>>
>> <%
>>  internet.database.SimpleUseOfConnectionPool myBean = new 
>> internet.database.SimpleUseOfConnectionPool() ;
>> %>
>>
>> If that works, then I would say jasper is at fault somehow.  If not, 
>> take a look at the generated exception for the real cause of your 
>> problem.
>>
>> --David
>>
>> Lars Nielsen Lind wrote:
>>
>>> David Smith skrev:
>>>
>>>> This may be something for a bugzilla report, but I looked at the 
>>>> source of org.apache.jasper.compiler.Generator.  The real exception 
>>>> generated is eaten in favor of the very unhelpful message you 
>>>> received.
>>>> The possible original exceptions may have been one of:
>>>>
>>>> java.lang.ClassNotFoundException - the class is not in 
>>>> WEB-INF/classes/internet/database or a jar in WEB-INF/lib probably 
>>>> not your issue since it works from jsps located in the webapp's 
>>>> root directory.
>>>>
>>>> java.lang.NoSuchMethodException - if no default constructor was 
>>>> found, I think you've already said one was present.
>>>>
>>>> java.lang.SecurityException - if the security manager is active and 
>>>> denying access.  Hmmm..... is tomcat running under a security manager?
>>>>
>>>>
>>>> --David
>>>>
>>>>
>>>> Mark Thomas wrote:
>>>>
>>>>> Lars Nielsen Lind wrote:
>>>>>  
>>>>>
>>>>>> Here is the error-report shown in the browser:
>>>>>>   
>>>>>
>>>>>
>>>>>
>>>>> The stack trace suggests the class cannot be instantiated. Hmm. Odd.
>>>>> Can you create a simple test case that reproduces this? You won't be
>>>>> able to post a war to the list so feel free to send it to me 
>>>>> directly.
>>>>>
>>>>> Mark
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>>>
>>>>>  
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>>
>>>>
>>> How do I check if Tomcat is running under a security manager?
>>>
>>> Lars Nielsen Lind
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
> Ok I have tried to do as you said 
> (......../webapps/application1/kontakt/kontakt.jsp):
>
> <%@ page language="java" contentType="text/html;charset=ISO-8859-1" 
> pageEncoding="ISO-8859-1" import="java.sql.*, java.io.*, java.util.*, 
> internet.database.*, internet.log.*" %>
>
> <%
> internet.database.SimpleUseOfConnectionPool myBean = new 
> internet.database.SimpleUseOfConnectionPool() ;
> %>
>
> And the result is:
>
> *type* Exception report
>
> *message*
>
> *description* _The server encountered an internal error () that 
> prevented it from fulfilling this request._
>
> *exception*
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
>
>     org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

>
>     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 
>
>     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
>
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> *root cause*
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
>
>     org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

>
>     org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 
>
>     org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) 
>
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
>     org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
>     org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) 
>
>     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303) 
>
>     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
>
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>
> *note* _The full stack trace of the root cause is available in the 
> Apache Tomcat/5.5.17 logs._
>
>
> And tomcat logs:
>
> 2006-08-08 22:01:52 org.apache.catalina.core.StandardWrapperValve invoke
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
> An error occurred at line: 5 in the jsp file: /kontakt.jsp
> Generated servlet error:
> internet.database.SimpleUseOfConnectionPool cannot be resolved to a type
>
>
>    at 
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

>
>    at 
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) 
>
>    at 
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:414) 
>
>    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
>    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
>    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
>    at 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) 
>
>    at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303) 
>
>    at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>    at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

>
>    at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

>
>    at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
>
>    at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
>
>    at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
>
>    at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
>
>    at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
>
>    at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
>
>    at 
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
>    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
>    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
>    at 
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684) 
>
>    at 
> org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876) 
>
>    at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 
>
>    at java.lang.Thread.run(Thread.java:595)
>
> Lars Nielsen Lind
>
>

Ok.  Any and all references to this problem indicate your class cannot 
be found.  I'm curious since I don't remember seeing an answer in this 
thread -- where exactly is SimpleUseOfConnectionPool.class?  Can you 
give the full path from $CATALINA_HOME down?

--David

---------------------------------------------------------------------
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