[shrinkwrap-issues] [JBoss JIRA] Commented: (SHRINKWRAP-315) NPE in ContainerBase.addAsLibrary

Aslak Knutsen (JIRA) jira-events at lists.jboss.org
Thu Aug 11 08:36:01 EDT 2011


    [ https://issues.jboss.org/browse/SHRINKWRAP-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620327#comment-12620327 ] 

Aslak Knutsen commented on SHRINKWRAP-315:
------------------------------------------

Could this be similar to the issues we had with addAsManifestResource and all the others, it's not a File that is being added, but a ClassLoader Resource, so the URL.getFile() when converted to a File does not really match a File on disk anywhere, possible a NestedJar, so listFiles return null.

https://github.com/shrinkwrap/shrinkwrap/blob/1.0.0-beta-2/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/container/ContainerBase.java#L641

> NPE in ContainerBase.addAsLibrary
> ---------------------------------
>
>                 Key: SHRINKWRAP-315
>                 URL: https://issues.jboss.org/browse/SHRINKWRAP-315
>             Project: ShrinkWrap
>          Issue Type: Bug
>    Affects Versions: 1.0.0-beta-2
>            Reporter: Andrew Rubinger
>
> Using code:
> {code}war.addAsLibrary("xerces/xercesImpl.jar", "xercesImpl.jar");{code}
> ..if the resourceName doesn't exist, results in:
> {code}Caused by: java.lang.NullPointerException
> 	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibrary(ContainerBase.java:1353)
> 	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibrary(ContainerBase.java:1338)
> 	at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addAsLibrary(ContainerBase.java:1289)
> 	at org.jboss.as.test.spec.xerces.ws.XercesUsageInWebServiceTestCase.createWebServiceDeployment(XercesUsageInWebServiceTestCase.java:74)
> 	... 59 more{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the shrinkwrap-issues mailing list