[JBoss JIRA] (DROOLS-10) Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-10?page=com.atlassian.jira.plugin.... ]
Edson Tirelli resolved DROOLS-10.
---------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
Fix Version/s: 6.0.0.Alpha1
Resolution: Cannot Reproduce Bug
> Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
> ----------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-10
> URL: https://issues.jboss.org/browse/DROOLS-10
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ken Warkentyne
> Assignee: Edson Tirelli
> Fix For: 6.0.0.Alpha1
>
>
> We have a Java class that uses java.sql.Timestamp to record time values. In Drools 5.0.1, we were able to use the @timestamp annotation as follows:
> {code}
> declare StateEvent
> @role( event )
> @timestamp( startTime )
> @duration( duration )
> end
> {code}
> StateEvent contains the following:
> {code}
> import java.sql.Timestamp;
> ...
> private Timestamp startTime;
> private Long duration;
> public Timestamp getStartTime() {
> return startTime;
> }
> public void setStartTime(Timestamp st) {
> startTime = st;
> }
> public Long getDuration() {
> return duration;
> }
> public void setDuration(Long d) {
> duration = d;
> }
> ....
> {code}
> We load the rules from a .drl file as follows:
> {code}
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newClassPathResource("path-to-file", ResourceType.DRL);
> {code}
> In 5.4.0, this no longer works and we get the error message:
> {code}
> Annotated type StateEvent - undefined property in @annotation timestamp: java.sql.Timestamp.value();
> {code}
> Also tested with 5.5.0.Final and 5.5.0.CR1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (DROOLS-10) Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-10?page=com.atlassian.jira.plugin.... ]
Edson Tirelli closed DROOLS-10.
-------------------------------
> Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
> ----------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-10
> URL: https://issues.jboss.org/browse/DROOLS-10
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ken Warkentyne
> Assignee: Edson Tirelli
> Fix For: 6.0.0.Alpha1
>
>
> We have a Java class that uses java.sql.Timestamp to record time values. In Drools 5.0.1, we were able to use the @timestamp annotation as follows:
> {code}
> declare StateEvent
> @role( event )
> @timestamp( startTime )
> @duration( duration )
> end
> {code}
> StateEvent contains the following:
> {code}
> import java.sql.Timestamp;
> ...
> private Timestamp startTime;
> private Long duration;
> public Timestamp getStartTime() {
> return startTime;
> }
> public void setStartTime(Timestamp st) {
> startTime = st;
> }
> public Long getDuration() {
> return duration;
> }
> public void setDuration(Long d) {
> duration = d;
> }
> ....
> {code}
> We load the rules from a .drl file as follows:
> {code}
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newClassPathResource("path-to-file", ResourceType.DRL);
> {code}
> In 5.4.0, this no longer works and we get the error message:
> {code}
> Annotated type StateEvent - undefined property in @annotation timestamp: java.sql.Timestamp.value();
> {code}
> Also tested with 5.5.0.Final and 5.5.0.CR1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (DROOLS-10) Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-10?page=com.atlassian.jira.plugin.... ]
Edson Tirelli commented on DROOLS-10:
-------------------------------------
Unable to reproduce in 6.0.0.Alpha9. I added the following test case to the code base:
{code:title=javaSqlTimestampTest.java}
@Test
public void testJavaSqlTimestamp() {
String rule = "";
rule += "package " + Message.class.getPackage().getName() + "\n" +
"declare " + Message.class.getCanonicalName() + "\n" +
" @role( event ) \n" +
" @timestamp( startTime ) \n" +
" @duration( duration )\n" +
"end\n";
KnowledgeBase kbase = loadKnowledgeBaseFromString( rule );
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
Message msg = new Message();
msg.setStartTime( new Timestamp( 10000 ) );
msg.setDuration( 1000l );
EventFactHandle efh = (EventFactHandle) ksession.insert( msg );
assertEquals( 10000,
efh.getStartTimestamp() );
assertEquals( 1000,
efh.getDuration() );
}
public static class Message {
private Timestamp timestamp;
private Long duration;
public Timestamp getStartTime() {
return timestamp;
}
public void setStartTime(Timestamp timestamp) {
this.timestamp = timestamp;
}
public Long getDuration() {
return duration;
}
public void setDuration(Long duration) {
this.duration = duration;
}
}
{code}
I will close the ticket. If you are still having problems in 6.0, please reopen it with more details on how to reproduce it.
Thank you.
> Cannot use @timestamp annotation on a java.sql.Timestamp field when declaring metadata for an existing Java type
> ----------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-10
> URL: https://issues.jboss.org/browse/DROOLS-10
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Ken Warkentyne
> Assignee: Mark Proctor
>
> We have a Java class that uses java.sql.Timestamp to record time values. In Drools 5.0.1, we were able to use the @timestamp annotation as follows:
> {code}
> declare StateEvent
> @role( event )
> @timestamp( startTime )
> @duration( duration )
> end
> {code}
> StateEvent contains the following:
> {code}
> import java.sql.Timestamp;
> ...
> private Timestamp startTime;
> private Long duration;
> public Timestamp getStartTime() {
> return startTime;
> }
> public void setStartTime(Timestamp st) {
> startTime = st;
> }
> public Long getDuration() {
> return duration;
> }
> public void setDuration(Long d) {
> duration = d;
> }
> ....
> {code}
> We load the rules from a .drl file as follows:
> {code}
> KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
> kbuilder.add(ResourceFactory.newClassPathResource("path-to-file", ResourceType.DRL);
> {code}
> In 5.4.0, this no longer works and we get the error message:
> {code}
> Annotated type StateEvent - undefined property in @annotation timestamp: java.sql.Timestamp.value();
> {code}
> Also tested with 5.5.0.Final and 5.5.0.CR1
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (DROOLS-60) MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-60?page=com.atlassian.jira.plugin.... ]
Edson Tirelli closed DROOLS-60.
-------------------------------
> MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean
> ------------------------------------------------------------------------------------------
>
> Key: DROOLS-60
> URL: https://issues.jboss.org/browse/DROOLS-60
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Alpha1
> Reporter: Charles Moulliard
> Assignee: Edson Tirelli
> Fix For: 6.0.0.Alpha1
>
>
> When drools-camel is deployed on Karaf and when a camel is fired to the drools component, the following error is generated :
> {code}
> 2013-02-27 13:31:29,378 | ERROR | imer://testRoute | DroolsManagementAgent | management.DroolsManagementAgent 137 | 119 - org.drools.karaf.drools-component - 6.0.0.SNAPSHOT | Unable to register mbean org.drools.kbases:type=beda8f5b-801e-4a00-bb2a-95150b985f95,group=Sessions,sessionId=Session-0 into the platform MBean Server
> javax.management.NotCompliantMBeanException: MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean, neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class org.drools.management.KieSessionMonitoringImpl is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: org.drools.management.KieSessionMonitoringImpl: Class org.drools.management.KieSessionMonitoringImpl is not a JMX compliant MXBean)
> at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:160)[:1.6.0_37]
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:305)[:1.6.0_37]
> at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_37]
> at org.drools.management.DroolsManagementAgent.registerMBean(DroolsManagementAgent.java:126)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.management.DroolsManagementAgent.registerKnowledgeSession(DroolsManagementAgent.java:111)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.initManagementBeans(AbstractWorkingMemory.java:320)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:315)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:234)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:200)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.reteoo.ReteooWorkingMemory.<init>(ReteooWorkingMemory.java:103)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.impl.StatelessKnowledgeSessionImpl.newWorkingMemory(StatelessKnowledgeSessionImpl.java:123)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:294)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.camel.component.DroolsInsertProducer$StatelessSessionInsertWorker.process(DroolsInsertProducer.java:146)[326:org.drools.camel:6.0.0.SNAPSHOT]
> at org.drools.camel.component.DroolsInsertProducer.process(DroolsInsertProducer.java:100)[326:org.drools.camel:6.0.0.SNAPSHOT]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (DROOLS-60) MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean
by Edson Tirelli (JIRA)
[ https://issues.jboss.org/browse/DROOLS-60?page=com.atlassian.jira.plugin.... ]
Edson Tirelli resolved DROOLS-60.
---------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
Fix Version/s: 6.0.0.Alpha1
Resolution: Done
MBean registration fixed. Thank you for reporting.
> MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean
> ------------------------------------------------------------------------------------------
>
> Key: DROOLS-60
> URL: https://issues.jboss.org/browse/DROOLS-60
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.0.Alpha1
> Reporter: Charles Moulliard
> Assignee: Edson Tirelli
> Fix For: 6.0.0.Alpha1
>
>
> When drools-camel is deployed on Karaf and when a camel is fired to the drools component, the following error is generated :
> {code}
> 2013-02-27 13:31:29,378 | ERROR | imer://testRoute | DroolsManagementAgent | management.DroolsManagementAgent 137 | 119 - org.drools.karaf.drools-component - 6.0.0.SNAPSHOT | Unable to register mbean org.drools.kbases:type=beda8f5b-801e-4a00-bb2a-95150b985f95,group=Sessions,sessionId=Session-0 into the platform MBean Server
> javax.management.NotCompliantMBeanException: MBean class org.drools.management.KieSessionMonitoringImpl does not implement DynamicMBean, neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class org.drools.management.KieSessionMonitoringImpl is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: org.drools.management.KieSessionMonitoringImpl: Class org.drools.management.KieSessionMonitoringImpl is not a JMX compliant MXBean)
> at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:160)[:1.6.0_37]
> at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:305)[:1.6.0_37]
> at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_37]
> at org.drools.management.DroolsManagementAgent.registerMBean(DroolsManagementAgent.java:126)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.management.DroolsManagementAgent.registerKnowledgeSession(DroolsManagementAgent.java:111)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.initManagementBeans(AbstractWorkingMemory.java:320)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:315)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:234)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.common.AbstractWorkingMemory.<init>(AbstractWorkingMemory.java:200)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.reteoo.ReteooWorkingMemory.<init>(ReteooWorkingMemory.java:103)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.impl.StatelessKnowledgeSessionImpl.newWorkingMemory(StatelessKnowledgeSessionImpl.java:123)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:294)[119:org.drools.karaf.drools-component:6.0.0.SNAPSHOT]
> at org.drools.camel.component.DroolsInsertProducer$StatelessSessionInsertWorker.process(DroolsInsertProducer.java:146)[326:org.drools.camel:6.0.0.SNAPSHOT]
> at org.drools.camel.component.DroolsInsertProducer.process(DroolsInsertProducer.java:100)[326:org.drools.camel:6.0.0.SNAPSHOT]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months