I have multiple jar files at a specific location .Based on some calculation, I need to load different jar files and invoke a certain method inside the jar. The jar file contains methods that act as a client to web services. When I invoke the method using reflection, it throws an error Wrapper class not found. Have you run APT to generate them?
Asked
Active
Viewed 3,453 times
3 Answers
1
It sounds like the classes that you are loadiing from the JAR use other classes that are not on the classpath. You can add the libraries they depend on to the system classpath of your application or list them in the Class-Path entry in the manifest files of the JARs you are loading.

Nat
- 9,820
- 3
- 31
- 33
-
Exactly. That's what usually solves my problems from this category. – Andreas Dolk May 19 '09 at 07:42
0
Check out this question for a possible solution.
I'm not sure why you would get such an error when you attempt to call a method via reflection but a little googling came up with this forum post (among others).

Community
- 1
- 1

Ronald Wildenberg
- 31,634
- 14
- 90
- 133
0
Just checking you aren't using -jar
option at all? This is mutually exclusive of -classpath
. See here for more explanation.
-
the jar files does not have reference to any other class.It simply is a client to a web service.So is it something to do with how i created the web service client? – May 20 '09 at 14:02