Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Heshan Suriyaarachchi
On Tue, Oct 14, 2014 at 2:19 PM, Alexander Kriegisch <
alexan...@kriegisch.name> wrote:

> Yes, the default compliance level is 1.4 according to
> http://mojo.codehaus.org/aspectj-maven-plugin/compile-mojo.html#complianceLevel,
> even in the current plugin version 1.7 (you still use 1.5, I recommend an
> update there as well, not just in the AspectJ runtime).
>
Will do. Thank you.


> --
> Alexander Kriegisch
> http://scrum-master.de
>
>
> Am 14.10.2014 um 23:08 schrieb Heshan Suriyaarachchi <
> heshan.suriyaarach...@gmail.com>:
>
> Thank you for the quick feedback guys.
>
> I tried updating to the latest aspectj jars too. Still I saw the same
> error. Then I found out the error. I was missing the  tag
> in my plugin configuration.
>
> Pasting the updated aspectj-maven-plugin configuration in case someone
> runs into the same issue that I ran into.
>
>  
> org.codehaus.mojo
> aspectj-maven-plugin
> 1.5
> 
> 1.7
> 1.7
> 1.7
> 
> 
> 
> 
> 
> compile
> test-compile
> 
> 
> 
> 
>
> Thanks,
> Heshan.
>
> On Tue, Oct 14, 2014 at 1:43 PM, Frank Pavageau 
> wrote:
>
>> 2014-10-14 21:28 GMT+02:00 Andy Clement :
>>>
>>> I’d recommend updating to a more recent AspectJ.  Older AspectJs did
>>> have issues with making mistakes generating stack map frames.  The option
>>> to use split verifier was only possible with JDK1.6 I think, with 1.7 they
>>> removed that capability so the stack map frames needed to be correct.
>>>
>>
>> For the record, -XX:-UseSplitVerifier is available in the Hotspot JVM 7
>> to disable the "new" verifier which needs correct stack map frames. It's
>> not available in the Hotspot JVM 8 anymore.
>>
>> Frank
>>
>> ___
>> aspectj-users mailing list
>> aspectj-users@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
>
> --
> Regards,
> Heshan Suriyaarachchi
>
> http://heshans.blogspot.com/
> http://www.linkedin.com/in/heshan
>
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>



-- 
Regards,
Heshan Suriyaarachchi

http://heshans.blogspot.com/
http://www.linkedin.com/in/heshan
___
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Alexander Kriegisch
I forgot to mention that AspectJ Maven Plugin 1.7 automatically uses 
aspectjtools 1.8.2 by default, see 
http://mojo.codehaus.org/aspectj-maven-plugin/dependencies.html


> Am 14.10.2014 um 23:19 schrieb Alexander Kriegisch :
> 
> Yes, the default compliance level is 1.4 according to 
> http://mojo.codehaus.org/aspectj-maven-plugin/compile-mojo.html#complianceLevel,
>  even in the current plugin version 1.7 (you still use 1.5, I recommend an 
> update there as well, not just in the AspectJ runtime).
> -- 
> Alexander Kriegisch
> http://scrum-master.de
> 
> 
>> Am 14.10.2014 um 23:08 schrieb Heshan Suriyaarachchi 
>> :
>> 
>> Thank you for the quick feedback guys. 
>> 
>> I tried updating to the latest aspectj jars too. Still I saw the same error. 
>> Then I found out the error. I was missing the  tag in my 
>> plugin configuration. 
>> 
>> Pasting the updated aspectj-maven-plugin configuration in case someone runs 
>> into the same issue that I ran into. 
>> 
>>  
>> org.codehaus.mojo
>> aspectj-maven-plugin
>> 1.5
>> 
>> 1.7
>> 1.7
>> 1.7
>> 
>> 
>> 
>> 
>> 
>> compile
>> test-compile
>> 
>> 
>> 
>> 
>> 
>> Thanks, 
>> Heshan.
>> 
>>> On Tue, Oct 14, 2014 at 1:43 PM, Frank Pavageau  
>>> wrote:
>>> 2014-10-14 21:28 GMT+02:00 Andy Clement :
 
 I’d recommend updating to a more recent AspectJ.  Older AspectJs did have 
 issues with making mistakes generating stack map frames.  The option to 
 use split verifier was only possible with JDK1.6 I think, with 1.7 they 
 removed that capability so the stack map frames needed to be correct.
