[jBPM Development] - Re: jBPM JUnit tests are failing
by Michael Wagner
Michael Wagner [http://community.jboss.org/people/michael.wagner] created the discussion
"Re: jBPM JUnit tests are failing"
To view the discussion, visit: http://community.jboss.org/message/616392#616392
--------------------------------------------------------------
Just getting more confused. If I increase the "sleep", the "list" increases, too:
public void testTimerStart() throws Exception {
KnowledgeBase kbase = createKnowledgeBase("BPMN2-TimerStart.bpmn2");
StatefulKnowledgeSession ksession = createKnowledgeSession(kbase);
final List list = new ArrayList();
ksession.addEventListener(new DefaultProcessEventListener() {
public void afterProcessStarted(ProcessStartedEvent event) {
list.add(event.getProcessInstance().getId());
}
});
Thread.sleep(250);
assertEquals(0, list.size());
for (int i = 0; i < 5; i++) {
ksession.fireAllRules();
Thread.sleep(500);
}
// the longer the time is the more process instances are in "list"
Thread.sleep(3500);
assertEquals(5, list.size());
}
junit.framework.AssertionFailedError: expected:<5> but was:<9>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616392#616392]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss Web Services Development] - How to deploy a JaxWS endpoint during AS7 service startup?
by Andrew Dinn
Andrew Dinn [http://community.jboss.org/people/adinn] created the discussion
"How to deploy a JaxWS endpoint during AS7 service startup?"
To view the discussion, visit: http://community.jboss.org/message/612541#612541
--------------------------------------------------------------
I have been integrating the XTS code into AS7 and so far have incorporated an XTS extension which will deploy the main XTS service as part of AS7 standalone startup (see the http://github.com/adinn/jboss-as/tree/master/xts xts subdirectory in my github http://github.com/adinn/jboss-as jbossas repo for details). However, this implemenation is incomplete because it does not deploy the JaxWS endpoints required for XTS to work. I can get it to work if I deploy the endpoints by throwing the relevant war files into the standalone deplloyments directory but clearly that is inadequate as a proper solution.
What I wouudl like to do is to deploy the endpoints during startup of the XTS service and undeploy them during service shutdown. Is there a way I can do this using the JBossWS AS integration code? Jason suggested this would be the best way to do the deployment as it ought only to involve handing over the SEI class and a URL path -- which would be much preferable as regards performance to pulling the details out of a war file on disk. It looks to me like the EndpointService will do what I want but I don't know how to access it, how to drive it or whether, in fact,this is barking up the wrong tree. Any advice?
regards,
Andrew Dinn
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/612541#612541]
Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss AS7 Development] - Best way to initialize environment on deployment / startup?
by rushead
rushead [http://community.jboss.org/people/rushead] created the discussion
"Best way to initialize environment on deployment / startup?"
To view the discussion, visit: http://community.jboss.org/message/616310#616310
--------------------------------------------------------------
I am trying to port my war file from JBoss AS 5.1 to JBoss AS 7.
To provide a correct resource management I have to initialize my specific environment when the war file is deployed, before the Servlets are instantiated.
I already tried 2 ways:
1. Implementation of the environment initialization in a ServletContextListener* The #contextInitialized is called when all Servlet are instantiated --> little too late...
2. Implementation of the environment initialization in another Servlet (in #init), use "<load-on-startup>"* The implemented servlet is always initialized after the normal Servlet (<load-on-startup> is ignored?!)
* The only difference between the two servlets is that the StartupServlet is implementing Servlet the "old" way and the real Servlet is using JaxWS (@WebService)
And now my questions:
* Why is the ServletContextListener called when all Servlets are instantiated?
* Why is "<load-on-startup>" ignored when the implementation differ only in the WS implementation?
* Last but not least: What is the best and usual way to initialize a custom environment for several servlets in a war file?* The initialization / startup servlet should run on Tomcat also if possible...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616310#616310]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss Transactions Development] - XA Transaction not propagated correctly on EJB3 calls
by Andres Munoz
Andres Munoz [http://community.jboss.org/people/andreco87] created the discussion
"XA Transaction not propagated correctly on EJB3 calls"
To view the discussion, visit: http://community.jboss.org/message/616182#616182
--------------------------------------------------------------
I'm developing an application with EJB 3.1, JPA 2.0, Hibernate 3.6.5, JBoss AS 6.0, DB2 AS400. All it's configured with XA transactions support.
I have two tables:KSSEGTUSER in DSMXMBASE schema, SSPCOTFUNCIONARIO in DSMXCORP schema.
|-----------------------| |---------------------------|
| DSMXMBASE.KSSEGTUSER | |DSMXCORP.SSPCOTFUNCIONARIO |
|-----------------------| |---------------------------|
|*ID | |*ID |
| USERNAME |_1_________*_/_ | USERID |
| PASSWORD | \ | FIRSTNAME |
| EMAIL | | LASTNAME |
| TYPE | | WORKINGAREAID |
| STATUS | | STATUS |
|-----------------------| |---------------------------|
KSSEGTUSER is mapped to UserDTO JPA 2.0 entity bean in the prjFrameworkV2 project.
SSPCOTFUNCIONARIO is mapped to FuncionarioDTO JPA 2.0 entity bean in the prjCorporativoV2 project.
For create or update the UserDTO, I have a Singleton Session bean named UsuarioServiceImpl, it has a UsuarioServiceLocal by Local Session Bean interface and it has a UsuarioServiceRemote by Remote Session Bean interface.
For create or update the FuncionarioDTO, I have a Singleton Session bean named FuncionarioServiceImpl, it has a FuncionarioServiceLocal by
Local Session Bean interface and
it has a FuncionarioServiceRemote by Remote Session Bean interface.
In the create method of funcionario of FuncionarioServiceImpl I'm calling to create method of usuario of UsuarioServiceImpl via EJB Local injection.
The problem is that I don´t insert the user and employee in same transaction, the application throw an exception when inserting the employe, the stack trace is:
---------------------------------------------------------------------------------------------------------------------------------------------
14:59:12,341 INFO [STDOUT] Hibernate: insert into KSSEGTUSER (cmsprofileid, lastmodificationdate, lastmodifieruserid, observation, registerdate, registeruserid, usercomnom, usercredat, useremail, usernom, userpasswordcaducitydate, userpasswordencrypted, userpwd, userroltypeid, usersecque, usersecqueans, userstatus, usersuper, usertypeid, userupddat, userid) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
14:59:12,819 INFO [STDOUT] Hibernate: insert into SSPCOTFUNCIONARIO (celularsms, codigoareatrabajo, codigointerno, codigopersona, estadofuncionario, fechamodificacion, fecharegistro, idserviciosms, nivelconfiguracion, operamatriz, recibesms, usuariofuncionario, usuariomodificacion, usuarioregistro, codigocompania, codigofuncionario) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
15:00:15,076 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: -913, SQLState: 57033
15:00:15,076 ERROR [org.hibernate.util.JDBCExceptionReporter] [SQL0913] Fila u objeto SSPCO00013 en DSMXCORP tipo *FILE utilizándose.
15:00:15,077 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session: org.hibernate.exception.GenericJDBCException: could not insert: [ec.com.smx.corpv2.dto.Employee]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) [:3.5.5-Final]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) [:3.5.5-Final]
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858) [:3.5.5-Final]
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178) [:3.5.5-Final]
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [:3.5.5-Final]
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [:3.5.5-Final]
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) [:3.5.5-Final]
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375) [:3.5.5-Final]
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:1057) [:3.5.5-Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94) [:6.0.0.Final]
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1158) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119) [:6.0.0.Final]
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) [:6.0.0.Final]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:82) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:255) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.singleton.aop.impl.AOPBasedInterceptorRegistry.intercept(AOPBasedInterceptorRegistry.java:110) [:1.0.0-alpha-28]
at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:206) [:1.0.0-alpha-28]
at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.dynamicInvoke(AOPBasedSingletonContainer.java:432) [:1.0.0-alpha-28]
at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:88) [:1.7.17]
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:75) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62) [:1.0.1.GA]
at $Proxy138.invoke(Unknown Source) at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
at $Proxy139.crearFuncionario(Unknown Source) at test.Transaccion.doPost(Transaccion.java:104)
at test.Transaccion.doGet(Transaccion.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0_23]
Caused by: java.sql.SQLException: [SQL0913] Fila u objeto SSPCO00013 en DSMXCORP tipo *FILE utilizándose.
at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:836) [:JTOpen 7.4]
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:699) [:JTOpen 7.4]
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:669) [:JTOpen 7.4]
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:971) [:JTOpen 7.4]
at com.ibm.as400.access.AS400JDBCPreparedStatement.executeUpdate(AS400JDBCPreparedStatement.java:1495) [:JTOpen 7.4]
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365) [:6.0.0.Final]
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) [:3.5.5-Final]
... 72 more
15:00:15,089 WARN [com.arjuna.ats.arjuna] ARJUNA-12125 TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0ac80608:126a:4e248f40:1c, org.hibernate.ejb.AbstractEntityManagerImpl$1@341b6e35 >: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not insert: [ec.com.smx.corpv2.dto.Employee]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235) [:3.5.5-Final]
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168) [:3.5.5-Final]
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:1064) [:3.5.5-Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:97) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:274) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:94) [:6.0.0.Final]
at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1158) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119) [:6.0.0.Final]
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) [:6.0.0.Final]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:82) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:255) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:349) [:0.0.1]
at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209) [:0.0.1]
at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52) [:0.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76) [:1.0.0.GA]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42) [:1.0.3]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.async.impl.interceptor.AsynchronousClientInterceptor.invoke(AsynchronousClientInterceptor.java:143) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) [:1.0.1]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.ejb3.singleton.aop.impl.AOPBasedInterceptorRegistry.intercept(AOPBasedInterceptorRegistry.java:110) [:1.0.0-alpha-28]
at org.jboss.ejb3.singleton.impl.container.SingletonContainer.invoke(SingletonContainer.java:206) [:1.0.0-alpha-28]
at org.jboss.ejb3.singleton.aop.impl.AOPBasedSingletonContainer.dynamicInvoke(AOPBasedSingletonContainer.java:432) [:1.0.0-alpha-28]
at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:88) [:1.7.17]
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:75) [:1.7.17]
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) [jboss-aop.jar:2.2.1.GA]
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62) [:1.0.1.GA]
at $Proxy138.invoke(Unknown Source) at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:185) [:1.0.11]
at $Proxy139.crearFuncionario(Unknown Source) at test.Transaccion.doPost(Transaccion.java:104)
at test.Transaccion.doGet(Transaccion.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0_23]
Caused by: org.hibernate.exception.GenericJDBCException: could not insert: [ec.com.smx.corpv2.dto.Employee]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) [:3.5.5-Final]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) [:3.5.5-Final]
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858) [:3.5.5-Final]
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:267) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:259) [:3.5.5-Final]
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:178) [:3.5.5-Final]
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [:3.5.5-Final]
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) [:3.5.5-Final]
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1206) [:3.5.5-Final]
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:375) [:3.5.5-Final]
at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:1057) [:3.5.5-Final]
... 62 more
Caused by: java.sql.SQLException: [SQL0913] Fila u objeto SSPCO00013 en DSMXCORP tipo *FILE utilizándose.
at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:836) [:JTOpen 7.4]
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:699) [:JTOpen 7.4]
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:669) [:JTOpen 7.4]
at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:971) [:JTOpen 7.4]
at com.ibm.as400.access.AS400JDBCPreparedStatement.executeUpdate(AS400JDBCPreparedStatement.java:1495) [:JTOpen 7.4]
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365) [:6.0.0.Final]
at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) [:3.5.5-Final]
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) [:3.5.5-Final]
... 72 more
--------------------------------------------------------------------------------------------------------------------------------------------------
*But when I deploy the same application in GlassFish 3.1, the application works fine. The funcionario and usuario was cretead sucessfully.*
*
*
I'm testing this functionality via Servlet http://localhost:8080/prjCorporativoWeb/Transaccion http://localhost:8080/prjCorporativoWeb/Transaccion.
Help me please. How to configure the JBoss 6.0 to works in this scenario?
Please see the source of attachments.
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/616182#616182]
Start a new discussion in JBoss Transactions Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months
[JBoss AS7 Development] - CDI bean injection problem
by Andrew Murphy
Andrew Murphy [http://community.jboss.org/people/Smurfs] created the discussion
"CDI bean injection problem"
To view the discussion, visit: http://community.jboss.org/message/615942#615942
--------------------------------------------------------------
Apologies if this query should be put to the user forum, but I'm not sure if what I face is a bug, or me just being dumb!
I have a bean, DownloadJob, which implements the quartz (timer) Job interface method execute(...). The bean has the @ManagedBean annotation. The problem I face is I have a number of CDI dependant beans declared within the DownloadJob bean which are not being injected i.e. all references to CDI beans remain 'null'. I suspect the underlying cause is the container is unaware of the DownloadJob bean (despite being annotated with @ManagedBean) as the quartz library instantiates it when a timer is triggered. Nonetheless my expectation is the container should still resolve calls/references to the other CDI managed beans under its control. Am I mistaken or naive?
Rather than paste a zillion of lines of code I have created the simple test case (zip attached) which replicates this issue by instantiating a bean with CDI dependencies using the *+new+* keyword. An excerpt of the test case is below.
I have the latest JBoss AS7.1 snapshot which I understand addresses a recent CDI injection bug, so any insight/guidance will be appreciated.
Thank you, Andrew
@RunWith(Arquillian.class)
public class SimpleCDITest {
//...
@Inject
private InjectableEJB1 injectableEJB1;
@Test
public void injectedManagedBeanDependencyTest() {
Assert.assertNotNull(injectableEJB1.getSimpleBean());
Assert.assertNotNull(injectableEJB1.getSimpleEJB());
}
@Test
public void instantiatedBeanDependencyTest() {
final InjectableEJB2 injectableEJB2 = new InjectableEJB2();
// Injected dependencies into InjectableEJB2 are null...
// ... assert fails
Assert.assertNotNull(injectableEJB2.getSimpleBean());
Assert.assertNotNull(injectableEJB2.getSimpleEJB());
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/615942#615942]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 5 months