For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 7 replies, 4 voices, and was last updated 19 years, 2 months ago by
Riyad Kalla.
-
AuthorPosts
-
amattasMemberI am working on a J2ee, and I reversed engineered the persistence layer for EJB3, and also built the facade for it. When I deploy on glassfish I get this stack trace (I haven’t modified the default generated classes at all)
INFO: [AutoDeploy] Selecting file C:\java\glassfish\domains\domain1\autodeploy\CI.ear for autodeployment.
Jun 18, 2007 2:35:35 PM com.sun.enterprise.deployment.phasing.PEDeploymentService$AuditInfo <init>
INFO: Deployment by user Unknown of module CI (type=Application) starting
Jun 18, 2007 2:35:36 PM com.sun.enterprise.security.provider.PolicyConfigurationImpl generatePermissions
WARNING: No Principals mapped to Role [users].
Jun 18, 2007 2:35:36 PM com.sun.enterprise.deployment.phasing.J2EECPhase runPhase
INFO: deployed with moduleid = CI
Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
INFO: [TopLink Config]: 2007.06.18 02:35:36.787–ServerSession(1063831)–The alias name for the entity class [class com.stryker.cmf.users.Groups] is being defaulted to: Groups.Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
INFO: [TopLink Config]: 2007.06.18 02:35:36.787–ServerSession(1063831)–The alias name for the entity class [class com.stryker.cmf.users.Users] is being defaulted to: Users.Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
INFO: [TopLink Config]: 2007.06.18 02:35:36.802–ServerSession(1063831)–The target entity (reference) class for the one to many mapping element [public java.util.Set com.stryker.cmf.users.Users.getGroupses()] is being defaulted to: class com.stryker.cmf.users.Groups.Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
INFO: [TopLink Config]: 2007.06.18 02:35:36.802–ServerSession(1063831)–The target entity (reference) class for the many to one mapping element [public com.stryker.cmf.users.Users com.stryker.cmf.users.Groups.getUsers()] is being defaulted to: class com.stryker.cmf.users.Users.Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.logging.SystemOutandErrHandler$LoggingByteArrayOutputStream flush
INFO: [TopLink Config]: 2007.06.18 02:35:36.802–ServerSession(1063831)–The primary key column name for the mapping element [public com.stryker.cmf.users.Users com.stryker.cmf.users.Groups.getUsers()] is being defaulted to: username.Jun 18, 2007 2:35:36 PM com.sun.enterprise.naming.NamingManagerImpl bindObjects
INFO: naming.bind
Jun 18, 2007 2:35:36 PM com.sun.ejb.containers.ContainerFactoryImpl createContainer
SEVERE: EJB5090: Exception in creating EJB container [java.lang.ArrayIndexOutOfBoundsException: 1873]
Jun 18, 2007 2:35:36 PM com.sun.ejb.containers.ContainerFactoryImpl createContainer
SEVERE: appId=CI moduleName=CIEJB_jar ejbName=GroupsFacade
Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.AbstractLoader loadEjbs
SEVERE: LDR5004: UnExpected error occured while creating ejb container
java.lang.ArrayIndexOutOfBoundsException: 1873
at oracle.toplink.libraries.asm.ClassReader.readByte(ClassReader.java:801)
at oracle.toplink.libraries.asm.attrs.Annotation.readValue(Annotation.java:457)
at oracle.toplink.libraries.asm.attrs.Annotation.read(Annotation.java:231)
at oracle.toplink.libraries.asm.attrs.Annotation.readAnnotations(Annotation.java:275)
at oracle.toplink.libraries.asm.attrs.RuntimeVisibleAnnotations.read(RuntimeVisibleAnnotations.java:108)
at oracle.toplink.libraries.asm.ClassReader.readAttribute(ClassReader.java:1016)
at oracle.toplink.libraries.asm.ClassReader.accept(ClassReader.java:301)
at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:89)
at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:660)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.getMethod0(Class.java:2642)
at java.lang.Class.getMethod(Class.java:1579)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:561)
at com.sun.ejb.containers.StatelessSessionContainer.<init>(StatelessSessionContainer.java:163)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:515)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:490)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:184)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader.java:113)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:322)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:196)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:633)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:908)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:892)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:445)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:296)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:203)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStartEvent(ServerDeploymentTarget.java:285)
at com.sun.enterprise.deployment.phasing.ApplicationStartPhase.runPhase(ApplicationStartPhase.java:119)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:263)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:281)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.deploy(ApplicationsConfigMBean.java:534)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:353)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:336)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:448)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:77)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:297)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.invokeDeploymentService(AutoDeployer.java:413)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:394)
at com.sun.enterprise.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:253)
at com.sun.enterprise.deployment.autodeploy.AutoDeployControllerImpl$AutoDeployTask.run(AutoDeployControllerImpl.java:358)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Jun 18, 2007 2:35:36 PM com.sun.enterprise.server.ApplicationManager applicationDeployed
WARNING: CORE5021: Application NOT loaded: [CI]
Jun 18, 2007 2:35:36 PM com.sun.enterprise.admin.server.core.DeploymentNotificationHelper multicastEvent
WARNING: ADM1075:Error on listening event:[Error while loading application [CI]. Please refer to the server log for more details. ]
Jun 18, 2007 2:35:36 PM com.sun.enterprise.deployment.phasing.PEDeploymentService$AuditInfo reportEnd
INFO: Deployment by user Unknown of module CI (type=Application) completed with warning, elapsed time 1125 ms
Jun 18, 2007 2:35:36 PM com.sun.enterprise.deployment.autodeploy.AutoDeployer parseResult
WARNING: Warning while deploying : com.sun.enterprise.deployment.backend.IASDeploymentException: Error while loading application [CI]. Please refer to the server log for more details.
.
Jun 18, 2007 2:35:36 PM com.sun.enterprise.deployment.autodeploy.AutoDeployer invokeDeploymentService
INFO: [AutoDeploy] Successfully autodeployed : C:\java\glassfish\domains\domain1\autodeploy\CI.ear.June 19, 2007 at 9:15 am #271710
Loyal WaterMemberHi amattas,
What version of Glass Fish are you using ? Can you use a different build of GlassFish like 49 or later and try your deployment again. We have known issues in the past where the deployment would fail on one build but work on another.June 19, 2007 at 10:22 am #271722
amattasMemberI’m using the latest promoted build of V2. V2 build 33
June 19, 2007 at 10:26 am #271724
GeoffMemberI am also having a problem using the Reverse Engineering for EJB3.
The problem I am seeing is this. I create a persistence unit with hibernate support and reverse engineer the Entities and the Facades.
I then deploy the ear that includes a simple war and the ejb project with the entities and facades.
The first problem I’m seeing is that the persistence unit seems to get created with the transaction-type of RESOURCE_LOCAL. This fails to deploy in glassfish. Best I can tell you cannot deploy a RESOURCE_LOCAL persistence unit to an application server that is to control the entity management. So I have to change this to JTA. Not a big deal, but I thought I should a) make sure I’m right about my suspicion and b) let you guys know about this bug (if it is one).
Next comes when I try to call the facade. It is trying to use the entityManagerFactory which is not allowed when the persistence unit transaction type is JTA. So the facades that are create are calling this FacadeHelper class which appears to only be able to be used for the RESOURCE_LOCAL. It seems that this needs to be generated differently if it is going to be handled by a container.
Am I right about this? Is this in the plans? As far as I can tell it is not possible to create Facades and deploy them to glassfish at this time. Please let me know what I should be looking into.
By the way, I love the way you guys are creating the facades. All of the finders and the generic find by property idea. Netbeans only creates the one finder (by Id). One thing that we have noticed, is that if you create Named Queries in your EJBs they get compiled and checked at deployment time rather than when they are called. This seems to fit well with the concept of: “If it is going to fail, make it fail as quickly as possible”. My addendum to that is preferrably before I can type it :-).
I hope this is useful information.
-Geoff
Thanks so much.
-GeoffJune 19, 2007 at 11:52 am #271735
Riyad KallaMemberamattas,
Please try a later build, not from the Beta 2 stream. Glassfish is changing quite a bit with every nightly build, and it’s a good idea to always use the latest. MyEclipse’s exploded deployments weren’t even supported until Nightly Build 47 when we worked with the GF2 team to get that in there. And in Build 46, when you deployed an EJB, it deployed as a web project, then in Build 49 it was fixed.Geoff,
Thank you for the detailed feedback. I am not that versed in EJB3 (yet) so I’m going to send your entire post to the persistence team to take a look at. We appreciate the insight.June 19, 2007 at 1:10 pm #271747
amattasMemberWill try this and get back to you. Thanks for the help.
June 19, 2007 at 2:48 pm #271767
amattasMemberThis has worked. Thank you
June 19, 2007 at 5:34 pm #271781
Riyad KallaMemberI’m glad it’s working now amattas.
-
AuthorPosts
