problem in JavaMethod classloader

Hi, 
When I executing my custom method (on a javamethod server) I received next exception:
java.lang.IllegalArgumentException: Interface ru.custom.IMyInterface is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:719)

I'am understand that this happens when the interface you are trying to proxy is in a library loaded through two different classloaders but I'am not understand how to resolve this. Maybe someone has encountered such a problem?

Comments

  • What exactly is your interface ? Is it part of a TBO or SBO or module ? How do you deploy it (e.g. packaged in a DAR in the docbase or do you copy the jar file to the JMS and if so where ? How do you call it ?
  • My interface its a part of TBO module. This is jar file is copy to java_methods(standartd fodler in documentum) folder.
  • You could try to put it under ServerApps.ear/lib or ServerApps.ear/DmMethods.war/WEB-INF/lib even though it's not so clean (beware of upgrades). However, it is best practice to package TBOs in a DAR and deploy it to the docbase. This should solve your classpath issue.
  • If you are using java module, then you should be importing your JAR files into repository, so that the TBO module (and JAR) is deployed dynamically.
  • In my long expirience working with many project with documentum, it's crazy customization everywhere, and we have no module(dmc_module in this project) so in my case the solution was moved my interace to ServerApps.ear/DmMethods.war/WEB-INF/lib and its worked! Thanks guys so much! 
Sign In or Register to comment.