1 Reply Latest reply on Aug 13, 2002 11:38 AM by Keith Putt

    Entity Bean creation problem with CMP 2.0 and Postgres or My

    Vandermeulen FIlip Newbie

      > I am trying to get JBoss up and running on top of a database
      > in which I want to create table entries through CMP (2.0) based
      > entity beans.
      >
      > I tried already with MySQL and Postgres-cygwin.
      >
      > Reading the DB and making EJBQL based queries is no problem,
      > but from the moment I want to create an entry with a primary
      > key, I get an error saying:
      >
      > do not call nextTransaction while not synched!
      >
      > Apparently this is an error output by the class
      > QueuedPessimisticEJBLock.class in file
      > QueuedPessimisticEJBLock.java at line 381. I get this error
      > by working with both MySQL and Postgres. Do you have any idea
      > what the reason of this could be? If someone of you would need any
      > source files relevant to this, please let me know. I pasted
      > the full error trace I got from JBoss here below and put the
      > error commands in bold. I hope you can do something with this
      > so I get some joy from JBoss with create DB entries;
      >
      If you did something similar in creating DB entries via CMP 2.0 entity beans and got similar errors, I would be glad to hear from you;

      > Many thanks for your help;
      >
      > Filip Vandermeulen; ________________________________________________
      > Filip Vandermeulen
      >
      > Network Strategy Engineer
      >
      > Belgacom
      > Advanced Network Services (NIS/NSS)
      >
      > 02 / 202 1080
      > 0478 / 950 668
      > fillip.vandermeulen@belgacom.be
      > __________________________________________
      >
      > Full JBoss error trace:
      >
      >
      >
      > 17:21:25,695 INFO [EjbModule] Creating
      > 17:21:25,735 INFO [EjbModule] Deploying CustomerBean
      > 17:21:25,985 INFO [EjbModule] Deploying MovieBean
      > 17:21:26,005 INFO [EjbModule] Deploying SagBean 17:21:26,055
      > INFO [EjbModule] Deploying SagServiceBean 17:21:26,075 INFO
      > [EjbModule] Deploying SagServiceParameterBean 17:21:26,096
      > INFO [EjbModule] Deploying ServiceBean 17:21:26,136 INFO
      > [EjbModule] Deploying ServiceParameterBean 17:21:26,176 INFO
      > [EjbModule] Deploying SubscriberBean 17:21:26,196 INFO
      > [EjbModule] Deploying SubscriberGroupBean 17:21:26,226 INFO
      > [EjbModule] Deploying VODServerBean 17:21:26,246 INFO
      > [EjbModule] Deploying ServiceControlBean 17:21:26,266 INFO
      > [EjbModule] Deploying SubscriptionMgmtControlBean
      > 17:21:26,296 INFO [EjbModule] Deploying AccessSessionBean
      > 17:21:26,746 INFO [EjbModule] Created 17:21:26,756 INFO
      > [EjbModule] Starting 17:21:33,136 INFO [EjbModule] Started
      > 17:21:33,196 INFO [EmbeddedCatalinaServiceSX] deploy,
      > ctxPath=/WARP10SA, warUrl
      > =file:/C:/jboss-3.0.1/server/default/tmp/deploy/server/default
      > /deploy/warpportal
      > .ear/90.warpportal.ear-contents/warpportal.war
      > 17:21:33,196 INFO [EmbeddedCatalinaServiceSX]
      > ClusteredHTTPSessionService not f ound 17:21:33,376 INFO
      > [Engine] WebappLoader[/WARP10SA]: Deploying class repositorie
      > s to work directory
      > C:\jboss-3.0.1\catalina\work\MainEngine\localhost\WARP10SA
      > 17:21:33,386 INFO [Engine] WebappLoader[/WARP10SA]: Deploy
      > class files /WEB-INF /classes to
      > C:\jboss-3.0.1\catalina\work\MainEngine\localhost\WARP10SA\WEB-INF\c
      > lasses
      > 17:21:33,696 INFO [Engine] StandardManager[/WARP10SA]:
      > Seeding random number ge nerator class
      > java.security.SecureRandom 17:21:33,706 INFO [Engine]
      > StandardManager[/WARP10SA]: Seeding of random number
      > generator has been completed 17:21:33,837 INFO [Engine]
      > ContextConfig[/WARP10SA]: Added certificates -> requ est
      > attribute Valve 17:21:34,047 INFO
      > [EmbeddedCatalinaServiceSX] Using Java2 parent classloader de
      > legation: true
      > 17:21:34,057 INFO [Engine] ServiceControlTestServlet: init
      > 17:21:34,067 INFO [Engine]
      > StandardWrapper[/WARP10SA:default]: Loading containe r
      > servlet default 17:21:34,067 INFO [Engine] default: init
      > 17:21:34,067 INFO [Engine]
      > StandardWrapper[/WARP10SA:invoker]: Loading containe r
      > servlet invoker 17:21:34,067 INFO [Engine] invoker: init
      > 17:21:34,067 INFO [Engine] jsp: init 17:21:34,097 INFO
      > [MainDeployer] Deployed package: file:/C:/jboss-3.0.1/server/
      > default/deploy/warpportal.ear 17:21:34,117 INFO
      > [URLDeploymentScanner] Started 17:21:34,117 INFO
      > [MainDeployer] Deployed package: file:/C:/jboss-3.0.1/server/
      > default/conf/jboss-service.xml 17:21:34,117 INFO [Server]
      > JBoss (MX MicroKernel) [3.0.1RC1 Date:200206291622] Started
      > in 0m:33s:78ms 17:25:39,931 INFO [STDOUT] GET SERVICE
      > CONTROL SESSION BEAN 17:25:43,836 INFO [STDOUT] GOT SERVICE
      > CONTROL BEAN 17:25:43,836 INFO [STDOUT] CREATING THE VOD
      > SERVICE 17:25:43,916 INFO [STDOUT] Creating the SERVICE
      > 17:25:43,956 INFO [STDOUT] Checking existence 17:25:43,986
      > INFO [STDOUT] calling findByName 17:25:45,789 ERROR [STDERR]
      > @ServiceUtil.getServiceByName : Failed to find the Service
      > Local object named Video_On_Demand:VOD_BGC 17:25:45,789 INFO
      > [STDOUT] Checked existence 17:25:45,799 INFO [STDOUT]
      > Starting creation 17:25:45,799 INFO [STDOUT] creating
      > 17:25:45,839 INFO [STDOUT] returning 17:25:46,240 INFO
      > [STDOUT] SQL EXCEPTION 17:25:46,240 ERROR [STDERR]
      > java.lang.reflect.UndeclaredThrowableException
      > 17:25:46,240 ERROR [STDERR] at $Proxy64.create(Unknown Source)
      > 17:25:46,240 ERROR [STDERR] at
      > com.belgacom.warpportal.services.util.Service
      > Util.createServiceInstance(Unknown Source)
      > 17:25:46,240 ERROR [STDERR] at
      > com.belgacom.warpportal.services.ejb.ServiceC
      > ontrolBean.addService(Unknown Source)
      > 17:25:46,250 ERROR [STDERR] at
      > sun.reflect.NativeMethodAccessorImpl.invoke0(
      > Native Method)
      > 17:25:46,250 ERROR [STDERR] at
      > sun.reflect.NativeMethodAccessorImpl.invoke(N
      > ativeMethodAccessorImpl.java:39)
      > 17:25:46,250 ERROR [STDERR] at
      > sun.reflect.DelegatingMethodAccessorImpl.invo
      > ke(DelegatingMethodAccessorImpl.java:25)
      > 17:25:46,250 ERROR [STDERR] at
      > java.lang.reflect.Method.invoke(Method.java:3
      > 24)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.StatelessSessionContainer$Conta
      > inerInterceptor.invoke(StatelessSessionContainer.java:664)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.resource.connectionmanager.CachedCo
      > nnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.StatelessSessionInstanc
      > eInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.AbstractTxInterceptor.i
      > nvokeNext(AbstractTxInterceptor.java:96)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.TxInterceptorCMT.runWit
      > hTransactions(TxInterceptorCMT.java:176)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.TxInterceptorCMT.invoke
      > (TxInterceptorCMT.java:61)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.SecurityInterceptor.inv
      > oke(SecurityInterceptor.java:129)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.plugins.LogInterceptor.invoke(L
      > ogInterceptor.java:183)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.StatelessSessionContainer.invok
      > e(StatelessSessionContainer.java:313)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.ejb.Container.invoke(Container.java
      > :705)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.mx.server.MBeanServerImpl.invoke(MB
      > eanServerImpl.java:491)
      > 17:25:46,260 ERROR [STDERR] at
      > org.jboss.invocation.local.LocalInvoker.invok
      > e(LocalInvoker.java:98)
      > 17:25:46,270 ERROR [STDERR] at
      > org.jboss.invocation.InvokerInterceptor.invok
      > e(InvokerInterceptor.java:102)
      > 17:25:46,270 ERROR [STDERR] at
      > org.jboss.proxy.TransactionInterceptor.invoke
      > (TransactionInterceptor.java:73)
      > 17:25:46,270 ERROR [STDERR] at
      > org.jboss.proxy.SecurityInterceptor.invoke(Se
      > curityInterceptor.java:76)
      > 17:25:46,270 ERROR [STDERR] at
      > org.jboss.proxy.ejb.StatelessSessionIntercept
      > or.invoke(StatelessSessionInterceptor.java:111)
      > 17:25:46,270 ERROR [STDERR] at
      > org.jboss.proxy.ClientContainer.invoke(Client
      > Container.java:76)
      > 17:25:46,270 ERROR [STDERR] at $Proxy55.addService(Unknown Source)
      > 17:25:46,270 ERROR [STDERR] at
      > com.belgacom.warpportal.services.servlet.Serv
      > iceControlTestServlet.service(Unknown Source)
      > 17:25:46,270 ERROR [STDERR] at
      > javax.servlet.http.HttpServlet.service(HttpSe
      > rvlet.java:853)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.ApplicationFilterCha
      > in.internalDoFilter(ApplicationFilterChain.java:247)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.ApplicationFilterCha
      > in.doFilter(ApplicationFilterChain.java:193)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.StandardWrapperValve
      > .invoke(StandardWrapperValve.java:243)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:566)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > oke(StandardPipeline.java:472)
      > 17:25:46,270 ERROR [STDERR] at
      > org.apache.catalina.core.ContainerBase.invoke
      > (ContainerBase.java:943)
      > 17:25:46,310 ERROR [STDERR] at
      > org.apache.catalina.core.StandardContextValve
      > .invoke(StandardContextValve.java:190)
      > 17:25:46,310 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:566)
      > 17:25:46,310 ERROR [STDERR] at
      > org.apache.catalina.valves.CertificatesValve.
      > invoke(CertificatesValve.java:246)
      > 17:25:46,310 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:564)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > oke(StandardPipeline.java:472)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.ContainerBase.invoke
      > (ContainerBase.java:943)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.StandardContext.invo
      > ke(StandardContext.java:2347)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.StandardHostValve.in
      > voke(StandardHostValve.java:180)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:566)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.valves.ErrorDispatcherVal
      > ve.invoke(ErrorDispatcherValve.java:170)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:564)
      > 17:25:46,330 ERROR [STDERR] at
      > org.apache.catalina.valves.ErrorReportValve.i
      > nvoke(ErrorReportValve.java:170)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:564)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.valves.AccessLogValve.inv
      > oke(AccessLogValve.java:468)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:564)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > oke(StandardPipeline.java:472)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.ContainerBase.invoke
      > (ContainerBase.java:943)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardEngineValve.
      > invoke(StandardEngineValve.java:174)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > okeNext(StandardPipeline.java:566)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.StandardPipeline.inv
      > oke(StandardPipeline.java:472)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.core.ContainerBase.invoke
      > (ContainerBase.java:943)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.connector.http.HttpProces
      > sor.process(HttpProcessor.java:1027)
      > 17:25:46,340 ERROR [STDERR] at
      > org.apache.catalina.connector.http.HttpProces
      > sor.run(HttpProcessor.java:1125)
      > 17:25:46,340 ERROR [STDERR] at
      > java.lang.Thread.run(Thread.java:536)
      > 17:25:46,350 ERROR [STDERR] Caused by:
      > java.rmi.ServerException: do not call nex tTransaction while
      > not synched!; nested exception is:
      > java.lang.IllegalStateException: do not call
      > nextTransaction while not s ynched!
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.AbstractTxInterceptor.i
      > nvokeNext(AbstractTxInterceptor.java:119)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.TxInterceptorCMT.runWit
      > hTransactions(TxInterceptorCMT.java:251)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.TxInterceptorCMT.invoke
      > Home(TxInterceptorCMT.java:52)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.SecurityInterceptor.inv
      > okeHome(SecurityInterceptor.java:104)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.LogInterceptor.invokeHo
      > me(LogInterceptor.java:118)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.EntityContainer.invokeHome(Enti
      > tyContainer.java:487)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.local.BaseLocalContaine
      > rInvoker.invokeHome(BaseLocalContainerInvoker.java:227)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.local.LocalHomeProxy.in
      > voke(LocalHomeProxy.java:110)
      > 17:25:46,350 ERROR [STDERR] ... 57 more
      > 17:25:46,350 ERROR [STDERR] Caused by:
      > java.lang.IllegalStateException: do not c all nextTransaction
      > while not synched!
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.lock.QueuedPessimisticE
      > JBLock.nextTransaction(QueuedPessimisticEJBLock.java:401)
      > 17:25:46,350 ERROR [STDERR] at
      > org.jboss.ejb.plugins.lock.QueuedPessimisticE
      > JBLock.endTransaction(QueuedPessimisticEJBLock.java:431)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.lock.QueuedPessimisticE
      > JBLock.endInvocation(QueuedPessimisticEJBLock.java:455)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.EntitySynchronizationIn
      > terceptor.invokeHome(EntitySynchronizationInterceptor.java:225)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.resource.connectionmanager.CachedCo
      > nnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.EntityInstanceIntercept
      > or.invokeHome(EntityInstanceInterceptor.java:88)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.EntityLockInterceptor.i
      > nvokeHome(EntityLockInterceptor.java:79)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.EntityCreationIntercept
      > or.invokeHome(EntityCreationInterceptor.java:44)
      > 17:25:46,360 ERROR [STDERR] at
      > org.jboss.ejb.plugins.AbstractTxInterceptor.i
      > nvokeNext(AbstractTxInterceptor.java:98)
      > 17:25:46,360 ERROR [STDERR] ... 64 more
      > 17:25:46,360 ERROR [STDERR]
      > @ServiceUtil.createServiceInstance : Failed to crea te
      > Service object on the Service Local Home Interface
      > 17:25:46,360 ERROR [STDERR] Throwing exception during create
      > of service 17:25:46,360 ERROR [STDERR]
      > @ServiceControlBean.addService : failed to create s ervice
      > entry 17:25:46,360 ERROR [STDERR] Failed to create VOD
      > servicecom.belgacom.warpportal.
      > services.util.ManagementError:
      > 17:25:46,360 INFO [STDOUT] VOD SERVICE CREATED with Id null
      > 17:25:46,360 INFO [STDOUT] MODIFYING THE VOD SERVICE
      > 17:25:46,360 INFO [STDOUT] calling findByName 17:25:46,370
      > ERROR [STDERR] @ServiceUtil.getServiceByName : Failed to
      > find the Service Local object named Video_On_Demand:VOD_BGC
      > 17:25:46,370 ERROR [STDERR] @ServiceControlBean.addService :
      > failed to create s ervice entry 17:25:46,370 ERROR [STDERR]
      > Modification of VOD service failed com.belgacom.warp
      > portal.services.util.ServiceNotInExistence:
      >
      > **** DISCLAIMER ****
      > "This e-mail and any attachments thereto may contain information
      > which is confidential and/or protected by intellectual property
      > rights and are intended for the sole use of the recipient(s)
      > named above.
      > Any use of the information contained herein (including, but
      > not limited to,
      > total or partial reproduction, communication or distribution
      > in any form)
      > by persons other than the designated recipient(s) is prohibited.
      > If you have received this e-mail in error, please notify the
      > sender either
      > by telephone or by e-mail and delete the material from any computer.
      > Thank you for your cooperation."
      >