Solved

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

Posted on 2003-12-11
25
77,855 Views
Last Modified: 2012-05-04
Hi,

I facing a weird problem and need urgent solution. The error is:


Apache Tomcat/4.0.4 - 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 between lines: 16 and 998 in the jsp file: /parseutimportlist.jsp

Generated servlet error:
/shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java:534: Variable myPool may not have been initialized.
                            conn = myPool.getConnection();
                                   ^

...

Generated servlet error:
/shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java:669: Variable displist_yyyymmdd may not have been initialized.
                                        if (displist_yyyymmdd.equalsIgnoreCase("")) { //File 1 is Range
                                            ^

...

An error occurred between lines: 16 and 998 in the jsp file: /parseutimportlist.jsp

Generated servlet error:
/shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java:900: Variable vecbuy may not have been initialized.
                                              buyx = (vecbuy.get(b) == null?"":vecbuy.get(b).toString());
                                                      ^

...

An error occurred between lines: 16 and 998 in the jsp file: /parseutimportlist.jsp

Generated servlet error:
/shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java:1269: Variable conn may not have been initialized.
                            myPool.freeConnection(conn);            
                                                  ^

An error occurred between lines: 1,097 and 1,099 in the jsp file: /parseutimportlist.jsp

Generated servlet error:
/shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java:1294: Variable isdisplistrange may not have been initialized.
                                                          if ((isfulllistfound ==true) || ((isdisplistfound ==true) || (isdisplistrange==true))) {
                                                                                                                        ^
Note: /shared/home/tomcat4/work/Apache/play.mydomain.com/unittrust/parseutimportlist$jsp.java uses or overrides a deprecated API.  Recompile with "-deprecation" for details.
65 errors, 2 warnings

      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.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.warp.WarpRequestHandler.handle(WarpRequestHandler.java:217)
      at org.apache.catalina.connector.warp.WarpConnection.run(WarpConnection.java:194)
      at java.lang.Thread.run(Thread.java:536)


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

Seems that all variables has been deprecated, any possible reason why this happen? I have declared all the variables at the top of the page, and this problem sometimes resolved after the Server (Apache Tomcat) is restarted.

How can i resolve this?
0
Comment
Question by:Ryan Chong
  • 10
  • 7
  • 4
  • +3
25 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9918999
0
 
LVL 24

Expert Comment

by:shivsa
ID: 9919019
if u could post your code it will easy to figure out errors.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9919104
yeah...post your JSP code :-)
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9919268
Thanks for the help, can help see this file? The file tested ok on my development pc but failed at client production server. Do Need an urgent fix! thks!!

http://www.activefusion.net/temp/unittrust/parseutimportlist.zip

You can send back the file to my to my email (see it from my profile) or at : ryancys at yahoo dot com.

thks a lot!
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9919306
Will it be the variables declaration problem? What will be the common error when see the error: sun.tools.javac.Main has been deprecated ?
0
 
LVL 9

Expert Comment

by:vzilka
ID: 9919383
What common libraries do you use? It might be a collision between 2 JAR files.
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9919627
Also,

conn = myPool.getConnection();

isn't in that file...  it must have been imported by one of the @include directives...

Are you sure the @imports are in the right order?  Do you have all the ones you need?

Is there a similar page that you can check to see that you have all the stuff you want, in the correct order?

Tim
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9919929
this file does not contain all the variables that are in error...... have you checked that your include files are compiling okay??
or can you provide them??
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9919955
>_<
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9920018
hey tim sorry to over look your comment....... I just downloaded the file and started typing my comments right away......:-)
My bad... sorry abt that
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9920044
hee hee :-)  no worries :-)  I got a bit "code blind" after looking at it too ;-)
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9925290
Will it be better if i pass you guys the war file??
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9926009
I think that would be helpful, we will still be not running it for the reason that we will not have database to get connected to but it will help atleast figureing out why jsps are not even getting compiled.....
0
 
LVL 30

Expert Comment

by:mayankeagle
ID: 9926279
>> Will it be the variables declaration problem?

Could be. It says:

>> Variable myPool may not have been initialized.
>> Variable displist_yyyymmdd may not have been initialized.
>> Variable conn may not have been initialized.
>> Variable vecbuy may not have been initialized.
>> Variable isdisplistrange may not have been initialized.

Initialize them to null at the time of declaration.

Connection conn = null ; // and so on....

Mayank.
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9926514
Hi Mayank,

i did defined as Connection conn = null; previously..


The original war file (remove those unwanted files) is at:

http://www.activefusion.net/temp/unittrust/ee_ut.war

