[JBoss jBPM] - JBPM Identity Component - QuerySyntaxException: JBPM_ID_USER
by varada
Hi,
I am developing a seam application integrated with JBPM. I am using Seam 1.0.1.GA on Jboss 4.0.4.GA with JBPM 3.1 I have a combined persistnace for JBMP and my application objects.
When I do a create query as follows:
Query jbpmquery = em.createQuery("select NAME_ from JBPM_ID_USER");
I get the following error:
15:08:26,080 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernat
e.hql.ast.QuerySyntaxException: JBPM_ID_USER is not mapped [select NAME_ from JBPM_ID_USER]
I have copied the jbpm-identity-3.1.jar into ejb3 folder for the ear
have the following entires in the hibernate.cfg.xml
mapping resource="org/jbpm/identity/User.hbm.xml"
mapping resource="org/jbpm/identity/Group.hbm.xml"
mapping resource="org/jbpm/identity/Membership.hbm.xml"
Any clues why this is happenning?
Thanks & Regards,
Varada
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969201#3969201
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969201
19 years, 7 months
[JBoss Seam] - JBoss Rules problem (where else to post?)
by galo.navarro
Sorry if this is not the appropiate forum but I can't find anything related to JBoss Rules.
The examples from the livetrails work perfectly on standalone applications, now I'm trying to get an example running on Jboss 4.0.4GA so I created a simple drl file and an EJB that puts some objects in the working memory etc.
The EJB runs this code below normally, if I debug and inspect the working memory I can see the rules are loaded (see below the code) and asserted objects are saved. But, misteriously, when it executes fireAllRules nothing happens. No errors shown anywhere. Am I missing something?
| PackageBuilder builder = new PackageBuilder();
| builder.addPackageFromDrl(new InputStreamReader(new java.io.FileInputStream("D:\\noc.drl")));
| RuleBase ruleBase = RuleBaseFactory.newRuleBase();
| WorkingMemory workingMemory = ruleBase.newWorkingMemory();
| if(this.nocs==null)
| this.listNoCs();
| Iterator it=this.nocs.iterator();
| while(it.hasNext())
| workingMemory.assertObject(it.next());
| System.out.println("Now you should see something:");
| workingMemory.fireAllRules();
|
| #created on: 31-Aug-2006
| package tal.noc.rules
|
| import tal.noc.entity.*;
|
| #list any import classes here.
| #declare any global variables here
|
| rule "NOC Id >= than 1"
| when
| noc : NOC(id>=1);
| then
| System.out.println("Found with id eq/over 1");
| end
|
| rule "NOC Id < than 1"
| when
| noc : NOC(id<1);
| then
| System.out.println("Found with id below 1");
| end
|
Another question, where should my .drl files be packaged for deployment?
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969199#3969199
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969199
19 years, 7 months
[JBoss Seam] - Re: i18n entity validation message?
by nhpvti
"mosabua" wrote :
| @NotNull
| @Length(min = 2, message="{person.lastName.length}"))
| public String getLastName()
| {
| return lastName;
| }
|
|
A seam-gen generated scaffold application relies only on the Seam properties files, for example :
@NotNull
@Length(min = 1, max = 50, message = "#{messages['err.fullname.length']}")
public String getFullname()
{
return fullname;
}
According entry in a properties file can look so:
err.fullname.length = Fullname is mandatory and should be maximal 50 characters long
The problem is obvious: max length information is spread among two places :-(
The following form unfortunately doesn't work
err.fullname.length = Fullname is mandatory and should be maximal {max} characters long
I suppose this could be a feature request: Seam messages must be able to interpret hibernate-validator alike variables {max}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969198#3969198
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969198
19 years, 7 months
[Persistence, JBoss/CMP, Hibernate, Database] - Aggregate function in where clause (Criteria API)
by shouab
I am using Criteria API. I want to use the Aggregate Functions like
Avg(),count() etc in the where clause i know its available through Projections but projections used as the slect part of the query i want to use these functions in where clause like
criteria.add(Restriction.eq(Projections.count("emp"),5));
Is there any way to do that.
if the problem is not clear lets say i have two tables Employee and Address and the relation between is one to many Employee have multiple Addresses so i want to retrieve the employee who have 5 or more Addresses.
Code is like that.
Criteria criteria = session.createCriteria(Employee.class,"emp");
| criteria.setFetchMode("addresses",FetchMode.EAGER);
| ProjectionList projList = Projections.projectionList();
| projList.add(Projections.count("emp.addresses"),"NoOfOpp");
| criteria.setProjection(projList);
| criteria.add((Restrictions.ge("NoOfOpp",6)));
| List list=criteria.list();
|
|
When i execute this it gives me NoOfOpp invalid identifier is any other way round to accomplish the task.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969195#3969195
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969195
19 years, 7 months