0 Replies Latest reply on Nov 24, 2009 7:39 PM by Mark Altaweel

    Bytecode error loading class

    Mark Altaweel Newbie


      I am loading classes via javassist and everything works fine when i run processes on one node.

      However, I am now running my javassist code using a distributed process.

      I have this code:

      ClassPool pool = ClassPool.getDefault();
      CtClass clazz = pool.makeClass("repast.simphony.util.bytecode.__DataSource" + counter++);
      StringBuilder methodStr = new StringBuilder("public Object getData(Object obj) {return ");


      In the distributed mode I get an error stating:

      javassist.NotFoundException: repast.simphony.util.bytecode.__DataSource0
      at javassist.ClassPool.get(ClassPool.java:436)
      at repast.simphony.util.bytecode.ByteCodeUtilities.createMethodCall(ByteCodeUtilities.java:74)
      at repast.simphony.data.logging.gather.MethodMapping.initDataSource(MethodMapping.java:48)
      at repast.simphony.data.logging.gather.MethodMapping.getColumnValue(MethodMapping.java:71)
      at repast.simphony.data.logging.gather.aggregate.AbstractStatsAggregateMapping.getStats(AbstractStatsAggregateMapping.java:44)

      So it seems that the DataSource class that I can make in one node is not able to be made in the other (remote) node. Is there something I should do to enable the class to be distributed and loaded across nodes?

      Thanks for your help.