For your information, please note:

1. Do Not use anycode inside in any commercial purpose, however, it's free for reference.

2. The backend database is Oracle, then SID, username and password is encrypted and write into a setting file call dbinit.jsp in the include folder, when a connection is established, it read the SID, username and password from the setting file and decript it to establish the connection.

* The war file link will be removed after the problem is resolved.

Since the SID, username and password is encrypted, if someone really interested to help and research on it, you can pass them by email to me, so that i can generated the encrypted info wanted.

thks!
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9926523
forget to tell, inside the war file, got a table.sql, it's used to generated the table structure in Oracle database, see the Unit Trust Search Test Planning v1.2.doc inside the war file for more information.
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9926828
I tried compiling your jsp and was able to successfully do so... only problem I faced was with JDK1.4, I am using 1.3.1_08 so had to change your .split() method and had to comment out the pattern.compile portion in order to get it going.... but after commenting this it compiled just fine... and gave me the class file..

so seeing this I am inclining to believe that it has got something to do with JDK version you are using + the java server
mine was jdk1.3.1_08 +tomcat 4.1.24...

One more thing... after getting the jsp compiled I am getting a white page ( no output ) and also no exception is being thrown any where.........

if your database is open on net I try connecting to it to see the actual results...
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9927232
Thks Kuldeepchaturvedi for the comment.

>>if your database is open on net I try connecting to it to see the actual results...
Unfortunately, this is out of my control, as the actually client is not allowed us to do it. Even i cant go and FTP the code change (IP restriction and not allowed to do so.., the server is at HK)

Jdk version and Tomcat version? is that possible? My development platform is j2ee1.3.1 plus Tomcat 4.0.6, it works fine here. I need to ask my Client regarding the Jdk and Tomcat version, however, i cannot do anything on it.

I have already make an implicit declaration for all the variables like:

java.sql.Connection conn = null;
java.sql.ResultSet rs = null;      
java.sql.PreparedStatement ps = null;

java.io.BufferedReader indisp = null;

...

i had sent this file to client to test already, hope it will passed!
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9927308
Get the feedback from client, problem remains with same error! :-(

What i'm gonna to do? i'm a bit frustrated already..

The full error page is shown at:
http://www.activefusion.net/temp/unittrust/Apache%20Tomcat-4_0_4%20-%20Error%20report.htm
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 9927391
okay can you do one thing? can you ask your customer to provide you the java file that tomcat is creating in its work folder??

looking at it may give us some useful hints...

ask them to send the file "parseutimportlist$jsp.java" which should have been created somewhere in the tomcat scratch directory..
we will try to see whats wrong with than generated java source for your jsp
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9939736
Hi guys,

Any ideas so far?

Kuldeepchaturvedi, seems that the HK admin ignore my mails :'( ..

And one of my friend indicate this may be is the server & javabean component haven't be registered in the http.conf page, is that true? got such thingy??
0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 500 total points
ID: 9939875
see if this helps.... seems you are not the only one in the world having this problem.....

http://www.caucho.com/support/resin-interest/0203/0288.html
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 9939995
Hi,

FYI, the target server will be a Unix Server with running both Apache (HTTP) server and Tomcat, so got any clue if i can resolve this problem from the conf file?

And i had cut off the parseutimportlist.jsp that got problem, and migrate parts of codes into an application, to generate the file needed (the parseutimportlist.jsp is used to read sources files, then generate output files and update database). I shorten the code from 1100+ lines to now 300+ lines, hope this will finally resolve my problem!

However, i'm now realised that i got another file contains 1500+ lines of codes, this time i'm affraid i cant cut the scripts as much as possible.. all codes need to be within, so how to cut off the scripts? i heard my another friend said using include files, will it works? Any comments?
0
 
LVL 49

Author Comment

by:Ryan Chong
ID: 10029514
Kuldeepchaturvedi,

I think you hit the jackpot! I did give me some idea on solving this weird problem. My solution will be split the 1100+ lines jsp into several jsp, which then i can put the code together by include them.

Hmmm, not truly solution but it did solve my problem, cheers ya! ;-)
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10039995
Happy to be of any help to you...:-) ans sorry for delayed response.. I was away in new yr parties........:-)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
session bean client machine 9 53
getting param value 7 51
sortaSum challenge java 17 170
oracle fusion vs MQ 2 93
This article will show you how to create an ISO CD-ROM/DVD-ROM image (*.iso), and MD5 checksum signature, for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5). It's a good idea to compare checksums, because many installations fail because of a corr…
A procedure for exporting installed hotfix details of remote computers using powershell
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now