tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ramnish Kalsi <rka...@Lastminute.com>
Subject RE: Precompilling struts-el tags with Jasper2
Date Wed, 19 Oct 2005 09:37:42 GMT
Pretty basic, but can you locate this class in the classpath at
precompilation time !!!

Print out your classpath being used at precompilation stage & then check
this class file in those jars.

-thnx.

-----Original Message-----
From: DeJong, Jonathan [mailto:jdejon01@harris.com] 
Sent: 14 October 2005 19:21
To: users@tomcat.apache.org
Subject: Precompilling struts-el tags with Jasper2

Hello, 
 
I've been battling this problem for a couple days now.  I've googled it, and
have seen it posted other places, but with no solution (that I've found).  I
also can't find anything in bugzilla (does not mean it's not there, just
means I can't find it).  If anyone has experienced this and knows of a
fix/solution/workaround, I would greatly appreciate it.
 
The problem appears when precompiling a jsp that uses the struts-el tags
using Jasper2.  I've attached the stack trace below.  I walked through the
struts and struts-el code and noticed that basically, what's happening, is a
class uses ClassLoader to attempt to load a class in it's own package and
jar file.  This throws a java.lang.ClassNotFoundException, which of course
makes no sense, since they're at the same location.
 
The error occurs only during precompilation, when the jsp code is being
translated into java code, before any actual compilation. 
 
The reason I think this is an issue with Jasper/Tomcat is that in a previous
project, I had the same problem using Weblogic, and gave up on
precompilation, which was fine then.  BEA has come out with a fix in SP4
(which makes me think it's a compiler problem, not a struts-el problem).
However, my current project uses JBoss, and precompilation is an absolute
must.  
 
Thanks in advance!
 
Setup: 
JBoss 3.0.1
Tomcat 4.1.12
 
Stack Trace:
(util.MessageResourcesFactory        153 )
MessageResourcesFactory.createFactory
   java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
       at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
       at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
       at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResource
sFactory.java:148)
       at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:493)
       at org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:93)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:141)
       at
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.class$(ELFormTagBeanInfo.j
ava:32)
       at
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.getPropertyDescriptors(ELF
ormTagBeanInfo.java:39)
       at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:471)
       at java.beans.Introspector.getBeanInfo(Introspector.java:381)
       at java.beans.Introspector.getBeanInfo(Introspector.java:153)
       at
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:18
74)
       at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:10
73)
       at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:707)
       at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
       at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:1070)
       at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:1076)
       at org.apache.jasper.compiler.Node$Root.accept(Node.java:232)
       at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:1028)
       at org.apache.jasper.compiler.Generator.generate(Generator.java:1845)
       at
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:234)
       at org.apache.jasper.JspC.processFile(JspC.java:561)
       at org.apache.jasper.JspC.execute(JspC.java:788)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:147)
       at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166)
       at org.apache.tools.ant.Task.perform(Task.java:319)
       at org.apache.tools.ant.Target.execute(Target.java:309)
       at org.apache.tools.ant.Target.performTasks(Target.java:336)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
       at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
       at org.apache.tools.ant.Task.perform(Task.java:319)
       at org.apache.tools.ant.Target.execute(Target.java:309)
       at org.apache.tools.ant.Target.performTasks(Target.java:336)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
       at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
       at org.apache.tools.ant.Task.perform(Task.java:319)
       at org.apache.tools.ant.Target.execute(Target.java:309)
       at org.apache.tools.ant.Target.performTasks(Target.java:336)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
       at org.apache.tools.ant.Task.perform(Task.java:319)
       at org.apache.tools.ant.Target.execute(Target.java:309)
       at org.apache.tools.ant.Target.performTasks(Target.java:336)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
       at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
       at org.apache.tools.ant.Task.perform(Task.java:319)
       at org.apache.tools.ant.Target.execute(Target.java:309)
       at org.apache.tools.ant.Target.performTasks(Target.java:336)
       at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
       at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
       at org.apache.tools.ant.Main.runBuild(Main.java:610)
       at org.apache.tools.ant.Main.start(Main.java:196)
       at org.apache.tools.ant.Main.main(Main.java:235)
   Error in class org.apache.jasper.JspC
 
 
Jon DeJong
Software Engineer II
Harris Technical Services Corporation
 
jonathan.dejong@harris.com
Cell: 402.871.7362

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message