rzo1 commented on PR #306: URL: https://github.com/apache/openjpa/pull/306#issuecomment-6818423453
I looked at why the profile still fails after the manifest change. Three things: 1. The root pom's test-dynamic-enhancer profile turns on the security manager. JDK 24+ refuses to start the test JVM, and on 17/21 the old policy lacks ManagementPermission "monitor" for surefire's ForkedBooter, so the fork dies in every module. 2. Because that profile is in the root pom, `-Ptest-dynamic-enhancer` switches off the activeByDefault test-derby profile, so there is no Derby driver/URL. 3. `-javaagent` pointing into ~/.m2 needs a prior install and otherwise picks up a stale kernel jar (here: no Premain-Class, "Agent_OnLoad: instrument"). I pushed two commits on top: the root profile and the leftover policy.file profiles are removed; openjpa-persistence-jdbc builds a manifest-only agent jar (Premain-Class=PCEnhancerAgent) in target/ and passes it to `-javaagent`, so the kernel classes come from the reactor, and recompiles the test classes so they are really enhanced at load time (be6fb428f); DynamicEnhancementSuite checks that the agent is active and leaves out TestClone and TestDataCacheBehavesIdentical, which the regular build excludes as well (5876818a8). With that `mvn test -Ptest-dynamic-enhancer` runs 417 tests on Derby with 0 failures on JDK 17, 21 and 25. Self-attach via `openjpa.DynamicEnhancementAgent` on JDK 9+ (no tools.jar) is a separate issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
