2

i got a Problem with my NetBeans-Maven-Project. If i add another Persistence-Unit into the same persistence.xml with the same Entities, i get some Exceptions i dont understand.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
  <persistence-unit name="com.xxx.plugin.connector_xxxAuthServices_war_firstPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>com.xxx.plugin.entities.Businesspartner</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <shared-cache-mode>NONE</shared-cache-mode>
    <validation-mode>NONE</validation-mode>
    <properties>
      <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db_first?zeroDateTimeBehavior=convertToNull"/>
      <property name="javax.persistence.jdbc.password" value="xxx"/>
      <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
      <property name="javax.persistence.jdbc.user" value="root"/>
    </properties>
  </persistence-unit>

  <!--  
  <persistence-unit name="com.xxx.plugin.connector_xxxAuthServices_war_secondPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>com.xxx.plugin.entities.Businesspartner</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <shared-cache-mode>NONE</shared-cache-mode>
    <validation-mode>NONE</validation-mode>
    <properties>
      <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db_second?zeroDateTimeBehavior=convertToNull"/>
      <property name="javax.persistence.jdbc.password" value="xxx"/>
      <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
      <property name="javax.persistence.jdbc.user" value="root"/>
    </properties>
  </persistence-unit>
  -->
</persistence>

If i uncomment the second PU i get some Exceptions:

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.558s
Finished at: Wed Nov 14 10:26:32 CET 2012
Final Memory: 21M/56M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile (default-testCompile) on project xxxAuthServices: Compilation failure: Compilation failure:
D:\Users\me\Documents\xxx\code\trunk\xxxAuthServices\src\test\java\com\xxx\plugin\webservices\MaterialsLoginRESTfulWSTest.java:[8,35] error: cannot find symbol

could not parse error message:   symbol:   class Businesspartner
location: package com.xxx.plugin.entities

MaterialsLoginRESTfulWSTest is a jUnit-Test and in Line 9 is the "import com.xxx.plugin.entities.Businesspartner".

I am at my wit's end. Is there someone who has answers to help me fix it...

Best greetz Zack

Zack
  • 51
  • 1
  • 5

1 Answers1

0

Forgot to post the my fix/misstake. I got an old or missmatched Version at my Maven-Rep.

Regards Zack

Zack
  • 51
  • 1
  • 5