You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Debeerst Benjamin <de...@younicos.com> on 2013/08/07 13:31:44 UTC

iPOJO manipulator and Stackmap Frames

Hi folks,
 
I am currently running into problems with the classes that get manipulated by iPOJO at runtime. More concrete, I face the well known [1][2] "VerifyError: Expecting a stackmap frame", caused by the new validation methods in Java 7.
 
However, the bytecode manipulation libraries have been updated since, and they should be producing correct stackmap frames by now. I am compiling my with Java 7 and running in Java 7, but still get such verify errors when putting iPOJO components and the iPOJO Runtime 1.10.1 to a Karaf runtime 2.3.2, which in turn featuring ASM 4.1.
I think these errors should not occur anymore since tehy should have been fixed in version 1.8.2 [1] with the version bump to ASM 3.3.1, right? I could indeed work around this by setting the env variable "-XX:-UseSplitVerifier", but I feel I should not have to do this. Moreover since this flag is deprecated and will be removed in Java 8.
 
Any opinions to this?
 
Despite from the fact that "it should work" and "there is a workaround", this causes problems when working with other bytecode manipulating stuff as well. More concrete I'm trying to integrate EclEmma / JaCoCo to generate code coverage reports on our Pax Exam integration tests. JaCoCo complains over "Missing or invalid stackmap frames" for classes that are iPOJO components. The JaCoCo devs seem to be pretty shure they're doing evering correct [3], and since iPOJO seems to do something wrong already without JaCoco, I indeed think this might be a iPOJO Bug.
 
Are there are people around having integrated Maven, Pax Exam, iPOJO and some code coverage tool? I'd be happy to hear of some working setups or pointers to working example code.
Any help is greatly appreciated! 
 
Best,
Benjamin
 
[1] https://issues.apache.org/jira/browse/FELIX-3145
[2] http://stackoverflow.com/questions/8958267/java-lang-verifyerror-expecting-a-stackmap-frame
[3] https://github.com/jacoco/jacoco/issues/109#issuecomment-18980300


Re: iPOJO manipulator and Stackmap Frames

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

On 8 oct. 2013, at 09:48, Benjamin Debeerst <De...@younicos.com> wrote:

> Hello all,
> 
> I was finally able to track down my problem. After all a pretty simple fault, just posting it for documentation.
> 
> The most simple component without any actual code (just @Component @Instantiate and @Validate) was provoking a Stackmap frame error at runtime in Apache Karaf 2.3.3 with iPOJO Runtime 1.10.1.
> 
> I used the following combination in my Maven-based setup:
> 
> maven-compiler-plugin 3.1 configured with source and target 1.7
> maven-ipojo-plugin 1.6.0 (!)

Yes this version is quite old and did not handle frames (as they were not checked at all by the JVM at that time).

> 
> The last two plugins in combination provoked the problem. Changing the maven-ipojo-plugin to version 1.10.1 fixed it.
> 
> 
> Btw: Kind of the 'root cause' why the old version was used, is that when googling for iPOJO, the old site shows up as first hit, with a lot of outdated information: http://felix.apache.org/site/apache-felix-ipojo.html
> The current site http://felix.apache.org/documentation/subprojects/apache-felix-ipojo.html is only second in googles list.
> It may be advisable to put a forwarding or a big hint on the old site, since this cause some confusion at least in my dev team.

I definitely agree.

Felix, could be do that ? 

Regards,

Clement

> 
> Regards,
> Benjamin
> 
> -----Original Message-----
> From: Debeerst Benjamin [mailto:debeerst@younicos.com] 
> Sent: Donnerstag, 8. August 2013 10:34
> To: users@felix.apache.org
> Subject: Re: iPOJO manipulator and Stackmap Frames
> 
> Hi,
> 
> Thanks for the quick reply, Clement.
> 
>> That means we're forgetting some cases. Could you give me an example of code generating the frame error ?
> 
> Unfortunately a find myself unable to quickly boil down the problem to a single concise example I could share, at least at the moment.
> I will come back to it as soon as I have a good example, give me some time.
> 
>> I read something about generating code coverage with pax exam a couple of month ago. I never tried by myself.
> 
> Do you still know where?
> 
> Regards,
> Benjamin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


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


RE: iPOJO manipulator and Stackmap Frames

Posted by Benjamin Debeerst <De...@younicos.com>.
Hello all,

I was finally able to track down my problem. After all a pretty simple fault, just posting it for documentation.

