0 Replies Latest reply on Jun 13, 2008 9:01 AM by Tullia Furini

    drools & jbrms client

    Tullia Furini Newbie

      I'm writing a java class calling a package deployed into jbrms.

      The code of the client class is the following

      ......
      InputStream s = new FileInputStream(new File(FILE_PROP));
      prop.load(s);
      RuleAgent agent = RuleAgent.newRuleAgent(prop);
      RuleBase rb = agent.getRuleBase();
      ......

      But when the last row is executed I get the following exception

      java.lang.ClassNotFoundException: [className]
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Unknown Source)
      at java.io.ObjectInputStream.resolveClass(Unknown Source)
      at org.drools.common.DroolsObjectInputStream.resolveClass(DroolsObjectInputStream.java:81)
      at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
      at java.io.ObjectInputStream.readClassDesc(Unknown Source)
      at java.io.ObjectInputStream.readClass(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readArray(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at java.util.HashMap.readObject(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
      at java.io.ObjectInputStream.readSerialData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.drools.rule.PackageCompilationData.readExternal(PackageCompilationData.java:149)
      at java.io.ObjectInputStream.readExternalData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.drools.rule.Package.readExternal(Package.java:176)
      at java.io.ObjectInputStream.readExternalData(Unknown Source)
      at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      at java.io.ObjectInputStream.readObject0(Unknown Source)
      at java.io.ObjectInputStream.readObject(Unknown Source)
      at org.drools.agent.HttpClientImpl.fetchPackage(HttpClientImpl.java:59)
      at org.drools.agent.URLScanner.readPackage(URLScanner.java:138)
      at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:110)
      at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:88)
      at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:330)
      at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:298)
      at org.drools.agent.RuleAgent.configure(RuleAgent.java:284)
      at org.drools.agent.RuleAgent.init(RuleAgent.java:208)
      at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:176)
      at org.drools.agent.RuleAgent.newRuleAgent(RuleAgent.java:148)


      Is there anyone who can help me? it' s urgent

      thanks in advance