Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-16 Thread Daniel Gresh

Daniel Gresh wrote:

Daniel Gresh wrote:

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file 
in the $CATALINA_HOME/conf directory according to the thread on the 
Java forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with 
ant. When I try to compile code -- ANY code from ANY JDK -- even 
something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*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

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException

org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Oh I should have mentioned that when I type ant -version I get the error:

Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/tools/ant/Main


Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



List,

I solved my problem with getting ant -version to work. The older version 
of Ant was apparently causing problems, but I can't remove it. So, I set 
the newer version of Ant at the beginning of PATH, so when I type ant 
-version, it will be referenced first, and it will give me the correct 
version (1.7.0). However, I am still getting a problem when I try to 
compile. I've searched Google for help, but I haven't managed to find any.


The error message has changed slightly from the last one, so here it is:


 HTTP Status 500 -



*type* Exception report

*message*

*description* _The server encountered an internal error () that 
prevented it from fulfilling this request._


*exception*

javax.servlet.ServletException: org/apache/tools/ant/launch/AntMain
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/AntMain
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)

Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some Java 
compilation errors when I used JDK1.5 features, and neither I nor the 
two who replied to my message could figure out why. Upgrading was 
suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves JDK1.5 
to find out if everything can compile correctly. However, when I deploy 
my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense to 
me (because I know the code I have compiles correctly with javac). This 
is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -



*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: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



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:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX box 
Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set to. 
Also when I use printenv JRE_HOME, it returns nothing. Is this a problem?


Thanks for any help you can offer,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread APliszka-Public
Try using code that is not 1.5 specific [like for(String x: s)] if it is 
going to work then your pages are compiled as Java 1.4 source code, you 
will have change tomcat config to so jsp compiler is compailing Java 1.5 
source.


Andrew Pliszka

Daniel Gresh wrote:


Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some Java 
compilation errors when I used JDK1.5 features, and neither I nor the 
two who replied to my message could figure out why. Upgrading was 
suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves 
JDK1.5 to find out if everything can compile correctly. However, when 
I deploy my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense 
to me (because I know the code I have compiles correctly with javac). 
This is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -



*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: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected


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:397) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX 
box Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set to. 
Also when I use printenv JRE_HOME, it returns nothing. Is this a 
problem?


Thanks for any help you can offer,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

APliszka-Public wrote:
Try using code that is not 1.5 specific [like for(String x: s)] if it 
is going to work then your pages are compiled as Java 1.4 source code, 
you will have change tomcat config to so jsp compiler is compailing 
Java 1.5 source.


Andrew Pliszka

Daniel Gresh wrote:


Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some 
Java compilation errors when I used JDK1.5 features, and neither I 
nor the two who replied to my message could figure out why. Upgrading 
was suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves 
JDK1.5 to find out if everything can compile correctly. However, when 
I deploy my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense 
to me (because I know the code I have compiles correctly with javac). 
This is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -



*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: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



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:397) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX 
box Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set 
to. Also when I use printenv JRE_HOME, it returns nothing. Is this 
a problem?


Thanks for any help you can offer,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hi, thanks for the reply.

I changed my code to use a JDK1.4 feature, assert, like this:

%
   boolean s = true;
   assert s;
%

and it compiled fine.

So apparently it is not compiling for JDK1.5. How would I tell it to do 
so? I looked at $CATALINA_HOME/conf/server.xml, but I wasn't sure if 
that was where I was supposed to make the configuration change. How 
would I do so?


Thanks,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread APliszka-Public

Google for compilerSourceVM, and you should find examples of enabling 1.5.

Andrew Pliszka

Daniel Gresh wrote:


APliszka-Public wrote:

Try using code that is not 1.5 specific [like for(String x: s)] if it 
is going to work then your pages are compiled as Java 1.4 source 
code, you will have change tomcat config to so jsp compiler is 
compailing Java 1.5 source.


Andrew Pliszka

Daniel Gresh wrote:


Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some 
Java compilation errors when I used JDK1.5 features, and neither I 
nor the two who replied to my message could figure out why. 
Upgrading was suggested, so we upgraded to Tomcat 5.5.9.


I'm running some simple tests using some basic code that involves 
JDK1.5 to find out if everything can compile correctly. However, 
when I deploy my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no 
sense to me (because I know the code I have compiles correctly with 
javac). This is the index.jsp file:


!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;

%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head

body

%
 String[] s = {1, 2};
   for (String x : s) {
}
%

/body
/html

This is the error message:


 HTTP Status 500 -

 



*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: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



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:397) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 


org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX 
box Tomcat is installed on, so the code should certainly be compiling.


