You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@servicemix.apache.org by "Davy Herben (JIRA)" <ji...@apache.org> on 2015/11/25 11:03:10 UTC

[jira] [Updated] (SM-2744) org.apache.servicemix.bundles.aspectj does not include repackaged aj.org.objectweb.asm.* packages from aspectjweaver jar

     [ https://issues.apache.org/jira/browse/SM-2744?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davy Herben updated SM-2744:
----------------------------
    Description: 
During the process of a Spring 3->4 and java7->java8 upgrade in our osgi environment, we switched from the spring-provided aspectjrt and aspectweaver bundles to the org.apache.servicemix.bundles.aspectj 1.8.7_1 version from the default maven repo. The description for this bundle is:

This OSGi bundle wraps aspectjrt and aspectjweaver 1.8.7 jar files.

In reality though, the servicemix bundle only wraps the org.aspectj.* packages from these jar files. It does NOT bundle the renamed ASM library packages from the aspectjweaver jar, in packages aj.org.objectweb.asm.*

The result of this is that AspectJ will (without any error or other message) start generating classes without StackMap frames (it checks for the presence of some classes in the aj.org.objectweb.asm package to determine if ASM is available.

I believe that NOT including this package was intentional, based on the presence of the following in the pom.xml: 

<servicemix.osgi.import.pkg>
javax.xml*, org.xml.sax*, com.bea.jvm;resolution:=optional, org.objectweb.asm;resolution:=optional, org.apache.commons.logging;resolution:=optional, aj.org.objectweb.asm;resolution:=optional
</servicemix.osgi.import.pkg>

This suggests to me that this bundle expects either the aj.org.objectweb.asm or the original org.objectweb.asm package to be available. However, AspectJ will only generate correct bytecode (for Java 1.7+) if aj.org.objectweb.asm is available, it will ignore org.objectweb.asm.

As far as I can see, there is no osgi bundle available (from servicemix or elsewhere) that provides these aj.org.objectweb.asm packages.

Suggested fix: either include the aj.org.objectweb.asm.* packages into the bundle, or provide these missing packages in another bundle

  was:
During the process of a Spring 3->4 and java7->java8 upgrade in our osgi environment, we switched from the spring-provided aspectjrt and aspectweaver bundles to the org.apache.servicemix.bundles.aspectj 1.8.7_1 version from the default maven repo. The description for this bundle is:

This OSGi bundle wraps aspectjrt and aspectjweaver 1.8.7 jar files.

In reality though, the servicemix bundle only wraps the org.aspectj.* packages from these jar files. It does NOT bundle the renames ASM library packages from the aspectjweaver jar, in packages aj.org.objectweb.asm.*

The result of this is that AspectJ will (without any error or other message) start generating classes without StackMap frames (it checks for the presence of some classes in the aj.org.objectweb.asm package to determine if ASM is available.

I believe that NOT including this package was intentional, based on the presence of the following in the pom.xml: 

<servicemix.osgi.import.pkg>
javax.xml*, org.xml.sax*, com.bea.jvm;resolution:=optional, org.objectweb.asm;resolution:=optional, org.apache.commons.logging;resolution:=optional, aj.org.objectweb.asm;resolution:=optional
</servicemix.osgi.import.pkg>

This suggests to me that this bundle expects either the aj.org.objectweb.asm or the original org.objectweb.asm package to be available. However, AspectJ will only generate correct bytecode (for Java 1.7+) if aj.org.objectweb.asm is available, it will ignore org.objectweb.asm.

As far as I can see, there is no osgi bundle available (from servicemix or elsewhere) that provides these aj.org.objectweb.asm packages.

Suggested fix: either include the aj.org.objectweb.asm.* packages into the bundle, or provide these missing packages in another bundle


> org.apache.servicemix.bundles.aspectj does not include repackaged aj.org.objectweb.asm.* packages from aspectjweaver jar
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-2744
>                 URL: https://issues.apache.org/jira/browse/SM-2744
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: bundles
>            Reporter: Davy Herben
>
> During the process of a Spring 3->4 and java7->java8 upgrade in our osgi environment, we switched from the spring-provided aspectjrt and aspectweaver bundles to the org.apache.servicemix.bundles.aspectj 1.8.7_1 version from the default maven repo. The description for this bundle is:
> This OSGi bundle wraps aspectjrt and aspectjweaver 1.8.7 jar files.
> In reality though, the servicemix bundle only wraps the org.aspectj.* packages from these jar files. It does NOT bundle the renamed ASM library packages from the aspectjweaver jar, in packages aj.org.objectweb.asm.*
> The result of this is that AspectJ will (without any error or other message) start generating classes without StackMap frames (it checks for the presence of some classes in the aj.org.objectweb.asm package to determine if ASM is available.
> I believe that NOT including this package was intentional, based on the presence of the following in the pom.xml: 
> <servicemix.osgi.import.pkg>
> javax.xml*, org.xml.sax*, com.bea.jvm;resolution:=optional, org.objectweb.asm;resolution:=optional, org.apache.commons.logging;resolution:=optional, aj.org.objectweb.asm;resolution:=optional
> </servicemix.osgi.import.pkg>
> This suggests to me that this bundle expects either the aj.org.objectweb.asm or the original org.objectweb.asm package to be available. However, AspectJ will only generate correct bytecode (for Java 1.7+) if aj.org.objectweb.asm is available, it will ignore org.objectweb.asm.
> As far as I can see, there is no osgi bundle available (from servicemix or elsewhere) that provides these aj.org.objectweb.asm packages.
> Suggested fix: either include the aj.org.objectweb.asm.* packages into the bundle, or provide these missing packages in another bundle



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)