Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » @Entity gives mapped class not specified error with 2 persistence units
@Entity gives mapped class not specified error with 2 persistence units [message #611139] Mon, 08 September 2008 23:12
Bill Blalock is currently offline Bill Blalock
Messages: 118
Registered: July 2009
Location: Alabama
Senior Member
Hi all.

I am new at this so please bear with me.

I have 2 persistence units in my project because the data is on two
servers with 2 SQL engines and the project combines the data.

Five tables are in the first unit. One table is in the second. I defined
the first five tables, added the 2nd persistence unit, and then tried to
develop the domain modle for the table in the 2nd persistence unit.

The @Entity annotation has the error "This mapped class is not specified
in persistence unit "sysmon"". "sysmon" is the name of the first
persistence unit. How do I get around this?

I am only using the persistence.xml file, no orm.xml file. Trying to use
annotations only.

This is the persistence.xml 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="sysmon" transaction-type="RESOURCE_LOCAL">
<class>
domain_model.Exftpclg00</class>
<class>
domain_model.Fslog00</class>
<class>
domain_model.Msgdef00</class>
<class>
domain_model.Xfrctl00</class>
<class>
domain_model.XfrctlSelection</class>
<properties>
<property name="eclipselink.jdbc.url"
value="jdbc:as400:host:prompt=false;date
format=iso;naming=sql;libraries=*LIBL SYSMONDB$ CPRSSECDTA TCPEXT"/>
<property name="eclipselink.jdbc.user" value="XXXXXXX"/>
<property name="eclipselink.jdbc.password" value="XXXXX"/>
<property name="eclipselink.jdbc.driver"
value="com.ibm.as400.access.AS400JDBCDriver"/>
<property name="eclipselink.session.customizer"
value="eclipselink.SessionSysmonCustomizer"/>
<property name="eclipselink.target-database"
value="eclipselink.DB2UDBiSeriesPlatform"/>
</properties>

</persistence-unit>
<persistence-unit name="dataexpress" transaction-type="RESOURCE_LOCAL">
<class>
domain_model.Ftplog01</class>
<properties>
<property name="eclipselink.jdbc.url"
value="jdbc:sqlserver:host:1433;databaseName=FTPLOG"/>
<property name="eclipselink.jdbc.user" value="XXXXXX"/>
<property name="eclipselink.jdbc.password" value="XXXXXX"/>
<property name="eclipselink.jdbc.driver" value="C:\javalib\Microsoft SQL
Server 2005 JDBC Driver\sqljdbc_1.2\enu\sqljdbc.jar"/>
</properties>
</persistence-unit>

</persistence>

The @Entity of domain_model.Ftplog01 annotation has an error because it is
not listed in "sysmon" persistence unit classes.

How do I get around this?

Thanks all
Bill Blalock
Previous Topic:Collection enum
Next Topic:Collection enum
Goto Forum:
  


Current Time: Tue Sep 23 10:35:54 GMT 2014

Powered by FUDForum. Page generated in 0.01616 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software