Unable to build jasper-compiler.jar for Tomcat 5.5

2007-02-09 Thread M Coffee
Could someone point me to directions on how to build jasper-compiler.jar?

This is the first time I've tried to build Tomcat, and while the build for 
Tomcat appeared to go
well (there are many jars, but there were errors in getting eclipse files from
http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/ so that part of the 
build failed),
there was no build for the jasper-compiler.jar.  I would like to build j-c.jar 
to add extra
debugging information to DefaultErrorHandler.java.

I got the source distribution for Tomcat 5.5.12, because that is the version we 
are running. 
There is source for jasper-compiler.jar, but no jasper-compiler.jar.  When I 
try to run the ant
build in the Jasper2 directory, following the BUILDING.txt instructions in that 
directory, it
doesn't work with the following errors:

--
E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2>ant -v jsp20el.dist
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_04\jre
Detected OS: Windows 2000
parsing buildfile E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\buil
d.xml with URI = file:/E:/apache-tomcat-5.5.12-src/jakarta-tomcat-jasper/jasper2
/build.xml
Project base dir set to: E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jaspe
r2
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading C:\Documents and Settings\Administrator.CITRIX_RAID\build.pr
operties
 [property] Unable to find property file: C:\Documents and Settings\Administrato
r.CITRIX_RAID\build.properties
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\bu
ild.properties
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\bu
ild.properties.sample
Override ignored for property "catalina.home"
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-5\build\build.pro
perties
 [property] Unable to find property file: E:\apache-tomcat-5.5.12-src\jakarta-to
mcat-5\build\build.properties
Override ignored for property "catalina.home"
Property "api.home" has not been set
Property "api.home" has not been set
Property "jasper-compiler-jdt.jar" has not been set
Property "xerces.jar" has not been set
Property "xercesImpl.jar" has not been set
Property "xml-apis.jar" has not been set
Property "commons-el.jar" has not been set
Property "commons-collections.jar" has not been set
Property "commons-logging.jar" has not been set
Property "commons-daemon-launcher.jar" has not been set
Property "junit.jar" has not been set
Property "xerces.jar" has not been set
Property "xercesImpl.jar" has not been set
Property "xml-apis.jar" has not been set
Property "commons-collections.jar" has not been set
Property "commons-launcher.jar" has not been set

BUILD FAILED
Target "jsp20el.dist" does not exist in the project "Jasper2".
at org.apache.tools.ant.Project.tsort(Project.java:1821)
at org.apache.tools.ant.Project.topoSort(Project.java:1729)
at org.apache.tools.ant.Project.topoSort(Project.java:1692)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 2 seconds
E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2>
---

I'm using ant 1.7.0 and jdk 1.5.

Most of those jars exist, but I expected one of the build scripts to set them.  
Do they need to be
explicitly set in the jasper build.properties file?

Hope someone can help,

M Coffee



 

Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Building the Jasper compiler

2007-02-12 Thread M Coffee
Could I ask again for a reference to instructions on how to build the Jasper 
compiler?  The
Building.txt that comes with it does not work for me (Win2K, jdk 1.5, ant 
1.7.0).

Or, would you let me know if it is not possible to build the Jasper compiler 
except through the
Tomcat build?

I have been able to compile individual classes in jasper, so that's what I've 
been doing, and
patching the working jar I have.  But I'd rather be following an ant build 
process, just to be
sure that all of the environment is being referenced correctly.

Is there a mailing list just for Jasper that I should be sending this question 
to?

M Coffee


 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Building the Jasper compiler

2007-02-12 Thread M Coffee
William,

Thanks for responding.  This explains why I couldn't find an independent build 
process for Jasper.
 So I'll continue patching the jar, and wait for the development you do on 
Gentoo.  If you do any
work on the Jasper compiler, please think about addressing the problem of 
getting reasonably good
source code lines numbers (jsp or java would be fine) from a JSP compile error. 
 It worked well in
Tomcat 4, but the Jasper compiler in Tomcat 5 does a poor job of it.  That's 
why we haven't
switched our development environments to Tomcat 5, and why I'm trying to do 
some sort of hack to
at least see the underlying compiler error messages.

M Coffee

--- "William L. Thomson Jr." <[EMAIL PROTECTED]> wrote:

> On Mon, 2007-02-12 at 10:21 -0800, M Coffee wrote:
> > Could I ask again for a reference to instructions on how to build the
> > Jasper compiler?  The Building.txt that comes with it does not work
> > for me (Win2K, jdk 1.5, ant 1.7.0).
> 
> It's not going to be on windows, but on Gentoo we will have a
> tomcat-jasper package. There was a jakarta-tomcat-jasper, that was old
> based on 5.0.28 sources, and I punted it from the tree since no one was
> using it. It's purpose was for Jetty, since Jetty uses Tomcat's Jasper.
> 
> I had to rip out the guts, and make a build.xml specifically for
> tomcat-servlet-api. I will be doing the same at some point for
> tomcat-jasper. So if no one else responds with info, check the Gentoo
> viewcvs/svn for either the tree, or one of our java overlays in a few
> weeks. Presently I have no motivation to work on the package, but will
> see about it over the upcoming weeks.
> 
> Once I do, you can take the build.xml and it should work on windows or
> etc.
> 
> > Or, would you let me know if it is not possible to build the Jasper
> > compiler except through the Tomcat build?
> 
> I am sure it's possible, but might be some steps involved. I would
> recommend looking at the existing build.xml for anything specific to
> jasper and rip that out and put into it's own build.xml. You will need
> to make your own compiling target, and omit any stuff that is not
> necessary to compiling or building jasper.
> 
> > I have been able to compile individual classes in jasper, so that's
> > what I've been doing, and patching the working jar I have.  But I'd
> > rather be following an ant build process, just to be sure that all of
> > the environment is being referenced correctly.
> 
> Their used to be multiple build.xml's. Which on one level was nice for
> splitting up the package. But on another made some things really a pain.
> I much prefer the single build.xml to multiple.
> 
> > Is there a mailing list just for Jasper that I should be sending this
> > question to?
> 
> It's my understanding through past comments on this list that Jasper is
> an integral port of Tomcat. It was developed for Tomcat, it will change
> along with Tomcat versions. So this would be the right list and place,
> unless things have changed ;)
> 
> -- 
> William L. Thomson Jr.
> Gentoo/Java
> 



 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Building the Jasper compiler

