0 Replies Latest reply on Feb 13, 2008 7:23 PM by 666705

    Cannot bind Proxy to JNDI Context in WL9/10

    666705
      We are in the process of upgrading from WebLogic 8 to WebLogic 9.2 (or 10) and have come across an error. We have a series of Remote Interfaces that we expose for RMI calls. We wrap the remote implementations in a proxy and bind the proxy, which allows us to perform work before and after the transaction. While this all worked in WebLogic 8/JVM1.4, upon upgrading to WL9/JVM1.5 we get the following error:

      java.lang.ClassCastException: $Proxy73
      at weblogic.rmi.extensions.server.ServerHelper.replaceAndResolveRemoteObject(ServerHelper.java:417)
      at weblogic.jndi.internal.WLEventContextImpl.copyObject(WLEventContextImpl.java:377)
      at weblogic.jndi.internal.WLEventContextImpl.bind(WLEventContextImpl.java:276)
      at javax.naming.InitialContext.bind(InitialContext.java:359)
      at com.cox.webdev.csapi.InterfaceBroker.bindAll(InterfaceBroker.java:164)
      at com.cox.webdev.csapi.app.CsapiApplication.configureInterfaces(CsapiApplication.java:481)

      How do we get around this issue? Binding the implementation works, but we lose a lot of our security and statistics layer. BTW, this is not an issue when executing on Tomcat and JVM 1.5 (thus definitely a WebLogic 9 addition).

      The proxy is created through:
      RemoteInterfaceInvocationHandler handler = new RemoteInterfaceInvocationHandler( imp );

      Object prox =
      Proxy.newProxyInstance(
      imp.getClass().getClassLoader(),
      imp.getClass().getInterfaces(),
      handler );

      --
      Edited by ccicoxnet at 02/13/2008 11:23 AM

      --
      Edited by ccicoxnet at 02/13/2008 11:23 AM