facebook

Strange error compiling JSP with struts-el taglib

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #196807 Reply

    chrismay
    Member

    I have a couple of JSPs that use the struts-el tag library. When I include at the top of the JSP a line like this:

    <%@ taglib uri=”/WEB-INF/lib/struts-html-el.tld” prefix=”html” %>

    then I get an error at that line, as shown below (reformatted onto multiple lines from the task view’s single-line version):

    The web-app works fine when built and deployed into Jetty, so I don’t think there’s anything obviously wrong with the JSP or the jar files

    Any thoughts? How can I look further into what’s going on? I have the struts source, so if there’s a way of getting JspCC to run in debug mode, I could step through and see why the exception’s being thrown.

    Chris

    80)
    at org.apache.strutsel.taglib.html.ELFormTagBeanInfo.getPropertyDescriptors(ELFormTagBeanInfo.java:80)
    at java.beans.Introspector.getTargetPropertyInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at java.beans.Introspector.getBeanInfo(Unknown Source)
    at de.bb.jsp.JspCC.?(Unknown Source)
    at de.bb.jsp.JspCC.?(Unknown Source)
    at de.bb.jsp.JspCC.?(Unknown Source)
    at de.bb.jsp.JspCC.?(Unknown Source)
    at de.bb.jsp.JspCC.?(Unknown Source)
    at de.bb.jsp.JspCC.run(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at de.bb.bje.eclipse.support.JspCompiler.compile(Unknown Source)
    at de.bb.bje.eclipse.IncrementalJspBuilder.compile(Unknown Source)
    at de.bb.bje.eclipse.IncrementalJspBuilder.visit(Unknown Source)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:71)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:52)
    at de.bb.bje.eclipse.IncrementalJspBuilder.?(Unknown Source)
    at de.bb.bje.eclipse.IncrementalJspBuilder.build(Unknown Source)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)
    at org.eclipse.core.runtime.Platform.run(Platform.java:413)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1006)
    at org.eclipse.core.runtime.Platform.run(Platform.java:413)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:212)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:884)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1600)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
    Caused by: java.lang.NullPointerException
    at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
    at org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:140)
    … 43 more

    #196808 Reply

    Scott Anderson
    Participant

    From the stactrace:

    Caused by: java.lang.NullPointerException
    at org.apache.struts.util.MessageResources.getMessageResources

    it looks like the taglib is trying to load some “message resources” and not finding them. I’d guess they’re property files or something. Is ther anything like that that could be causing the problem? Perhaps they’re not on the classpath?

    –Scott
    MyEclipse Support

    #196809 Reply

    Wayne Kidd
    Member

    The MessageResources file (a properties file) is a file that must be on the classpatth of the app server. The taglib declaration is not the problem. Other stuff in the page may be missing (possibly a struts error tag). In any case, there is not enough of configuation and page definition to answer about what is wrong. Jetty, if it is running this page has a file in its classpath that has a name defined in (or defaulted in) struts-config.xml.

    Wayne

    #196838 Reply

    dombat
    Member

    I’m having exactely the same trouble, but using jboss-3.2.1-tomcat-4.1.24
    Every jsp with one or several <%@ taglib uri=”/WEB-INF/struts-xxx-el.tld” prefix=”xxx-el” %> gets this kind of error with jspcc.
    But the jsps run fine after deployement.

    I have an other problem:
    I create a J2EE project with web and ejb module on one machine which deploys and run fine, then I copy the whole project (the 3 parts) in an other machine, same configuration: if I try to deploy this project, only the .ear is created, without the web app .war and the ejb .jar in it.

    #196839 Reply

    Scott Anderson
    Participant

    On both these issues I’d have to simply recommend that you wait until the end of the day and upgrade to the GA release of the product. Great enhancements have gone in in both of these areas.

    –Scott
    MyEclipse Support

    #197000 Reply

    dombat
    Member

    same trouble with jspcc and jsp using el struts tag libs rebuilding the project under 2.5 GA

    #197009 Reply

    support-michael
    Keymaster

    Sorry to hear you are still running into problems. I have entered a problem report and we will research this issue. I’ll post back our findings ASAP.

    Michael
    MyEclipse Support

    #197021 Reply

    Scott Anderson
    Participant

    One more question on the taglibs: Did you appropriately modify web.xml to map the taglib uri’s to their location? Relying on default behavior is inherently dangerous and may be the root of this issue.

    –Scott
    MyEclipse Support

    #197092 Reply

    support-michael
    Keymaster

    We are adding struts-el taglib to our test suite. I will follow up shortly with more information.

    Michael
    MyEclipse Support

    #197640 Reply

    I have several jsps that use the struts-el and it still provides errors on pages that have the el tag in version 2.5.1GA. Although it is not a show stopper. It is annoying. I was just wondering if there is a workaround or if there is a fix coming soon.

    #197643 Reply

    No Operation
    Member

    Could you assemble an example project to reproduce that behaviour?

    NOP

    #197656 Reply

    Scott Anderson
    Participant

    I have several jsps that use the struts-el and it still provides errors on pages that have the el tag in version 2.5.1GA. Although it is not a show stopper. It is annoying. I was just wondering if there is a workaround or if there is a fix coming soon.

    A small example project that reproduces the behavior would really be beneficial, as NOP suggested. Did you create your project inside the workspace or outside of it? There has been an internal fix regarding taglib support for projects stored outside the workspace that will be part of the next service release. If that’s not it, then an example project will ensure that the issue gets addressed as rapidly as possible.

    –Scott
    MyEclipse Support

    #197722 Reply

    Oz
    Member

    Hi all,
    I’ve spent a bit of time on this as well with no luck. Is there a resolution to the problem yet?

    Are you still in the dark or has anyone put their hand up to a give you a sample project yet Scott?

    Thanks
    Oz

    #197735 Reply

    Scott Anderson
    Participant

    Oz,

    No, we still haven’t received a sample project from anyone on this issue. However we did find a problem with taglib recognition, but it only seems to affect projects that are stored outside the workspace (ie. not in its default location). If you have a small example project that demonstrates the problem, please email it to support@my….com. In the email, please include the URL for this thread so whomever handles it can follow up appropriately.

    –Scott
    MyEclipse Support

    #197809 Reply

    Sorry, I’ve been away. I can provide a small project to show this. Has anyone already provided a project?

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: Strange error compiling JSP with struts-el taglib

You must be logged in to post in the forum log in