I'm using Drools 5.4.0 with Java 8 beta 89 and all works perfect. Very simple
use of Drools:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClassPathResource("CFL_Advisor.dsl",
getClass() ), ResourceType.DSL);
kbuilder.add( ResourceFactory.newClassPathResource( "CFL_Advisor.dslr",
getClass() ), ResourceType.DSLR );
Now I've just upgraded to Java 8 beta 104 and Drools stopped working. I have
tried with Java 8 beta 101 with the same error. I have tried also with
Drools 5.5.0 and Drools 6.0.0 RC3 and the error is the same.
Java 8 beta 89 works also well for all the previous Drools versions.
I need to use lastest Java 8 beta releases because we are developing an
experimental system that needs last releases of Java FX. And I suppose that
it is important that Drools (any versiĆ³n) will support Java 8.
I get this error:
Exception in thread "main" java.lang.RuntimeException: wrong class format
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:263)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:203)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:102)
at
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1188)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:317)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:640)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:619)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:295)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:107)
at
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1188)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createFields(BinaryTypeBinding.java:355)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:326)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:640)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:619)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:295)
at
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:107)
at
org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at
org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.resolve(ParameterizedTypeBinding.java:851)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:100)
at
org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.superclass(BinaryTypeBinding.java:1062)
at
org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1256)
at
org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1181)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2237)
at
org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:401)
at
org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:357)
at
org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:913)
at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:447)
at
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:189)
at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:406)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1131)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1219)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:528)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:759)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:464)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:389)
at
org.drools.commons.jci.compilers.AbstractJavaCompiler.compile(AbstractJavaCompiler.java:49)
at
org.drools.rule.builder.dialect.java.JavaDialect.compileAll(JavaDialect.java:371)
at
org.drools.compiler.DialectCompiletimeRegistry.compileAll(DialectCompiletimeRegistry.java:46)
at org.drools.compiler.PackageRegistry.compileAll(PackageRegistry.java:102)
at org.drools.compiler.PackageBuilder.compileAll(PackageBuilder.java:1006)
at
org.drools.compiler.PackageBuilder.compileAllRules(PackageBuilder.java:842)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:831)
at
org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:467)
at
org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:673)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:45)
at
org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:34)
at es.indra.ifocucs.drools.CflAdvisor.getKnowledgeBase(CflAdvisor.java:28)
at es.indra.ifocucs.drools.CflAdvisor.(CflAdvisor.java:52)
at es.indra.ifocucs.drools.CflAdvisor.main(CflAdvisor.java:79)
Caused by: org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.(ClassFileReader.java:372)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$2.createNameEnvironmentAnswer(EclipseJavaCompiler.java:287)
at
org.drools.commons.jci.compilers.EclipseJavaCompiler$2.findType(EclipseJavaCompiler.java:258)
... 53 more
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-doesn-t-works-with-latest-beta-r...
Sent from the Drools: Developer (committer) mailing list mailing list archive at
Nabble.com.