[JBoss jBPM] - Re: TaskInstance.setActorId(String) causes set TaskInstance
by Octomac
Changing to a request bean instead of a session bean fixed the refresh problem, since I'm now forcing JBPM to hit the database on every call to the controller. This is a little slow, but it's working well, which is fine by me.
I'm still seeing, though, that when I assign a task from a PooledActor to an ActorID by means of setActorId(String), the boolean properties ISCANCELLED, ISSUSPENDED, ISOPEN, ISSIGNALILNG, and ISBLOCKING are all set to TRUE. This is a major problem, because JBPM now thinks that the assigned task is canceled. That means that the task disappears from both the group list and the users list.
Does anyone have any idea as to why these boolean properties may be getting set this way?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158388#4158388
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158388
17 years, 10 months
[EJB 3.0] - Re: EntityManager's Native Query & Paging Results
by jaikiran
I have a simple native query:
select distinct usr.userid from user usr where usr.name like '%jai%'
which returns me the expected output when used with setFirstResult and setMaxResult. Not sure whether its a problem with your query or something else.
You can try enabling TRACE level logs of Hibernate package by adding the following to your jboss-log4j.xml file under the %JBOSS_HOME%\server\< serverName>\conf folder. Then in your server.log see if you can find something which will help you understand what's going on. For me, i see logs like this:
2008-06-16 20:38:57,932 TRACE [http-0.0.0.0-8080-2] [org.hibernate.jdbc.AbstractBatcher] preparing statement
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.jdbc.AbstractBatcher] about to open ResultSet (open ResultSets: 0, globally: 0)
| 2008-06-16 20:38:58,011 TRACE [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] processing result set
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result set row: 0
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result row:
| 2008-06-16 20:38:58,011 TRACE [http-0.0.0.0-8080-2] [org.hibernate.type.BigIntegerType] returning '7' as column: ID
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result set row: 1
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result row:
| 2008-06-16 20:38:58,011 TRACE [http-0.0.0.0-8080-2] [org.hibernate.type.BigIntegerType] returning '8' as column: ID
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result set row: 2
| 2008-06-16 20:38:58,011 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] result row:
| 2008-06-16 20:38:58,026 TRACE [http-0.0.0.0-8080-2] [org.hibernate.type.BigIntegerType] returning '9' as column: ID
| 2008-06-16 20:38:58,026 TRACE [http-0.0.0.0-8080-2] [org.hibernate.loader.Loader] done processing result set (3 rows)
| 2008-06-16 20:38:58,026 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.jdbc.AbstractBatcher] about to close ResultSet (open ResultSets: 1, globally: 1)
| 2008-06-16 20:38:58,026 DEBUG [http-0.0.0.0-8080-2] [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2008-06-16 20:38:58,026 TRACE [http-0.0.0.0-8080-2] [org.hibernate.jdbc.AbstractBatcher] closing statement
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158385#4158385
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158385
17 years, 10 months
[Persistence, JBoss/CMP, Hibernate, Database] - EJB3 Entity persistence OK with JBoss 4.2.2GA, but fails wil
by mlavannis
I wrote a very basic EJB3 entity and deployed it on JBoss 4.2.2GA - it worked fine. But when I tried to deploy the exact same EAR on JBoss 5.0.0 Beta4, the deployment failed with the following error:
10:42:51,673 INFO [SchemaUpdate] Running hbm2ddl schema update
10:42:51,673 INFO [SchemaUpdate] fetching database metadata
10:42:51,674 INFO [SchemaUpdate] updating schema
10:42:51,686 INFO [DatabaseMetadata] table not found: Book
10:42:51,689 INFO [DatabaseMetadata] table not found: Book
10:42:51,691 ERROR [SchemaUpdate] Unsuccessful: create table database.Book (id integer not null auto_increment, author varchar(255), title varchar(255), primary key (id))
10:42:51,698 ERROR [SchemaUpdate] CREATE command denied to user 'jboss'@'localhost' for table 'book'
10:42:51,698 INFO [SchemaUpdate] schema update complete
It appears like it is unable to create the "Book" table ("Book" is the name of my entity EJB class).
However, note the SQL query it uses the create the table:
create table database.Book (id integer not null auto_increment, author varchar(255), title varchar(255), primary key (id))
It qualifies the table name "Book" with the identifier "database" - this is what is causing it to fail. In my EJB, I have set the schema to "jbossdb" wich is a valid database. It is not clear to me why the query does not use "jbossdb.Book" instead of "database.Book"
I am using MySQL 5.1
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158372#4158372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158372
17 years, 10 months