felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: Using maven-scr-plugin under JDK 1.7
Date Wed, 07 Dec 2011 01:51:12 GMT

On 6 Dec 2011, at 22:36, Mark Derricutt wrote:

> Is anyone currently using tghe maven-scr-plugin under JDK 1.7 compiling
> with a -target- language level of JDK 1.7?
> 
> Whilst the plugin runs fine, it appears that any automatically generated
> bind/unbind methods created by the plugin generate bad bytecode for JDK 1.7.
> 
> It appears that the version of ASM used is the culprit, and that ASM 4.0
> which was released a few months ago has full support for JDK 1.7, however -
> that doesn't appear to be in maven central.
> 
> 
> However - I compiled up my own version of the maven-scr-plugin and adapted
> the code to use ASM 4.0, and its minor API change, but I still end up with
> java.lang.VerifyError's all over the place.

Did you try passing ClassWriter.COMPUTE_MAXS or ClassWriter.COMPUTE_FRAMES into the ClassWriter
constructor?

> I -could- go thru and add boiler plate bind/unbind methods on all my
> services ( and may end up doing so ) but I'd rather not if possible...
> 
> Any thoughts/suggestions/recommendations?
> 
> Should I just look at switching to Blueprint or iPojo or something else?
> 
> 
> org.apache.maven.surefire.util.SurefireReflectionException:
> java.lang.reflect.InvocationTargetException; nested exception is
> java.lang.reflect.InvocationTargetException: null
> java.lang.reflect.InvocationTargetException
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>    at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>    at java.lang.reflect.Method.invoke(Method.java:601)
>    at
> org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
>    at
> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
>    at
> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
>    at
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
>    at
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
> Caused by: java.lang.VerifyError: Expecting a stackmap frame at branch
> target 13 in method
> smx3.partyresource.service.PartyServiceImpl.unbindSessionFactory(Lorg/hibernate/SessionFactory;)V
> at offset 5
>    at
> smx3.partyresource.service.AgreementServiceImplTest$AgreementServiceModule.configure(AgreementServiceImplTest.java:262)
>    at
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>    at com.google.inject.spi.Elements.getElements(Elements.java:101)
>    at
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>    at
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>    at com.google.inject.Guice.createInjector(Guice.java:95)
>    at com.google.inject.Guice.createInjector(Guice.java:72)
>    at
> org.testng.internal.ClassImpl.getInstanceFromGuice(ClassImpl.java:143)
>    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:105)
>    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:195)
>    at
> org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
>    at org.testng.TestRunner.initMethods(TestRunner.java:406)
>    at org.testng.TestRunner.init(TestRunner.java:232)
>    at org.testng.TestRunner.init(TestRunner.java:202)
>    at org.testng.TestRunner.<init>(TestRunner.java:151)
>    at
> org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:529)
>    at org.testng.SuiteRunner.init(SuiteRunner.java:158)
>    at org.testng.SuiteRunner.<init>(SuiteRunner.java:112)
>    at org.testng.TestNG.createSuiteRunner(TestNG.java:1246)
>    at org.testng.TestNG.createSuiteRunners(TestNG.java:1233)
>    at org.testng.TestNG.runSuitesLocally(TestNG.java:1085)
>    at org.testng.TestNG.run(TestNG.java:1006)
>    at
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
>    at
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:160)
>    at
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:100)
>    at
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:115)
>    ... 9 more
> 
> -- 
> "Great artists are extremely selfish and arrogant things" — Steven Wilson,
> Porcupine Tree


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message