2 Replies Latest reply on Apr 5, 2010 6:50 PM by fatbatman

    Application ClassNotFound within InvocationHandler.invoke() on AS6 M2

    fatbatman Novice



      I'm in the process of upgrading the JBoss 6 M2 and I'm getting a ClassNotFound error within MyRemotingInvocationHandler.invoke(InvocationRequest invocation) when an applications class object is received by the server side invocation handler.


      I create my connector programmatically using the code below on a socket transport.

      The class is in the same application jar that the connector is created from, which is within deploy/myapp.ear/myapp.jar.

      The connectors are created when the application is started as an mbean from deploy/myapp.ear/myserver-service.xml


      This worked fine on JBoss 4 & 5 so I assume there's something different in the Class Loading from the remoting thread pool threads on JBoss 6 M2?


      Does anyone have any suggestions?


      Thanks in advance






      Server side connector set up is;


      Map<String, String> connectorConfig = new HashMap<String, String>();
      connectorConfig.put("callbackStore", "org.jboss.remoting.callback.BlockingCallbackStore");     //will block the thread trying to send it if memory is low.
      connectorConfig.put("return-exception","true");               //Make sure the original Exception is returned to client when using servlet
      connectorConfig.put("numAcceptThreads", "20");
      connectorConfig.put("maxPoolSize", "500");
      Map<String, String> locatorConfig = new HashMap<String, String>();
      locatorConfig.put("force_remote", "true");
      locatorConfig.put("leasing", "true");                         //The client will establish a lease with the server so the server can check it's still connected
      locatorConfig.put("lease_period", GlobalConstants.LEASE_PERIOD+"");                    //The period in which the server check the client is still there
      String uri = protocol + "://" + server + ":" + port + path;
      ServerConfiguration serverConfig = new ServerConfiguration(protocol);
      Connector connector1 = new Connector(connectorConfig);
      connector1.setInvokerLocator(uri);          //new InvokerLocator(protocol, server, port, path, locatorConfig);
      MyRemotingInvocationHandler invocationHandler = new MyRemotingInvocationHandler();
      connector1.addInvocationHandler(MyConstants.REMOTING_SYSTEM, invocationHandler);
      connector1.addConnectionListener(new MyRemotingConnectionListener());