Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static-Weaving failing due to erroneous generated persistence.xml #26

Closed
jonnybecker opened this issue Sep 19, 2019 · 6 comments
Closed
Assignees
Labels
Milestone

Comments

@jonnybecker
Copy link

jonnybecker commented Sep 19, 2019

I just tried static-weaving with new eclipselink-maven-plugin v2.7.4.
Weaving fails since the generated persistence.xml is erroneous. The class-entries don't have the full qualified name, but the class definition.

Generated persistence.xml:

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
    xmlns="http://xmlns.jcp.org/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
    <persistence-unit name="regid-core" transaction-type="RESOURCE_LOCAL">
        <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
        <properties>
            <property name="eclipselink.weaving" value="static"/>
        </properties>
        <class>public abstract class com.foo.domain.entities.BaseVersionEntity&lt;I&gt; extends com.foo.domain.entities.BaseEntity&lt;I&gt;</class>
        <class>...</class>
    </persistence-unit>
</persistence>

My setup:

  • Windows 10
  • Java 8/11
  • Maven 3.5.3
@ethlo ethlo added this to the 2.7.4.1 milestone Sep 21, 2019
@ethlo ethlo self-assigned this Sep 21, 2019
@ethlo ethlo added the bug label Sep 21, 2019
ethlo added a commit that referenced this issue Sep 21, 2019
@ethlo
Copy link
Owner

ethlo commented Sep 21, 2019

Thanks for the report. The issue should be fixed and is released in 2.7.4.1-SNAPSHOT

@ethlo ethlo closed this as completed Sep 21, 2019
@jonnybecker
Copy link
Author

Thanks for the quick reaction. Any release-dates for 2.7.4.1 scheduled so far?
I'm asking, since we switched to Java11 and in 2.7.1.1 static-weaving isn't working (for us?).

@ethlo
Copy link
Owner

ethlo commented Sep 28, 2019 via email

@ethlo
Copy link
Owner

ethlo commented Sep 30, 2019

Were you able to use version 2.7.4.1 with your Java 11 build?

@jonnybecker
Copy link
Author

Seems to work, thanks a lot! But I had to add an extra dependency (bundle) for the weaving process (see below).

<pluginManagement>
  <plugins>
	<plugin>
	  <groupId>com.ethlo.persistence.tools</groupId>
	  <artifactId>eclipselink-maven-plugin</artifactId>
	  <version>2.7.4.1</version>
	  <dependencies>
		<dependency>
		  <groupId>org.glassfish.jaxb</groupId>
		  <artifactId>jaxb-runtime</artifactId>
		  <version>2.3.2</version>
		</dependency>
	  </dependencies>
	</plugin>
        ...

Which dependencies do I really need for the weaving?

@ethlo
Copy link
Owner

ethlo commented Oct 1, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants