Hi all, i've got a named query like this
@NamedQuery(name = WorkflowInstance.GET_ALL_WORKFLOW_BY_ID, query = "SELECT w FROM WorkflowInstance w where w.workflowId=:input ORDER BY w.workflowInstanceId") My enity looks like this @Entity @Table(name = "workflowinstance") public class WorkflowInstance implements Serializable { public static final String GET_ALL_WORKFLOW_BY_ID = "getAllInstancesByWorkflowId"; public static final String GET_INPUT_OUTPUT_DATA = "getInputOutputData"; @Id @GeneratedValue() ... } Defined in a entity, when I invoke it form a standalone program it works fine, but when I invoke it through a web service I always get this error "There is no query with the name "getAllInstancesByWorkflowId" defined for any of the known persistent classes: null. " As you can see I've defined a constant that hold the value to the name of the query. I can get a single instance of this class without any problems, but when I want to write my own query I cant get any results.. So I'm wondering what I'm doing wrong here, id the name query correct? cheers, Håkon -- Håkon Sagehaug, Software Developer Parallab, Bergen Center for Computational Science (BCCS) UNIFOB AS (University of Bergen Research Company)