warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

I have used aspectj that is in turn used by Allure Reporting tool in my pom.xml. When I run the suite through maven, I get warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

After a while the classes that contain my tests will stop and I get Unreachable browser exception. I run the same suite through testng.xml and works like a charm. I feel that because of this warning, the classes stop getting called.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.unilog.project</groupId>
  <artifactId>standardTemplate.project</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>

  <name>ProjectSuite</name>
  <url>http://maven.apache.org</url>

 <properties>
        <compiler.version>1.7</compiler.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <version.allure>1.4.3</version.allure>
        <version.aspectj>1.7.4</version.aspectj>
        <version.cucumber>1.2.0</version.cucumber>
        <version.selenium>2.53.0</version.selenium>
        <version.slf4j>1.7.7</version.slf4j>
        <version.phantomjs>1.9.7</version.phantomjs>

    </properties>

    <dependencies>
        <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-htmlunit-driver</artifactId>
        <version>2.52.0</version>
        </dependency>

    <dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>2.7.0</version>
  </dependency>



    <dependency>
    <groupId>com.pojosontheweb</groupId>
    <artifactId>monte-repack</artifactId>
    <version>1.0</version>
    </dependency>


    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>2.9.0</version>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>${version.selenium}</version>
    </dependency>

 <!-- custom excelread library using apachePOI -->   
    <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi</artifactId>
    <version>3.13</version>
</dependency>

    <dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml</artifactId>
    <version>3.13</version>
</dependency>

<dependency>
    <groupId>org.apache.poi</groupId>
    <artifactId>poi-ooxml-schemas</artifactId>
    <version>3.13</version>
</dependency>

<!-- zipturnaround -->
    <dependency>
    <groupId>org.zeroturnaround</groupId>
    <artifactId>zt-zip</artifactId>
    <version>1.7</version>
    </dependency>


 <!-- java mail -->
    <dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4.7</version>
</dependency>

        <!-- Selenium and Drivers -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${version.selenium}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
        <groupId>com.github.detro.ghostdriver</groupId>
        <artifactId>phantomjsdriver</artifactId>
        <version>1.1.0</version>
        </dependency>       

        <dependency>
        <groupId>com.github.detro</groupId>
        <artifactId>phantomjsdriver</artifactId>
        <version>1.2.0</version>
        </dependency>


    <dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-server</artifactId>
    <version>${version.selenium}</version>
    </dependency>

    <dependency>
    <groupId>com.google.code.gson</groupId>
    <artifactId>gson</artifactId>
    <version>2.3.1</version>
    </dependency>


        <!-- Utils -->

        <dependency>
            <groupId>ru.yandex.qatools.properties</groupId>
            <artifactId>properties-loader</artifactId>
            <version>1.5</version>
            </dependency>
        <dependency>
    <groupId>org.hamcrest</groupId>
    <artifactId>hamcrest-all</artifactId>
    <version>1.3</version>
