You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2005/02/07 23:10:39 UTC
DO NOT REPLY [Bug 33434] New: -
el taglibs cause jspc crash?
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33434>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33434
Summary: el taglibs cause jspc crash?
Product: Struts
Version: 1.2.4
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Custom Tags
AssignedTo: dev@struts.apache.org
ReportedBy: jeroen.kransen@ordina.nl
I try to pre-compile my JSPs using a jspc task in my build.xml.
This is the error message that I get:
[echo] precompiling JSPs to ./src/www
[jspc] 22:49:09,468 ERROR [org.apache.struts.util.MessageResourcesFactory]
MessageResourcesFactory.createFactory
[jspc] java.lang.ClassNotFoundException:
org.apache.struts.util.PropertyMessageResourcesFactory
[jspc] at java.net.URLClassLoader$1.run(Unknown Source)
[jspc] at java.security.AccessController.doPrivileged(Native Method)
[jspc] at java.net.URLClassLoader.findClass(Unknown Source)
[jspc] at java.lang.ClassLoader.loadClass(Unknown Source)
[jspc] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
[jspc] at java.lang.ClassLoader.loadClass(Unknown Source)
[jspc] at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:119)
[jspc] at
org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:150)
[jspc] at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:495)
[jspc] at org.apache.struts.taglib.html.HtmlTag.<clinit>(HtmlTag.java:50)
[jspc] at java.lang.Class.forName0(Native Method)
[jspc] at java.lang.Class.forName(Unknown Source)
[jspc] at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanInfo.java:48)
[jspc] at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors(ELHtmlTagBeanInfo.java:48)
[jspc] at java.beans.Introspector.getTargetPropertyInfo(Unknown Source)
[jspc] at java.beans.Introspector.getBeanInfo(Unknown Source)
[jspc] at java.beans.Introspector.getBeanInfo(Unknown Source)
[jspc] at
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:3676)
[jspc] at
org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(Generator.java:2098)
[jspc] at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1579)
[jspc] at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
[jspc] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
[jspc] at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
[jspc] at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
[jspc] at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
[jspc] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
[jspc] at org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
[jspc] at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
[jspc] at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
[jspc] at org.apache.jasper.JspC.processFile(JspC.java:854)
[jspc] at org.apache.jasper.JspC.execute(JspC.java:989)
It seems to fail on my struts-html-el taglib (and -logic and probably -bean).
When I strip the -el in the taglib location in the web.xml, in other words:
...<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>...
instead of:
...<taglib-location>/WEB-INF/tld/struts-html-el.tld</taglib-location>...
the problem disappears. It only occurs when pre-compiling the JSPs, it doesn't
show up when "post-compiling" :-)
Though it looks like it can't find
org.apache.struts.util.PropertyMessageResourcesFactory (that's what it says), I
am sure that its jar (struts.jar) is on my class path (see below). Besides, it
is just as necessary when I use the non-el versions, and then it doesn't complain.
My ant jsp task looks like:
<target name="jsp-compile" description="compiles the jsp files into java files,
which are placed among the other .java files">
<taskdef classname="org.apache.jasper.JspC" name="jspc" >
<classpath id="jspc.classpath">
<pathelement location="${base.dir}/tmp"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${base.dir}/ref">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<echo>precompiling JSPs to ${www.dir}</echo>
<jspc
verbose="5"
validateXml="false"
webXmlFragment="${webinf.dir}/generated_web.xml"
outputDir="${src.java.dir}"
uriroot="${www.dir}"
/>
</target>
I am quite sure that I have all the necessary .jars in place. Just to be sure I
think I put the most relevant ones below.
in the {lib.dir} are:
struts.jar
struts-el.jar
jstl.jar
standard.jar
lots of jakarta commons jars and others
in the {base.dir}/ref are:
commons-el.jar
jasper-compiler.jar
jasper-runtime.jar
Oh, there was a log4j.log created, which contains very little:
19:47:32,125 DEBUG [org.apache.jasper.compiler.JspRuntimeContext] Parent class
loader is: sun.misc.Launcher$AppClassLoader@53ba3d
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \index.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \wml\index.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \html\aanmelden.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \html\aanmeldfout.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \html\foutpagina.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File:
\html\overzicht_kennissen.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File:
\html\overzicht_wensen_gebruiker.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File:
\html\wijzigen_wensen_gebruiker.jsp
19:47:32,250 INFO [org.apache.jasper.JspC] Built File: \css\screen.jsp
And the created .java files just stop where the tag referencing the html-el is
found (I hid the -el details, but it matches the uri in web.xml):
<%@ taglib uri="html" prefix="html" %>
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org