Bugs item #668291, was opened at 2003-01-15 13:54
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=668291&group_id=22866

Category: JBossWeb
Group: v3.0 Rabbit Hole
>Status: Pending
Resolution: None
Priority: 5
Submitted By: Brian Bannister (beoch)
Assigned to: Jules Gosnell (jules_gosnell)
Summary: Jasper in release 3.0.5 is 

Initial Comment:
Windows 2000 
JDK 1.4.1_01
JBoss 3.0.5

I'm getting JSP compile errors that do not occur in 
JBoss 3.0.4. Jasper complains that it can't find a class 
that is definately in the deployed war. Using the same 
ear on JBoss 3.0.4 I get no problems.

The traces from JBoss-3.0.5 and JBoss-3.0.4 are 
attached, as well as the war manifest showing the class 
that Jasper can't find.

The exception thrown is:


Time: 13:42:55  Priority: WARN  Thread: PoolThread-
4  NDC: null Category: org.jboss.jbossweb Location: 
org.jboss.logging.Logger.warn(Logger.java:167) 
Message:
WARNING: Exception for 
http://192.223.0.59:8080/itochu/newsticker/view/45/dyna
micMedia/x-news-ticker.jsp
org.apache.jasper.JasperException: Unable to compile 
class for JSPNote: sun.tools.javac.Main has been 
deprecated.


An error occurred at line: 2 in the jsp 
file: /45/dynamicMedia/x-news-ticker.jsp

Generated servlet error:
C:\DOCUME~1\brianb\LOCALS~1
\Temp\Jetty_0_0_0_0_8080__itochu_newsticker\45
\dynamicMedia\x_0002dnews_0002dticker$jsp.java:65: 
Class 
com.activesky.itochu.newsticker.view.NewsTickerView 
not found.
        
com.activesky.itochu.newsticker.view.NewsTickerView 
viewParameter = null;
                                            ^


An error occurred at line: 2 in the jsp 
file: /45/dynamicMedia/x-news-ticker.jsp

Generated servlet error:
C:\DOCUME~1\brianb\LOCALS~1
\Temp\Jetty_0_0_0_0_8080__itochu_newsticker\45
\dynamicMedia\x_0002dnews_0002dticker$jsp.java:68: 
Class 
com.activesky.itochu.newsticker.view.NewsTickerView 
not found.
          viewParameter= 
(com.activesky.itochu.newsticker.view.NewsTickerView)
                                                              ^


An error occurred at line: 2 in the jsp 
file: /45/dynamicMedia/x-news-ticker.jsp

Generated servlet error:
C:\DOCUME~1\brianb\LOCALS~1
\Temp\Jetty_0_0_0_0_8080__itochu_newsticker\45
\dynamicMedia\x_0002dnews_0002dticker$jsp.java:73: 
Class 
com.activesky.itochu.newsticker.view.NewsTickerView 
not found.
              viewParameter = 
(com.activesky.itochu.newsticker.view.NewsTickerView) 
java.beans.Beans.instantiate(this.getClass
().getClassLoader
(), "com.activesky.itochu.newsticker.view.NewsTickerVie
w");
                                                                   ^
3 errors, 1 warning

        at 
org.apache.jasper.compiler.Compiler.compile
(Compiler.java:289)
        at 
org.apache.jasper.servlet.JspServlet.loadJSP
(JspServlet.java:548)
        at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.l
oadIfNecessary(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.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:360)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatc
h(WebApplicationHandler.java:280)
        at 
org.mortbay.jetty.servlet.Dispatcher.dispatch
(Dispatcher.java:194)
        at org.mortbay.jetty.servlet.Dispatcher.forward
(Dispatcher.java:129)
        at 
com.activesky.servlet.FrontController.doGet
(FrontController.java:46)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service
(HttpServlet.java:853)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle
(ServletHolder.java:360)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.d
oFilter(WebApplicationHandler.java:328)
        at 
com.activesky.aserver.mbroker.MediaBrokerFilter.doFilte
r(MediaBrokerFilter.java:138)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler$Chain.d
oFilter(WebApplicationHandler.java:320)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatc
h(WebApplicationHandler.java:272)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle
(ServletHandler.java:553)
        at org.mortbay.http.HttpContext.handle
(HttpContext.java:1656)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle
(WebApplicationContext.java:549)
        at org.mortbay.http.HttpContext.handle
(HttpContext.java:1606)
        at org.mortbay.http.HttpServer.service
(HttpServer.java:862)
        at org.jboss.jetty.Jetty.service(Jetty.java:497)
        at org.mortbay.http.HttpConnection.service
(HttpConnection.java:752)
        at 
org.mortbay.http.HttpConnection.handleNext
(HttpConnection.java:916)
        at org.mortbay.http.HttpConnection.handle
(HttpConnection.java:769)
        at 
org.mortbay.http.SocketListener.handleConnection
(SocketListener.java:202)
        at org.mortbay.util.ThreadedServer.handle
(ThreadedServer.java:289)
        at 
org.mortbay.util.ThreadPool$PoolThread.run
(ThreadPool.java:455)
Throwable:
null

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

>Comment By: Brian Bannister (beoch)
Date: 2003-01-17 23:08

Message:
Logged In: YES 
user_id=651952

Good call on the war structure Adrian. You're right the server-
side classes should be in WEB_INF/classes not in the root 
(checking the manifest below I can see that the structure is 
wrong). I'm using ant to create our archives and I've probably 
stuffed something up. (Can you tell I'm pretending that I didn't 
have to check the spec?)

If there is also a "spaces in path" issue then it's being 
masked by the war structure one. You can see in the 
3.2.0RC1 console trace below that I was using c:\tmp by the 
time that was created.

I'm at home now on a dial-up so I'll have a proper look at the 
code on Monday at work.

Cheers

Brian

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

Comment By: Adrian Brock (ejort)
Date: 2003-01-17 17:27

Message:
Logged In: YES 
user_id=9459

I don't believe classes are supposed to be loaded from
wars and ears.
The correct location for unpacked classes is
WEB-INF/classes

Regards,
Adrian

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

Comment By: Adrian Brock (ejort)
Date: 2003-01-17 17:17

Message:
Logged In: YES 
user_id=9459

This looks like a folder with spaces problem

JBossWebApplicationContext - correct :-)

