1 Reply Latest reply on Sep 9, 2013 9:46 AM by William Lovett

    Jmx Classloading Error with JDeveloper ADF 12c

    William Lovett Newbie

      All,

       

      Using JBoss EAP 6.1 which I believe is equivalent to AS 7.2.

       

      I'm trying to deploy a simple Hello World type ADF 12c application that uses ADF business components and an application module to JBoss.  This program works fine in Weblogic and Glassfish 3.1.  However, when I deploy the same application to JBoss I receive a variety of NoClassDefFoundError errors.  I'm pretty sure this is due to the application module as I can get a similar application to deploy successfully to JBoss if I pull out the Model/Datasource/Application Module.

       

      Here are the steps I've taken for deploying to JBoss

       

      1) Simple Hello World application using ADF 12c but without the model.  Program simply says "Hello." when navigating to the landing page.  All is well.

      2) I add a model and pull the "Hello" from the database instead.  I receive

      java.lang.ClassNotFoundException: oracle.as.jmx.framework.PortableMBeanFactory
      
      
      

      which leads me to believe I need to add some missing jars.  The corresponding log is "WithNothingAdded.log".

      3) I add jmxframework.jar from my JDeveloper installation to my WAR and receive new errors telling me

      Error loading the JMX FRamework SPI "oracle.as.jmx.framework.jboss.spi.JMXFrameworkProviderImpl"
      
      
      

      so I add jmxspi.jar from my JDeveloper installation to my WAR and receive new errors.  The log is "WithJmxFramework.log".

      4) Now I receive new errors telling me there is a ClassCastException.  This is detailed in "WithJmxAndSpiFramework.log".  This leads me to believe I'm doing it all wrong and need to load JBoss's jmx framework and spi.

      5) I include a jboss-deployment-structure.xml file in my EAR's WEB-INF folder.

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-deployment-structure>
        <deployment>
          <dependencies>
        <module name="org.jboss.as.jmx" export="true" />
        <module name="org.jboss.as.jpa.spi" export="true" />
          </dependencies>
        </deployment>
      </jboss-deployment-structure>
      
      
      

      6) I receive the same errors as in the very beginning telling me I am missing the JMX framework jars.  This is in "WithJBossDeploymentStructure.log".

       

      At this point I'm not sure what to do next.  Any ideas?

       

      Thanks in advance.

       

      Will

       

      PS:  Not sure if this is relevant, but here is my bc4j.xcfg file which configures my application module.

       

      <?xml version = '1.0' encoding = 'UTF-8'?>
      <BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">
        <AppModuleConfigBag ApplicationName="sample.model.AppModule">
          <AppModuleConfig name="AppModuleLocal" jbo.project="sample.model.Model" ApplicationName="sample.model.AppModule"
                           DeployPlatform="LOCAL">
            <Database jbo.TypeMapEntries="OracleApps"/>
            <Security AppModuleJndiName="sample.model.AppModule"/>
            <!-- Weblogic -->
            <!-- <Custom ns0:JDBCDataSource="java:comp/env/jdbc/SampleConnDS" xmlns:ns0="http://xmlns.oracle.com/bc4j/configuration"/> -->
            <!-- Glassfish 3.1 -->
            <!-- <Custom ns0:JDBCDataSource="jdbc/SampleConnDS" xmlns:ns0="http://xmlns.oracle.com/bc4j/configuration"/> -->
            <!-- JBoss EAP 6.1 ? -->
            <Custom ns0:JDBCDataSource="java:/SampleConnDS" xmlns:ns0="http://xmlns.oracle.com/bc4j/configuration"/>
          </AppModuleConfig>