- This topic has 7 replies, 4 voices, and was last updated 12 years, 6 months ago by Brian Fernandes.
-
AuthorPosts
-
atomz4peaceParticipantHi,
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)
support-joyMemberatomz4peace,
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.
atomz4peaceParticipantThe only tld-related entries in my web.xml are:
<jsp-config>
<taglib>
<taglib-uri>http://www.osjava.org/taglibs/trail-1.0</taglib-uri>
<taglib-location>/WEB-INF/trail.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://jakarta.apache.org/taglibs/unstandard-1.0</taglib-uri>
<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?
support-joyMemberatomz4peace,
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 tabSorry for the inconvenience.
atomz4peaceParticipantHi 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?
atomz4peaceParticipantHi 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?
support-swapnaModeratoratomz4peace,
Thank you for the detailed findings. I have escalated it to a dev team member.
They will get back to you.Sorry for inconvenience.
Brian FernandesModeratoratomz,
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.
-
AuthorPosts