[EJB 3.0] - error in your SQL syntax
by albtorres
Hello,
I,am trying to execute a query in a stateless bean, with jboss seam
The query is
List existing = em.createQuery("select username from Users")
.getResultList();
and I get this error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.users users0_' at line 1
My entity bean is defined as
@Entity
@Name ("users")
@Scope (SESSION)
@Table(name = "users")
public class Users implements java.io.Serializable {
private static final long serialVersionUID = 1881413500711441951L;
private String username;
private String password;
.........
What is wrong??
I have configue my app with jboss seam
seam setup
seam new-project
My database is mysql 4.1.21 and if I connect by jdbc all its ok.
thank you
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053005#4053005
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053005
18Â years, 10Â months
[JBoss jBPM] - Variable resolver
by chawax
Hi,
I am a newbie to jBPM and I need help about variable resolvers.
I wrote an Action handler with an "idDemande" parameter. This parameter should be an EL expression, so that I my action handler could be context independant. For what I understood, I should use a variable resolver, but I can't understand how it works (and I found no documentation about it).
My node is configured as following :
<node name="Valider la demande">
| <transition name="" to="Fin"></transition>
| <action class="fr.horoquartz.t4.workflow.actions.absences.ValiderDemandeAbsenceAction">
| <idDemande>#{processInstance.id_element}</idDemande>
| </action>
| </node>
I'm not sure the EL expression is right ...
I wrote this evaluate function in my action handler :
private String evaluate(String expression, ExecutionContext executionContext) {
| VariableResolver variableResolver = JbpmExpressionEvaluator.getUsedVariableResolver();
| if (variableResolver != null) {
| variableResolver = new JbpmVariableResolver();
| }
| return (String) JbpmExpressionEvaluator.evaluate(expression, executionContext, variableResolver);
| }
But I have a NullPointerException when I run it.
Note I can read the process instance variable this way :
Long idElement = (Long) executionContext.getContextInstance().getVariable("id_element");
But it makes my action handler context dependant.
Thanks for your help ;)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053001#4053001
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053001
18Â years, 10Â months