Problem « Glassfish « JPA Q&A





1. Problem integrating Openjpa with Glassfish    stackoverflow.com

I have been trying to integrate Openjpa 2.0 (and later) with Glassfish 3.1 (open source), but I don't know whether it is impossible or it's me that's missing something, haven't had ...

2. Glassfish + JPA (Hibernate) + WebLogic client = deployment problem    stackoverflow.com

I am writing application that is going to be deployed on Glassfish 3.1 AS. Main duty of the app will be connecting to remote EJB hosted on WLS. I also employed ...

3. JPA2 usage problem    java.net

On 2/23/2011 3:45 PM, emiddio-frontier wrote: > i am learning JPA -- an example from Core JavaServer Faces 3rd > edition, with JPA2.0 examples > is not reading the database before each update -- it does the first time. > > a 2nd app using JDBC from the same book -- does read the database each > time the query > ...

5. JPA and remove-problem    java.net

yes, I think the manual cleanup is necessary for all forms of relationships. Section 3.2.3 "Synchronization to the Database" on page 50 of the spec says: "It is the developers responsibility to keep the in-memory references held on the owning side and those held on the inverse side consistent with each other when they change." Some vendor might have a vendor ...

6. JPA Problems    java.net

I'm not sure that using @DiscriminatorValue("Customer") is the problem, atleast the error and the bind value do not point to it. The values in the logging for binding are printed as is - calling to string on the attibute values passed to the driver. So you can't really tell the type from the value printed in the log - since for ...

7. jpa - problem resolving classes    java.net

[#|2007-05-11T11:46:55.242+0200|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.ejb|_ThreadID=12;_ThreadName=httpWorkerThread-8080-1;| javax.ejb.EJBException at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3730) at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3630) at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3431) at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247) at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:197) at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:67) at $Proxy325.printBanner(Unknown Source) 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.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705) at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:154) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:194) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:159) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119) at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197) at anthesi.isiportal.banner.__IISIBanner4_Remote_DynamicStub.printBanner(__IISIBanner4_Remote_DynamicStub.java) at anthesi.isiportal.banner._IISIBanner4_Wrapper.printBanner(anthesi.isiportal.banner._IISIBanner4_Wrapper.java) at org.cstura.mpx3.cache.MPX3Cache_anthesi_isiportal_banner_IISIBanner4.printBanner(MPX3Cache_anthesi_isiportal_banner_IISIBanner4.java:12) 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 anthesi.isiportal.ISIPortalWebBean.invoke(ISIPortalWebBean.java:383) ...

8. JPA merge problem    java.net

9. [SOLVED] JPA settings problem    java.net


@Entity
@Table( name="CFGCUSTOM" )
@javax.persistence.SequenceGenerator(
name="SEQ_CUSTOM",
sequenceName="SEQ_CUSTO" )
public class Customer extends VObject {
@Id
@Column( name="NIDCUST" )
@GeneratedValue( strategy=GenerationType.SEQUENCE, generator="SEQ_CUSTO" )
private Long id;

@NotNull
@Column( name="CNAMECUST")
private String name;

@OneToMany( mappedBy="id.customer", cascade = { CascadeType.ALL }, fetch=FetchType.EAGER )
private Set phones= new HashSet();





10. JPA Problem: LinkageError    java.net

java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "DatenStruktur.ConditionBasic.getCouplingElement()LDatenStruktur/CouplingElement;" the class loader (instance of oracle/toplink/essentials/internal/ejb/cmp3/JavaSECMPInitializer$TempEntityLoader) of the current class, DatenStruktur/ConditionBasic, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for interface DatenStruktur/Conditionable have different Class objects for the type DatenStruktur/CouplingElement used in the signature at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2291) at java.lang.Class.getDeclaredFields(Class.java:1743) at oracle.toplink.essentials.internal.security.PrivilegedAccessHelper.getDeclaredFields(PrivilegedAccessHelper.java:204) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataHelper.getFields(MetadataHelper.java:443) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor.usesPropertyAccess(MetadataDescriptor.java:1081) at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessor.processAccessors(ClassAccessor.java:564) at ...

13. JPA Java Heap problem    java.net

Problem: Since I am using the JPA to avoid the tight interaction with the DB, the data are persisted in the memory, Which leads to the Java Heap Memory problem, when I am going to one page to another. Because the page has to show all records from the database table (Lazy loading is used for the LOB). So I, cleared ...

14. JPA Problem    java.net

Basically there are two entities, Flats and his son entity, Property ("Inmueble" in Spanish). The problem appears when you insert many Properties (with his corresponding Flat), delete one of them, and inmediatly after you re-insert another flat. That's when say the exception: "java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST:com.dalya.bbdd.entity.Inmueble [idInmueble=5]."

15. Problem using Jersey in conjunction with Hibernate    java.net

As I found out in the meanwhile both hibernate and jersey depend on asm libraries (hibernate indirectly through cglib) of different versions (1.5.3 and 3.1). I built cglib anew resulting in jersey and hibernate both depending on the same asm version (3.1). Using this newly built gclib I succeeded in running hibernate and jersey together in glassfish.

16. Problem with JPA cache    java.net

The war module that accesses the stateless session bean via the MDB retrieves the Chassis entity using a query and the Chassis entity is found. The problem is that ConfigurationSet collection when accessed through this Chassis entity only has one of the ConfigurationSet instances in the list. In fact it is the first ConfigurationSet entity that was added to the Chassis ...





17. Problem with JPA and cache    java.net

My J2EE application consists of using the Command pattern and various Commands can be strung together to accomplish a desired goal. These Commands when strung together are executed within a Container Managed transaction and EntityManager. This is the reason that the flow that I present below is done and I have no easy way that I can change it.

18. Desparately need help with JPA (Toplink) cache problems    java.net

I've been battleing this problem for a long time. The problem that I am seeing is that the Toplink cache is becoming inconsistent. My code has a parent->child entity bidirectional relationship (and yes I wire up both sides correctly) and when I remove a child entity, in a later transaction, the system the parent entity with the child entity that I ...

19. Problems with RESTful Web services and Hibernate    java.net

After solving my first problem with asm version incompatibilities I have another problem. As i said in my previous post i'm trying to use Hibernate and RESTful Web Services, at first i tried just to get it to work using plain Hibernate with XML mapping and that worked fine, but what i want is to map using annotations.

20. JPA problem with connection    java.net

Dru Devore wrote: > Running this solution has been working until I redeploy the application > from NetBeans. If I redeploy the application all the values are set back > to the default. > > Anyone know why this is happening or how I can fix it? > > > -------- Original Message -------- > Subject: RE: JPA problem with connection ...

21. Problem undeploying WAR which uses JPA (in RESOURCE_LOCAL mode)    java.net

In MAT, for example, you can open the dump file, go to the histogram view, and search for an application class that should not be present but is - make sure you triggered the heap dump after you undeployed the app. Then you can select one such class and use "Show Objects by class with inbound references" and then use "Path ...

22. Problem with Glassfish 2.1, Hibernate and MySQL on Windows XP    java.net

On Sat, 2009-02-21 at 14:53 +0200, Elad Mallel wrote: > Hey everyone, > > > > Im using Glassfish v2.1 with Hibernate against a MySQL database on > Windows XP. Im using the 5.1.7 version of the MySQL JDBC library. > > Im having trouble performing the simplest task of selecting an object > from the database. > > The exception ...

23. JPA/View Problem    java.net

I've searched the forum and it looks as if JPA does support views, which is what I am trying to do -- but having a problem. In my case, the view is owned by another schema. When I connect to the Oracle 10 schema using a tool like Toad, I can't see the view even though I can query it. I ...

25. Can't deploy app client with Glassfish v3 - JPA problem    java.net

When I try and load the ear file into gf I get the following exception: java.lang.RuntimeException: The persistence-context-ref-name [.PcuFileSelector/em] in module [WPDN#WPDN-war.war] resolves to a persistence unit called [BeanLibPU] which is of type RESOURCE_LOCAL. Only persistence units with transaction type JTA can be used as a container managed entity manager. Please verify your application.

26. Problems with Glassfish V3, Hibernate and log4j [SOLVED]    java.net

log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not assignable to a "org.apache.log4j.spi.Configurator" variable.|#] log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by |#] log4j:ERROR [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)] whereas object of type |#] log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by [WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)].|#] log4j:ERROR Could not instantiate configurator [org.apache.log4j.xml.DOMConfigurator].|#] log4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version).|#] log4j:WARN Please initialize the log4j system properly.|#]

28. Glassfish JPA PK problem    java.net

When I merge a parent entity that already been persisted, but has newly created children objects, the new PK for the child objects do not get populated into the java object. The store works fine, but the children PK are still null. Am I missing something configuration wise? I can post code samples if helpful.

29. Glassfish V3, hibernate and log4j problems.    java.net

I seem to be having a problem getting logging to work correctly. I use hibernate as my persistence provider which uses SLF4J for logging. Glassfish V3 uses the JDK logging while my project uses log4j and I don't want to change it to one of the above mentioned loggers. To get SLF4J and log4j to play nicely I included the slf-log4j.jar ...

30. Problems with findByExample method. glassfish + hibernate.    forum.hibernate.org

Development Environment: Windows XP EN SP2 JDK 1.5.0_12 Netbeans 6.0M10 Glassfish V2 RC1 Hibernate version: Hibernate-3.2.4.sp1 Hibernate-annotations-3.3.0.GA Hibernate-entitymanager-3.3.1.GA Code between sessionFactory.openSession() and session.close(): ...some code to persist a new Token object... Token example = new Token(); example.setSn(1105920); List tokens = tokenDAOBean.findByExample(example); Full stack trace of any exception that occurs: Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/WebApplication1' Hibernate: insert into ...