das habe ich gemacht. beim instanziieren der 2. factory kommt folgende fehlermeldung:
INFO - table not found: s_adresse_etrangere
Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.HibernateException: Missing sequence or table: s_adresse_etrangere
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:737)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
at lu.cc.formInitiale.file.CsvReader.main(CsvReader.java:17)
Caused by: org.hibernate.HibernateException: Missing sequence or table: s_adresse_etrangere
at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1094)
at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:317)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:730)
... 4 more
die tabelle, die da angemeckert wird, ist eine sequence des 1. datenbankschemas.
meine persistence.xml sieht so aus:
<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="formInitiale" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />
<property name="hibernate.connection.username" value="bla" />
<property name="hibernate.connection.password" value="blub" />
<property name="hibernate.connection.url" value="jdbc

racle:thin

1.0.2.1:1521:db" />
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
<property name="hibernate.c3p0.timeout" value="300"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
</properties>
</persistence-unit>
<persistence-unit name="rchCom" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.driver.OracleDriver" />
<property name="hibernate.connection.username" value="laber" />
<property name="hibernate.connection.password" value="rabarber" />
<property name="hibernate.connection.url" value="jdbc

racle:thin

1.0.2.1:1521:db" />
<property name="hibernate.archive.autodetection" value="class, hbm"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect" />
<property name="hibernate.hbm2ddl.auto" value="validate" />
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
<property name="hibernate.c3p0.timeout" value="300"/>
<property name="hibernate.c3p0.max_statements" value="50"/>
</properties>
</persistence-unit>
</persistence>
die factories erzeuge ich so:
EntityManagerFactory emfFormInitiale = Persistence.createEntityManagerFactory("formInitiale");
EntityManagerFactory emfRchCom = Persistence.createEntityManagerFactory("rchCom");