[EJB 3.0] - Re: EJB 3.0 Entity problem - Error: Incomplete Deployment li
by HappyNewYear
Here it is...
| C:\jboss-4.2.2.GA\server\default\deploy>jar -tf tps-entity.jar
| META-INF/
| META-INF/MANIFEST.MF
| tps/entity/Flight.class
| meta-inf/persistence.xml
| tps/entity/IFlight.class
| tps/entity/FlightBean.class
|
| C:\jboss-4.2.2.GA\server\default\deploy>
|
I took out the unitName, so now I'm only using @PersistenceContext. Here is the error I got.
| ===============================================================================
|
| JBoss Bootstrap Environment
|
| JBOSS_HOME: C:\jboss-4.2.2.GA
|
| JAVA: C:\Sun\SDK\jdk\bin\java
|
| JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.cli
| ent.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
|
| CLASSPATH: C:\Sun\SDK\jdk\lib\tools.jar;C:\jboss-4.2.2.GA\bin\run.jar
|
| ===============================================================================
|
| 10:21:48,265 INFO [Server] Starting JBoss (MX MicroKernel)...
| 10:21:48,265 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=
| JBoss_4_2_2_GA date=200710221139)
| 10:21:48,265 INFO [Server] Home Dir: C:\jboss-4.2.2.GA
| 10:21:48,265 INFO [Server] Home URL: file:/C:/jboss-4.2.2.GA/
| 10:21:48,265 INFO [Server] Patch URL: null
| 10:21:48,265 INFO [Server] Server Name: default
| 10:21:48,265 INFO [Server] Server Home Dir: C:\jboss-4.2.2.GA\server\default
| 10:21:48,265 INFO [Server] Server Home URL: file:/C:/jboss-4.2.2.GA/server/defa
| ult/
| 10:21:48,265 INFO [Server] Server Log Dir: C:\jboss-4.2.2.GA\server\default\log
|
| 10:21:48,265 INFO [Server] Server Temp Dir: C:\jboss-4.2.2.GA\server\default\tm
| p
| 10:21:48,265 INFO [Server] Root Deployment Filename: jboss-service.xml
| 10:21:48,625 INFO [ServerInfo] Java version: 1.6.0,Sun Microsystems Inc.
| 10:21:48,625 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.6.0-b105,S
| un Microsystems Inc.
| 10:21:48,625 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
| 10:21:49,234 INFO [Server] Core system initialized
| 10:21:51,968 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083
| /
| 10:21:51,984 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resour
| ce:jboss-log4j.xml
| 10:21:52,625 INFO [TransactionManagerService] JBossTS Transaction Service (JTA
| version) - JBoss Inc.
| 10:21:52,781 INFO [TransactionManagerService] Setting up property manager MBean
| and JMX layer
| 10:21:53,046 INFO [TransactionManagerService] Starting recovery manager
| 10:21:53,140 INFO [TransactionManagerService] Recovery manager started
| 10:21:53,140 INFO [TransactionManagerService] Binding TransactionManager JNDI R
| eference
| 10:21:56,265 INFO [EJB3Deployer] Starting java:comp multiplexer
| 10:21:56,609 INFO [STDOUT] no object for null
| 10:21:56,609 INFO [STDOUT] no object for null
| 10:21:56,625 INFO [STDOUT] no object for null
| 10:21:56,640 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
| 10:21:56,656 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
| 10:21:58,921 INFO [NativeServerConfig] JBoss Web Services - Native
| 10:21:58,921 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=20071021
| 0837)
| 10:21:59,953 INFO [Embedded] Catalina naming disabled
| 10:22:00,093 INFO [AprLifecycleListener] The Apache Tomcat Native library which
| allows optimal performance in production environments was not found on the java
| .library.path: C:\Sun\SDK\jdk\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;
| C:\WINDOWS;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\INDIGO~1\perl\bin
| ;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickT
| ime\QTSystem\;C:\Sun\SDK\jdk\bin;C:\Program Files\apache-ant-1.7.0\bin;C:\PRISM
| WORKSPACE\PrismMW\lib;C:\Program Files\AspectJ\bin;C:\Program Files\AspectJ\lib\
| aspectjrt.jar;C:\Program Files\Common Files\Adobe\AGL;C:\PROGRA~1\ADDINS~1\XLSTA
| T~1;C:\indigoperl\perl\bin;C:\xmlbeans-2.3.0\bin;C:\shiftone-jrat-0.71b.zip;C:\j
| boss-4.2.2.GA;C:\jboss-4.2.2.GA\bin;ORACLE_HOME;ORACLE_SID;C:\oraclexe\app\oracl
| e\product\10.2.0\server\jdbc\lib;C:\Sun\SDK\bin;C:\Program Files\Pinnacle\Shared
| Files;C:\Program Files\Pinnacle\Shared Files\Filter
| 10:22:00,296 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0
| .1-8080
| 10:22:00,296 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-80
| 09
| 10:22:00,296 INFO [Catalina] Initialization processed in 340 ms
| 10:22:00,296 INFO [StandardService] Starting service jboss.web
| 10:22:00,296 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
| 10:22:00,343 INFO [Catalina] Server startup in 39 ms
| 10:22:00,437 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-w
| eb.deployer/ROOT.war/
| 10:22:01,171 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/
| http-invoker.sar/invoker.war/
| 10:22:01,296 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/
| jbossws.sar/jbossws-context.war/
| 10:22:01,531 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../
| deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
| 10:22:02,859 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../dep
| loy/management/console-mgr.sar/web-console.war/
| 10:22:03,421 INFO [MailService] Mail Service bound to java:/Mail
| 10:22:03,531 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/jboss-ha-local-jdbc.rar
| 10:22:03,656 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/jboss-ha-xa-jdbc.rar
| 10:22:03,687 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/jboss-local-jdbc.rar
| 10:22:03,718 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/jboss-xa-jdbc.rar
| 10:22:03,781 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/jms/jms-ra.rar
| 10:22:03,796 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/mail-ra.rar
| 10:22:03,828 INFO [RARDeployment] Required license terms exist, view META-INF/r
| a.xml in .../deploy/quartz-ra.rar
| 10:22:03,843 INFO [QuartzResourceAdapter] start quartz!!!
| 10:22:03,890 INFO [SimpleThreadPool] Job execution threads will use class loade
| r of thread: main
| 10:22:03,921 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
| 10:22:03,921 INFO [RAMJobStore] RAMJobStore initialized.
| 10:22:03,921 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzSchedule
| r' initialized from default resource file in Quartz package: 'quartz.properties'
|
| 10:22:03,921 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
| 10:22:03,921 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUS
| TERED started.
| 10:22:04,781 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
| oss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 10:22:05,015 INFO [A] Bound to JNDI name: queue/A
| 10:22:05,015 INFO [B] Bound to JNDI name: queue/B
| 10:22:05,015 INFO [C] Bound to JNDI name: queue/C
| 10:22:05,015 INFO [D] Bound to JNDI name: queue/D
| 10:22:05,015 INFO [ex] Bound to JNDI name: queue/ex
| 10:22:05,046 INFO [testTopic] Bound to JNDI name: topic/testTopic
| 10:22:05,046 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
| 10:22:05,046 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
|
| 10:22:05,046 INFO [testQueue] Bound to JNDI name: queue/testQueue
| 10:22:05,078 INFO [UILServerILService] JBossMQ UIL service available at : /127.
| 0.0.1:8093
| 10:22:05,125 INFO [DLQ] Bound to JNDI name: queue/DLQ
| 10:22:05,390 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jb
| oss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 10:22:05,421 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../dep
| loy/jmx-console.war/
| 10:22:05,921 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
| 080
| 10:22:05,953 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
| 10:22:05,984 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
| s_4_2_2_GA date=200710221139)] Started in 17s:703ms
| 10:22:21,312 WARN [ServiceController] Ignoring request to stop nonexistent serv
| ice: jboss.j2ee:jar=tps-entity.jar,name=FlightBean,service=EJB3
| 10:22:21,312 WARN [ServiceController] Ignoring request to destroy nonexistent s
| ervice: jboss.j2ee:jar=tps-entity.jar,name=FlightBean,service=EJB3
| 10:22:21,312 WARN [JmxKernelAbstraction] jboss.j2ee:jar=tps-entity.jar,name=Fli
| ghtBean,service=EJB3 is not registered
| 10:22:21,312 WARN [ServiceController] Problem starting service jboss.j2ee:servi
| ce=EJB3,module=tps-entity.jar
| java.lang.RuntimeException: Illegal @PersistenceUnit on protected javax.persiste
| nce.EntityManager tps.entity.FlightBean.em :There is no default persistence unit
| in this deployment.
| at org.jboss.injection.PersistenceContextHandler.handleFieldAnnotations(
| PersistenceContextHandler.java:182)
| at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUt
| il.java:137)
| at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.ja
| va:174)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:358)
| at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java
| :140)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deploym
| ent.java:292)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:356)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS
| upport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB
| eanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
| ler.java:978)
| at $Proxy0.start(Unknown Source)
| at org.jboss.system.ServiceController.start(ServiceController.java:417)
| at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
| java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy33.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
| BeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor
| .java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(Intercepto
| rServiceMBeanSupport.java:238)
| at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInt
| erceptor.java:87)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.
| start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterce
| ptor.java:95)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy34.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
| 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:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept
| or.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM
| BeanOperationInterceptor.java:142)
| 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:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy9.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
| tScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
| canner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
| doScan(AbstractDeploymentScanner.java:263)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
| loop(AbstractDeploymentScanner.java:274)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
| run(AbstractDeploymentScanner.java:225)
| 10:22:21,390 INFO [EJB3Deployer] Deployed: file:/C:/jboss-4.2.2.GA/server/defau
| lt/deploy/tps-entity.jar
| 10:22:21,406 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.j2ee:service=EJB3,module=tps-entity.jar
| State: FAILED
| Reason: java.lang.RuntimeException: Illegal @PersistenceUnit on protected java
| x.persistence.EntityManager tps.entity.FlightBean.em :There is no default persis
| tence unit in this deployment.
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:service=EJB3,module=tps-entity.jar
| State: FAILED
| Reason: java.lang.RuntimeException: Illegal @PersistenceUnit on protected java
| x.persistence.EntityManager tps.entity.FlightBean.em :There is no default persis
| tence unit in this deployment.
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140164#4140164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140164
18 years
[EJB 3.0] - Re: Bug: Injected EJB objects instantiated on every MDB call
by doktora
"adrian(a)jboss.org" wrote : As I commented on the "bug" report. This is not JMS, this is EJB3.
|
| OFF TOPIC - use the ejb3 forum rather than respond to this post.
|
| It isn't clear to me what you are doing, but it doesn't look like a bug to me.
| It looks like you don't understand that ejbs are pooled and/or that multiple copies
| of an entity bean can exist simultanously,
| e.g. for optimisitic locking
|
| To have singletons you need to use some form of pessimistic locking which is usually not
| very performant.
Hi Adrian,
Apologies for posting on the wrong forum, but the issue seems to present itself only in MDBs, therefore my assumption that it was an MDB problem. I didn't write the code, so you might be right.
I think my understanding of pooling is pretty good, ergo the post and the "Bug" in the title. I'm pretty sure this is broken:
After making 351 requests, how many instances of RecordManagerBean do you think were created? The answer is, 351. postConstruct was called 351 times and preDestroy was called 0 times, so none of these instances were claimed back. Is there a fault in my understanding of how this should work?
What happened on the 352'nd request? Here:
Can't create thread: 5
| 13:34:45,519 ERROR [JmsServerSession] Unable to schedule work
| javax.resource.spi.work.WorkRejectedException: org.jboss.util.threadpool.ThreadPoolFullException: java.lang.OutOfMemoryError: unable to create new native thread
| at org.jboss.resource.work.WorkWrapper.rejected(WorkWrapper.java:250)
| ...
|
JBoss is started with -Xms128m -Xmx512m, so maybe these memory settings will make it easier to replicate the bug.
Here is also a script to call the calculator injection mdb 3 times every second:
URL="http://<YOURIP>:8080/EJB3Trail/serviceobjects/injection/calculator.jsp?action=send&start=25&end=65&growthrate=0.08&saving=300&submit=Calculate"
|
| out=/dev/null
| content=/dev/null
|
| i=0
| while [ $i -ne 500 ]; do
| i=`echo "1 + $i" | bc -q`
| echo $i
| wget $URL --output-file $out --output-document $content
| wget $URL --output-file $out --output-document $content
| wget $URL --output-file $out --output-document $content
| sleep 1
| done
Please be so kind to ponder on my comments and reconsider whether it still looks like I don't understand ejb's and pooling.
Also consider that jaikiran independently verified this with his own code.
Also consider the fact that this behaviour does not occur if we do not use MDB, i.e. just by using stateless beans.
Kind regards
Dok
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140142#4140142
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4140142
18 years