Normally that means there is something wrong with your .jar, are you sure there are .class files in there and not .java? We don't compile .jars we only add them to the classpath.

Mark
Darko Ivancan wrote:
Product: JBoss DRools
Version: 4.0.3
JDK: 1.5.0_12
OS: Windows XP SP2
AS: JBoss 4.2.2GA

Hi,

Sorry haven't been on the list for a while, busy with a project, which keeps me now really busy.
We have here an exception which does not seem to make any sense and we're a bit lost in the why and where this happens.

Any help will be appreciated.
Thanks,
Darko IVANCAN
----------------------------------
Steps to reproduce:

1. Log in to jBRMS
2. Created Package as “com.xyz.abcservice.rules”
3. Imported two jars (“rulescore.jar”,” sampleDomain.jar”) into Model.
4. Created New Rule with the following content
 
	package com.xyz.abcservice.rules;

	import domain.Accommodation1;
	import java.util.List;
	import com.xyz.common.rules.api.GenericRuleViolation;

	global java.util.List errList;

	rule "Conflict Rule 1"               
	   when
		accommodation1:Accommodation1(name == "Car")
		accommodation2:Accommodation1(name == "Caravan")
	   then
		errList.add(new 
		GenericRuleViolation(accommodation1,"Invalid cabin combination."));
	end
 

4. Validate it…

------------Output------------------
An error occurred executing the action.

Details
	
<!-- AppServer Exceptions moved below this exception for readability--!>

Caused by: java.lang.ClassFormatError: Incompatible magic value 1885430635 in class file domain/Accommodation1
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
 at org.drools.rule.MapBackedClassLoader.fastFindClass(MapBackedClassLoader.java:60)
 at org.drools.rule.MapBackedClassLoader.loadClass(MapBackedClassLoader.java:79)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at org.drools.rule.PackageCompilationData$PackageClassLoader.loadClass(PackageCompilationData.java:358)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
 at org.drools.base.ClassTypeResolver.resolveType(ClassTypeResolver.java:146)
 at org.drools.rule.builder.dialect.mvel.MVELDialect.addImport(MVELDialect.java:254)
 at org.drools.compiler.DialectRegistry.addImport(DialectRegistry.java:98)
 at org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:377)
 at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:264)
 at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:167)
 at org.drools.brms.server.contenthandler.DecisionTableXLSHandler.compile(DecisionTableXLSHandler.java:63)
 at org.drools.brms.server.builder.ContentPackageAssembler.buildAsset(ContentPackageAssembler.java:139)
 at org.drools.brms.server.builder.ContentPackageAssembler.<init>(ContentPackageAssembler.java:103)
 at org.drools.brms.server.ServiceImplementation.buildAsset(ServiceImplementation.java:867)
 ... 51 more


<!-- AppServer Exceptions: --!>

java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
 at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
 at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:40)
 at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
 at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:106)
 at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:155)
 at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:91)
 at org.drools.brms.server.ServiceImplementation_$$_javassist_3.buildAsset(ServiceImplementation_$$_javassist_3.java)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at org.jboss.seam.remoting.gwt.GWTToSeamAdapter.callWebRemoteMethod(GWTToSeamAdapter.java:74)
 at org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.processCall(GWTRemoteServiceServlet.java:290)
 at org.jboss.seam.remoting.gwt.GWTRemoteServiceServlet.doPost(GWTRemoteServiceServlet.java:172)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
 at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:46)
 at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
 at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
 at java.lang.Thread.run(Thread.java:595)
  

_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users