</dependency>

        <dependency>
            <groupId>com.relevantcodes</groupId>
            <artifactId>extentreports</artifactId>
            <version>2.05</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${version.slf4j}</version>
            <scope>test</scope>
        </dependency>

        <!-- Allure Reporter -->


        <dependency>
            <groupId>ru.yandex.qatools.allure</groupId>
            <artifactId>allure-testng-adaptor</artifactId>
            <version>${version.allure}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.9.6</version>
        </dependency>

        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6</version>
        </dependency>


    </dependencies>

    <build>
     <plugins>
            <plugin>
                <groupId>com.github.klieber</groupId>
                <artifactId>phantomjs-maven-plugin</artifactId>
                <version>0.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>install</goal>
                        </goals>    
                    </execution>
                </executions>
                <configuration>
                    <version>${version.phantomjs}</version>
                </configuration>
            </plugin>

                <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.10.v20150310</version>
                <configuration>
                    <webAppSourceDirectory>${project.build.directory}/site/allure-maven-plugin</webAppSourceDirectory>
                    <stopKey>stop</stopKey>
                    <stopPort>1234</stopPort>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${compiler.version}</source>
                    <target>${compiler.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <argLine>
                      -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${version.aspectj}/aspectjweaver-${version.aspectj}.jar
                    </argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${version.aspectj}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            com.github.klieber
                                        </groupId>
                                        <artifactId>
                                            phantomjs-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [0.4,)
                                        </versionRange>
                                        <goals>
                                            <goal>install</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <excludeDefaults>true</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>ru.yandex.qatools.allure</groupId>
                <artifactId>allure-maven-plugin</artifactId>
                <version>2.0</version>
                <configuration>
                    <reportVersion>${version.allure}</reportVersion>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>

aop.xml

<aspectj>
    <weaver options="-Xset:weaveJavaxPackages=true">        
        <include within="my.app.*"/>
        <include within="javax.persistence.*"/>
    </weaver>
    <aspects>
        <aspect name="my.app.MyAspect" />
    </aspects>
</aspectj>

javax.* types are not being woven because the weaver option '-Xset , ERROR [STDERR] (main) [BaseClassLoader@5ec7640b] warning javax.* types are not being woven because the weaver option  ERROR [STDERR] (main) [BaseClassLoader@5ec7640b] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified in JBoss EAP - Red Hat Customer Portal

First of all as many people mentioned this is a warning and it's not related to your issue.

Secondly, you should weave javax classes only if you have very specific purpose like weaving an aspect to trace HttpServlet api or some other javax.* stuff.

Finally, if you decided to weave javax.* it's not terribly wrong, but it may affect performance.

Btw, there is a bug opened for this warning message: eclipse bug 365702

That said, you should really ignore that warning message.

some discussion related to allowing to weave javax.*

just another advice similar to mine

Should I be concerned about the warning log message on EM , contains the following warning message: [com.wily.apm.tess] warning javax.* types are not being woven because the weaver option '-Xs. [JClassLoader@179935d] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified [JClassLoader@bf053f] info AspectJ Weaver Version DEVELOPMENT built on ThursdayDec 18, 2008 at 18:33:02 GMT [JClassLoader@bf053f] info register classloader org.objectweb.jonas.server.JClassLoader@bf053f

I changed my jdk to jdk8. It helped me.

users - Xset:weaveJavaxPackage not read in aop.xml, [AppClassLoader@df6ccd] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not  [FactoryURLClassLoader@44faa4f2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified matozoid added Symbol Solver Bug report labels Jul 7, 2019

You can create a file resources/META-INF/aop.xml with the following context that will turn off all warnings:

<aspectj>
    <weaver options="-nowarn"/>
</aspectj>

[AppClassLoader@6ed3ef1] warning javax.* types are not being , [AppClassLoader@6ed3ef1] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified. and a warning: "[AppClassLoad@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified" They do not seem to affect functionality though. Greetings. Klaas

AJDT » weaving java and javax classes, [AppClassLoader@fabe9] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not  [AppClassLoader@18b4aac2] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified

365702 – Useless warning on javax.* types, Still, we get "[JClassLoader@65b60280] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been  2014-09-05 08:42:12.500 INFO 65053 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] [AppClassLoader@58644d46] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been

Can't get load time weaving with aspectj to work · Issue #1521 , [AppClassLoader@58644d46] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has  @DumbDev hi, sorry for the delay. Seems like your app have a huge classpath. So all you need is create aop.xml and configure aspectJ to process only your project classes. An example if all your tests and steps located under my.company.app package create META-INF/aop.xml file with the following content:

Comments
  • I have the same problem. Any update on this?
  • @paul Any update by any of you guys?
  • Nope nobody response
  • Possible duplicate of How to set Spring weaver options in Java config class?
  • Because this old question just popped up in my news feed due to the new answer: The AspectJ warning is most probably not related to the problem. Where is your reproducible test case for this? A POM alone does not explain anything. I see no test, application or aspect code.
  • While it removes the warning, it's not the right thing to do unless you really need to weave javax.*.