[rules-users] NoClassDefFoundError for

Barfield Steve Steve.Barfield at uk.fujitsu.com
Mon Aug 13 20:31:59 EDT 2007


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\readDownLoadedPk
g;

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

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

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

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

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

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

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

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

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

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

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

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

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

 
D:\bea\user_projects\w4WP_workspaces\workspace1\readDownLoadedPkg\lib\xp
p3-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\pid
p\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\weblogi
c_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 at uk.fujitsu.com
<mailto:steve.barfield at uk.fujitsu.com> >

Web: http://uk.fujitsu.com <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.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070814/d2cc08a8/attachment.html 


More information about the rules-users mailing list