You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by dblevins <da...@visi.com> on 2010/10/21 03:38:08 UTC

Re: Problem with Sequences


Jeff Reiffers wrote:
> 
> Hello,
> 
> I have an Oracle10g Database, a Tomcat-Server with openejb, but i get
> following error, when i try to persist an entity.
> 
> [EL Warning]: 2010-02-04 14:05:57.125--ClientSession(5589744)--Exception
> [EclipseLink-4002] (Eclipse Persistence Services - 1.1.2.v20090612-r4475):
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: ORA-00942: table or view does
> not exist
> 
> Error Code: 942
> Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
> 	bind => [50, SQ_MESURAGE]
> Query: DataModifyQuery(sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ?
> WHERE SEQ_NAME = ?")
> javax.ejb.EJBException: The bean encountered a non-application exception;
> nested exception is: 
> 	Exception [EclipseLink-4002] (Eclipse Persistence Services -
> 1.1.2.v20090612-r4475):
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: ORA-00942: table or view does
> not exist
> 
> Error Code: 942
> 
> 
> 
> My persistence.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <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"
>              xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
>   <persistence-unit name="archivage-ejb">
>     <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>     <jta-data-source>oratest</jta-data-source>
>     <class>act.etat.lu.archivage.ejb.mesurage.Mesurage</class>
>   </persistence-unit>
> 
> </prsistence>
> 
> 
> My Entityclass:
> @Entity
> @NamedQueries({
>   @NamedQuery(name = "Mesurage.findAll", query = "select o from Mesurage
> o"),
>   @NamedQuery(name = "Mesurage.findById", query = "select o from Mesurage
> o where o.mesurageId =:mesurageId")
> })
> @SequenceGenerator(name = "mesurage_sequence", sequenceName =
> "SQ_MESURAGE", allocationSize=1)
> 
> 
> public class Mesurage implements Serializable {
> 
>     @Id
>     @GeneratedValue(strategy = GenerationType.SEQUENCE, generator =
> "mesurage_sequence")
>     @Column(name = "MESURAGE_ID", nullable = false)
>     private Long mesurageId;
> 
> ....
> }
> 


Dear user, we have recently discovered that in January Nabble changed the
"OpenEJB" Nabble Category to a Nabble Forum and allowed posts to be made
directly on it.  These posts were never delivered to any mailing list and
were not seen by the OpenEJB community.

We are moving all such threads to the "OpenEJB User" Nabble Forum so future
replies will go to the mailing lists, but please understand that your
original post and all previous replies are not in the Apache archives nor
visible to its subscribers.

If you still need help with your question please repost.

-- 
View this message in context: http://openejb.979440.n4.nabble.com/Problem-with-Sequences-tp1468770p3004899.html
Sent from the OpenEJB User mailing list archive at Nabble.com.