>>> 
>>> For the record, -XX:-UseSplitVerifier is available in the Hotspot JVM 7 to 
>>> disable the "new" verifier which needs correct stack map frames. It's not 
>>> available in the Hotspot JVM 8 anymore.
>>> 
>>> Frank
>>> 
>>> ___
>>> aspectj-users mailing list
>>> aspectj-users@eclipse.org
>>> To change your delivery options, retrieve your password, or unsubscribe 
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> 
>> 
>> 
>> -- 
>> Regards,
>> Heshan Suriyaarachchi
>> 
>> http://heshans.blogspot.com/
>> http://www.linkedin.com/in/heshan
>> ___
>> aspectj-users mailing list
>> aspectj-users@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe from 
>> this list, visit
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
___
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Alexander Kriegisch
Yes, the default compliance level is 1.4 according to 
http://mojo.codehaus.org/aspectj-maven-plugin/compile-mojo.html#complianceLevel,
 even in the current plugin version 1.7 (you still use 1.5, I recommend an 
update there as well, not just in the AspectJ runtime).
-- 
Alexander Kriegisch
http://scrum-master.de


> Am 14.10.2014 um 23:08 schrieb Heshan Suriyaarachchi 
> :
> 
> Thank you for the quick feedback guys. 
> 
> I tried updating to the latest aspectj jars too. Still I saw the same error. 
> Then I found out the error. I was missing the  tag in my 
> plugin configuration. 
> 
> Pasting the updated aspectj-maven-plugin configuration in case someone runs 
> into the same issue that I ran into. 
> 
>  
> org.codehaus.mojo
> aspectj-maven-plugin
> 1.5
> 
> 1.7
> 1.7
> 1.7
> 
> 
> 
> 
> 
> compile
> test-compile
> 
> 
> 
> 
> 
> Thanks, 
> Heshan.
> 
>> On Tue, Oct 14, 2014 at 1:43 PM, Frank Pavageau  
>> wrote:
>> 2014-10-14 21:28 GMT+02:00 Andy Clement :
>>> 
>>> I’d recommend updating to a more recent AspectJ.  Older AspectJs did have 
>>> issues with making mistakes generating stack map frames.  The option to use 
>>> split verifier was only possible with JDK1.6 I think, with 1.7 they removed 
>>> that capability so the stack map frames needed to be correct.
>> 
>> For the record, -XX:-UseSplitVerifier is available in the Hotspot JVM 7 to 
>> disable the "new" verifier which needs correct stack map frames. It's not 
>> available in the Hotspot JVM 8 anymore.
>> 
>> Frank
>> 
>> ___
>> aspectj-users mailing list
>> aspectj-users@eclipse.org
>> To change your delivery options, retrieve your password, or unsubscribe from 
>> this list, visit
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 
> 
> -- 
> Regards,
> Heshan Suriyaarachchi
> 
> http://heshans.blogspot.com/
> http://www.linkedin.com/in/heshan
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe from 
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
___
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Heshan Suriyaarachchi
Thank you for the quick feedback guys.

I tried updating to the latest aspectj jars too. Still I saw the same
error. Then I found out the error. I was missing the  tag
in my plugin configuration.

Pasting the updated aspectj-maven-plugin configuration in case someone runs
into the same issue that I ran into.

 
org.codehaus.mojo
aspectj-maven-plugin
1.5

1.7
1.7
1.7





compile
test-compile





Thanks,
Heshan.

On Tue, Oct 14, 2014 at 1:43 PM, Frank Pavageau 
wrote:

> 2014-10-14 21:28 GMT+02:00 Andy Clement :
>>
>> I’d recommend updating to a more recent AspectJ.  Older AspectJs did have
>> issues with making mistakes generating stack map frames.  The option to use
>> split verifier was only possible with JDK1.6 I think, with 1.7 they removed
>> that capability so the stack map frames needed to be correct.
>>
>
> For the record, -XX:-UseSplitVerifier is available in the Hotspot JVM 7 to
> disable the "new" verifier which needs correct stack map frames. It's not
> available in the Hotspot JVM 8 anymore.
>
> Frank
>
> ___
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>



-- 
Regards,
Heshan Suriyaarachchi

