Michael,

Thanks for your reply. I havn't got the hang of adding to an existing thread in this forum, I keep starting a new one.

The original post was by Jesse Stockall jstockall at embotics.com on Tue Jul 17 08:55:23 EDT 2007

 

My problem seems to be the same as Jesse’s, Fernando thought it might be a bug but I’m not sure if that was proved.

 

I have been having a problem with a web service loading a package downloaded from JBRMS.

 

When I try this from a simple main method :

 

  package com.fs.pidp.risk;

 

  import org.drools.util.BinaryRuleBaseLoader;

 

  public class readPkg {

 

    public static void main(String[] args) {

      readPkg rP=new readPkg();

      rP.methodReadPkg();

    }

           

    private void methodReadPkg(){

      String curDir = System.getProperty("user.dir");

      System.out.println("curDir-"+curDir);

      String curPath = System.getProperty("java.class.path");

      System.out.println("curPath-"+curPath);

      System.out.println(new java.util.Date());

                                               

      try{

        BinaryRuleBaseLoader loader = new BinaryRuleBaseLoader(); 

        loader.addPackage( this.getClass().getResourceAsStream( "/pMessage.pkg" ) );

        System.out.println("readPkg.methodReadPkg - end");

      }

      catch(Exception e){

        System.out.println("readPkg.methodReadPkg, Exception="+e.toString());

      }

    }

  }

 

this is with the pkg pMessage.pkg in the directory D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg

and the class Message.class in D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\com\fs\pidp\risk

 

it loads ok :

 

curDir-D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg

curPath-D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\xstream-1.1.3.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\antlr-runtime-3.0.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\core-3.2.3.v_686_R32x.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\drools-compiler-4.0.0.SNAPSHOT.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\drools-core-4.0.0.SNAPSHOT.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\drools-decisiontables-4.0.0.SNAPSHOT.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\drools-jsr94-4.0.0.SNAPSHOT.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\janino-2.5.7.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\jsr94-1.1.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\jxl-2.4.2.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\mvel14-1.2beta26.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\xercesImpl-2.4.0.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\xml-apis-1.0.b2.jar;

             D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\xpp3-1.1.3.4.O.jar

Tue Aug 14 01:02:12 BST 2007

readPkg.methodReadPkg - end

 

 

 

___________________________________________________________________________________________________________________

 

When I try this from a simple web service :

 

  package com.fs.pidp.risk;

 

  import javax.jws.*;

  import org.drools.util.BinaryRuleBaseLoader;

  import weblogic.jws.Context;

  import weblogic.wsee.jws.JwsContext;

 

  @WebService

  public class WsSimple {

 

    @Context

    JwsContext context;

 

    // This is called when WL creates an instance of web service

    public void context_onCreate() {

      System.out.println("Webservice Object is being Created!");

    }

           

    @WebMethod

    public String loadPkg() {

                       

      String curDir = System.getProperty("user.dir");

      System.out.println("curDir-"+curDir);

      String curPath = System.getProperty("java.class.path");

      System.out.println("curPath-"+curPath);

      System.out.println(new java.util.Date());

                                               

      try{

       BinaryRuleBaseLoader loader = new BinaryRuleBaseLoader(); 

       loader.addPackage( this.getClass().getResourceAsStream( "/pMessage.pkg" ) );

        System.out.println("readPkg.methodReadPkg - end");

      }

      catch(Exception e){

        System.out.println("readPkg.methodReadPkg, Exception="+e.toString());

      }

      return "/pMessage.pkg";

    }

  }

 

this is with the pkg pMessage.pkg in the directory D:\bea\weblogic92\samples\domains\wl_server

and the class Message.class in D:\bea\weblogic92\samples\server\examples\build\serverclasses\com\fs\pidp\risk

 

I get:

 

Webservice Object is being Created!

curDir-D:\bea\weblogic92\samples\domains\wl_server

curPath-D:\bea\weblogic92\samples\server\examples\build\serverclasses;

             D:\bea\patch_weblogic920\profiles\default\sys_manifest_classpath\weblogic_patch.jar;

             D:\bea\JROCKI~1\lib\tools.jar;D:\bea\WEBLOG~1\server\lib\weblogic_sp.jar;

             D:\bea\WEBLOG~1\server\lib\weblogic.jar;

             D:\bea\WEBLOG~1\server\lib\webservices.jar;;

             D:\bea\WEBLOG~1\common\eval\pointbase\lib\pbembedded51.jar;

             D:\bea\WEBLOG~1\common\eval\pointbase\lib\pbupgrade51.jar;

             D:\bea\WEBLOG~1\common\eval\pointbase\lib\pbclient51.jar;

             D:\bea\WEBLOG~1\server\lib\xqrl.jar;;

