Hi Sanga... Can you please send this maessage in a separate thread/new mail on the same list, becuase the original problem of this thread is not related to your problem.
On Mon, Dec 8, 2008 at 9:16 PM, sanga lawalata <[EMAIL PROTECTED]> wrote: > I have this error code while try to persist this entity bean. > > it seems that It can get the sequence number from oracle dual sequence. > Below I put also the ddl. > > Any advice ? > > WARN - Unexpected exception from beforeCompletion; transaction will roll > back > <openjpa-1.1.0-r422266:659716 nonfatal general error> > org.apache.openjpa.persistence.PersistenceException: null > at > org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:162) > at > org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.nextInternal(NativeJDBCSeq.java:209) > at > org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60) > at > org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160) > at > org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144) > at > org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:592) > at > org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:464) > at > org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:440) > > this is my EntityBean, > > [code] > @Entity > @Table(name = "myTable") > > public class TestBean implements Comparable<TestBean>, > Serializable { > > @Transient > private static final long serialVersionUID = 6555325804020146762L; > > @Id > @GeneratedValue(strategy = GenerationType.SEQUENCE,generator = > "SEQ_TESTSEQUENCE" ) > @SequenceGenerator(name = "SEQ_TESTSEQUENCE", sequenceName = > "SEQ_TESTSEQUENCE",allocationSize=1) > private long id; > > @Temporal(TemporalType.TIMESTAMP) > @Column(name = "CREATED", nullable = false) > private Date created; > > @Column(name = "ERROR_MESSAGE", nullable = false,length=200) > private String errorMessage; > [/code] > > and this my persistence.xml > > [code] > > <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="NCDError"> > > <jta-data-source>java:/DefaultDS</jta-data-source> > > <class>my.package.TestBean</class> > > </persistence-unit> > > </persistence> > > [/code] > > My DDL : > > [code] > CREATE SEQUENCE "DEV001"."SEQ_TESTSEQUENCE" MINVALUE 1 MAXVALUE > 999999999999999999999999999 INCREMENT BY 1 START WITH 2500000060 CACHE 20 > NOORDER NOCYCLE ; > [/code] > > best regards > sanga lawalata > -- ---- Thanks - Mohammad Nour - LinkedIn: http://www.linkedin.com/in/mnour ---- "Life is like riding a bicycle. To keep your balance you must keep moving" - Albert Einstein