Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JPA Enhancer problem
JPA Enhancer problem [message #194217] Sat, 09 June 2007 12:55
Eclipse UserFriend
Originally posted by: chrisjames64.hotmail.co.uk

Hi,

I'm having a problem with creating a JPA Enhancer builder for my project
entities.
I have a JPA Project (using OpenJPA) laid out as follows:-

\JPATest\src
\JPATest\test
\JPATest\build\classes

....with the following contents...

\JPATest\src\META-INF\MANIFEST.MF
\JPATest\src\META-INF\orm.xml
\JPATest\src\META-INF\persistence.xml

\JPATest\src\org\chris\jpa\dao\BaseDaoImpl.java
\JPATest\src\org\chris\jpa\dao\CustomerDao.java
\JPATest\src\org\chris\jpa\dao\CustomerDaoImpl.java
\JPATest\src\org\chris\jpa\dao\OrderDao.java
\JPATest\src\org\chris\jpa\dao\OrderDaoImpl.java

\JPATest\src\org\chris\jpa\model\Customer.java
\JPATest\src\org\chris\jpa\model\Lineitem.java
\JPATest\src\org\chris\jpa\model\Newids.java
\JPATest\src\org\chris\jpa\model\Order.java
\JPATest\src\org\chris\jpa\model\Product.java

\JPATest\test\org\chris\jpa\dao\test\DataManagerTest.java
\JPATest\test\unitTest-applicationContext.xml

Note: The model classes were generated using the...
JPA Tools => Generate Entities wizard

I then have an ant task at the root...
\JPATest\enhancer.xml

<project name="enhanceJPA">

<taskdef name="openjpac"
classname="org.apache.openjpa.ant.PCEnhancerTask" />

<!-- invoke enhancer on all .java files -->
<target name="enhance">
<openjpac>
<config propertiesFile="./src/META-INF/persistence.xml" />
<fileset dir="./src">
<include name="**/org/chris/jpa/model/*.java" />
</fileset>
</openjpac>
</target>

</project>

If I run the enhancer.xml using "Run As => Ant Build", then the classes
are enhanced correctly.
Note: The classpath of the Ant Build task includes both the \src and
\build\classes folders.

However, if I try and run the enhancer.xml as a Project builder using,
as near as possible, the same settings as for the Ant Build, it fails
saying it cannot find the classes to enhance.

Could anyone shed any light on why this is happening.

Many thanks
Chris
Previous Topic:Dali: Not correctly mapping column name 'class'
Next Topic:Connecting to MS SQL Server 2005 with the Database Explorer
Goto Forum:
  


Current Time: Sat Apr 20 03:04:50 GMT 2024

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

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

Back to the top