[JBoss JIRA] (DROOLS-2182) NPE when @Expires is missing on event type
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-2182?page=com.atlassian.jira.plugi... ]
Mario Fusco updated DROOLS-2182:
--------------------------------
Sprint: 2018 Week 01-02
> NPE when @Expires is missing on event type
> ------------------------------------------
>
> Key: DROOLS-2182
> URL: https://issues.jboss.org/browse/DROOLS-2182
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.5.0.Final
> Reporter: Christian Bauer
> Assignee: Mario Fusco
>
> This code in {{ClassObjectTypeConf}} assumes that an event class always has an @Expires annotation, which is optional:
> {code}
> Role role = clazz.getAnnotation(Role.class);
> if (role != null) {
> isEvent = role.value() == Type.EVENT;
> if (isEvent) {
> Expires expires = clazz.getAnnotation(Expires.class);
> expirationOffset = TimeIntervalParser.parseSingle( expires.value() );
> }
> }
> {code}
> {code}
> java.lang.NullPointerException
> at org.drools.core.reteoo.ClassObjectTypeConf.<init>(ClassObjectTypeConf.java:99)
> at org.drools.core.common.ObjectTypeConfigurationRegistry.getObjectTypeConf(ObjectTypeConfigurationRegistry.java:69)
> at org.drools.core.common.NamedEntryPoint.insert(NamedEntryPoint.java:181)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1493)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1453)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:1447)
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months
[JBoss JIRA] (WFLY-9604) wildfly-11.0.0.Final JPA
by Trond Arild Lode Tobiassen Heidelberg (JIRA)
[ https://issues.jboss.org/browse/WFLY-9604?page=com.atlassian.jira.plugin.... ]
Trond Arild Lode Tobiassen Heidelberg edited comment on WFLY-9604 at 1/9/18 2:24 PM:
-------------------------------------------------------------------------------------
Thanks for the comment. I want to mention that the actual code runs well under glassfish and paraya.
was (Author: trondarild):
Thanks for the comment.
> wildfly-11.0.0.Final JPA
> ------------------------
>
> Key: WFLY-9604
> URL: https://issues.jboss.org/browse/WFLY-9604
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Affects Versions: 11.0.0.Final
> Environment: Javaee 7, Windows 7, jdk 8 151
> Reporter: Trond Arild Lode Tobiassen Heidelberg
> Labels: task
> Fix For: 12.0.0.Alpha1
>
>
> I am deploying to above. I get this error message:
>
> {"jboss.persistenceunit.registrar#REGDB" => "org.hibernate.AnnotationException: Property no.tobiassenit.sipstack.sip.message.AbstractMessage.part has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type Caused by: org.hibernate.AnnotationException: Property no.tobiassenit.sipstack.sip.message.AbstractMessage.part has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type"},
>
>
> I have this code:
>
> @OneToOne(optional = true, cascade = CascadeType.ALL, targetEntity = AbstractPart.class)
> @JoinColumn(name = "PART", unique = false, nullable = true, updatable = false)
> protected X part;
> What about the target= vs the targetEntity=? There is no target attribute or @Type annotation available.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 3 months