Hello,
I am trying to migrate an application of my company from Drools V4.0.7 to
V5.1.1 (without actually using features brought by v5), and I am currently
experiencing a problem.
The application is called via an Axis web service deployed on a Weblogic 10
server, using JDK v1.5.0_14. I have two ways to test the application:
- A simple java class that sets the facts and calls directly the implemented
method of the web service
- Using soapUI, after having deployed the .war file of my web service on my
Weblogic server.
While in V4, everything works fine, java test and web service test (with
SoapUI) alike, I get the expected results. With V5, the Java test works as
expected, but the web service test fails (I get a
"java.lang.reflect.InvocationTargetException" without any StackTrace).
I put the server in debug mode and tried to narrow down the problem in
eclipse the best I could. The first difference I noticed, was that the
classloader was different between the two test methods:
- for the java test: Launcher$AppClassLoader
- for the WS test: ChangeAwareClassLoader
However, I don't really know how it affects the execution. After debugging
deeper into the code, I found out the difference: at some point (see stack
below) it seems to get the wrong "referent" from Reference.class. In the
java test, the referent is an "ObjectStreamClass", whereas in the web
service test, it becomes a "NoClassDefFoundError"...
Where could that come from ? Does it have something to do with the
ClassLoader (I admit this area is out of the bounds of my coding skills) ?
For more details, here is the stack from my java test (some lines excluded)
:
ObjectStreamClass.lookup(Class, boolean) line: 261
ObjectStreamClass.initNonProxy(ObjectStreamClass, Class,
ClassNotFoundException, ObjectStreamClass) line: 531
DroolsObjectInputStream(ObjectInputStream).readNonProxyDesc(boolean) line:
1552
DroolsObjectInputStream(ObjectInputStream).readClassDesc(boolean) line: 1466
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1699
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
HashMap<K,V>.readObject(ObjectInputStream) line: 1067
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
ObjectStreamClass.invokeReadObject(Object, ObjectInputStream) line: 946
DroolsObjectInputStream(ObjectInputStream).readSerialData(Object,
ObjectStreamClass) line: 1809
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1719
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
DialectRuntimeRegistry.readExternal(ObjectInput) line: 59
DroolsObjectInputStream(ObjectInputStream).readExternalData(Externalizable,
ObjectStreamClass) line: 1755
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1717
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
Package.readExternal(ObjectInput) line: 197
DroolsObjectInputStream(ObjectInputStream).readExternalData(Externalizable,
ObjectStreamClass) line: 1755
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1717
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
DroolsStreamUtils.streamIn(InputStream, ClassLoader, boolean) line: 205
DroolsStreamUtils.streamIn(InputStream) line: 174
FileScanner.readPackage(File) line: 147
FileScanner.getChangeSet() line: 97
FileScanner.loadPackageChanges() line: 72
DirectoryScanner.loadPackageChanges() line: 85
And here is the stack, at the same point, from my web service (difference in
bold) :
ObjectStreamClass.lookup(Class, boolean) line: 261
ObjectStreamClass.initNonProxy(ObjectStreamClass, Class,
ClassNotFoundException, ObjectStreamClass) line: 531
DroolsObjectInputStream(ObjectInputStream).readNonProxyDesc(boolean) line:
1552
DroolsObjectInputStream(ObjectInputStream).readClassDesc(boolean) line: 1466
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1699
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
HashMap<K,V>.readObject(ObjectInputStream) line: 1067
GeneratedMethodAccessor2.invoke(Object, Object[]) line: not available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 585
ObjectStreamClass.invokeReadObject(Object, ObjectInputStream) line: 946
DroolsObjectInputStream(ObjectInputStream).readSerialData(Object,
ObjectStreamClass) line: 1809
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1719
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
DialectRuntimeRegistry.readExternal(ObjectInput) line: 59
DroolsObjectInputStream(ObjectInputStream).readExternalData(Externalizable,
ObjectStreamClass) line: 1755
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1717
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
Package.readExternal(ObjectInput) line: 197
DroolsObjectInputStream(ObjectInputStream).readExternalData(Externalizable,
ObjectStreamClass) line: 1755
DroolsObjectInputStream(ObjectInputStream).readOrdinaryObject(boolean) line:
1717
DroolsObjectInputStream(ObjectInputStream).readObject0(boolean) line: 1305
DroolsObjectInputStream(ObjectInputStream).readObject() line: 348
DroolsStreamUtils.streamIn(InputStream, ClassLoader, boolean) line: 205
DroolsStreamUtils.streamIn(InputStream) line: 174
FileScanner.readPackage(File) line: 147
FileScanner.getChangeSet() line: 97
FileScanner.loadPackageChanges() line: 72
DirectoryScanner.loadPackageChanges() line: 85
I hope I made the situation as clear as I could. I'm available for further
details, and obviously, any help would be very appreciated :) .
--
View this message in context:
http://drools-java-rules-engine.46999.n3.nabble.com/Problem-deploying-Dro...
Sent from the Drools - User mailing list archive at
Nabble.com.