[JBoss JIRA] Created: (JBRULES-3121) Enriching Jar Model with event annotations causes RuntimeDroolsException in guvnor
by Scott Embler (JIRA)
Enriching Jar Model with event annotations causes RuntimeDroolsException in guvnor
----------------------------------------------------------------------------------
Key: JBRULES-3121
URL: https://issues.jboss.org/browse/JBRULES-3121
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-guvnor
Affects Versions: 5.2.0.Final
Environment: Windows XP
JDK 1.6.0_26
Tomcat 6.0
Guvnor 5.2.0.Final
Drools-core 5.2.0.Final + dependencies
Reporter: Scott Embler
Assignee: Mark Proctor
Attempting to validate a declared model (or build a package using such a model) that annotates an existing class as an event causes this:
ERROR 07-07 10:45:42,789 (LoggingHelper.java:error:69) Unable to build asset.
org.drools.RuntimeDroolsException: Field/method 'timestamp' not found for class 'org.drools.test.even.MyEvent'
at org.drools.base.ClassFieldAccessorFactory.getClassFieldReader(ClassFieldAccessorFactory.java:136)
at org.drools.base.ClassFieldAccessorCache$CacheEntry.getReadAccessor(ClassFieldAccessorCache.java:169)
at org.drools.base.ClassFieldAccessorCache.getReadAcessor(ClassFieldAccessorCache.java:102)
at org.drools.base.ClassFieldAccessorStore.wire(ClassFieldAccessorStore.java:419)
at org.drools.base.ClassFieldAccessorStore.getReader(ClassFieldAccessorStore.java:118)
at org.drools.base.ClassFieldAccessorStore.getReader(ClassFieldAccessorStore.java:95)
at org.drools.compiler.PackageBuilder.processTypeDeclarations(PackageBuilder.java:1553)
at org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:985)
at org.drools.compiler.PackageBuilder.newPackage(PackageBuilder.java:973)
at org.drools.compiler.PackageBuilder.processTypeDeclarations(PackageBuilder.java:1439)
at org.drools.compiler.PackageBuilder.mergePackage(PackageBuilder.java:985)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:689)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:338)
at org.drools.guvnor.server.builder.PackageAssemblerBase.addDrl(PackageAssemblerBase.java:216)
at org.drools.guvnor.server.builder.PackageAssemblerBase.loadDeclaredTypes(PackageAssemblerBase.java:183)
at org.drools.guvnor.server.builder.PackageAssemblerBase.setUpPackage(PackageAssemblerBase.java:87)
at org.drools.guvnor.server.builder.AssetItemValidator$BuilderValidator.validate(AssetItemValidator.java:53)
at org.drools.guvnor.server.builder.AssetItemValidator.validate(AssetItemValidator.java:42)
at org.drools.guvnor.server.RepositoryAssetOperations.validateAsset(RepositoryAssetOperations.java:86)
at org.drools.guvnor.server.RepositoryAssetService.validateAsset(RepositoryAssetService.java:392)
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:597)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
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:28)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:157)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
at org.drools.guvnor.server.RepositoryAssetService_$$_javassist_5.validateAsset(RepositoryAssetService_$$_javassist_
5.java)
at org.drools.guvnor.server.RepositoryServiceServlet.validateAsset(RepositoryServiceServlet.java:427)
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:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
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:53)
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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
A curious thing to note is that the class this exception describes is a misspelling of the uploaded class ('org.drools.test.even.MyEvent' instead of 'org.drools.test.event.MyEvent')
Another thing worth noting is that if the timestamp field is removed from the declaration, everything will validate. But, when the package is used to create a knowledgebase, objects of the class that was declared to be an event do not activate any rules. However, if the event declaration is removed completely, the rules will fire (but of course the facts will no longer be treated as events). Could the misspelling be causing this behavior?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 5 months