One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:


Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set 
to. Also when I use printenv JRE_HOME, it returns nothing. Is this 
a problem?


Thanks for any help you can offer,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hi, thanks for the reply.

I changed my code to use a JDK1.4 feature, assert, like this:

%
   boolean s = true;
   assert s;
%

and it compiled fine.

So apparently it is not compiling for JDK1.5. How would I tell it to 
do so? I looked at $CATALINA_HOME/conf/server.xml, but I wasn't sure 
if that was where I was supposed to make the configuration change. How 
would I do so?


Thanks,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Propes, Barry L [GCG-NAOT]
might require updated jar files for the servlets and jsps?

-Original Message-
From: Daniel Gresh [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 15, 2007 1:34 PM
To: Tomcat Users List
Subject: Tomcat 5.5.9 on Sun Solaris: JSP compilation error


Hi list,

Recently I upgraded Tomcat from 4.0.5 to 5.5.9, due to some unusual 
problems I was experiencing with Tomcat 4.0.5. I was getting some Java 
compilation errors when I used JDK1.5 features, and neither I nor the 
two who replied to my message could figure out why. Upgrading was 
suggested, so we upgraded to Tomcat 5.5.9.

I'm running some simple tests using some basic code that involves JDK1.5 
to find out if everything can compile correctly. However, when I deploy 
my index.jsp to the server and try to launch it from 
http://localhost:port#, I get a compilation error that makes no sense to 
me (because I know the code I have compiles correctly with javac). This 
is the index.jsp file:

!doctype html public -//w3c//dtd html 4.0 transitional//en 
http://www.w3.org/TR/REC-html40/strict.dtd;
%@ page import=java.util.ArrayList %
%@ page contentType=text/html;charset=UTF-8 language=java %
html
headtitleTEXT/title/head
 
body
 
%
  String[] s = {1, 2};
for (String x : s) {
}
%
 
/body
/html

This is the error message:


  HTTP Status 500 -



*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: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)

An error occurred at line: 9 in the jsp file: /index.jsp
Generated servlet error:
Syntax error on token ), : expected



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:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I don't know what is wrong. I have JDK1.5.0_06 installed on the UNIX box 
Tomcat is installed on, so the code should certainly be compiling.

One thing that bothers me is this:

When I use shutdown.sh or startup.sh to shutdown and startup Tomcat, 
respectively, the terminal output tells me:

Using JRE_HOME: /usr/local/jdk1.5.0_06

Should this not be JAVA_HOME instead of JRE_HOME? I have a JAVA_HOME 
environment variable that is set to what JRE_HOME is currently set to. 
Also when I use printenv JRE_HOME, it returns nothing. Is this a problem?

Thanks for any help you can offer,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file in 
the $CATALINA_HOME/conf directory according to the thread on the Java 
forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with ant. 
When I try to compile code -- ANY code from ANY JDK -- even something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*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

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException

org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5.9 on Sun Solaris: JSP compilation error

2007-02-15 Thread Daniel Gresh

Daniel Gresh wrote:

APliszka-Public wrote:
Google for compilerSourceVM, and you should find examples of 
enabling 1.5.


Andrew Pliszka


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Hi all, thanks for the fast replies.

I googled compilerSourceVM and came across this thread on the Java 
forums: 
http://forum.java.sun.com/thread.jspa?threadID=579806messageID=2928513


I followed the instructions there. I removed jasper-compiler-jdt.jar 
from my $CATALINA_HOME/common/lib directory. Then, I noticed my Ant 
version was 1.5.4, so I downloaded Ant 1.7.0 instead, as 1.5.4 is not 
compatible with JDK1.5. Next, I added ant.jar to the 
$CATALINA_HOME/common/lib directory. Then, I edited my web.xml file in 
the $CATALINA_HOME/conf directory according to the thread on the Java 
forums and the Jasper how-to. Finally, I restarted Tomcat.


I am still getting a problem however, and I believe this deals with 
ant. When I try to compile code -- ANY code from ANY JDK -- even 
something like:


%
String s;
%

I get this error:


 HTTP Status 500 -



*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
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.NullPointerException
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:159) 


org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) 


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I haven't removed the older version of Ant (Ant 1.5.4). Could this be 
causing the problem? Or is there something else I am missing?


Also, I accidentally clicked refresh on my browser after getting this 
error, and the page loaded. I hit refresh a few more times and it 
loaded. Then, it gave me the error again, and repeated. I doubt it's 
pertinent, but who knows.


Thanks,
Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Oh I should have mentioned that when I type ant -version I get the error:

Exception in thread main java.lang.NoClassDefFoundError: 
org/apache/tools/ant/Main


Dan

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]