3 Replies Latest reply: May 2, 2013 11:50 PM by Vijaya Moderator -Oracle RSS

    not able to deploy application with fast-swap enabled - weblogic 10.3

    978828
      Hi ,
      When i am trying to deploy my exploded directory by adding      

      <fast-swap>
      <enabled>true</enabled>
      </fast-swap>
           
      to weblogic.xml , i am getting following error

      ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent

      if remove fast-swap from my weblogic.xml it deploying successfully.
        • 1. Re: not able to deploy application with fast-swap enabled - weblogic 10.3
          Vijaya Moderator -Oracle
          Please paste the complete error stacktrace.

          Thnx,
          Vijaya
          • 2. Re: not able to deploy application with fast-swap enabled - weblogic 10.3
            978828
            Full stack trace
            <Apr 27, 2013 10:09:52 PM EDT> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar.
            org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.weaving.AspectJWeavingEnabler#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
                 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
                 Truncated. see log file for complete stacktrace
            org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loadTimeWeaver': Initialization of bean failed; nested exception is java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
                 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
                 Truncated. see log file for complete stacktrace
            java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar
                 at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:82)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1322)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                 at java.security.AccessController.doPrivileged(Native Method)
                 Truncated. see log file for complete stacktrace
            >
            <Apr 27, 2013 10:09:52 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1367114948992' for task '11'. Error is: 'weblogic.application.ModuleException: '
            weblogic.application.ModuleException:
                 at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1373)
                 at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
                 at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
                 at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                 Truncated. see log file for complete stacktrace
            java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar
                 at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:82)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1322)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                 at java.security.AccessController.doPrivileged(Native Method)
                 Truncated. see log file for complete stacktrace
            >
            <Apr 27, 2013 10:09:52 PM EDT> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 1 task for the application 'PDC_1306'.>
            <Apr 27, 2013 10:09:52 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'PDC_1306'.>
            <Apr 27, 2013 10:09:52 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
            weblogic.application.ModuleException:
                 at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1373)
                 at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
                 at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
                 at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
                 at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
                 Truncated. see log file for complete stacktrace
            java.lang.IllegalStateException: ClassLoader [com.bea.wls.redef.RedefiningClassLoader] does NOT provide an 'addTransformer(ClassFileTransformer)' method. Specify a custom LoadTimeWeaver or start your Java virtual machine with Spring's agent: -javaagent:spring-agent.jar
                 at org.springframework.context.weaving.DefaultContextLoadTimeWeaver.setBeanClassLoader(DefaultContextLoadTimeWeaver.java:82)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1322)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                 at java.security.AccessController.doPrivileged(Native Method)
                 Truncated. see log file for complete stacktrace
            • 3. Re: not able to deploy application with fast-swap enabled - weblogic 10.3
              Vijaya Moderator -Oracle
              Hi,

              The following types of changes are supported with FastSwap:

              Addition of static methods

              Removal of static methods

              Addition of instance methods

              Removal of instance methods

              Changes to static method bodies

              Changes to instance method bodies

              Addition of static fields

              Removal of static fields

              Addition of instance fields

              Removal of instance fields


              Can you please confirm what changes were made in the application after enabling the fast swap?

              However you should have ended up with UnsupportedOperationException if you've hit limitation on Fast swap as per the below doc

              http://docs.oracle.com/cd/E2432901/web.1211/e24443/deployunits.htm#i1054385_

              Also could you try enabling the fast swap in the weblogic-application.xml and let us know if it makes any difference?

              Below is for your information on Fast swap:

              Limitations When Using FastSwap

              The following limitations apply when using FastSwap deployment:

              Java reflection results do not include newly added fields and methods and include removed fields and methods. As a result, use of the reflection API on the modified classes can result in undesired behavior.

              Changing the hierarchy of an already existing class is not supported by FastSwap. For example, either a) changing the list of implemented interfaces of a class; or b) changing the superclass of a class, is not supported.

              Addition or removal of Java annotations is not supported by FastSwap, since this is tied to the reflection changes mentioned above.

              Addition or removal of methods on EJB Interfaces is not supported by FastSwap since an EJB Compilation step is required to reflect the changes at run time.

              Addition or removal of constants from Enums is not supported.

              Addition or removal of the finalize method is not supported.

              When you change a field name, the object state is not retained. This type of change occurs as follows: the field with the old name is deleted and a field with the new name is added. As such, any state in the old field is not carried over to the renamed field. You should expect an instance value to be reset when you change a field name.




              Thanks,
              Vijaya