[JBoss jBPM] - org.hibernate.StaleObjectStateException: jbpm and esb
by sshetty
Hi,
We see the following invocation when we use JBPM to orchestrate our ESB services.
| 2009-03-02 16:00:07,508 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
| 2009-03-02 16:00:07,508 DEBUG [org.hibernate.jdbc.ConnectionManager] skipping aggressive-release due to flush cycle
| 2009-03-02 16:00:07,508 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.job.ExecuteActionJob#63081]
| at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1765)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2407)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:234)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:142)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:59)
| at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
| at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
| at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
| at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
| at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
| at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.endJtaTransaction(JtaDbPersistenceService.java:76)
| at org.jbpm.persistence.jta.JtaDbPersistenceService.close(JtaDbPersistenceService.java:37)
| at org.jbpm.svc.Services.close(Services.java:225)
| at org.jbpm.JbpmContext.close(JbpmContext.java:139)
| at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:144)
| at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
| 2009-03-02 16:00:07,509 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2009-03-02 16:00:07,509 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
| 2009-03-02 16:00:07,510 WARN [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed fo
| r com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@53a642
|
|
Here is our env:
anonymous wrote :
| Oracle 10g
| jboss-4.2.3.GA
| jboss-messaging-1.4.2.GA
| jbossesb-4.4.GA
|
Our BPM does not use fork or joins.
Any help appreciated.
Thanks
:)
SShetty
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214312#4214312
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214312
15 years, 10 months
[Security & JAAS/JBoss] - Re: Minimal JBoss config to use GSSAPI/Kerberos acceptSecCon
by chriscorbell
I finally got it working. I had gotten a sample working in a small test Java app. using the external config file brought in by "-Djava.security.auth.login.config" per the Sun sample.
I believe I have confirmed that this usage is not the way to go with JBoss - you need to use the same configuration properties of a "com.sun.security.jgss.accept" that might be defined in such a config file, but do it in the standard JBoss login-config.xml.
The three system property args needed are:
-Djava.security.krb5.realm=(your realm), -Djava.security.krb5.kdc=(your kdc IP), and -Djavax.security.auth.useSubjectCredsOnly=false
(I'm passing these to the JVM via run.sh).
It turns out I was missing a few things in my login-config.xml application-policy, that was the main source of may failure - also missing a couple of steps in my code.
Here's what my policy looks like in login-config.xml:
<application-policy name = "com.sun.security.jgss.accept">
| <authentication>
| <login-module code="com.sun.security.auth.module.Krb5LoginModule"
| flag="required">
| <module-option name="debug">true</module-option>
| <module-option name="realm">MY.TEST.REALM.COM</module-option>
| <module-option name="kdc">10.1.6.100</module-option>
| <module-option name="useKeyTab">true</module-option>
| <module-option name="useTicketCache">true</module-option>
| <module-option name="doNotPrompt">true</module-option>
| <module-option name="keyTab">/Library/sso/myservice/krb5.keytab</module-option>
| <module-option name="storeKey">true</module-option>
| <module-option name="principal">myservice/10.1.6.22</module-option>
| </login-module>
| </authentication>
| </application-policy>
The options for "realm", "kdc", "keyTab" and "principal" are the values that vary based on deployment and particular service.
In source, I found I needed to:
1. unmarshall the GSS context token I've received from the client into a byte array
2. get a GSSManager instance
3. create a new LoginContext with:
new LoginContext("com.sun.security.jgss.accept");
4. Call login() on my LoginContext instance
5. Create a GSSCredentials instance with the manager, using
.createCredential(GSSCredential.ACCEPT_ONLY);
6. Create a GSSContext using the manager, passing the credentials just created to .createContext(...)
7. Use the context to call .acceptSecContext:
gssCtx.acceptSecContext(gssContextBytes, 0, gssContextBytes.length);
Hopefully this is useful for someone else who's trying to achieve the same thing.
- Chris
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214309#4214309
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214309
15 years, 10 months
[JBoss/Spring Integration] - <component scan fail while War deployment
by shaival
Hi,
I am using autowired Beans with @AutoWired , @Component etc
and my Application-context.xml has following entry.
<context:component-scan base-package="com.interval.services.pojo.impl">
<context:include-filter type="annotation" expression="org.springframework.beans.factory.annotation.Autowired"/>
<context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/>
</context:component-scan>
My WebWar deploys fine in Tomcat , jetty but when i use Jboss 5.0.1A.
Deployment fails and it gives following error.If you can guide me a bit that will be really great.
at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.beans.factory.BeanCreationException: Could not au
towire field: private com.interval.services.pojo.ContactService com.interval.con
tact.service.contactmanager.ContactManagerEndpoint.contactService; nested except
ion is org.springframework.beans.factory.NoSuchBeanDefinitionException: No uniqu
e bean of type [com.interval.services.pojo.ContactService] is defined: Unsatisfi
ed dependency of type [interface com.interval.services.pojo.ContactService]: exp
ected at least 1 matching bean
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:435)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject
Fields(InjectionMetadata.java:105)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.
java:240)
... 78 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No u
nique bean of type [com.interval.services.pojo.ContactService] is defined: Unsat
isfied dependency of type [interface com.interval.services.pojo.ContactService]:
expected at least 1 matching bean
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:613)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:412)
... 80 more
15:07:00,708 ERROR [[/EnterpriseServicesWeb]] Servlet /EnterpriseServicesWeb thr
ew load() exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean
of type [com.interval.services.pojo.ContactService] is defined: Unsatisfied depe
ndency of type [interface com.interval.services.pojo.ContactService]: expected a
t least 1 matching bean
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
resolveDependency(DefaultListableBeanFactory.java:613)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.j
ava:412)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject
Fields(InjectionMetadata.java:105)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanP
ostProcessor.postProcessAfterInstantiation(AutowiredAnnotationBeanPostProcessor.
java:240)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.populateBean(AbstractAutowireCapableBeanFactory.java:959)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:380)
at org.springframework.web.servlet.FrameworkServlet.createWebApplication
Context(FrameworkServlet.java:402)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationCo
ntext(FrameworkServlet.java:316)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(Fram
eworkServlet.java:282)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.
java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.
java:1048)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:95
0)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex
t.java:4122)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
421)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
Internal(TomcatDeployment.java:312)
at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy
(TomcatDeployment.java:144)
at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeploy
ment.java:461)
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
er.java:157)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java
:206)
at $Proxy36.start(Unknown Source)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installActio
n(StartStopLifecycleAction.java:42)
at org.jboss.system.microcontainer.StartStopLifecycleAction.installActio
n(StartStopLifecycleAction.java:37)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.sim
pleInstallAction(SimpleControllerContextAction.java:62)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.ins
tall(AccessControllerContextAction.java:71)
at org.jboss.dependency.plugins.AbstractControllerContextActions.install
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214297#4214297
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214297
15 years, 10 months