On Saturday, December 5, 2020 12:38:54 AM CET Cris Rockwell wrote:
> Thanks Oliver.
Hi Cris,
> Helps a lot. At least when using the latest sling-bundle-parent, the project
> builds with Java 8. Unfortunately, neither
> sling-org-apache-sling-servlets-annotations nor
> sling-org-apache-sling-junit-core [0] build with Java 11 [1] on my
> localhost or in by the CI.
Before we look into the details again, can you merge the IT module into the
main module and clean up? For me it looks like you don't need the
PaxExamServer rule at all.
Have a look at Scripting FreeMarker¹ and use it as a blueprint.
Regards,
O.
[1] https://github.com/apache/sling-org-apache-sling-scripting-freemarker
> sling-org-apache-sling-junit-core... it/annotations-it bundle has this
> error…
>
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> 4.509 s <<< FAILURE! - in org.apache.sling.junit.annotations.ReferenceIT
> [ERROR] org.apache.sling.junit.annotations.ReferenceIT Time elapsed: 4.499
> s <<< ERROR! org.ops4j.pax.exam.TestContainerException:
> org.osgi.framework.BundleException: Could not create bundle object. at
> org.ops4j.pax.exam.forked.ForkedTestContainer.start(ForkedTestContainer.jav
> a:168) at
> org.ops4j.pax.exam.junit.PaxExamServer.before(PaxExamServer.java:87) at
> org.apache.sling.junit.annotations.it@1.0.0/org.apache.sling.junit.annotati
> ons.ReferenceIT$1.before(ReferenceIT.java:61) at
> org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:50) at
> org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
> at
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java
> :364) at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Prov
> ider.java:272) at
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provid
> er.java:237) at
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:
> 158) at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBoot
> er.java:428) at
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162
> ) at
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:562) at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:548)
> Caused by: org.osgi.framework.BundleException: Could not create bundle
> object. at org.apache.felix.framework.Felix.installBundle(Felix.java:3312)
> at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImp
> l.java:147) at
> org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImp
> l.java:120) at
> org.ops4j.pax.swissbox.framework.RemoteFrameworkImpl.installBundle(RemoteFr
> ameworkImpl.java:132) at
> jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Delegati
> ngMethodAccessorImpl.java:43) at
> java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at
> java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:359
> ) at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200) at
> java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197) at
> java.base/java.security.AccessController.doPrivileged(Native Method) at
> java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196) at
> java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.jav
> a:562) at
> java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTrans
> port.java:796) at
> java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(
> TCPTransport.java:677) at
> java.base/java.security.AccessController.doPrivileged(Native Method) at
> java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransp
> ort.java:676) at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecu
> tor.java:1128) at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec
> utor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
> at
> java.rmi/sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Str
> eamRemoteCall.java:303) at
> java.rmi/sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.ja
> va:279) at java.rmi/sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164) at
> java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(R
> emoteObjectInvocationHandler.java:217) at
> java.rmi/java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectI
> nvocationHandler.java:162) at com.sun.proxy.$Proxy10.installBundle(Unknown
> Source)
> at
> org.ops4j.pax.exam.forked.ForkedTestContainer.installAndStartBundles(Forked
> TestContainer.java:285) at
> org.ops4j.pax.exam.forked.ForkedTestContainer.start(ForkedTestContainer.jav
> a:165) ... 14 more
> Caused by: