This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 297312 - Failed deployment of JEE application leaves broken Persistence Unit definition on Glassfish v3 b74
Summary: Failed deployment of JEE application leaves broken Persistence Unit definitio...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: glassfish
Keywords:
Depends on: 322288 316512 333336
Blocks:
  Show dependency tree
 
Reported: 2009-12-09 05:06 EST by Jaroslaw Lewandowski CLA
Modified: 2022-06-09 10:25 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslaw Lewandowski CLA 2009-12-09 05:06:16 EST
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10
Build Identifier: 2.0.0-RC1

Many times after deployment of JEE application which fails due to issues in Persistence Unit definitions (e.g. Accessing objects as entities which actually are not specified as them, errors in queries etc.) lives EL in the state which does not allow to deploy fixed app. For some reason persistence unit is left on GF (v3 b74) even if application which defines it does not exists on GF (deployment failed). These errors could be like this:

Caused by: Exception [EclipseLink-7250] (Eclipse Persistence Services - 2.0.0.v20091121-r5847): org.eclipse.persistence.exceptions.ValidationException
Exception Description: [<Some Class Name>] uses a non-entity [class <Some Class Name>] as target entity in the relationship attribute [field suppliers].
        at org.eclipse.persistence.exceptions.ValidationException.nonEntityTargetInRelationship(ValidationException.java:1320)
        at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getReferenceDescriptor(RelationshipAccessor.java:329)
        at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:292)
        at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.processOneToManyMapping(OneToManyAccessor.java:168)
        at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor.process(OneToManyAccessor.java:111)
        at org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.RelationshipAccessor.processRelationship(RelationshipAccessor.java:546)
        at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processRelationshipAccessors(MetadataProject.java:1085)
        at org.eclipse.persistence.internal.jpa.metadata.MetadataProject.processStage3(MetadataProject.java:1364)
        at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processORMMetadata(MetadataProcessor.java:462)
        at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:392)
        at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:934)
        ... 33 more

OR:

Caused by: java.lang.IllegalArgumentException: Object: [<SOME OBJECT>] is not a known entity type.
        at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4147)
        at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:368)
        at com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:258)
        at com.phorest.memento.server.master.service.BootstrapService.insertBoostrapData(BootstrapService.java:83)
        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:597)
        at com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
        at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
        at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133)
        at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115)
        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:597)
        at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961)
        at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390)
        at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373)
        at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:518)
        ... 38 more

<SOME OBJECT> is actually value of basic entity property


Reproducible: Always
Comment 1 Jaroslaw Lewandowski CLA 2009-12-09 05:24:49 EST
It looks like that classes of applications which failed to deploy are still available to EL.
Comment 2 Jaroslaw Lewandowski CLA 2009-12-09 05:34:26 EST
Or maybe class information is cached globally by EL and not refreshed with re-deployment.
Comment 3 Tom Ware CLA 2009-12-22 14:31:08 EST
Setting target and priority.  See the following page for details of what this means:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines
Comment 4 Michael OBrien CLA 2010-08-05 16:27:44 EDT
>reverify on Glassfish 3.0.1
Comment 5 Michael OBrien CLA 2010-08-10 15:39:00 EDT
>in queue, not yet assigned
Comment 6 Michael OBrien CLA 2011-01-13 13:39:59 EST
>The version of EclipseLink in GlassFish 3.0.1 is 6600 from Feb 2010
>See if updating past 8141 or for bug# 303063 and bug# 332290 fixes the issue
>Or upgrade to GlassFish 3.1 when it is released with EclipseLink 2.2

See bug# 297711 for the [dev-package-bundles] target
https://bugs.eclipse.org/bugs/show_bug.cgi?id=297711#c6
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:25:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink