[
https://jira.jboss.org/browse/SHRINKWRAP-190?page=com.atlassian.jira.plug...
]
Andrew Lee Rubinger reopened SHRINKWRAP-190:
--------------------------------------------
Please rethrow another NCDFE; this is an Error. Throwing a new RuntimeException loses the
Error notion, and is a bit less generic than we can be.
Improve Exception on ClassNotFoundException during addPackage
-------------------------------------------------------------
Key: SHRINKWRAP-190
URL:
https://jira.jboss.org/browse/SHRINKWRAP-190
Project: ShrinkWrap
Issue Type: Feature Request
Components: impl-base
Affects Versions: 1.0.0-alpha-10
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Fix For: 1.0.0-alpha-11
It's possible to get ClassNotFoundException during addPackage(..) since the Classes
found are loaded. If a Class found refers to a Class not in the Classloader.
Currently the Exception states only which class it can not find, it would be helpful to
add which Class is being loaded that cause the ClassNotFoundException.
java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInvocation
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at
org.jboss.shrinkwrap.impl.base.container.ContainerBase$2.classFound(ContainerBase.java:932)
at
org.jboss.shrinkwrap.impl.base.URLPackageScanner.foundClass(URLPackageScanner.java:178)
at
org.jboss.shrinkwrap.impl.base.URLPackageScanner.handleArchiveByFile(URLPackageScanner.java:134)
at org.jboss.shrinkwrap.impl.base.URLPackageScanner.handle(URLPackageScanner.java:156)
at
org.jboss.shrinkwrap.impl.base.URLPackageScanner.scanPackage(URLPackageScanner.java:107)
at
org.jboss.shrinkwrap.impl.base.container.ContainerBase.addPackages(ContainerBase.java:917)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira