tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Rivera" <>
Subject Re: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException
Date Tue, 18 Jul 2006 16:56:15 GMT
 Hi Tim,

I have not solved the problem, but managed to understand that the problem is
not where I drop the classes that will make the JNI calls. Dropping them
inthe share directory results in the
java.lang.reflect.InvocationTargetException at the Client side.

1) To be clear, the call to th e JNI wrapper (dropped in the share/classes
directoy) is something like this:

public void getCompany(CompanyHolder company, StringHolder result) {...}

Making this call from the Stub implementation (dropped in
axis/WEB-INF/classes directory) result in the mentioned exception. The
clases ComapnyHolder is visible to both classes, and tthey are in
axis/WEB-INF/classes and axis/WEB-INF/classes.

2) For the sake of testing, I created a new method without parameters

public Stirng getCompany();

and made the call just like in 1, and IT WORKED ... no Exception at the
client side.

3) So, the problem seems to me is not wher eI drop the implementation
classes, but the classes with all the types and hodlers generated with
wsdl2Java, and it doesn't seem to be the shared/classes directory, because
that classloader finds it correctly.

It seems that there is another classloader in the middle, between the one
for shared and the one for my WebApp that needs to know where to get these
classes from, but where? ... I tried common and server.... no luck !!!

Or is there anywhere else or something else I have not looked into?

  Thanks in advance,
  --Luis R.

On 7/17/06, Tim Lucia <> wrote:
> Please post a full stack trace.  TargetInvocationException should have an
> underlying cause associated with it, like NullPointerException or
> ClassNotFoundException.
> Tim
> > -----Original Message-----
> > From: Luis Rivera []
> > Sent: Monday, July 17, 2006 8:57 PM
> > To:
> > Subject: Tomcat 5.5/Axis 1.4 java.lang.reflect.InvocationTargetException
> >
> > Hi Tomcat users,
> >
> > I have a web service which will JNI to access the application, which
> > according to the documentation should be placed in the shared/classes
> > directory. I did so and I got a dreaded
> > java.lang.reflect.InvocationTargetException, which I believe is a class
> > loader problem. However, I have tried to solve this placing it in the
> > common/classes, server/classes and I get the same result.
> >
> > I have searched the web for solutions, some people say that it is a
> > classpath problem, but nobody seems to let you know where exactly you
> set
> > this so that the correct class loader finds the class (assuming I am
> right
> > and it is a classloader problem).
> >
> > Anyone here can help me? If have had a similar setup/problem and have a
> > solution at hand?
> >
> > Thanks in advance,
> > --Luis R.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message