Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deprecated error

Status
Not open for further replies.

Dalamar

Programmer
Dec 10, 2002
2
0
0
GB

Hi,

I'm using a JavaBean from a JSP with Tomcat 4.0.6, Tomcat can found the three files, but Im getting an error, and I think the code is good, because is an example from a book.

I have 3 files:
- beans.html -->Root
- beans.jsp -->Root
This the first part of the file:

<jsp:useBean id=&quot;languageBean&quot; scope=&quot;page&quot; class=&quot;LanguageBean&quot;>
<jsp:setProperty name=&quot;languageBean&quot; property=&quot;*&quot;/>
</jsp:useBean>

<html>
<head>

- LanguageBean.class -->WEB-INF/classes/

This is the error I'm getting:


Apache Tomcat/4.0.6 - HTTP Status 500 - Internal Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 1 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:56: Class org.apache.jsp.LanguageBean not found.
LanguageBean languageBean = null;
^


An error occurred at line: 1 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:59: Class org.apache.jsp.LanguageBean not found.
languageBean= (LanguageBean)
^


An error occurred at line: 1 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:64: Class org.apache.jsp.LanguageBean not found.
languageBean = (LanguageBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), &quot;LanguageBean&quot;);
^


An error occurred at line: 12 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:94: Class org.apache.jsp.LanguageBean not found.
out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute(&quot;languageBean&quot;)).getName())));
^


An error occurred at line: 15 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:101: Class org.apache.jsp.LanguageBean not found.
out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute(&quot;languageBean&quot;)).getLanguage())));
^


An error occurred at line: 18 in the jsp file: /beans.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\_\beans$jsp.java:108: Class org.apache.jsp.LanguageBean not found.
out.print(JspRuntimeLibrary.toString((((LanguageBean)pageContext.findAttribute(&quot;languageBean&quot;)).getLanguageComments())));
^
6 errors, 1 warning

at org.apache.jasper.compiler.Compiler.compile(Compiler.java:285)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)

Thanks
 
Hi Dalamar:

I think the problem is that tomcat can't find the Bean class. The deprecation warning is throwing while the tomcat webserver is trying to dinamically compile the generated servlet from your JSP. This may be due to a JDK version issue with your tomcat version, but shouldn't be a problem.


NOTE (kind of disclaimer): The compile-time, run-time apparently concept error of &quot;deprecation warning throwed&quot; comes from the fact that in runtime of the tomcat application, the generated servlet is being compiled, so the warning can be &quot;throwed&quot;. Anyway, don't pay attention to that.


Seriously, what I suggest you to do is to compile a very simple class, something like a &quot;hello world&quot; and place it in the same directory where the LanguageBean is located. If you get the same problem when the jsp loads the simple class, you have a context (CLASSPATH) problem. If doesn't, it could be other kind of more serious problem.

Let me know what happens.

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top