The most simple component without any actual code (just @Component @Instantiate and @Validate) was provoking a Stackmap frame error at runtime in Apache Karaf 2.3.3 with iPOJO Runtime 1.10.1.

I used the following combination in my Maven-based setup:

maven-compiler-plugin 3.1 configured with source and target 1.7
maven-ipojo-plugin 1.6.0 (!)

The last two plugins in combination provoked the problem. Changing the maven-ipojo-plugin to version 1.10.1 fixed it.


Btw: Kind of the 'root cause' why the old version was used, is that when googling for iPOJO, the old site shows up as first hit, with a lot of outdated information: http://felix.apache.org/site/apache-felix-ipojo.html
The current site http://felix.apache.org/documentation/subprojects/apache-felix-ipojo.html is only second in googles list.
It may be advisable to put a forwarding or a big hint on the old site, since this cause some confusion at least in my dev team.

Regards,
Benjamin

-----Original Message-----
From: Debeerst Benjamin [mailto:debeerst@younicos.com] 
Sent: Donnerstag, 8. August 2013 10:34
To: users@felix.apache.org
Subject: Re: iPOJO manipulator and Stackmap Frames

Hi,

Thanks for the quick reply, Clement.

> That means we're forgetting some cases. Could you give me an example of code generating the frame error ?

Unfortunately a find myself unable to quickly boil down the problem to a single concise example I could share, at least at the moment.
I will come back to it as soon as I have a good example, give me some time.

> I read something about generating code coverage with pax exam a couple of month ago. I never tried by myself.

Do you still know where?

Regards,
Benjamin

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


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


Re: iPOJO manipulator and Stackmap Frames

Posted by Debeerst Benjamin <de...@younicos.com>.
Hi,

Thanks for the quick reply, Clement.

> That means we're forgetting some cases. Could you give me an example of code generating the frame error ?

Unfortunately a find myself unable to quickly boil down the problem to a single concise example I could share, at least at the moment.
I will come back to it as soon as I have a good example, give me some time.

> I read something about generating code coverage with pax exam a couple of month ago. I never tried by myself.

Do you still know where?

Regards,
Benjamin

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


Re: iPOJO manipulator and Stackmap Frames

Posted by Clement Escoffier <cl...@gmail.com>.
Hi,

On 7 août 2013, at 13:31, Debeerst Benjamin <de...@younicos.com> wrote:

> Hi folks,
> 
> I am currently running into problems with the classes that get manipulated by iPOJO at runtime. More concrete, I face the well known [1][2] "VerifyError: Expecting a stackmap frame", caused by the new validation methods in Java 7.
> 
> However, the bytecode manipulation libraries have been updated since, and they should be producing correct stackmap frames by now. I am compiling my with Java 7 and running in Java 7, but still get such verify errors when putting iPOJO components and the iPOJO Runtime 1.10.1 to a Karaf runtime 2.3.2, which in turn featuring ASM 4.1.
> I think these errors should not occur anymore since tehy should have been fixed in version 1.8.2 [1] with the version bump to ASM 3.3.1, right? I could indeed work around this by setting the env variable "-XX:-UseSplitVerifier", but I feel I should not have to do this. Moreover since this flag is deprecated and will be removed in Java 8.
> 
> Any opinions to this?

That means we're forgetting some cases. Could you give me an example of code generating the frame error ?


> 
> Despite from the fact that "it should work" and "there is a workaround", this causes problems when working with other bytecode manipulating stuff as well. More concrete I'm trying to integrate EclEmma / JaCoCo to generate code coverage reports on our Pax Exam integration tests. JaCoCo complains over "Missing or invalid stackmap frames" for classes that are iPOJO components. The JaCoCo devs seem to be pretty shure they're doing evering correct [3], and since iPOJO seems to do something wrong already without JaCoco, I indeed think this might be a iPOJO Bug.
> 
> Are there are people around having integrated Maven, Pax Exam, iPOJO and some code coverage tool? I'd be happy to hear of some working setups or pointers to working example code.
> Any help is greatly appreciated! 

I read something about generating code coverage with pax exam a couple of month ago. I never tried by myself.

Regards,

Clement

> 
> Best,
> Benjamin
> 
> [1] https://issues.apache.org/jira/browse/FELIX-3145
> [2] http://stackoverflow.com/questions/8958267/java-lang-verifyerror-expecting-a-stackmap-frame
> [3] https://github.com/jacoco/jacoco/issues/109#issuecomment-18980300
> 


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