# The re is no default persistence unit in this deployment



## ma_ria (16. Apr 2008)

hallihallo,

ich habe folgendes problem:
ich versuch auf einem jboss 4.2 auf dem ja die hsqldb vorkonfiguriert ist, ein propgramm zu deployen. leider kommt da folgender fehler:


```
11:52:05,937 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=AuthenticationBean,service=EJB3

11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=AuthenticationBean,service=E
JB3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=AuthenticationBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=JobManagementBean,service=EJB3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=JobManagementBean,service=EJ
B3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=JobManagementBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=QuestionManagementBean,service=
EJB3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=QuestionManagementBean,servi
ce=EJB3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=QuestionManagementBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=TestManagemenBean,service=EJB3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=TestManagemenBean,service=EJ
B3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=TestManagemenBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=UserSessionBean,service=EJB3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=UserSessionBean,service=EJB3

11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=UserSessionBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=testPersitenceBean,service=EJB
3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=testPersitenceBean,service=
EJB3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=testPersitenceBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Ignoring request to stop nonexistent serv
ice: jboss.j2ee:ear=test.ear,jar=test.jar,name=CopyOftestPersitenceBean,servi
ce=EJB3
11:52:05,953 WARN  [ServiceController] Ignoring request to destroy nonexistent s
ervice: jboss.j2ee:ear=test.ear,jar=test.jar,name=CopyOftestPersitenceBean,se
rvice=EJB3
11:52:05,953 WARN  [JmxKernelAbstraction] jboss.j2ee:ear=test.ear,jar=test.jar
,name=CopyOftestPersitenceBean,service=EJB3 is not registered
11:52:05,953 WARN  [ServiceController] Problem starting service jboss.j2ee:servi
ce=EJB3,module=test.jar
java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.persistenc
e.EntityManager de.biotronik.test.persistence.CopyOftestPersitenceBean.em :The
re is no default persistence unit in this deployment.
        at org.jboss.injection.PersistenceUnitHandler.handleFieldAnnotations(Per
sistenceUnitHandler.java:247)
        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:585)
        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:585)
        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:585)
        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.start(MainDeployer.java:1015)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
        at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
        at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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.startService(A
bstractDeploymentScanner.java:336)
        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:585)
        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:585)
        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 $Proxy4.start(Unknown Source)
        at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
        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 org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
        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:585)
        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 $Proxy5.deploy(Unknown Source)
        at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
        at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
        at org.jboss.Main.boot(Main.java:200)
        at org.jboss.Main$1.run(Main.java:508)
        at java.lang.Thread.run(Thread.java:595)
11:52:06,031 INFO  [EJB3Deployer] Deployed: file:/D:/Programme/jboss-4.2.2.GA/se
rver/default/tmp/deploy/tmp56209test.ear-contents/test.jar
11:52:06,046 INFO  [TomcatDeployer] deploy, ctxPath=/test, warUrl=.../tmp/deplo
y/tmp56209test.ear-contents/test-exp.war/
11:52:06,203 INFO  [EARDeployer] Started J2EE application: file:/D:/Programme/jb
oss-4.2.2.GA/server/default/deploy/test.ear
11:52:06,203 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:service=EJB3,module=test.jar
  State: FAILED
  Reason: java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.
persistence.EntityManager de.biotronik.test.persistence.CopyOftestPersitenceBe
an.em :There is no default persistence unit in this deployment.

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:service=EJB3,module=test.jar
  State: FAILED
  Reason: java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.
persistence.EntityManager de.biotronik.test.persistence.CopyOftestPersitenceBe
an.em :There is no default persistence unit in this deployment.


11:52:06,281 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8
080
11:52:06,312 INFO  [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
11:52:06,328 INFO  [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBos
s_4_2_2_GA date=200710221139)] Started in 21s:500ms
```

was heißt denn There is no default persistence unit in this deployment ich les überall hsqldb is dabei?
need help


----------



## Gast (17. Apr 2008)

Gucke mal in deiner ear ob die persistence.xml mit eingebunden worden ist.


----------



## ma_ria (18. Apr 2008)

ja daran lags hatte das packet falsch gepackt *hehe*


----------

