1) No, I think that Oracle created to generate to ids automatically.
2) I'm working with Oracle XE, my default schema is SYSTEM.
3) My persistence.xml doesn't contain an eclipselink.ddl-generation
property.
This is the configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd";>
        <persistence-unit name="educaPU"> 
                
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
                <jta-data-source>java:/OracleDS</jta-data-source>
                <properties>
                        <property name="hibernate.hbm2ddl.auto" 
value="drop-create" />
                        <property name="hibernate.dialect"
value="org.hibernate.dialect.Oracle10gDialect" />
                        <!-- MySQL 
                        <property name="hibernate.hbm2ddl.auto" 
value="create-drop" />
                        <property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLInnoDBDialect" />
                        -->
                </properties>
        </persistence-unit>
</persistence>

4) Table or view doesn't exist


Quintin Beukes-2 wrote:
> 
> I have had some struggles with Toplink (now Eclipselink) and sequence
> generators as well, so I might be able to help with that.
> 
> Few questions.
> 1. Does the table "sequence" actually exist in your database?
> 2. What is your default schema, if any?
> 3. What is your "eclipselink.ddl-generation" mode. If it is
> create-tables, try drop-and-create-tables. If this doesn't help, try
> setting "eclipselink.ddl-generation.output-mode=both" in your
> persistence unit properties and paste the output of the generated sql
> script.
> 4. Could you perhaps translate "Table ou vue inexistante". I figure it
> says something about or the table doesn't exist, but it might point
> out more as to what is going wrong.
> 
> Quintin Beukes
> 
> 
> 
> On Wed, Oct 21, 2009 at 7:40 PM, El Arbi Aboussoror
> <[email protected]> wrote:
>> Hello,
>> When I try to store one of my entities that uses the annotation
>> @GeneratedValue(strategy = GenerationType.AUTO) on the "id" field I get
>> this
>> error:
>>
>> *[EL Info]: 2009-10-21 18:47:35.337--ServerSession(6451154)--EclipseLink,
>> version: Eclipse Persistence Services - 1.1.2.v20090612-r4475
>> [EL Info]: 2009-10-21
>> 18:47:35.976--ServerSession(6451154)--file:/G:/data/eclipse/workspace_0/Educa-EJB/build/classes/-educaPU
>> login successful
>> [EL Warning]: 2009-10-21 18:47:36.054--ClientSession(2003839)--Exception
>> [EclipseLink-4002] (Eclipse Persistence Services -
>> 1.1.2.v20090612-r4475):
>> org.eclipse.persistence.exceptions.DatabaseException
>> Internal Exception: java.sql.SQLException: ORA-00942: Table ou vue
>> inexistante
>>
>> Error Code: 942
>> Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
>>    bind => [50, SEQ_GEN]
>> Query: DataModifyQuery(sql="UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ?
>> WHERE SEQ_NAME = ?")*
>>
>> Maybe I forgot to set something ?
>> Thanks for ur help.
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40GeneratedValue%28strategy-%3D-GenerationType.AUTO%29-tp25997753p25999110.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to