Issue 7 in thread-weaver: Can't load classes from jar files on windows

26 views
Skip to first unread message

thread...@googlecode.com

unread,
Nov 8, 2010, 5:28:16 AM11/8/10
to thread...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 7 by a.shah.314: Can't load classes from jar files on windows
http://code.google.com/p/thread-weaver/issues/detail?id=7

What steps will reproduce the problem?
1. Use windows
2. Attempt to instrument a class which has dependencies in a jar file on
the classpath


Fails with null pointer exception
Caused by: java.lang.NullPointerException
at
com.google.testing.instrumentation.InstrumentedClassLoader.loadClassData(InstrumentedClassLoader.java:152)
at
com.google.testing.instrumentation.InstrumentedClassLoader.findClass(InstrumentedClassLoader.java:137)
at
com.google.testing.instrumentation.InstrumentedClassLoader.loadClass(InstrumentedClassLoader.java:113)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
com.google.testing.threadtester.AnnotatedTestWrapper.runTests(AnnotatedTestWrapper.java:231)
... 31 more


Using version 0.1 on Windows XP

Cause if from line 135 of
com.google.testing.instrumentation.InstrumentedClassLoader
"String resourceName = className.replace('.', File.separatorChar)
+ ".class";"

File separator on windows is a backslash. But the
ClassLoader.getResource(String name) method requires a forwardslash in
order to find a resource from a jar. The input stream found on line 136 is
null which cuases the NPE further on.

thread...@googlecode.com

unread,
Nov 8, 2010, 4:41:09 PM11/8/10
to thread...@googlegroups.com

Comment #1 on issue 7 by alasdair.mackintosh: Can't load classes from jar

THis has been fixed (See issue #5) but I have not yet built a new version.
Sorry about that. I will try and get a new version out soon, or you can
build from the source.

thread...@googlecode.com

unread,
Oct 22, 2013, 1:51:14 AM10/22/13
to thread...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 7 by alasdair.mackintosh: Can't load classes from jar
Should be fixed in V0.2

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages