JPA and Postgres
Hi friends!
I am new with EJB 3.0 and I am trying to do my first Entity Bean. I am working with Postgres and GlashFish. I have a class whose name is "Cabin", and my persistence.xml (under META-INF folder) is:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="titan">
<class>paquete.Cabin</class>
<properties>
<property name="jdbc.driver" value="org.postgresql.Driver"/>
<property name="jdbc.connection.string" value="jdbc:postgresql://localhost/TitanDB"/>
<property name="jdbc.user" value="postgres"/>
<property name="jdbc.password" value="postgres"/>
<property name="ddl-generation" value="dropandcreate"/>
<property name="toplink.logging.level" value="FINE"/>
</properties>
</persistence-unit>
</persistence>
And in my Session Bean I have the following code:
@PersistenceContext (unitName="titan")
private EntityManager manager;
When I run my application I get the following error:
javax.naming.NameNotFoundException: SimpleBeanJNDI not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
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:154)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Can you help me?
Thanks in advance for your help to this matter.
Hi friends!
I am new with EJB 3.0 and I am trying to do my first Entity Bean. I am working with Postgres and GlashFish. I have a class whose name is "Cabin", and my persistence.xml (under META-INF folder) is:
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="titan">
<class>paquete.Cabin</class>
<properties>
<property name="jdbc.driver" value="org.postgresql.Driver"/>
<property name="jdbc.connection.string" value="jdbc:postgresql://localhost/TitanDB"/>
<property name="jdbc.user" value="postgres"/>
<property name="jdbc.password" value="postgres"/>
<property name="ddl-generation" value="dropandcreate"/>
<property name="toplink.logging.level" value="FINE"/>
</properties>
</persistence-unit>
</persistence>
And in my Session Bean I have the following code:
@PersistenceContext (unitName="titan")
private EntityManager manager;
When I run my application I get the following error:
javax.naming.NameNotFoundException: SimpleBeanJNDI not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:74)
at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:129)
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
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:154)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1706)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1088)
at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:223)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:806)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:563)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2567)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Can you help me?
Thanks in advance for your help to this matter.
Similar Messages
-
Stored procedure, EJB, JPA, and JavaServer Faces
Hi!
I am currently working on a Web application using EJB, JPA, and JavaServer Faces. A part of the
business logic is already stored in the database as stored procedures, so we need to call those
procedures (instead of named queries) through a EJB and represent the data on the web tier.
Where can I find an extensive tutorial using this technology? There is no such tutorial in the Oracle Learning Library.
Maybe somebody can provide a link and/or example.
Thanks in advance for your help!Hi,
http://download.oracle.com/docs/cd/B10464_05/web.904/b10313/queries.htm#1135305
For more help, see the TopLink / JPA forum
TopLink/JPA
Frank -
JPA and SQL Server 2005's Identity Don't Play Nice
I am hoping someone with a little more senior knowledge of JPASQL Server 2005 can point me in the right direction involving SQL Server 2005.
What I am discovering is JPA and SQL Server 2005 do not playing nice together when you use the IDENTITY capability for
a primary key. Let me explain. "...when using the IDENTITY as the generator type, the value for the identity field MAY NOT be
available BEFORE the entity data is saved in the database because typically it is generated when a record is committed."
My problem is this.
I have two separate entities using another entity, for example a car has a wheel and a truck has a wheel. I can go through the steps
of persisting the car and the wheel with no problem. My problem begins when I try to
find the wheel (by wheel description) for the truck. The query finds the wheel, but does not return the primary key for wheel.
Therefore, using the PK inside a query generates this error:
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation. What has been my appraoch to get the entity to commit to the database is to use the following sequence for the Entity Manager.
entityManager.persist(wheel);
entityManager.flush(); I have assumed to this point this action would persist my data because I have been able to retrieve the PK immidately after these steps.
However, multiple actions taking place within the same transaction, appears to render the persist and flush steps useless. My initial thought
is to wrap the wheel creation within a new transaction so when the method/transaction completes, the data would be in the database. This
has not worked.
I hope I have explained this clear for others to follow. I apologize in advance if I have not. Any suggestions are greatly appreciated.I am hoping someone with a little more senior knowledge of JPASQL Server 2005 can point me in the right direction involving SQL Server 2005.
What I am discovering is JPA and SQL Server 2005 do not playing nice together when you use the IDENTITY capability for
a primary key. Let me explain. "...when using the IDENTITY as the generator type, the value for the identity field MAY NOT be
available BEFORE the entity data is saved in the database because typically it is generated when a record is committed."
My problem is this.
I have two separate entities using another entity, for example a car has a wheel and a truck has a wheel. I can go through the steps
of persisting the car and the wheel with no problem. My problem begins when I try to
find the wheel (by wheel description) for the truck. The query finds the wheel, but does not return the primary key for wheel.
Therefore, using the PK inside a query generates this error:
java.lang.IllegalArgumentException: An instance of a null PK has been incorrectly provided for this find operation. What has been my appraoch to get the entity to commit to the database is to use the following sequence for the Entity Manager.
entityManager.persist(wheel);
entityManager.flush(); I have assumed to this point this action would persist my data because I have been able to retrieve the PK immidately after these steps.
However, multiple actions taking place within the same transaction, appears to render the persist and flush steps useless. My initial thought
is to wrap the wheel creation within a new transaction so when the method/transaction completes, the data would be in the database. This
has not worked.
I hope I have explained this clear for others to follow. I apologize in advance if I have not. Any suggestions are greatly appreciated. -
Heterogeneous connection between Oracle and Postgres.
Hi All,
I'm trying to make an heterogeneous connection between Oracle and Postgres since few days but i still having this error : "lost RPC connection".
First of all : I'm using Windows 7, Oracle 10g and PostgreSQL 8.4.
I have done the following operations :
1) Create a System DNS named "PG". (Test connection is OK)
2) Create the file "initPG.ora" in "$ORACLE_HOME/hs/admin" :
# This is a sample agent init file that contains the HS parameters that are
# needed for an ODBC Agent.
# HS init parameters
HS_FDS_CONNECT_INFO = PG
HS_FDS_TRACE_LEVEL = ON
# Environment variables required for the non-Oracle system
#set <envvar>=<value>
3) Configure the file "listener.ora" (in "$ORACLE_HOME/NETWORK/ADMIN") :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = extproc)
(SID_DESC =
(SID_NAME = PG)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\10.2.0\server)
(PROGRAM = hsodbc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = Cédric-PC)(PORT = 1521))
DEFAULT_SERVICE_LISTENER = (XE)
4) Configure the file "tnsnames.ora" (in "$ORACLE_HOME/NETWORK/ADMIN") :
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Cédric-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
PG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = Cédric-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = PG)
(HS = OK)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
5) Finally, i create my DB-Link and test it :
CREATE DATABASE LINK "CENTRALE_POSTGRES" CONNECT TO "user_login" IDENTIFIED BY "user_password" USING 'PG';
SELECT * FROM "dual"@CENTRALE_POSTGRES;
I got this error :
ORA-03135 : lost RPC connection.
As you can see, i have activated the trace level (HS_FDS_TRACE_LEVEL = ON), but the directory "$ORACLE_HOME/NETWORK/trace" still empty.
Any ideas ?
Regardsthe tnsnames.ora alias PG is wrong - you need to have 2 closing brackets after the SERVICE_NAME so that HS=OK is outside of the CONNECT_DATA like:
PG =
<space>(DESCRIPTION =
<space><space>(ADDRESS = (PROTOCOL = tcp)(HOST = Cédric-PC)(PORT = 1521))
<space><space>(CONNECT_DATA =
<space><space><space>(SERVICE_NAME = PG))
<space><space>(HS = OK)
<space>)
Please be also aware HSODBC up to release 10.2 has been desupported since March 2008 and it was replaced by its follow up product DG4ODBC V11 -
JPA and CAF BO - are there any editors of the JPA data (like CAF)?
Hello!
As you know SAP invented some layer above JPA and called it CAF. There is a very convenient way to edit data in CAF.
But now I have to create a complex database scheme, also with CAF doesn't allow us to work with objects. So we can't use someObject.getChildren().
So my question is are there any editors of the JPA data (like it is done in CAF)?Hi Kirill,
at the beginning of our project at the end of 2009, we did a deep analysis of CAF since our architect vehemently suggested to use this framework.
First about the history and purpose of CAF: Initially, CAF was never meant to be a layer above CAF since CAF was invented in the time before EJB 3.0 and JPA standard where writing persistence with EJB 2.x CMP forced the developer to write pages of boiler plate code. This background was approved by SAP.
With upcoming of JPA, CAF ist mostly useless (except for very simply structured data) and prevents you from writing good software.
It is easy just to write @Entity, @Id and @OneToMany (for complex database schemes) and CAF forces you to use an ugly, imperformant database scheme (e.g. CAF uses mapping tables even for 1:n relationships, a clear antipattern!)
The CRUD-services generated with CAF are a pain, too. Usage of pessimistic locking is not up to date for web applications.
With your complex database schemes, you exceed the limit of CAF.
(We decided not to use CAF and did never regret this.)
Concerning your question: There is an "JPA Details" view in NWDS that might help you. It needs JPA Persistence facet on your project to work. Developed by SAP. For JPA beginners, it is a good cheat sheet for JPA annotations and their attributes.
You do not need more since a JPA POJO is easy to code.
Regards,
Rolf -
hi ,
How can i represent my DataBase View in JPA , and since each "Entity" should have an "@Id" how can i handle this on my views since some of them does not have a convenient ID field/fields , ThanksIn this situation I created @Id for one of the columns or created @IdClass from all view fields.
-
[NewBie] Not able to connect JPA and Hibernate ?
Hi,
In last few days I have read some tutorial and started doing JPA and Hibernate tutorials. But I am not able to make it work. Can some one please point out what is that I am doing wrong? Here are the details of what I am doing
I am using
IDE : Eclipse EE Indigo
Following jars
antlr-2.7.6.jar
commons-collections-3.2.jar
dom4j-1.6.1.jar
hibernate-annotations-3.4.0.GA.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-entitymanager-3.4.0.GA.jar
hibernate-jpa-2.0-api.jar
hibernate3-3.3.2.GA.jar
javaee-api-5.0-3.jar
javassist-3.9.0.GA.jar
junit-4.8.2.jar
log4j-1.2.12.jar
slf4j-api-1.6.1.jar
slf4j-simple-1.6.1.jar
sqljdbc.jar => For connecting to MS SQL Server database
junit-4.8.2 => For testing the application
The target runtime is set as JBoss 5.0 with jars of JBoss 6.0
Here is my persistence.xml. This file is under "src\META-INF"
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="JH1" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>entity.Users</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
<property name="hibernate.show_sql" value="true"/>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlserver://localhost:1433;databaseName=TempEPMUser"/>
<property name="javax.persistence.jdbc.user" value="user"/>
<property name="javax.persistence.jdbc.password" value="password"/>
<property name="javax.persistence.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<property name="javax.persistence.transactionType" value="RESOURCE_LOCAL"/>
</properties>
</persistence-unit>
</persistence>
Here is the Users.java code. This is the entity class created using the context menu item JPA Entities from tables
package entity;
import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.math.BigDecimal;
* The persistent class for the Users database table.
@Entity
public class Users implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name="Usr_UserID")
private long usr_UserID;
@Column(name="Usr_DeptId")
private BigDecimal usr_DeptId;
public Users() {
public long getUsr_UserID() {
return this.usr_UserID;
public void setUsr_UserID(long usr_UserID) {
this.usr_UserID = usr_UserID;
Here is the testing code TestUser.java
package testentity;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import javax.persistence.PersistenceException;
import org.apache.log4j.BasicConfigurator;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import entity.Users;
public class TestUser {
private EntityManagerFactory emf;
private EntityManager em;
@Before
public void initEmfAndEm(){
BasicConfigurator.configure();
try {
emf = Persistence.createEntityManagerFactory("JH1");
} catch (PersistenceException pe) {
System.out.println(pe.getMessage());
em = emf.createEntityManager();
@After
public void cleanup() {
em.close();
@Test
public void emptyTest() {
EntityTransaction et = em.getTransaction();
et.begin();
@SuppressWarnings("unchecked")
final List<Users> listUser = em.createQuery("select usr_DeptID from Users").getResultList();
et.commit();
for (Users usr: listUser){
int depid = usr.getUsr_DeptId().intValue();
System.out.println("User Department id is "+depid);
When I execute the code I get following error message
java.lang.UnsupportedOperationException: The user must supply a JDBC connection
at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
at org.hibernate.ejb.TransactionImpl.begin(TransactionImpl.java:38)
at testentity.TestUser.emptyTest(TestUser.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)Hi,
Try following the JPA tutorials for WebLogic, JPA using EclipseLink or Hibernate will be the same if you stick to the specification. WebLogic 10.3.4.0 ships with a Java EE 6 compliant JPA 2.0 implementation in EclipseLink - you may want to give that a try.
http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
http://wiki.eclipse.org/EclipseLink/Examples/Distributed
I also have a JBoss 6 tutorial for getting JPA working as well.
BTW, your persistence unit is currently application managed - try switching to container managed - then most of your jar dependencies will go away as everything is already setup for you to do dependency injection via the container.
http://wiki.eclipse.org/EclipseLink/Examples/JPA/JBoss_Web_Tutorial
thank you
Michael O'Brien
http://www.eclipselink.org -
Hi people...
I working with JPA and Hibernate and i have a View in my Database and i need to map this View. It's this possible? Some have an example to show me?.
Thanks!I hope this link help you
http://forums.java.net/jive/message.jspa?messageID=244187
I�m having a similar problem, I�m developing using JPA and now I need to bring values from some views on database but I still don�t know how.I�m still Java jr and I didn�t understand clearly but I guess that the link can help you, and if it�s true please explain me. -
What are the relation between JPA and Hibernate, JPA and TopLink?
What are the relation between JPA and Hibernate, JPA and TopLink?
Can JPA instead of Hibernate and TopLink?The Java Persistence API (JPA) is the object relational mapping persistence
standard for Java. Hibernate and TopLink provide an Open source Object-relational mapping framework for Java.
They provide an implementation for the Java Persistence API. In my opinion, both Hibernate and TopLink provide support to JPA
and they can also be regarded as the complementary to JPA.
Let's wait to see other person's opinions. -
Hi everybody,
I'd like to know your experiences about using SUN AS PE 8 and postgres. I have read that actual version has problems with this database manager. It's true?
Thanks...I found another tread that talks about this problem, http://forum.java.sun.com/thread.jsp?forum=136&thread=509737
A workaround for me was to disable privacy control in my firewall, not a viable solution but will do for now. I am interested in hearing about a real solution to this problem.
Theodor -
Set role with Java JPA and NativeSQL
Hi,
using 10g setting roles with Java JPA and NativeSQL works fine. After the upgrade to 11g the same commands will not work.
Ars ther any significant changes to set roles in 11g?
Regards
Siegwinsiegwin.port wrote:
using 10g setting roles with Java JPA and NativeSQL works fine. After the upgrade to 11g the same commands will not work.
Ars ther any significant changes to set roles in 11g?When I eval'd 11g, I did not notice any changes in setting my roles. I did notice a significant difference in Java. I cannot remember the JDK version change from 10g to 11g. We ended up settling back to 10g for other reasons. -
OC4J 10.1.3.2, JPA and Hibernate 3.2 Exception on Deployment
I can't get my simple web application to deploy in my standalone oc4j container. The European organization that I working for wants to use the new technologies out there. Part of the testing is getting oc4j working with hibernate. My web application works just fine with Toplink, but not with Hibernate3. The same web application in Tomcat works for both. The error that oc4j generates is shown below and really doesn't say much that I can do. I followed this blog instructions.
http://debupanda.blogspot.com/2007/01/using-hibernate-as-pluggable-ejb-3-jpa.html
2007-04-23 11:48:57.477 NOTIFICATION Starting application : TestJPA
2007-04-23 11:48:57.477 NOTIFICATION Initializing ClassLoader(s)
2007-04-23 11:48:57.477 NOTIFICATION Initializing EJB container
2007-04-23 11:48:57.477 NOTIFICATION Loading connector(s)
2007-04-23 11:48:57.524 NOTIFICATION Starting up resource adapters
2007-04-23 11:48:57.524 NOTIFICATION Initializing EJB sessions
2007-04-23 11:48:57.524 NOTIFICATION Committing ClassLoader(s)
2007-04-23 11:48:57.524 NOTIFICATION Initialize TestJPA begins...
2007-04-23 11:48:57.539 NOTIFICATION Initialize TestJPA ends...
2007-04-23 11:48:57.539 NOTIFICATION Started application : TestJPA
2007-04-23 11:48:57.555 NOTIFICATION Binding web application(s) to site default-
web-site begins...
2007-04-23 11:48:57.571 NOTIFICATION Binding TestJPA web-module for application
TestJPA to site default-web-site under context root jpa
07/04/23 11:48:57 oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA
] - Exception creating EntityManagerFactory using PersistenceProvider class org.
hibernate.ejb.HibernatePersistence for persistence unit TestPU.
07/04/23 11:48:57 at com.evermind.server.ejb.exception.DeploymentException
.exceptionCreatingEntityManagerFactory(DeploymentException.java:130)
07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
nagerImpl.createContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:19
7)
07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
nagerImpl.initializePersistenceUnit(PersistenceUnitManagerImpl.java:159)
07/04/23 11:48:57 at com.evermind.server.ejb.persistence.PersistenceUnitMa
nagerImpl.initialize(PersistenceUnitManagerImpl.java:86)
07/04/23 11:48:57 at com.evermind.server.http.HttpApplication.<init>(HttpA
pplication.java:733)
07/04/23 11:48:57 at com.evermind.server.ApplicationStateRunning.getHttpAp
plication(ApplicationStateRunning.java:414)
07/04/23 11:48:57 at com.evermind.server.Application.getHttpApplication(Ap
plication.java:571)
07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
imeReference.createHttpApplicationFromReference(HttpSite.java:1990)
07/04/23 11:48:57 at com.evermind.server.http.HttpSite$HttpApplicationRunT
imeReference.<init>(HttpSite.java:1909)
07/04/23 11:48:57 at com.evermind.server.http.HttpSite.addHttpApplication(
HttpSite.java:1606)
07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
ebApp(WebApplicationBinder.java:238)
07/04/23 11:48:57 at oracle.oc4j.admin.internal.WebApplicationBinder.bindW
ebApp(WebApplicationBinder.java:99)
07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.bindWe
bApp(ApplicationDeployer.java:547)
07/04/23 11:48:57 at oracle.oc4j.admin.internal.ApplicationDeployer.doDepl
oy(ApplicationDeployer.java:202)
07/04/23 11:48:57 at oracle.oc4j.admin.internal.DeployerBase.execute(Deplo
yerBase.java:93)
07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeploy
erRunnable.doRun(OC4JDeployerRunnable.java:52)
07/04/23 11:48:57 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRu
nnable.run(DeployerRunnable.java:81)
07/04/23 11:48:57 at com.evermind.util.ReleasableResourcePooledExecutor$My
Worker.run(ReleasableResourcePooledExecutor.java:298)
07/04/23 11:48:57 at java.lang.Thread.run(Unknown Source)
2007-04-23 11:48:57.726 NOTIFICATION Application Deployer for TestJPA FAILED.
2007-04-23 11:48:57.726 NOTIFICATION Application UnDeployer for TestJPA STARTS.
2007-04-23 11:48:57.742 NOTIFICATION Removing all web binding(s) for application
TestJPA from all web site(s)
07/04/23 11:48:57 SEVERE: ProgressObjectImpl.reportError [TestJPA:TestJPA] - Exc
eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
te.ejb.HibernatePersistence for persistence unit TestPU.oracle.oc4j.admin.jmx.sh
ared.exceptions.InternalException: [TestJPA:TestJPA] - Exception creating Entity
ManagerFactory using PersistenceProvider class org.hibernate.ejb.HibernatePersis
tence for persistence unit TestPU.
at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.<init>(Notif
icationUserData.java:107)
at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:123
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
yerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Unknown Source)
Caused by: oracle.oc4j.admin.internal.DeployerException: [TestJPA:TestJPA] - Exc
eption creating EntityManagerFactory using PersistenceProvider class org.hiberna
te.ejb.HibernatePersistence for persistence unit TestPU.
at com.evermind.server.ejb.exception.DeploymentException.exceptionCreati
ngEntityManagerFactory(DeploymentException.java:130)
at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.create
ContainerEntityManagerFactory(PersistenceUnitManagerImpl.java:197)
at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
lizePersistenceUnit(PersistenceUnitManagerImpl.java:159)
at com.evermind.server.ejb.persistence.PersistenceUnitManagerImpl.initia
lize(PersistenceUnitManagerImpl.java:86)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:
733)
at com.evermind.server.ApplicationStateRunning.getHttpApplication(Applic
ationStateRunning.java:414)
at com.evermind.server.Application.getHttpApplication(Application.java:5
71)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.cre
ateHttpApplicationFromReference(HttpSite.java:1990)
at com.evermind.server.http.HttpSite$HttpApplicationRunTimeReference.<in
it>(HttpSite.java:1909)
at com.evermind.server.http.HttpSite.addHttpApplication(HttpSite.java:16
06)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
tionBinder.java:238)
at oracle.oc4j.admin.internal.WebApplicationBinder.bindWebApp(WebApplica
tionBinder.java:99)
at oracle.oc4j.admin.internal.ApplicationDeployer.bindWebApp(Application
Deployer.java:547)
at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDe
ployer.java:202)
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
... 4 more
2007-04-23 11:48:58.225 NOTIFICATION Application UnDeployer for TestJPA COMPLETE
S.
07/04/23 11:48:58 WARNING: DeployerRunnable.run [TestJPA:TestJPA] - Exception cr
eating EntityManagerFactory using PersistenceProvider class org.hibernate.ejb.Hi
bernatePersistence for persistence unit TestPU.oracle.oc4j.admin.internal.Deploy
erException: [TestJPA:TestJPA] - Exception creating EntityManagerFactory using P
ersistenceProvider class org.hibernate.ejb.HibernatePersistence for persistence
unit TestPU.
at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:126
at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun
(OC4JDeployerRunnable.java:52)
at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(Deplo
yerRunnable.java:81)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(Relea
sableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Unknown Source)I am not using JDeveloper, the project was created in Netbeans 5.5. I only use the WAR created and Deploy it using the web administration of Oracle 10.1.3.2
-
Error when creating Recordset using CF and Postgres
I'm a complete newbie when it comes to databases and development so go easy on me.
I have created a simple database with a schema (ABC) and 2 tables (_Address, _Member) in Postgres 9.0. I have installed CF 9 in development and am creating a new application using the Construction Kit Vol 1 as my guide. I got to the point where I am to make a Recordset and keep getting an error of:
-1:ERROR: schema "ABC" does not exist
org.postgresql.util.PSQLException: ERROR: schema "ABC" does not exist
...about 20+ lines of at errors follow (can post a screenshot if they would be helpfull)...
From the Database tab I am able to browse my database just fine but I cannot create this recordset in the bindings tab. I also followed the examples in the book and using their database I am able to create a recordset just fine. CF says my data source verifies correctly. I have verified that my password is correct as well as when in the database tab of DW I can test the connection fine. I cannot edit the connecton from there but I get the same error when I try to edit on all of the databases, including the default test databases.
Any suggestions would be greatly appreciated.Hi Loan,
In your stock transfer Purchase Order has the correct 'Shipping Point' been determined for this item - i.e. the 'Shipping Point' associated with your 0002 Storage Location?
The 'Shipping Point' determination is setup in config in <OVL2>, you can use the 'Loading Group' field in the Material Master (Sales:General Plant) tab to influence the shipping point that is automatically determined for a Material.
Assuming the Shipping Point has been determined correctly for your 0002 SLoc - then in <VL10B> you will have selected this 'Shipping Point' for your delivery creation. I also noticed that in <VL10B> on the Material tab you have the option to specify a SLoc (I'm assuming this is a source SLoc since the help doesn't clearly specify) - try entering this data too and see if you can generate your delivery.
Good luck,
Ravelle -
Dear experts,
I have a WD application with EJB model. I have faced strange JPA exception (I am using SAP JPA implementation).
This is 2 Entities with relationship
@Entity
@Table( schema = "dbo", name = "class")
public class ClassEntity {
private Long id;
@Id
@Column(name="id")
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Long getId() {
return id;
public void setId(Long id) {
this.id = id;
private Collection<ClassAttributeEntity> classAttributesById;
@OneToMany(mappedBy = "classByClassId", fetch=FetchType.LAZY)
public Collection<ClassAttributeEntity> getClassAttributesById() {
return classAttributesById;
public void setClassAttributesById(Collection<ClassAttributeEntity> classAttributesById) {
this.classAttributesById = classAttributesById;
@Entity
@Table( schema = "dbo", name = "class_attribute")
public class ClassAttributeEntity{
private Long id;
@Id
@Column(name="id")
@GeneratedValue(strategy= GenerationType.IDENTITY)
public Long getId() {
return id;
public void setId(Long id) {
this.id = id;
private ClassEntity classByClassId;
@ManyToOne
@JoinColumn(name = "class_id", referencedColumnName = "id")
public ClassEntity getClassByClassId() {
return classByClassId;
public void setClassByClassId(ClassEntity classByClassId) {
this.classByClassId = classByClassId;
I want to execute JPQL query
"SELECT c FROM ClassEntity c"
; But I get this exception:
javax.persistence.PersistenceException: The relationship >>classAttributesById<< of entity {test.ClassEntity(id=1686)}cannot be loaded because the entity is detached
I can overcome it using EAGER loading -
@OneToMany(mappedBy = "classByClassId", fetch=FetchType.EAGER)
, but I really dont need ClassAttributes in this situation! I have many thousands of classes and eager loading provides extremly poor perfomance. What can I do with this problem?
Thanks in advance for any advice.Hi Andrey,
I assume you are getting the exception if you atempt to access "classAttributesById" ouside the transaction, in which you executed the query, i.e. after the persistence context, in which the query has been executed is closed.
You have got to make sure that all entities you need to access are read as long as the persistence context executing the query is still open.
How to address this depends a bit on whether you need to access all related entites or only some.
If you need to access the relationship "classAttributesById" for only some instances of "ClassEntity", you could for example call size() on "classAttributesById" for these selected instances of "ClassEntity" (within the same transaction/persistence context".
If you need to access all related entities, theoretically, fetchType = EAGER would be the right choice. However, as you have observed, SAP JPA can't handle this efficiently at the time beeing. Therefore,
I'd rather suggest that you firstly load all related attributes with a query
"SELECT ca FROM ClassAttributeEntity ca"
and secondly load the "ClassEntity"s
"SELECT c FROM ClassEntity c"
this should execute efficiently.
Sorry for the inconvenience.
-Adrian -
Deployement problem in oc4j with hibernate + JPA and Spring
Dear All,
From last 2 days I am facing a problem in deployment of our application in oc4j client of oracle app server.
I am getting the following exception
Operation failed with error: [mkclsets:mkclsets] - Exception creating EntityManagerFactory using PersistenceProvider class oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider for persistence unit mkclsetsPersistenceUnit.When I am deploying the same application in tomcat app server its working fine. But I am unable to deploy the same in oc4j.
I am using the following technologies
Spring 2.0
Struts 2.0
Hibernate 3.3
JPA 1.0
OC4J 10.1.3.3.0
IDE : my eclipse 6.0
My persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="mkclsetsPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<!-- jta-data-source>mkclDS</jta-data-source-->
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<!-- properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/>
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.OC4JTransactionManager"/>
</properties-->
</persistence-unit>
</persistence>Datasource-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" lazy-init="true"/>
<!-- following code is for using oracle -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="true">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@//xxxx.xxxx.xxxx.xxxx:1521/mydb</value>
</property>
<property name="username">
<value>tpsadmin</value>
</property>
<property name="password">
<value>tpsadmin</value>
</property>
</bean>
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" lazy-init="true">
<property name="persistenceUnitName" value="mkclsetsPersistenceUnit"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" lazy-init="true">
<property name="database" value="ORACLE"/>
<property name="showSql" value="true"/>
</bean>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" lazy-init="true">
<property name="entityManagerFactory" ref="entityManagerFactory"></property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
</beans>Server.xml (oc4j/j2ee/home/config)
<?xml version="1.0"?>
<application-server xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/application-server-10_1.xsd" application-directory="../applications"
check-for-updates="adminClientOnly"
deployment-directory="../application-deployments"
connector-directory="../connectors"
schema-major-version="10" schema-minor-version="0" >
<shared-library name="global.libraries" version="1.0" library-compatible="true">
<code-source path="../applib"/>
</shared-library>
<shared-library name="global.tag.libraries" version="1.0" library-compatible="true">
<code-source path="../../home/jsp/lib/taglib/"/>
<code-source path="../../../j2ee/home/jsp/lib/taglib/"/>
<code-source path="../../../lib/dsv2.jar"/>
<import-shared-library name="oracle.xml"/>
<import-shared-library name="oracle.jdbc"/>
<import-shared-library name="oracle.cache"/>
<import-shared-library name="soap"/>
</shared-library>
<shared-library name="oracle.persistence" version="1.0" library-compatible="true">
<code-source path="../../../toplink/jlib/toplink-essentials.jar"/>
<import-shared-library name="oracle.jdbc"/>
</shared-library>
<shared-library name="hibernatejpa" version="1.0">
<code-source path="ejb3-persistence.jar"/>
<code-source path="hibernate3.jar"/>
<code-source path="hibernate-annotations.jar"/>
<code-source path="hibernate-commons-annotations.jar"/>
<code-source path="hibernate-entitymanager.jar"/>
<code-source path="jboss-archive-browsing.jar"/>
<code-source path="jta.jar"/>
</shared-library>
<shared-library name="db" version="1.0">
<code-source path="ojdbc14.jar"/>
</shared-library>
<shared-library name="displaytab" version="1.0">
<code-source path="commons-beanutils-1.7.0.jar"/>
<code-source path="commons-lang-2.3.jar"/>
<code-source path="displaytag-1.1.1.jar"/>
</shared-library>
<shared-library name="ehCache" version="1.0">
<code-source path="backport-util-concurrent.jar"/>
<code-source path="ehcache-1.4.0-beta2.jar"/>
<code-source path="jsr107cache-1.0.jar"/>
</shared-library>
<shared-library name="json" version="1.0">
<code-source path="ezmorph-1.0.4.jar"/>
<code-source path="json.jar"/>
</shared-library>
<shared-library name="other_sets" version="1.0">
<code-source path="commons-fileupload-1.1.jar"/>
<code-source path="dom4j-1.6.1.jar"/>
<code-source path="dwr.jar"/>
<code-source path="javassist.jar"/>
<code-source path="log4j-1.2.13.jar"/>
</shared-library>
<shared-library name="spring2" version="1.0">
<code-source path="aspectjrt.jar"/>
<code-source path="aspectjweaver.jar"/>
<code-source path="cglib-nodep-2.1_3.jar"/>
<code-source path="spring.jar"/>
</shared-library>
<shared-library name="struts2" version="1.0">
<code-source path="antlr-2.7.2.jar"/>
<code-source path="commons-collections.jar"/>
<code-source path="commons-io-1.1.jar"/>
<code-source path="commons-logging-1.0.4.jar"/>
<code-source path="freemarker-2.3.8.jar"/>
<code-source path="ognl-2.6.11.jar"/>
<code-source path="struts2-core-2.0.9.jar"/>
<code-source path="struts2-spring-plugin-2.0.9.jar"/>
<code-source path="xwork-2.0.4.jar"/>
</shared-library>
<rmi-config path="./rmi.xml" />
<jms-config path="./jms.xml" />
<javacache-config path="../../../javacache/admin/javacache.xml" />
<j2ee-logging-config path="./j2ee-logging.xml" />
<log>
<file path="../log/server.log" />
</log>
<java-compiler name="javac" in-process="false" options="-J-Xmx1024m -encoding UTF8" extdirs="C:\Program Files\Java\jdk1.5.0_07\jre\lib\ext" />
<global-application name="default" path="application.xml" parent="system" start="true" />
<application name="javasso" path="../../home/applications/javasso.ear" parent="default" start="false" />
<application name="ascontrol" path="../../home/applications/ascontrol.ear" parent="system" start="true" />
<application name="Test" path="../applications\Test.ear" parent="default" start="true" />
<application name="OraTest" path="../applications\OraTest.ear" parent="default" start="true" />
<global-web-app-config path="global-web-application.xml" />
<transaction-manager-config path="transaction-manager.xml" />
<web-site default="true" path="./default-web-site.xml" />
<cluster id="6745699755968" />
</application-server>Orion-application.xml (oc4j/j2ee/home/config)
<?xml version="1.0"?>
<orion-application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-application-10_0.xsd" deployment-version="10.1.3.1.0" default-data-source="jdbc/OracleDS" component-classification="external"
schema-major-version="10" schema-minor-version="0" >
<imported-shared-libraries>
<import-shared-library name="hibernatejpa"/>
<import-shared-library name="db"/>
<import-shared-library name="displaytab"/>
<import-shared-library name="ehCache"/>
<import-shared-library name="json"/>
<import-shared-library name="other_sets"/>
<import-shared-library name="spring2"/>
<import-shared-library name="struts2"/>
</imported-shared-libraries>
</orion-application>Please help to deploy my application, I created one application with struts2 and spring2 and that is working fine, but when I try to add JPA with hibernate 3.3 I am unable to deploy it.
Thanks a lot in advance.
With best regards,
IshaanHi,
Thank you very much for your reply. the previous Exception has gone but now I get the following one.
Exception: NoClassDefFoundError: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0.
[Jun 2, 2008 10:57:17 AM] Operation failed with error: Missing class: org.dom4j.DocumentException Dependent class: org.hibernate.ejb.HibernatePersistence Loader: hibernatejpa:1.0 Code-Source: /C:/oracle123/j2ee/home/shared-lib/hibernatejpa/1.0/hibernate-entitymanager.jar Configuration: in /C:/oracle123/j2ee/home/config/server.xml The missing class is available from the following locations: 1. Code-Source: /C:/oracle123/j2ee/home/shared-lib/other_sets/1.0/dom4j-1.6.1.jar (from in /C:/oracle123/j2ee/home/config/server.xml) This code-source is available in loader other_sets:1.0. with bset regards,
ishaan
Maybe you are looking for
-
How can i find out what color is a certain pixel in a picture file?
Do any of you know if there is some command that returns the color of a pixel in RGB format or something from a picture file?
-
Ipod Touch Version 3.1.3 volume bar disappeared and will not return
The volume bar on my 1st generation iOS 3.1.3 ipod touch started disappearing then would return with tweeking of the headphones and sometimes when resetting all settings. Now it is gone completely and won't come back. I have tried resetting to factor
-
Is it possible to create DVD Templates with Motion for burning Blue Ray DVDs from Final Cut Pro X?
-
How to change the PDF Setting?
PDF has different setting, such as Press Quality, Smallest File Size ... Suppose I have a PDF file in Press Quality, how do I convert it to a PDF file with Smalles File Size Setting? I mean in Porgramming way. Does LifeCycle can do it? Thanks a lot f
-
Hi, I am creating a JFrame with a JPanel. On clicking the Panel, I am invoking the fullscreen window. Now, I would like to know who is having the focus the JPanel, the JFrame or the JWindow. I am calling JPanel.requestFocus(), but the keyPressed or k