String path = url.getPath();
if (path != null)
File f = new File(path);
...

Since your temp is in Document And Settings,
this will return Document%20And%20Settings
on 1.4 and f.exists() will fail.

Try changing your temp environment variable
to one without spaces.

I think the correct fix is:
path = java.net.URLDecoder.decode(path);
before constructing the file.

Regards,
Adrian


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

Comment By: Brian Bannister (beoch)
Date: 2003-01-17 17:11

Message:
Logged In: YES 
user_id=651952

Hey Jules I just noticed your author tag on the code. Sorry for 
the obvious comments before, I wasn't sure how well you 
knew the codebase.

I think that I've got a fix for the problem:

on line 244 of 
org.jboss.jetty.JBossWebApplicationContext

you have

        if (f.exists() &&
         f.canRead() &&
         (f.isDirectory() ||
         path.endsWith(".jar")||
         path.endsWith(".zip")) &&
         (!list.contains(url))
         )

I think you need to add wars and ears to the list as well as 
jars. I made this change locally:

        if (f.exists() &&
         f.canRead() &&
         (f.isDirectory() ||
         path.endsWith(".jar")||
         path.endsWith(".war")||
         path.endsWith(".zip")) &&
         (!list.contains(url))
         )

And my jsp now compiles properly.

If you agree that this is a fix, will it be added into 3.0.5 or a 
later release?

Cheers

Brian

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

Comment By: Brian Bannister (beoch)
Date: 2003-01-17 14:37

Message:
Logged In: YES 
user_id=651952

one more quick thing. I've had a look through the source for 
Jetty 4.2.4 and 4.2.5 and the differences look pretty minor.

Looking throught the JBoss 3.0.5 src for (src/jetty/main/)
org.jboss.jetty I can see that JBossWebApplicationContext 
has had changes made to the getFileClassPath() method. I'm 
guessing that this is close to the source of the bug.

Cheers

Brian

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

Comment By: Brian Bannister (beoch)
Date: 2003-01-17 14:04

Message:
Logged In: YES 
user_id=651952

After a bit more testing I can see that the problem isn't 
actually in the jasper jars. If I run JBoss version 3.0.5, but in 
server/default/deploy/jbossweb.sar I deploy the 
org.apache.jasper.jar from version 3.0.4 I still see the same 
exception.

The problem lies somewhere either in 
org.jboss.jetty.jar 
or 
org.mortbay.j2ee.jar. 

If I again run 3.0.5 with the 3.0.4 version of these jars I do not 
see the exception.

Cheers

Brian

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

Comment By: Brian Bannister (beoch)
Date: 2003-01-17 10:22

Message:
Logged In: YES 
user_id=651952

with 3.2.0RC1 we still se the same problem, I'm attaching the 
console trace. 

I don't see the problem with 3.0.5 or 3.2.0RC1 if I delete the 
server/default/deploy/jbossweb.sar and deploy the one from 
3.0.4 instead. I'll have a closer look and see if I can tie it 
down a bit more.

Cheers

Brian

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

Comment By: Jules Gosnell (jules_gosnell)
Date: 2003-01-15 20:23

Message:
Logged In: YES 
user_id=49106

Would you try the latest 3.2 package....

As far as Jetty is concerned the only difference between
Jboss-3.0 and 3.2 is that 3.0 contains Jasper1 and 3.2
contains Jasper2.

If Jasper1 is broken, and Jasper2 works OK, then I will
probably upgrade  Jasper on jboss-3.2.

Jules


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=668291&group_id=22866


-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to