Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317878

Summary: Receive NPE during JBoss Tools Model Update
Product: [Eclipse Project] PDE Reporter: Len Tyson <ljtyson>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: RESOLVED NOT_ECLIPSE QA Contact:
Severity: normal    
Priority: P3 CC: aniefer
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Len Tyson CLA 2010-06-24 16:05:05 EDT
Build Identifier: 20100218-1602

Description: Open Hibernate3 tutorial. Double click 'hibernate.cfg.xml'. Receive NPE

<quote>
The troublemaker entry is /hibernate-distribution-3.5.2-Final.pom which starts with '/' while usually all file entries in the root of jar do not have it as leading symbol. I can easily modify my code to check for it, but it seems that Eclipse itself is not happy about it. Find hibernate3.jar Package Explorer under libraries of a project, navigate to hibernate-distribution-3.5.2-Final.pom and try to open it. Editor fails. So, what should we do. May we ask provider of hibernate3.jar to modify the entry path as erroneous, or should we report to Bugzilla on Eclipse failure to process such entries?
</quote>
Log: 
An internal error occurred during: "JBoss Tools Model Update".
java.lang.NullPointerException

java.lang.NullPointerException
at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)
at org.jboss.tools.common.model.filesystems.impl.JarAccess.getContent(JarAccess.java:200)
at org.jboss.tools.common.model.filesystems.impl.JarAccess.isTextEntry(JarAccess.java:235)
at org.jboss.tools.common.model.filesystems.impl.JarFolderImpl.createFileObject(JarFolderImpl.java:90)
at org.jboss.tools.common.model.filesystems.impl.JarFolderImpl.loadChildren(JarFolderImpl.java:74)
at org.jboss.tools.common.model.filesystems.impl.JarSystemImpl.loadChildren(JarSystemImpl.java:46)
at org.jboss.tools.common.model.impl.RegularObjectImpl.getChildByPathPart(RegularObjectImpl.java:140)
at org.jboss.tools.common.model.filesystems.impl.JarFolderImpl.getChildByPathPart(JarFolderImpl.java:131)
at org.jboss.tools.common.model.impl.XModelObjectImpl.getChildByPath(XModelObjectImpl.java:335)
at org.jboss.tools.common.model.impl.XModelImpl.getByPathInFileSystem(XModelImpl.java:227)
at org.jboss.tools.common.model.impl.XModelImpl.getByPath(XModelImpl.java:161)
at org.jboss.tools.jst.web.model.helpers.WebAppHelper.getWebApp(WebAppHelper.java:45)
at org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectContext.setModel(SyncProjectContext.java:81)
at org.jboss.tools.struts.webprj.model.helpers.sync.SyncProjectContext.update(SyncProjectContext.java:753)
at org.jboss.tools.common.model.project.Watcher.updateAll(Watcher.java:97)
at org.jboss.tools.common.model.project.Watcher.access$0(Watcher.java:89)
at org.jboss.tools.common.model.project.Watcher$WatcherRunnable.run(Watcher.java:47)
at org.jboss.tools.common.model.XJob.runInWorkspace(XJob.java:158)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)



Environment:
Eclipse Java EE IDE for Web Developers.
Build id: 20100218-1602
java.version=1.6.0_19
java.vendor=Sun Microsystems Inc.

Reproducible: Always

Steps to Reproduce:
1. Open Hibernate3 tutorial.  
2. Double click 'hibernate.cfg.xml'.
3. Receive NPE
Comment 1 Andrew Niefer CLA 2010-06-24 16:26:58 EDT
I don't believe jboss is hosted at eclipse.

Try raising this at http://www.jboss.org/tools
Comment 2 Len Tyson CLA 2010-06-24 17:27:04 EDT
As I noted in the report this involves how Eclipse handles the directory structure inside of jar files; I thought that would make it an Eclipse issue.
Comment 3 Andrew Niefer CLA 2010-06-25 09:52:57 EDT
The entire call stack is org.jboss.tools.*.  The only code here from eclipse.org is the code that started the job at the very bottom of the stack.