Tue Aug 14 00:24:59 BST 2007

<WSEE>

 Error invoking com.fs.pidp.risk.WsSimple (POJO): java.lang.NoClassDefFoundError

<ComponentHandler.handleRequest:115>

<WSEE>java.lang.NoClassDefFoundError: org/drools/base/com/fs/pidp/risk/Message$g

etStatus : org/drools/base/extractors/BaseIntClassFieldExtractor<ComponentHandle

r.handleRequest:115>

java.lang.NoClassDefFoundError: org/drools/base/com/fs/pidp/risk/Message$getStat

us : org/drools/base/extractors/BaseIntClassFieldExtractor

        at java.lang.ClassLoader.defineClass(Ljava.lang.String;[BIILjava.securit

y.ProtectionDomain;)Ljava.lang.Class;(Unknown Source)

        at org.drools.base.ClassFieldExtractorFactory$ByteArrayClassLoader.defin

eClass(ClassFieldExtractorFactory.java:455)

        at org.drools.base.ClassFieldExtractorFactory.getClassFieldExtractor(Cla

ssFieldExtractorFactory.java:114)

        at org.drools.base.ClassFieldExtractor.init(ClassFieldExtractor.java:77)

 

        at org.drools.base.ClassFieldExtractor.<init>(ClassFieldExtractor.java:5

7)

        at org.drools.base.ClassFieldExtractorCache.getExtractor(ClassFieldExtra

ctorCache.java:35)

        at org.drools.base.ClassFieldExtractor.readResolve(ClassFieldExtractor.j

ava:72)

        at java.lang.LangAccessImpl.readResolve(Ljava.lang.Class;Ljava.lang.Obje

ct;)Ljava.lang.Object;(Unknown Source)

        at java.io.ObjectStreamClass.invokeReadResolve(Ljava.lang.Object;)Ljava.

lang.Object;(Unknown Source)

        at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unk

nown Source)

        at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown So

urce)

        at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i

o.ObjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O

bjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unk

nown Source)

        at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown So

urce)

        at java.io.ObjectInputStream.readObject()Ljava.lang.Object;(Unknown Sour

ce)

        at java.util.ArrayList.readObject(ArrayList.java:592)

        at java.lang.LangAccessImpl.readObject(Ljava.lang.Class;Ljava.lang.Objec

t;Ljava.io.ObjectInputStream;)V(Unknown Source)

        at java.io.ObjectStreamClass.invokeReadObject(Ljava.lang.Object;Ljava.io

.ObjectInputStream;)V(Unknown Source)

        at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O

bjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unk

nown Source)

        at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown So

urce)

        at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i

o.ObjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O

bjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unk

nown Source)

        at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown So

urce)

        at java.io.ObjectInputStream.defaultReadFields(Ljava.lang.Object;Ljava.i

o.ObjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readSerialData(Ljava.lang.Object;Ljava.io.O

bjectStreamClass;)V(Unknown Source)

        at java.io.ObjectInputStream.readOrdinaryObject(Z)Ljava.lang.Object;(Unk

nown Source)

        at java.io.ObjectInputStream.readObject0(Z)Ljava.lang.Object;(Unknown So

urce)

        at java.io.ObjectInputStream.readArray(Z)Ljava.lang.Object;(Unknown Sour

ce)

 

Regards, Steve Barfield, Developer

Application Services

FUJITSU SERVICES

Cavendish Road, Stevenage, Herts, SG1 2DY

( +44 (0) 870 234 8197 (Int: 7444 8197)

È +44 (0) 7867 828474

+ <mailto:steve.barfield@uk.fujitsu.com>

Web: http://uk.fujitsu.com

Fujitsu Services Limited, Registered in England no 96056, Registered Office 22 Baker Street, London, W1U 3BW

This e-mail is only for the use of its intended recipient. Its contents are subject to a duty of confidence and may be privileged. Fujitsu Services does not guarantee that this e-mail has not been intercepted and amended or that it is virus-free.