http://heshans.blogspot.com/
http://www.linkedin.com/in/heshan
___
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Frank Pavageau
2014-10-14 21:28 GMT+02:00 Andy Clement :
>
> I’d recommend updating to a more recent AspectJ.  Older AspectJs did have
> issues with making mistakes generating stack map frames.  The option to use
> split verifier was only possible with JDK1.6 I think, with 1.7 they removed
> that capability so the stack map frames needed to be correct.
>

For the record, -XX:-UseSplitVerifier is available in the Hotspot JVM 7 to
disable the "new" verifier which needs correct stack map frames. It's not
available in the Hotspot JVM 8 anymore.

Frank
___
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Andy Clement
Hi,

I’d recommend updating to a more recent AspectJ.  Older AspectJs did have 
issues with making mistakes generating stack map frames.  The option to use 
split verifier was only possible with JDK1.6 I think, with 1.7 they removed 
that capability so the stack map frames needed to be correct.

AspectJ 1.8.2 should work fine with Java 1.7.

cheers,
Andy

On Oct 14, 2014, at 11:33 AM, Heshan Suriyaarachchi 
 wrote:

> Sorry for the confusing title. It should be corrected as "Stackmap frame 
> errors when building an aspectj project with Java 1.7"
> 
> On Tue, Oct 14, 2014 at 11:31 AM, Heshan Suriyaarachchi 
>  wrote:
> Hi, 
> 
> I have a project which is using aspectj and it is building fine with Java 
> 1.6. When I update it to Java 1.7 I'm seeing following error. 
> 
> [INFO] Molva the Destroyer Aspects ... FAILURE [2.324s]
> [INFO] Molva The Destroyer Client  SKIPPED
> [INFO] Molva The Destroyer Parent  SKIPPED
> [INFO] Molva The Destroyer Distribution .. SKIPPED
> [INFO] 
> 
> [INFO] BUILD FAILURE
> [INFO] 
> 
> [INFO] Total time: 2.424s
> [INFO] Finished at: Tue Oct 14 11:16:19 PDT 2014
> [INFO] Final Memory: 12M/310M
> [INFO] 
> 
> [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java 
> (default) on project molva-the-destroyer-aspects: An exception occured while 
> executing the Java class. Expecting a stackmap frame at branch target 30
> [ERROR] Exception Details:
> [ERROR] Location:
> [ERROR] com/concur/puma/molva/aspects/TestTarget.main([Ljava/lang/String;)V 
> @12: invokestatic
> [ERROR] Reason:
> [ERROR] Expected stackmap frame at this location.
> [ERROR] Bytecode:
> [ERROR] 000: 2a4d b200 5e01 012c b800 644e b800 c62d
> [ERROR] 010: b600 ca2c 2db8 00bb 2db8 00bf 57b1 3a04
> [ERROR] 020: b800 c62d 1904 b600 ce19 04bf
> [ERROR] Exception Handler Table:
> [ERROR] bci [12, 30] => handler: 30
> [ERROR] -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> 
> 
> 
> This is what my maven configuration looks like. 
> 
> 
> junit
> junit
> 3.8.1
> test
> 
> 
> org.aspectj
> aspectjrt
> 1.6.5
> 
> 
> log4j
> log4j
> 1.2.17
> 
> 
> org.perf4j
> perf4j
> 0.9.16
> 
> 
> 
> 
> 
> 
> org.codehaus.mojo
> aspectj-maven-plugin
> 1.2
> 
> 1.7
> 1.7
> 
> 
> 
> 
> compile
> 
> 
> 
> 
> 
> org.codehaus.mojo
> exec-maven-plugin
> 1.1
> 
> 
> package
> 
> java
> 
> 
> 
> 
> 
> com.concur.puma.molva.aspects.TestTarget
> 
> 
> 
> 
> 
> The TestTarget class is a simple class (Pasting it here for completeness.)
> public class TestTarget {
> 
> static Logger logger = Logger.getLogger(TestTarget.class);
> 
> public static void main(String[] args) throws Exception {
> // Test case 01
> new TestTarget().test1();
> 
> // Test case 02
> for(int i=0;i<10;i++) {
> testCountFast(1000);
> }
> 
> // Test case 03
> for(int i=0;i<5;i++) {
> testCountSlow(1000);
> }
> 
> // Test case 04
> //new TestTarget().test2();
> }
> 
> public static void testCountSlow(int value) {
> count(value,5);
> System.out.println("slow count executed!");
> //logger.info("Slow count complete!");
> }
> 
> public static void testCountFast(int value) {
> count(value,0);
> System.out.println("fast count executed!");
> //logger.info("Fast count complete!");
> }
> 
> private static void count(int value, int delay) {
> for (int i=0;i try {
> Thread.sleep(

Re: [aspectj-users] Stackmap frame errors when building the aspectj project with Java 1.7

2014-10-14 Thread Heshan Suriyaarachchi
Sorry for the confusing title. It should be corrected as "Stackmap frame
errors when building *an* aspectj project with Java 1.7"

On Tue, Oct 14, 2014 at 11:31 AM, Heshan Suriyaarachchi <
heshan.suriyaarach...@gmail.com> wrote:

> Hi,
>
> I have a project which is using aspectj and it is building fine with Java
> 1.6. When I update it to Java 1.7 I'm seeing following error.
>
> [INFO] Molva the Destroyer Aspects ... FAILURE [2.324s]
> [INFO] Molva The Destroyer Client  SKIPPED
> [INFO] Molva The Destroyer Parent  SKIPPED
> [INFO] Molva The Destroyer Distribution .. SKIPPED
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
> [INFO] Total time: 2.424s
> [INFO] Finished at: Tue Oct 14 11:16:19 PDT 2014
> [INFO] Final Memory: 12M/310M
> [INFO]
> 
> [ERROR] Failed to execute goal
> org.codehaus.mojo:exec-maven-plugin:1.1:java (default) on project
> molva-the-destroyer-aspects: An exception occured while executing the Java
> class. Expecting a stackmap frame at branch target 30
> [ERROR] Exception Details:
> [ERROR] Location:
> [ERROR]
> com/concur/puma/molva/aspects/TestTarget.main([Ljava/lang/String;)V @12:
> invokestatic
> [ERROR] Reason:
> [ERROR] Expected stackmap frame at this location.
> [ERROR] Bytecode:
> [ERROR] 000: 2a4d b200 5e01 012c b800 644e b800 c62d
> [ERROR] 010: b600 ca2c 2db8 00bb 2db8 00bf 57b1 3a04
> [ERROR] 020: b800 c62d 1904 b600 ce19 04bf
> [ERROR] Exception Handler Table:
> [ERROR] bci [12, 30] => handler: 30
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>
>
>
> This is what my maven configuration looks like.
> 
> 
> junit
> junit
> 3.8.1
> test
> 
> 
> org.aspectj
> aspectjrt
> 1.6.5
> 
> 
> log4j
> log4j
> 1.2.17
> 
> 
> org.perf4j
> perf4j
> 0.9.16
> 
> 
>
> 
> 
> 
> org.codehaus.mojo
> aspectj-maven-plugin
> 1.2
> 
> 1.7
> 1.7
> 
> 
> 
> 
> compile
> 
> 
> 
> 
> 
> org.codehaus.mojo
> exec-maven-plugin
> 1.1
> 
> 
> package
> 
> java
> 
> 
> 
> 
>
> com.concur.puma.molva.aspects.TestTarget
> 
> 
> 
> 
>
> The TestTarget class is a simple class (Pasting it here for completeness.)
> public class TestTarget {
>
> static Logger logger = Logger.getLogger(TestTarget.class);
>
> public static void main(String[] args) throws Exception {
> // Test case 01
> new TestTarget().test1();
>
> // Test case 02
> for(int i=0;i<10;i++) {
> testCountFast(1000);
> }
>
> // Test case 03
> for(int i=0;i<5;i++) {
> testCountSlow(1000);
> }
>
> // Test case 04
> //new TestTarget().test2();
> }
>
> public static void testCountSlow(int value) {
> count(value,5);
> System.out.println("slow count executed!");
> //logger.info("Slow count complete!");
> }
>
> public static void testCountFast(int value) {
> count(value,0);
> System.out.println("fast count executed!");
> //logger.info("Fast count complete!");
> }
>
> private static void count(int value, int delay) {
> for (int i=0;i try {
> Thread.sleep(delay);
> } catch (Exception e) {
> logger.error("Error occurred while sleeping the thread
> count", e);
> }
> }
> }
>
> public void test1() {
> //logger.info("TestTarget.test()");
> }
>
> public void test2() throws Exception {
> throw new Exception("Test exception");
> //logger.info(1/0);
> }
> }
>
> I have read some articles on the web and some a