Hello,
I'm having some issues with getting exclude-unlisted-classes to work in a J2SE environment. We have a fully working configuration which deploys fine to a J2EE environment but are wanting to test outside of the container.
Our configuration for J2EE is annotation driven so makes use of the J2EE default and processes the files and builds the JPA configuration as a result, but outside the container in J2SE land we need to specify exclude-unlisted-classes with a value of false to have our classes interograted. Unfortunately this isn't happening with our current setup. If we specify the list of <class> elements in the persistence.xml file however the system works but this isn't terribly convenient.
I can't see any indication anywhere that this is a known defect but can't see any explanation for this either.
We're currently running Build b58g-fcs (09/07/2007) and are experiencing the problem in a Java6 environment running within the context of a jUnit4 test suite. Toplink seems to fire up fine but simply ignores the directive. If we replace it with the list of class elements and re-run the tests, everything fires correctly which seems to point to an issue with the directive in this configuration?
Persistence extracts below.
Many thanks for your help!
Andrew.
FAILS:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="
http://java.sun.com/xml/ns/persistence">
<persistence-unit name="sdn" transaction-type="RESOURCE_LOCAL">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="toplink.logging.level" value="FINER" />
<property name="toplink.logging.exceptions" value="true" />
<property name="toplink.weaving" value="false" />
</properties>
</persistence-unit>
</persistence>
SUCCEEDS (Classes slimmed down for ease of reading):
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="
http://java.sun.com/xml/ns/persistence">
<persistence-unit name="sdn" transaction-type="RESOURCE_LOCAL">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<class>com.symbian.sdn.model.User</class>
<class>com.symbian.sdn.model.Permission</class>
...
<class>com.symbian.sdn.model.Event</class>
<class>com.symbian.sdn.model.NewsItem</class>
<properties>
<property name="toplink.logging.level" value="FINER" />
<property name="toplink.logging.exceptions" value="true" />
<property name="toplink.weaving" value="false" />
</properties>
</persistence-unit>
</persistence>
[Message sent by forum member 'nugs' (nugs)]
http://forums.java.net/jive/thread.jspa?messageID=246112