users@glassfish.java.net

Invoke error when using refection to call SLSB business-method

From: <glassfish_at_javadesktop.org>
Date: Mon, 25 May 2009 07:03:21 PDT

Hi

We have a library in a seperat JAR-file where we keep some tools and abstract classes.
In one of those classes that is a superclass to our implementation of a SLSB with common utilitys ie, get a remote reference, do logging
This JAR is later build into the the EAR-file.

I want to add a call to another SLSB where we do all logging af data to a database.
I don't want any references from our library to SLSB so I thought of using reflection.

I manage to get a reference to the log-SLSB and get a Method from the EJB-metadata and even succesfully call an no-argument method and a method with a String argument.
But when I try to pass a class that is developed by ourself, a wrapper around a hashmap, I get an IllegalArgumentException and as a cause "argument type mismatch".

I am shure I pass the right data.

Can this have to do with classloaders ?
Any suggestions ?

TIA
Jan

Sourcecode in the attached file.
[Message sent by forum member 'pliktverket' (pliktverket)]

http://forums.java.net/jive/thread.jspa?messageID=347554