geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "YunFeng Ma (JIRA)" <j...@apache.org>
Subject [jira] Updated: (GERONIMO-3317) "has not been enhanced" error when invoking an EJB 2.1 Entity Bean
Date Tue, 07 Aug 2007 11:19:59 GMT

     [ https://issues.apache.org/jira/browse/GERONIMO-3317?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

YunFeng Ma updated GERONIMO-3317:
---------------------------------

    Attachment: GERONIMO-3317-1.patch

I retested my application on Sun JDK and IBM JDK, found that it works OK on Sun JDK, but get
NoClassDefFoundError on IBM JDK.

A little investigation found the root cause is the following codes in org.apache.geronimo.kernel.config.Configuration
{code}
private final Map<AbstractName, GBeanData> gbeans = new HashMap<AbstractName, GBeanData>();
{code}

Note here we used HashMap. The Java doc describes HashMap:
This class makes no guarantees as to the order of the map; in particular, it does not guarantee
that the order will remain constant over time.

We expect the gbeans is ordered, when get the gbeans via configuration.getGBeans().values(),
it's order is decided by the specific JDK.

I changed it to the following codes:
{code}
private final Map<AbstractName, GBeanData> gbeans = new LinkedHashMap<AbstractName,
GBeanData>();
{code}

The Java doc describes LinkedHashMap:
This implementation differs from HashMap in that it maintains a doubly-linked list running
through all of its entries. This linked list defines the iteration ordering, which is normally
the order in which keys were inserted into the map (insertion-order)

Now, my application works ok on both Sun JDK and IBM JDK.


> "has not been enhanced" error when invoking an EJB 2.1 Entity Bean
> ------------------------------------------------------------------
>
>                 Key: GERONIMO-3317
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-3317
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: OpenEJB
>    Affects Versions: 2.0
>            Reporter: Song
>            Assignee: Kevan Miller
>            Priority: Critical
>             Fix For: 2.0.x, 2.1
>
>         Attachments: GERONIMO-3317-1.patch, GERONIMO-3317.patch, gvtlibTable.ddl
>
>
> My application could be deployed successfully. 
> But when launching an Entity Bean, "has not been enhanced" error is thrown:
> 17:07:58,593 ERROR [OpenEJB] The bean instances business method encountered a system
exception: The type "class openejb.gvtlibrary.EJBUser" has not been enhanced.
> <1.0.0-SNAPSHOT-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException:
The type "class openejb.gvtlibrary.EJBUser" has not been enhanced.
>         at org.apache.openjpa.meta.ClassMetaData.resolveMeta(ClassMetaData.java:1610)
>         at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1584)
>         at org.apache.openjpa.meta.MetaDataRepository.processBuffer(MetaDataRepository.java:663)
>         at org.apache.openjpa.meta.MetaDataRepository.resolveMeta(MetaDataRepository.java:563)
>         at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:488)
>         at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:290)
>         at org.apache.openjpa.kernel.BrokerImpl.newObjectId(BrokerImpl.java:1089)
>         at org.apache.openjpa.kernel.DelegatingBroker.newObjectId(DelegatingBroker.java:257)
>         at org.apache.openjpa.persistence.EntityManagerImpl.find(EntityManagerImpl.java:348)
>         at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.find(CMPEntityManagerTxScoped.java:125)
>         at org.apache.openejb.core.cmp.jpa.JpaCmpEngine.loadBean(JpaCmpEngine.java:171)
>         at org.apache.openejb.core.cmp.CmpContainer.findByPrimaryKey(CmpContainer.java:687)
>         at org.apache.openejb.core.cmp.CmpContainer.invoke(CmpContainer.java:284)
>         at org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:57)
>         at org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:160)
>         at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:230)
>         at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>         at $Proxy51.findByPrimaryKey(Unknown Source)
>         at javaUtility.EjbUtility.getUser(EjbUtility.java:105)
>         at servlets.WelcomeServlet.doPost(WelcomeServlet.java:71)
>         at servlets.GVTServlet.service(GVTServlet.java:89)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>         at org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)
>         at org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
>         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:801)
> org.apache.openejb.InvalidateReferenceException: java.rmi.RemoteException: The bean encountered
a non-application exception.; nested exception is:
>         <1.0.0-SNAPSHOT-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException:
The type "class openejb.gvtlibrary.EJBUser" has not been enhanced.: The bean encountered a
non-application exception.; nested exception is:
>         <1.0.0-SNAPSHOT-SNAPSHOT fatal user error> org.apache.openjpa.persistence.ArgumentException:
The type "class openejb.gvtlibrary.EJBUser" has not been enhanced.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message