[JBoss jBPM] - couldn't commit hibernate session
by remon_sherin
Hi all
I'm trying to signal a newly created ProcessInstance, it sounds workin because I retrieve the current node and I found that it's the second node in the graph, but, when I call jbpmContext.close() to close and flush the session I got the following exception: org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
Here is the code
| JbpmConfiguration conf = JbpmConfiguration.parseResource('/home/mustang/jbpm.cfg.xml");
| JbpmContext environment = conf.createJbpmContext();
| GraphSessin graphSession = environment.getGraphSession();
| ProcessDefinition pd = graphSession.findLatestProcessDefinition("AProcessDefinition");
| ProcessInstance pi = new ProcessInstance(pd);
| pi.signal();
| environment.close();
|
I'd be grateful if anybody could help me
And here is the full StackTrace:
| org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:179)
| at org.jbpm.svc.Services.close(Services.java:211)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1124)
| at php.java.bridge.Request.handleRequest(Request.java:342)
| at php.java.bridge.Request.handleRequests(Request.java:388)
| at php.java.bridge.JavaBridge.run(JavaBridge.java:215)
| at php.java.bridge.BaseThreadPool$Delegate.run(BaseThreadPool.java:66)
| Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.taskmgmt.exe.TaskMgmtInstance
| at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
| at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
| at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
| at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:563)
| at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3071)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:472)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:169)
| ... 11 more
| Jul 01 12:44:20 JavaBridge ERROR: An exception occured: org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session}
| org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session}
| at org.jbpm.svc.Services.close(Services.java:223)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1124)
| at php.java.bridge.Request.handleRequest(Request.java:342)
| at php.java.bridge.Request.handleRequests(Request.java:388)
| at php.java.bridge.JavaBridge.run(JavaBridge.java:215)
| at php.java.bridge.BaseThreadPool$Delegate.run(BaseThreadPool.java:66)
| Caused by: org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:179)
| at org.jbpm.svc.Services.close(Services.java:211)
| ... 10 more
| Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: org.jbpm.taskmgmt.exe.TaskMgmtInstance
| at org.hibernate.engine.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:219)
| at org.hibernate.type.EntityType.getIdentifier(EntityType.java:397)
| at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:242)
| at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:563)
| at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:3071)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:472)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197)
| at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:196)
| at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
| at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:169)
| ... 11 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059436#4059436
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059436
16Â years, 10Â months
[Remoting] - Re: Simple Socket Server (TEXT)?
by hurzeler
Ok yes I am an idiot. I had an old jar file in the deploy directory.
Now the sar gets deployed ok and answers on port 8084. The problem I have now is that remoting complains about the version of the data:
18:18:51,734 ERROR [ServerThread] Worker thread initialization failure
| java.io.IOException: Can not read data for version 116. Supported versions: 1,2,22
| at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:660)
| at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:530)
| at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:369)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
I am trying to send simple text to the socket via telnet. On the server side I do not want any fancy deserialization happening. I just want to get the InputStream (SimpleInputStreamWrapper getInputStream() returns a simple InputStream) and read the data of that InputStream (TextUnMarshaller read(InputStream is, Map map) returns a String).
May be I misunderstand the concept but I definitely do not understand the above error message.
Thanks for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059432#4059432
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059432
16Â years, 10Â months
[Remoting] - Re: Simple Socket Server (TEXT)?
by hurzeler
Yes there is actually a second socket in jboss-4.2.0.GA/server/default/conf/jboss-service.xml but as far as I can see it is on port 4446. Mine should go on port 8084. The name of the mbean is also different??? So therefore I can't see what is wrong. Further this part worked ok on jboss4.0.5GA but the un/marshalling did not. I guess this is because of the different remoting version.
Is this a bug???
This is the socket that conflicts in the default jboss-4.2.0.GA/server/default/conf/jboss-service.xml:
| <!-- The Connector is the core component of the remoting server service. -->
| <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
| <!-- data marshalling, etc.) with the invocation handlers. -->
| <mbean code="org.jboss.remoting.transport.Connector"
| name="jboss.remoting:service=Connector,transport=socket"
| display-name="Socket transport Connector">
|
| <!-- Can either just specify the InvokerLocator attribute and not the invoker element in the -->
| <!-- Configuration attribute, or do the full invoker configuration in the in invoker element -->
| <!-- of the Configuration attribute. -->
|
| <!-- Remember that if you do use more than one param on the uri, will have to include as a CDATA, -->
| <!-- otherwise, parser will complain. -->
| <!-- <attribute name="InvokerLocator"><![CDATA[socket://${jboss.bind.address}:4446/?datatype=invocation]]></attribute> -->
|
| <attribute name="Configuration">
| <!-- Using the following <invoker> element instead of the InvokerLocator above because specific attributes needed. -->
| <!-- If wanted to use any of the parameters below, can just add them as parameters to the url above if wanted use the InvokerLocator attribute. -->
| <config>
| <!-- Other than transport type and handler, none of these configurations are required (will just use defaults). -->
| <invoker transport="socket">
| <attribute name="dataType" isParam="true">invocation</attribute>
| <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
| <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
| <!-- This will be port on which the marshall loader port runs on. -->
| <!-- <attribute name="loaderport" isParam="true">4447</attribute> -->
| <!-- The following are specific to socket invoker -->
| <!-- <attribute name="numAcceptThreads">1</attribute>-->
| <!-- <attribute name="maxPoolSize">303</attribute>-->
| <!-- <attribute name="clientMaxPoolSize" isParam="true">304</attribute>-->
| <attribute name="socketTimeout" isParam="true">600000</attribute>
| <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
| <attribute name="serverBindPort">4446</attribute>
| <!-- <attribute name="clientConnectAddress">216.23.33.2</attribute> -->
| <!-- <attribute name="clientConnectPort">7777</attribute> -->
| <attribute name="enableTcpNoDelay" isParam="true">true</attribute>
| <!-- <attribute name="backlog">200</attribute>-->
| <!-- The following is for callback configuration and is independant of invoker type -->
| <!-- <attribute name="callbackMemCeiling">30</attribute>-->
| <!-- indicates callback store by fully qualified class name -->
| <!-- <attribute name="callbackStore">org.jboss.remoting.CallbackStore</attribute>-->
| <!-- indicates callback store by object name -->
| <!-- <attribute name="callbackStore">jboss.remoting:service=CallbackStore,type=Serializable</attribute> -->
| <!-- config params for callback store. if were declaring callback store via object name, -->
| <!-- could have specified these config params there. -->
| <!-- StoreFilePath indicates to which directory to write the callback objects. -->
| <!-- The default value is the property value of 'jboss.server.data.dir' and if this is not set, -->
| <!-- then will be 'data'. Will then append 'remoting' and the callback client's session id. -->
| <!-- An example would be 'data\remoting\5c4o05l-9jijyx-e5b6xyph-1-e5b6xyph-2'. -->
| <!-- <attribute name="StoreFilePath">callback</attribute>-->
| <!-- StoreFileSuffix indicates the file suffix to use for the callback objects written to disk. -->
| <!-- The default value for file suffix is 'ser'. -->
| <!-- <attribute name="StoreFileSuffix">cst</attribute>-->
| </invoker>
|
| <!-- At least one handler is required by the connector. If have more than one, must decalre -->
| <!-- different subsystem values. Otherwise, all invocations will be routed to the only one -->
| <!-- that is declared. -->
| <handlers>
| <!-- can also specify handler by fully qualified classname -->
| <handler subsystem="invoker">jboss:service=invoker,type=unified</handler>
| </handlers>
| </config>
| </attribute>
| <depends>jboss.remoting:service=NetworkRegistry</depends>
| </mbean>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059430#4059430
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059430
16Â years, 10Â months
[EJB 3.0] - Calling rmi server running in Weblogic 6.x from Jboss 4.0.5G
by jinchuriki
Hi all,
First of all, please forgive me if i have posts this in the wrong forum group.
Recently i have a project that needs me to call a remote ejb which is running in Weblogic 6.x. It is using Weblogic's proprietary protocol known as "t3". If i include weblogic.jar (i believe this version of weblogic doesn't deliver its client lib wlclient.jar) in my war file's WEB-INF/lib, i get this error:
2007-06-30 17:32:33,462 ERROR (GqsClient.java:93) - TestProject: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
I've tried to put it in server/default/lib but that throws another exception.
My test code:
Properties jndiProperties = new Properties();
jndiProperties.setProperty( Context.INITIAL_CONTEXT_FACTORY,
MY_INITIAL_CONTEXT_FACTORY );
jndiProperties.setProperty( Context.PROVIDER_URL, MY_PROVIDER_URL );
Context initialContext;
initialContext = new InitialContext( jndiProperties );
Object homeInt = initialContext.lookup( MY_EJB );
objectHome = ( SomeObjectHome ) PortableRemoteObject
.narrow( homeInt, SomeObjectHome.class );
objectRemote = objectHome.create();
Have i done anything wrong in the codes?
Where should i put my weblogic.jar?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059429#4059429
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059429
16Â years, 10Â months
[JBoss Seam] - Seam, GWT, JSF, and lunch with Gavin
by RobJellinghaus
Gavin King and I had lunch last week, and talked quite a bit about the work I've been doing to integrate GWT, JSF, and Seam (see http://unrealities.com/seamgwt for more on that).
In the process, we came up with a (perhaps harebrained) scheme for building JSF components with GWT in a declarative, composable way.
I wrote a blog post about it here:
http://blog.robjsoftware.org/2007/06/gwt-jsf-declarative-markup-and-lunch...
Anyone interested, please chime in either here or in the comments on that post.
(Is there a Seam-developers forum? If not, can someone make one? Seems like a necessary thing....)
Cheers!
Rob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059426#4059426
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059426
16Â years, 10Â months
[JBoss Seam] - Q) Usage of @Generated(GenerationTime.ALWAYS)
by kenï¼ tydfam.jp
Hi!
I seam-gen to build platform to start my application development. I generated codes using seam generate-entities from DB which has ID generated by DB itself. So, I tried to add @Generated(GenerationTime.ALWAYS) to ID, but it caused the error as shown below.
Am I misunderstanding something? Is there a way to enable generated code respecting DB generated IDs?
Table scheme
Column | Type | Modifiers
| ---------+---------+----------------------------------------------------
| id | integer | not null default nextval('users_id_seq'::regclass)
| name | text | not null
| address | text | not null
| email | text |
| tel | text |
| Indexes:
| "users_pkey" PRIMARY KEY, btree (id)
|
|
| | package jp.tydfam.test1;
| | // Generated 2007/07/01 13:46:57 by Hibernate Tools 3.2.0.b9
| |
| | import javax.persistence.Column;
| | import javax.persistence.Entity;
| | import javax.persistence.Id;
| | import javax.persistence.Table;
| |
| | import org.hibernate.annotations.Generated;
| | import org.hibernate.annotations.GenerationTime;
| | import org.hibernate.validator.NotNull;
| |
| | /**
| | * Users generated by hbm2java
| | */
| | @Entity
| | @Table(name = "users", schema = "public")
| | public class Users implements java.io.Serializable {
| |
| | private int id;
| | private String name;
| | private String address;
| | private String email;
| | private String tel;
| |
| | public Users() {
| | }
| |
| | public Users(int id, String name, String address) {
| | this.id = id;
| | this.name = name;
| | this.address = address;
| | }
| | public Users(int id, String name, String address, String email, String tel) {
| | this.id = id;
| | this.name = name;
| | this.address = address;
| | this.email = email;
| | this.tel = tel;
| | }
| |
| | @Id
| | @Generated(GenerationTime.ALWAYS)
| | @Column(name = "id", unique = true, nullable = false, insertable=false, updatable=false)
| | @NotNull
| | public int getId() {
| | return this.id;
| | }
| |
| | public void setId(int id) {
| | this.id = id;
| | }
| |
| | @Column(name = "name", nullable = false)
| | @NotNull
| | public String getName() {
| | return this.name;
| | }
| |
| | public void setName(String name) {
| | this.name = name;
| | }
| | : : :
| |
| | }
| |
| Error log in server.log (partial)
|
| | : : :
| | 2007-07-01 13:52:32,909 DEBUG [org.hibernate.cfg.AnnotationBinder] Processing annotations of jp.tydfam.test1.Users.id
| | 2007-07-01 13:52:32,909 DEBUG [org.hibernate.cfg.Ejb3Column] Binding column id unique true
| | 2007-07-01 13:52:32,909 DEBUG [org.hibernate.cfg.AnnotationBinder] id is an id
| | 2007-07-01 13:52:32,909 DEBUG [org.hibernate.cfg.annotations.SimpleValueBinder] building SimpleValue for id
| | 2007-07-01 13:52:32,909 DEBUG [org.hibernate.cfg.annotations.PropertyBinder] Building property id
| | 2007-07-01 13:52:32,910 DEBUG [org.jboss.ejb3.ServiceDelegateWrapper] Starting failed persistence.units:ear=test1.ear,unitName=test1
| | java.lang.NullPointerException
| | at org.hibernate.cfg.annotations.PropertyBinder.make(PropertyBinder.java:145)
| | at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1738)
| | at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1180)
| | at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:710)
| | at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:452)
| | : : :
| |
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059425#4059425
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059425
16Â years, 10Â months