This thread has been locked & this forum has been archived.
Please post new topics to Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Author Message
atomz4peace
Veteran Member
Veteran Member


Joined: Jun 29, 2009
Posts: 23

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)
 
 View user's profile Send private message  
Reply with quote Back to top
support-joy
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3442

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.

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
atomz4peace
Veteran Member
Veteran Member


Joined: Jun 29, 2009
Posts: 23

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>
<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?
 
 View user's profile Send private message  
Reply with quote Back to top
support-joy
Registered Member
Registered Member


Joined: Feb 03, 2009
Posts: 3442

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.

_________________
Joy
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
atomz4peace
Veteran Member
Veteran Member


Joined: Jun 29, 2009
Posts: 23

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

Code:

   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:

Code:

               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? [/code]
 
 View user's profile Send private message  
Reply with quote Back to top
atomz4peace
Veteran Member
Veteran Member


Joined: Jun 29, 2009
Posts: 23

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

Code:

   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:

Code:

               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?
 
 View user's profile Send private message  
Reply with quote Back to top
support-swapna



Joined: Nov 11, 2010
Posts: 2703

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Support-Brian
Moderator
Moderator


Joined: Aug 21, 2004
Posts: 2674

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.

_________________
Brian
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
® 2014 - Genuitec, LLC.