4 Replies Latest reply: Apr 2, 2013 6:46 AM by 972794 RSS

    How to deploy a 11g ADF application on Tomcat 6.x

    vventin
      I am posting this after working on the example found at:

      http://blogs.oracle.com/dana/2009/01/how_to_deploy_a_11g_adf_applic_1.html

      It is an attempt to run an Oracle 11g ADF application that uses the Business Component framework.
      This is different from what you will find at Re: Tomcat 6 with 11g ADF JSF application startup problem!!!

      Dana attempts to get around the issue described in 11g: ADF Security on Tomcat? by changing from the use of the JspFilter to using a Datasource Connection.

      First of all, has anyone gotten this example to run?

      My attempt resulted in the following errors:

      From the catalina.log:

      SEVERE: oracle.adf.share.config.ConfigHelper
      java.lang.RuntimeException: java.lang.ClassCastException: oracle.adf.share.common.rc.util.impl.MetadataRegistryImpl cannot be cast to oracle.adf.share.common.rc.util.MetadataRegistry
           at oracle.adf.share.common.rc.util.MetadataRegistry.newInstance(MetadataRegistry.java:293)
           at oracle.adf.share.config.ConfigHelper.getRCUtils(ConfigHelper.java:131)
           at oracle.adf.share.config.ConfigHelper.getParsedElements(ConfigHelper.java:219)
           at oracle.adf.share.config.ADFSettingsImpl.parseSettings(ADFSettingsImpl.java:144)
           at oracle.adf.share.config.ADFSettingsImpl.readConfig(ADFSettingsImpl.java:134)
           at oracle.adf.share.config.ADFSettingsImpl.<init>(ADFSettingsImpl.java:68)
           at oracle.adf.share.config.ConfigContainerFactory.findOrCreateADFSettings(ConfigContainerFactory.java:79)
           at oracle.adf.share.config.ConfigContainerFactory.findOrCreateConfig(ConfigContainerFactory.java:59)
           at oracle.adf.share.ADFContext.getADFSettings(ADFContext.java:427)
           at oracle.adf.controller.config.ControllerSettings.getCurrent(ControllerSettings.java:49)
           at oracle.adf.controller.config.ControllerSettings.getPhaseListeners(ControllerSettings.java:72)
           at oracle.adf.controller.v2.lifecycle.ADFLifecycle.initControllerConfigListeners(ADFLifecycle.java:36)
           at oracle.adf.controller.v2.lifecycle.ADFLifecycle.setInstance(ADFLifecycle.java:20)
           at oracle.adfinternal.controller.faces.lifecycle.JSFLifecycleImpl.<init>(JSFLifecycleImpl.java:31)
           at oracle.adfinternal.controller.faces.lifecycle.ADFPhaseListener.<init>(ADFPhaseListener.java:37)
           at oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener.<init>(ADFLifecyclePhaseListener.java:24)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
           at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
           at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
           at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
           at java.lang.Class.newInstance0(Class.java:355)
           at java.lang.Class.newInstance(Class.java:308)
           at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:214)
           at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListeners(LifecycleConfigProcessor.java:141)
           at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:114)
           at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:94)
           at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:201)
           at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:184)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
           at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:516)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: java.lang.ClassCastException: oracle.adf.share.common.rc.util.impl.MetadataRegistryImpl cannot be cast to oracle.adf.share.common.rc.util.MetadataRegistry
           at oracle.adf.share.common.rc.util.MetadataRegistry.newInstance(MetadataRegistry.java:285)
           ... 52 more
      Jun 10, 2009 4:29:16 PM org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      Jun 10, 2009 4:29:16 PM org.apache.catalina.core.StandardContext start
      SEVERE: Context [adf-richclient-demo] startup failed due to previous errors

      From the localhost.log:

      SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
      Source Document: jar:file:/C:/j2ee/tomcat-6.0.18_8080/lib/adf-controller.jar!/META-INF/faces-config.xml
      Cause: Unable to create a new instance of 'oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener': oracle.adf.share.ADFShareException: Callback parsing error
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:211)
           at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:184)
           at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
           at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
           at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
           at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
           at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
           at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
           at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
           at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
           at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
           at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
           at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
           at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
           at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
           at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
           at org.apache.catalina.core.StandardService.start(StandardService.java:516)
           at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
           at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
           at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
      Caused by: com.sun.faces.config.ConfigurationException:
      Source Document: jar:file:/C:/j2ee/tomcat-6.0.18_8080/lib/adf-controller.jar!/META-INF/faces-config.xml
      Cause: Unable to create a new instance of 'oracle.adfinternal.controller.faces.lifecycle.ADFLifecyclePhaseListener': oracle.adf.share.ADFShareException: Callback parsing error
           at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractConfigProcessor.java:234)
           at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListeners(LifecycleConfigProcessor.java:141)
           at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:114)
           at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:94)
           at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132)
           at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:201)
           ... 25 more

      Let me know if you have a suggestion for resolving these errors.

      Thanks

      Vince
        • 1. Re: How to deploy a 11g ADF application on Tomcat 6.x
          Dana Singleterry-Oracle
          First off, Tomcat is not supported at this time so my blog is not official but a simple scenario that has worked for me and many others. I'm more than happy to assist you with the sample I've provided. Is that what you're using or have you created your on application. If it's your own application, package it up and send it to me and I can take a look. First thoughts is that you may not have the correct jars.
          • 2. Re: How to deploy a 11g ADF application on Tomcat 6.x
            vventin
            Thanks for the information Dana.

            I created a simple ADF application which uses a ADF entity object, view object and application module. I have one table that has an ID number field, and two text fields.

            This is connected to an ADF page with a table on it - index.jspx.

            I made the updates as you stated, such as changing the am to use a Datasource connection.

            The list of jar files that I deployed was from your list. However, I checked the files listed in the deployment profile WEB-INF/lib filters. There are fewer files in mine than what you listed. All of mine have been added to the Tomcat lib directory.

            Where can I send my app?

            Thanks again.
            • 3. Re: How to deploy a 11g ADF application on Tomcat 6.x
              vventin
              I have not heard back on this. I realize that Oracle does not support Tomcat or JBoss at this time but I felt that testing this might be helpful for others also.

              Has anyone had any success with deploying an 11g ADF application which uses ADF Business Components to either Tomcat or JBoss?

              I was able to deploy the Rich Faces Demo application without a problem to both Tomcat 6 and JBoss 4.2.3.

              I have not been able to deploy a very simple application that uses ADF BC. There seems to be a library conflict or missing library?

              Any help would be appreciated. I am trying to determine if there is a "JEE standard" deployment that will work for this.

              Thanks in advance.

              Vince
              • 4. Re: How to deploy a 11g ADF application on Tomcat 6.x
                972794
                Hi Dana,
                I am using JDEV 11.1.2.2.0. and tomcat 6.x. JDBC DB. I have followed the same steps you have given in your blog to deploy the application in the server. When I start running my application on the server, I am getting the following errors in the catalina log file.

                Apr 02, 2013 4:45:35 PM oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack contextInitialized
                SEVERE: ADFConnection mbean not registered for defaultApplicationName.
                Apr 02, 2013 4:45:35 PM oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack contextInitialized
                SEVERE:
                oracle.jrf.UnknownPlatformException: JRF is unable to determine the current application server platform.
                     at oracle.jrf.ServerPlatformSupportFactory.getInstance(ServerPlatformSupportFactory.java:79)
                     at oracle.adf.mbean.share.connection.ADFConnectionLifeCycleCallBack.contextInitialized(ADFConnectionLifeCycleCallBack.java:81)
                     at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
                     at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
                     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
                     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
                     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
                     at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
                     at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
                     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
                     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
                     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
                     at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
                     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
                     at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
                     at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
                     at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
                     at org.apache.catalina.core.StandardService.start(StandardService.java:525)
                     at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
                     at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                     at java.lang.reflect.Method.invoke(Unknown Source)
                     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
                     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

                Apr 02, 2013 4:45:35 PM oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack contextInitialized
                SEVERE: Failed to register config mbean for defaultApplicationName.

                Am I missing any steps? What is the cause of this error. My lcoalhost log file is empty. Please do help me. I am struck in this for so many days :(