Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Lazy Fetch and weblogic issue

 Hi,

I am deploying a webapp to Weblogic 10.3.1.0 with eclipselink 1.1. I am using resource injection in a ModelFacade class to get EntityManager Factory:


public class ModelFacade implements ServletContextListener {

 @PersistenceUnit(unitName = "BPWebappPu")
 private EntityManagerFactory emf;
 @Resource
 private UserTransaction utx;


I don't have any weave specific properties set in my persistence.xml either:
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence";>
<persistence-unit name="BPWebappPu">
 <description>BPWebapp Persistence Unit
 </description>
 <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
 <jta-data-source>jdbc/BPWebappDB</jta-data-source>
 <properties>
   <!-- for eclipselink 1.0 -->
<property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.MySQLPlatform"/>

 </properties>
</persistence-unit>
</persistence>

I am getting the following exception after deploying and hitting the home page for the first time:


####<Aug 24, 2009 3:11:10 PM PDT> <Error> <HTTP> <etc01> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <12511518704 52> <BEA-101020> <[ServletContext@16140565[app:_appsdir_webapp_war module:webapp.war path:/webapp spec-version:2.5]] Servlet failed with Exception javax.persistence.PersistenceException: Exception [EclipseLink-0] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:
---------------------------------------------------------

Descriptor Exceptions:
---------------------------------------------------------

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The method [_persistence_setaddress_vh] or [_persistence_getaddress_vh] is not defined in the object [org.apache.olio.webapp.model.Person]. Internal Exception: java.lang.NoSuchMethodException: org.apache.olio.webapp.model.Person._persistence_getaddress_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(org.apache.olio.webapp.model.Person --> [DatabaseTable(PERSON)])

Exception [EclipseLink-60] (Eclipse Persistence Services - 1.1.1.v20090430-r4097): org.eclipse.persistence.exceptions.DescriptorException Exception Description: The method [_persistence_setaddress_vh] or [_persistence_getaddress_vh] is not defined in the object [org.apache.olio.webapp.model.SocialEvent]. Internal Exception: java.lang.NoSuchMethodException: org.apache.olio.webapp.model.SocialEvent._persistence_getaddress_vh()
Mapping: org.eclipse.persistence.mappings.OneToOneMapping[address]
Descriptor: RelationalDescriptor(org.apache.olio.webapp.model.SocialEvent --> [DatabaseTable(SOCIALEVENT)])

Runtime Exceptions:
---------------------------------------------------------

java.lang.NullPointerException

java.lang.NullPointerException

at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:272) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:111) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:163) at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:150)
 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 weblogic.deployment.EntityManagerFactoryProxyImpl.invoke(EntityManagerFactoryProxyImpl.java:75)
 at $Proxy117.createEntityManager(Unknown Source)
at org.apache.olio.webapp.model.ModelFacade.getSocialEvents(ModelFacade.java:1076) at org.apache.olio.webapp.controller.EventAction.listEvents(EventAction.java:219) at org.apache.olio.webapp.controller.EventAction.process(EventAction.java:57) at org.apache.olio.webapp.controller.ControllerServlet.process(ControllerServlet.java:61) at org.apache.olio.webapp.controller.ControllerServlet.doGet(ControllerServlet.java:93)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)


Note that for both of the address fields "Address" mentioned in Person and Social event, they are defined as LAZY type fetches.

I had a colleague inform me that since the resource injection is being injected, the weaving should be transparent to me and should occur between WebLogic and Eclipselink. However, the error seems to indicate that the weaving did not occur. Any ideas?

Thanks for the help,

Kim





Back to the top