[EJB 3.0] - Illegal @PersistenceUnit: There is no default persistence un
by mindhaq
I'm developing on Jboss AS 4.0.5GA.
When I try to access my PersistenceUnit without specifying the unitName explicitly in @PersistenceUnit, I get the following error, as though the default PersistenceUnit could not be determined. But I only have a single persistence defined in my EAR.
23:43:51,140 WARN [ServiceController] Problem starting service jboss.j2ee:service=EJB3,module=IndyPhoneBeans.jar
| java.lang.RuntimeException: Illegal @PersistenceUnit on private javax.persistence.EntityManager de.indyphone.common.ejb.UserSessionBean.entityManager
| :There is no default persistence unit in this deployment.
| at org.jboss.injection.PersistenceContextHandler.handleFieldAnnotations(PersistenceContextHandler.java:182)
| at org.jboss.injection.InjectionUtil.processFieldAnnotations(InjectionUtil.java:136)
| at org.jboss.injection.InjectionUtil.processAnnotations(InjectionUtil.java:173)
| at org.jboss.ejb3.EJBContainer.processMetadata(EJBContainer.java:270)
| at org.jboss.ejb3.SessionContainer.processMetadata(SessionContainer.java:116)
| at org.jboss.ejb3.Ejb3Deployment.processEJBContainerMetadata(Ejb3Deployment.java:273)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:322)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor138.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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(ServiceController.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(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.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 $Proxy29.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
| at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.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 $Proxy30.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.GeneratedMethodAccessor17.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.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 $Proxy8.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.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)
I also tried defining a scoped classloader, as written in the Trailblazer (and with another setting, see below, and without defining one and without a jboss-app.xml), all to no avail.
<?xml version="1.0" encoding="windows-1252"?>
| <jboss-app>
| <!--
| specify custom classloader name
| see here why: http://trailblazer.demo.jboss.com/EJB3Trail/persistence/config/index.html
| still, it doesn't work :(
|
| also tried this one, didn't do anything either
| IndyPhone:archive=IndyPhone.ear
| -->
| <loader-repository>
| IndyPhone:app=ejb3
| </loader-repository>
| </jboss-app>
Is there anything special to do for not being required to provide the unitName? It works providing it, but I'd rather not want to tie my EJBs to that name.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988529#3988529
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988529
19Â years, 5Â months
[JBoss Portal] - general question
by ahmed maaloul
Hello, I am a new JBoss Portal user, For that, I am tryin to know more about these product. So Here are my question:
1-Does JBoss Portal offers 2 type of pages open windows and contecnt page?
2-Can we design(custom) the graphic chart of the portal?
3-Can we define and visualize the organigram of the Portal users?
4-Does JBoss Portal offers the webmail funtionnality?
5-Does JBoss Portal offers a page which contains the portal plan?
6-Are Netscape Navigator 4.7 compatible with JBoss Portal fuctionnalities?
7-Does JBoss Portal offers accesibility facilites for handicaped persons?
8-Does JBoss Portal manage content archieving?
9-Does JBoss Portal offers a workflow engine to design business process?
10- What's the business process related to the publication of content?
11-Does JBoss Portal offers statistics related to the use and traffic of the portal (intranet/extranet)?
12-Can we made a thematic folder?
13-Does JBoss Portal offers the fuction on the media release?
14-Does JBoss Portal offers the fuction on thenews letter?
15-Does JBoss Portal offers the fuction on anounces?
16-Does JBoss Portal offers the fuction on the sondage?
17-Does JBoss Portal offers the fuction on the calendar?
18-Does JBoss Portal offers the fuction on the agednda?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988528#3988528
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988528
19Â years, 5Â months
[JBoss Seam] - Re: Using seam-gen with JBoss IDE (Eclipse), where are all t
by ellenzhao
Hi Richard,
a common problem of almost all modern java IDE is, they consume a lot of system resource. I encountered OutOfMemoryException on both stack and heap pretty often using default start up configuration. This problem is magnified when there are plugins. So first off, the JBoss IDE does consume more system resource than a plain Eclipse. Make sure the memory is big enough in your box. With <= 512MB memory you'll probably spend more time on waiting for the IDE to respond than actual programming. (I have 1.5G in one box and 2G in another) For exclipse based IDEs, a workaround is adding arguments like this on startup:
| -vmargs -Xms128M -Xmx256M -XX:PermSize=128M -XX:MaxPermSize=256M
|
Second, it is better to use the all-in-one bundle from jboss than first installing the bare Eclipse SDK then adding the JBoss features as plugin. The latter option might bring up some plugin management problems. Especially after running an update for the Eclipse, some JBoss features, for example the server synchronization (I consider a very important feature) was automatically disabled by Eclipse update and I failed to bring it back after hours of tweaking the configurations for the different plugins. When there was incompatible plugins, the really messy cyclic dependencies even prevented me from unstalling anything. So I tried out the all-in-one bundle from Jboss then things worked again.
The JBoss IDE offers free tools for Hibernate, visual Jbpm and things alike. I would like to have a feature which validates Seam objects. Hopefully it would be available in the future. But then, more memory would be needed....
Whether to use JBoss IDE or not also depends on what do you develop. My boss wanted a jbpm showcase application with graphical diagrams so I'm using this IDE. The hibernate tools are nice and frequently used by others too. If your daily work is more about handling web presentations especially jsf- or struts-centric, there might be better alternative which is more visual or consumes less system resources. If you go for WYSIWYH visual tools, on the Eclipse platform there are myeclipse, exadel studio and others. NetBeans has some visual things out of box, recently they have visual bpel and visual page-flow thing. IDEA 6 occupied approximately 60mb memory at startup without any plugin. That was remarkable but after plugins like database browser installed, the performance decreased significantly. What bothered me most is, IDEA 6 isn't really Debian-friendly. It was not quite responsive and crashed every 30 min on my Linux box (2G memory). NetBeans has the best performance on Linux among the three and very stable. Emacs/JEdit + Ant has the ultimate performance but when the project goes large and/or the there are a lot of configuration files, the OutOfMemoryException would occur in _my_ brain instead. :D
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988527#3988527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988527
19Â years, 5Â months