2007-02-12 Thread M Coffee
William,

> >   This explains why I couldn't find an independent build process for
> > Jasper. So I'll continue patching the jar, and wait for the
> > development you do on Gentoo.
> 
> I will try to remember to shoot you a heads up when I do. It will be the
> build.xml that you want. But really they are not bad to make, feel free
> to try yourself. 

Sure, I could probably work through getting the build.xml for jasper to run.  
It just seemed like
something that would have already been done.  If I get one working, I'll post 
it here.

> >   If you do any
> > work on the Jasper compiler,
> 

> My focus these days is on 6.0.x. I hope you are wanting to build a 6.0.x
> Jasper. As I doubt I will be packaging a 5.5.x jasper, and I believe
> there was a jasper specific build xml with the 5.5.x branch. It's been a
> bit since I last dug in sources so can't recall from memory at this
> time.

There is a jasper build.xml, but it doesn't build the jars without a complete 
Tomcat build
environment (and possibly an older version of Ant), so I stopped working on 
debugging that one. 
There's no documentation for it either -- the code is the documentation, I 
guess.

I definitely don't want to move up to Tomcat 6 until the problems with 
debugging JSP pages in the
Tomcat 5 environment are resolved.  We've waited a while, and now I'm trying to 
hack it to the
point where we can use it internally.


Thanks again,

M Coffee

> -- 
> William L. Thomson Jr.
> Gentoo/Java
> 



 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JSP Compiler error messages lower quality in Tomcat 5.5?

2006-07-06 Thread M Coffee
The quality of the JSP compiler error messages for Tomcat 5 seems much worse 
than those for Tomcat
4.  The difference makes debugging much harder under the Tomcat 5.5 releases.  
Is there a way to
build Tomcat with different components to have it provide better compiler error 
messages?

As an example, this JSP code snippet:

errMsg = "Uploaded file has no readable records or is empty.");

generates this compiler error message in Tomcat 5.5.12:

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 7 in the jsp file: /adminArea/UploadFile.jsp
Generated servlet error:
Syntax error on token ")", delete this token


However, the same file under Tomcat 4.1.24 generates this compiler error 
message:
---
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac]
D:\jakarta-tomcat-4.1.24\work\Standalone\localhost\_\adminArea\UploadFile_jsp.java:1998:
 ';'
expected
[javac] errMsg = "Uploaded file has no readable 
records or is empty.");
[javac] 
  
   ^
[javac] 1 error
------

M Coffee

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP Compiler error messages lower quality in Tomcat 5.5?

2006-07-06 Thread M Coffee
Yoav -- thanks for this link.

The patch you referenced installs and runs, but doesn't solve the problem 
Tomcat 5 has with
showing where the JSP compiler error occurred.  We installed the patch on a 
Tomcat 5.5.12
instance, and it runs successfully, but the output for the same code snippet is 
still
uninformative:

--
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 7 in the jsp file: /adminArea/UploadFile.jsp
Generated servlet error:
Syntax error on token ")", delete this token



org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:474)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
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: 7 in the jsp file: /adminArea/UploadFile.jsp
Generated servlet error:
Syntax error on token ")", delete this token



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:409)
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:563)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
-

In reading the Bugzilla reference you included, I see that there are more 
layers of indirection
between the compiler and the Tomcat output -- with even more added in later 
releases of Tomcat 5.5
-- so that is probably the issue:  someone didn't propagate the full compiler 
error information up
the stack.

Has anyone looked at this, or can someone point me at the likely spot to 
collect the correct
information from the JSP compiler so that I could start trying to build a patch?

Thanks,

M Coffee


--- Yoav Shapira <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> On 7/6/06, M Coffee <[EMAIL PROTECTED]> wrote:
> > The quality of the JSP compiler error messages for Tomcat 5 seems much 
> > worse than >those for
> Tomcat
> 
> That's kind of funny: a few 5.5 releases ago I committed a patch
> suggested by someone to make JSP error messages much clearer ;)  I
> think it was for release 5.5.15 and the relevant Bugzilla issue is
> 37062: see it at
> http://issues.apache.org/bugzilla/show_bug.cgi?id=37062.
> 
> Obviously "clear" is a subjective term.  See if you like the Tomcat
> 5.5 behavior before 5.5.15 better or less than Tomcat 4, and let us
> know.  Then perhaps we can work on a patch together.
> 
> > Is there a way to build Tomcat with different components to have it provide 
> > better compiler >
> error messages?
> 
> Generically speaking, you can customize Tomcat any which way you want.
>  And if you find a setup that works better for you with regards to JSP
> error messages, we'd love to hear about it, see your patch, and
> hopefully include it in the product itself.
> 
> Yoav
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]