[Persistence, JBoss/CMP, Hibernate, Database] - HQL and enum constants
by alexg79
According to the Hibernate manual, it is possible to use public static final constants directly in HQL queries.
Why then can I not use enums there as well?
I tried
| SELECT DISTINCT m FROM Material m, IN(m.suppliers) s WHERE m.unit <> Material.MaterialUnit.SQUARE_METRES AND s.id = :id
|
and variations like "MaterialUnit.SQUARE_METRES" and the fully qualified name, but they all produce the same error message on deployment:
anonymous wrote :
| 13:55:36,982 ERROR [SessionFactoryImpl] Error in named query: Material.nonCuttables
| org.hibernate.hql.ast.QuerySyntaxException: Invalid path: 'null.MaterialUnit.SQUARE_METRES' [SELECT DISTINCT m FROM fi.karico.etikettu.domain.Material m, IN(m.suppliers) s WHERE m.unit <> Material.MaterialUnit.SQUARE_METRES AND s.id = :id]
|
The same works fine if I just input the enum as a parameter:
| SELECT DISTINCT m FROM Material m, IN(m.suppliers) s WHERE m.unit <> :m2unit AND s.id = :id
|
What am I doing wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020510#4020510
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020510
19Â years, 2Â months
[JBoss jBPM] - Re: Problem with process composition
by Dennys
"nicolemans72" wrote : I have a problem with my process composition.
|
| I have a sub-process like that:
|
|
| | <process-state name="process1">
| | <sub-process name="implementation" />
| | <variable name="crStatut" access="read,write" mapped-name="crStatut" />
| | <variable name="crId" access="read,write" mapped-name="crId" />
| | <transition name="Validation" to="statut 90"></transition>
| | </process-state>
| |
|
| and when the process arrive to the "Process State" I hava an error
|
|
| | java.lang.NullPointerException: can't create a process instance when processDefinition is null
| | at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:87)
| | at org.jbpm.graph.exe.Token.createSubProcessInstance(Token.java:571)
| | at org.jbpm.graph.node.ProcessState.execute(ProcessState.java:109)
| | at org.jbpm.graph.def.Node.enter(Node.java:316)
| |
|
| However, i have deployed the processimplementation and there is a process definition in the database
|
| Any suggestions?
Hay nicolemans72!
JBPM_PROCESSDEFINITION table it must possess one process definition with name "implementation".
Bye!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020504#4020504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020504
19Â years, 2Â months