Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panel

Quick Links to:

Table of Contents
minLevel3
Panel

When deploying batchadmin to me local OC4J server, I get the following exception:

Code Block

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mbeanExporter': Invocation of init method failed; nested exception is org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.batch.admin.jmx.BatchMBeanExporter@4262d5d7] with key 'batchMBeanExporter';
nested exception is java.lang.SecurityException: Unauthorized access from application: batchadmin to MBean: spring.application:name=batchMBeanExporter,type=BatchMBeanExporter
Panel

My OC4J application deployment fails with a NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit.

  • The OC4J deployment fails with the error:  Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)

ANSWER:

  • The issue is that multiple (and old) versions of the "asm" jar are being deployed.   Do the following:
    1. remove the dependencies for the asm and cglib jars from the project pom.xml file.
    2. add a dependency for the cglib-nodep jar version 2.2.2 in your project pom.xml (this pulls in asm).
      Code Block
      <dependency>
          <groupId>cglib</groupId>
          <artifactId>cglib-nodep</artifactId>
          <version>2.2.2</version>
      </dependency>
      
    3. add exclusions for any other indirect dependencies of the cglib and asm jars (all versions).

...