facebook

NPE on Jboss Tools ME10

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #325857 Reply

    atomz4peace
    Participant

    Hi,

    Every time I start eclipse (or open web.xml) I get this error. Looks like related to taglibs but any idea how to get rid of it or why it’s there?

    Thank you!

    java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:432)
    at org.jboss.tools.jst.web.tld.TaglibMapping.findTldsInFolder(TaglibMapping.java:227)
    at org.jboss.tools.jst.web.tld.TaglibMapping.loadTldsInWebInf(TaglibMapping.java:172)
    at org.jboss.tools.jst.web.tld.TaglibMapping.revalidate(TaglibMapping.java:82)
    at org.jboss.tools.jsf.web.JSFWatcherContributor.updateProject(JSFWatcherContributor.java:49)
    at org.jboss.tools.common.model.project.Watcher.updateAll(Watcher.java:109)
    at org.jboss.tools.common.model.project.Watcher.access$0(Watcher.java:92)
    at org.jboss.tools.common.model.project.Watcher$WatcherRunnable.run(Watcher.java:52)
    at org.jboss.tools.common.model.XJob.runInWorkspace(XJob.java:160)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    #325874 Reply

    support-joy
    Member

    atomz4peace,

    Sorry to hear you are running into this issue. I came across this weblink – https://community.jboss.org/thread/99256?tstart=1 mentioning similar issue. This user refers to issue with functions.tld. Could you please investigate in the same lines.

    #325899 Reply

    atomz4peace
    Participant

    The only tld-related entries in my web.xml are:

    <jsp-config>
    <taglib>
    <taglib-uri>http://www.osjava.org/taglibs/trail-1.0</taglib-uri&gt;
    <taglib-location>/WEB-INF/trail.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>http://jakarta.apache.org/taglibs/unstandard-1.0</taglib-uri&gt;
    <taglib-location>/WEB-INF/unstandard.tld</taglib-location>
    </taglib>
    </jsp-config>

    If I take those out, I still get the error message. Any other ideas?

    #325904 Reply

    support-joy
    Member

    atomz4peace,

    Sorry to hear that you could not locate the TLD which is causing this issue. Could you do the following –

    1. Open MyEclipse IDE, from menu options click on MyEclipse > Installation Summary > Installation Details > [Copy to Clipboard] and paste the same here
    2. Attach your .log file located at [your workspace dir]/.metadata/.log
    3. Create a small bare bone sample project and attach the same here to help me replicate the issue at my end.
    4. If you have added any third party plugins, please list the same here. Please include details such as update site or weblink to download the plugin
    5. Attach screenshot of Help > MyEclipse Configuration Center – Dashboard and Software tab

    Sorry for the inconvenience.

    #325942 Reply

    atomz4peace
    Participant

    Hi Joy,

    No worries on that level of effort. I don’t think it causes much harm. But I think I know where it is. If you look at the jboss tools JST source for an older version like v2.1 you see this

    
        private void findTldsInFolder(XModelObject folder, String base) {
            XModelObject[] cs = folder.getChildren();
            if(cs==null) return;
            for (int i = 0; i < cs.length; i++) {
                if(cs[i].getFileType() == XModelObject.FOLDER) {
                    findTldsInFolder(cs[i], base + cs[i].getAttributeValue("name") + "/");
                } else if(cs[i].getFileType() == XModelObject.FILE) {
                    String entity = cs[i].getModelEntity().getName();
                    if(!entity.startsWith("FileTLD")) continue;
                    String uri = cs[i].getAttributeValue("uri");
                    String location = base + FileAnyImpl.toFileName(cs[i]);
                    if(folder instanceof FolderImpl) {
                        String path = WebProject.getInstance(cs[i].getModel()).getPathInWebRoot(cs[i]);
    ---- line 227 ------>                    if(path != null) resolvedURIs.put(path, uri);
                    }
                    addLocation(uri, location);
                    taglibObjects.put(uri, cs[i]);
                }
            }        
        }
    

    But in the current SVN source for this same class, you’ll see a check for uri:

    
                        if(uri == null) {
                            WebModelPlugin.getDefault().logWarning("TaglibMapping: null 'uri' from object " + cs[i].getModelEntity().getName()); //$NON-NLS-1$
                        } else {
                            if(path != null) resolvedURIs.put(path, uri);
                        }
    

    So I think this has been fixed in the most recent version of jboss tools. I do have a couple tlds in the web-inf directory, but they all have a URI.

    As a simple fix, is there a way to update ME with a more recent version of jboss tools?

    #325943 Reply

    atomz4peace
    Participant

    Hi Joy,

    No worries on that level of effort. I don’t think it causes much harm. But I think I know where it is. If you look at the jboss tools JST source for an older version like v2.1 you see this

    
        private void findTldsInFolder(XModelObject folder, String base) {
            XModelObject[] cs = folder.getChildren();
            if(cs==null) return;
            for (int i = 0; i < cs.length; i++) {
                if(cs[i].getFileType() == XModelObject.FOLDER) {
                    findTldsInFolder(cs[i], base + cs[i].getAttributeValue("name") + "/");
                } else if(cs[i].getFileType() == XModelObject.FILE) {
                    String entity = cs[i].getModelEntity().getName();
                    if(!entity.startsWith("FileTLD")) continue;
                    String uri = cs[i].getAttributeValue("uri");
                    String location = base + FileAnyImpl.toFileName(cs[i]);
                    if(folder instanceof FolderImpl) {
                        String path = WebProject.getInstance(cs[i].getModel()).getPathInWebRoot(cs[i]);
    ---- line 227 ------>                    if(path != null) resolvedURIs.put(path, uri);
                    }
                    addLocation(uri, location);
                    taglibObjects.put(uri, cs[i]);
                }
            }        
        }
    

    But in the current SVN source for this same class, you’ll see a check for uri:

    
                        if(uri == null) {
                            WebModelPlugin.getDefault().logWarning("TaglibMapping: null 'uri' from object " + cs[i].getModelEntity().getName()); //$NON-NLS-1$
                        } else {
                            if(path != null) resolvedURIs.put(path, uri);
                        }
    

    So I think this has been fixed in the most recent version of jboss tools. I do have a couple tlds in the web-inf directory, but they all have a URI.

    As a simple fix, is there a way to update ME with a more recent version of jboss tools?

    #325959 Reply

    support-swapna
    Moderator

    atomz4peace,

    Thank you for the detailed findings. I have escalated it to a dev team member.
    They will get back to you.

    Sorry for inconvenience.

    #326022 Reply

    Brian Fernandes
    Moderator

    atomz,

    I’m afraid that due to the tight integration between JBoss Tools and MyEclipse – updating just the JBoss tools plugin would not work due to dependency conflicts.

    I really appreciate you tracking down the source of the issue for us . This issue has already been targeted for the 10.5 release, due in about a month from now. While we won’t be doing a JBoss Tools update, I can ensure that this piece of code is patched.

    Sorry for the inconvenience caused.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: NPE on Jboss Tools ME10

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