10 Replies Latest reply: Nov 28, 2012 7:22 PM by 976855 RSS

    Unable to access the selected application. Exception in AppMerge flows'

    927069
      Recevied error when I am trying to deploy an ear at the first step in weblogic 12c (Same ear is fine in weblogic 10.3.2 and 10.3.6, never have this issue)

      Unable to access the selected application.
      Exception in AppMerge flows' progression
      Exception in AppMerge flows' progression
      Apps tool failure: Check nested exception for details
      java.lang.ArrayIndexOutOfBoundsException

      After searching google for a while, I used weblogic.appmerge to check and receive following exception stacktrace:
      $java -cp ~/Oracle/Middleware/wlserver_12.1/server/lib/weblogic.jar -verbose weblogic.appmerge my-1.0.ear


      <Mar 28, 2012 3:37:07 PM EDT> <Error> <J2EE> <BEA-160228> <AppMerge failed to merge your application. Merge again with the -verbose option for more details. See the error message(s) below.>
      Exception in thread "main" weblogic.utils.compiler.ToolFailureException: 48188
           at weblogic.application.compiler.FlowDriver.handleStateChangeException(FlowDriver.java:54)
           at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:38)
           at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:159)
           at weblogic.utils.compiler.Tool.run(Tool.java:158)
           at weblogic.utils.compiler.Tool.run(Tool.java:115)
           at weblogic.application.compiler.AppMerge.main(AppMerge.java:194)
           at weblogic.appmerge.main(appmerge.java:13)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: 48188
           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
           at weblogic.application.utils.annotation.ClassfinderClassInfos.populateClassInfos(ClassfinderClassInfos.java:137)
           at weblogic.application.utils.annotation.ClassfinderClassInfos.<init>(ClassfinderClassInfos.java:28)
           at weblogic.servlet.internal.War.initializeClassInfosIfNecessary(War.java:443)
           at weblogic.servlet.internal.War.getAnnotatedClasses(War.java:373)
           at weblogic.servlet.internal.WebBaseModuleExtensionContext.getAnnotatedClasses(WebBaseModuleExtensionContext.java:62)
           at weblogic.ejb.container.deployer.BaseModuleExtensionFactory.hasAnnotatedEJBs(BaseModuleExtensionFactory.java:43)
           at weblogic.ejb.tools.EJBToolsModuleExtensionFactory.create(EJBToolsModuleExtensionFactory.java:22)
           at weblogic.servlet.tools.WARModule.initModuleExtensions(WARModule.java:536)
           at weblogic.servlet.tools.WARModule.merge(WARModule.java:571)
           at weblogic.application.compiler.ToolsModuleWrapper.merge(ToolsModuleWrapper.java:96)
           at weblogic.application.utils.CustomModuleManager.merge(CustomModuleManager.java:78)
           at weblogic.application.compiler.flow.MergeModuleFlow.compile(MergeModuleFlow.java:40)
           at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
           at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
           at weblogic.application.compiler.BaseMerger.merge(BaseMerger.java:20)
           at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:75)
           at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:40)
           at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
           at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
           ... 5 more

      Any help and suggestions are greatly appreciated!
        • 1. Re: Unable to access the selected application. Exception in AppMerge flows'
          928954
          Where you able to fix this issue? I am having the same issue when trying to deploy a Spring Web MVC application to Weblogic 12c Application Server. Thanks.
          I am using ANT to build and all my dependencies are managed by Maven.

          <Apr 6, 2012 8:46:53 AM EDT> <Info> <Deployer> <BEA-149038> <Initiating task for myspringapp : [Deployer:149026]deploy application myspringapp on AdminServer..>
          <Apr 6, 2012 8:46:55 AM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1333716412802" for task "0". Error is: "java.lang.ArrayIndexOutOfBoundsException: 48188"
          java.lang.ArrayIndexOutOfBoundsException: 48188
               at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
               at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
               at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
               at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
               at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
               at weblogic.application.utils.annotation.ClassfinderClassInfos.populateClassInfos(ClassfinderClassInfos.java:137)
               at weblogic.application.utils.annotation.ClassfinderClassInfos.<init>(ClassfinderClassInfos.java:28)
               at weblogic.servlet.internal.War.initializeClassInfosIfNecessary(War.java:443)
               at weblogic.servlet.internal.War.getAnnotatedClasses(War.java:373)
               at weblogic.servlet.utils.WarUtils.isJsfApplication(WarUtils.java:222)
               at weblogic.servlet.internal.WebAppModule.detectJsfApplication(WebAppModule.java:278)
               at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:269)
               at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:636)
               at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
               at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:74)
               at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
               at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:312)
               at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:325)
               at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:378)
               at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
               at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
               at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
               at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:48)
               at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
               at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
               at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
               at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:96)
               at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:229)
               at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
               at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
               at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
               at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
               at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
               at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
               at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
               at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
               at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
               at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

          Thanks and regards
          Raj

          Edited by: user4803220 on Apr 6, 2012 6:07 AM
          • 2. Re: Unable to access the selected application. Exception in AppMerge flows'
            927069
            So far, no positive result.

            Here is my weblogic-application.xml under META-INF
            <?xml version="1.0" encoding="UTF-8"?>
            <weblogic-application xmlns="http://xmlns.oracle.com/weblogic/weblogic-application"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/javaee_5.xsd
            http://xmlns.oracle.com/weblogic/weblogic-application
            http://xmlns.oracle.com/weblogic/weblogic-application/1.4/weblogic-application.xsd">
            <application-param>
            <param-name>webapp.encoding.default</param-name>
            <param-value>UTF-8</param-value>
            </application-param>
            <prefer-application-packages>
            <package-name>org.apache.*</package-name>
                      <package-name>javax.xml.stream.*</package-name>
                      <package-name>org.dom4j.*</package-name>
                      <!--<package-name>com.sun.java.util.*</package-name>-->
            </prefer-application-packages>
            </weblogic-application>


            I couldn't directly paste web.xml and weblogic.xml because there are lot of contents exposing my current company's work, I am suspecting whether this piece is causing the issue:
            <prefer-application-packages>
            <package-name>org.apache.*</package-name>
                      <package-name>javax.xml.stream.*</package-name>
                      <package-name>org.dom4j.*</package-name>
                      <!--<package-name>com.sun.java.util.*</package-name>-->
            </prefer-application-packages>
            • 3. Re: Unable to access the selected application. Exception in AppMerge flows'
              user3214090
              This may or may not be relevant to your issue but try to uninstall "Basic WebLogic SIP Domain" that you chose while installing. You may need to recreate your domain with that option unselected.

              Edited by: user3214090 on Apr 6, 2012 5:08 PM
              • 4. Re: Unable to access the selected application. Exception in AppMerge flows'
                927069
                I did not pick SIP server, I remember there are 4 types, 1, basic, 2. SIP, 3 and 4 are jaxrpc/jaxws, I don't remember exactly.

                I did see a post from stacktrace.com, there was an answer regarding to this similar issue, but I did not have SIP server installed.
                • 5. Re: Unable to access the selected application. Exception in AppMerge flows'
                  Arunbodap-Oracle
                  Looks like the problem is occurring due to WLS trying to load an invalid class in the deployed war file.

                  I'm not sure why this problem didn't occur in 10.3.5
                  The only change w.r.t classloading is that WLS 10.3.5 didn't load classes that are identified as resource classes while 12c does it
                  The above change might have triggered this error to happen in 12c

                  WLS depends on simple java classloading (Class.forName) to load classes.

                  So, I would recommend to run a simple java program to test and identify which class in the war is causing the failure. (The program should recursively browse through the classes in the war file AND try to load them using Class.forName, any class that would fail to load might be the culprit. Most probably this could be due to a library that might have been included in WEB-INF\lib.
                  Since this is simple java classloading that is failing, we should focus on fixing that class to avoid this issue.


                  Arun
                  • 6. Re: Unable to access the selected application. Exception in AppMerge flows'
                    927069
                    Very interesting, I will do it and post update for it.

                    Thank you very much.
                    • 7. Re: Unable to access the selected application. Exception in AppMerge flows'
                      927069
                      No progress unfortunately, I wrote a listener and configured in web.xml, it is scanning all classes by Class.forName, it is working in weblogic 10.3.6, and listing all class names from the project source code, however, in weblogic 12c, it simply fail on the deployment step, never get the chance to load this listener.

                      Here is the stack trace, it has to be a flaw from weblogic 12c, my ear can be deployed in weblogic in every 10.3.* without any issues, but fail in weblogic 12c.
                      <Apr 9, 2012 3:55:39 PM EDT> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "1334001337083" for task "0". Error is: "java.lang.ArrayIndexOutOfBoundsException: 48188"
                      java.lang.ArrayIndexOutOfBoundsException: 48188
                           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
                           Truncated. see log file for complete stacktrace
                      Caused By: java.lang.ArrayIndexOutOfBoundsException: 48188
                           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
                           Truncated. see log file for complete stacktrace
                      >
                      <Apr 9, 2012 3:55:40 PM EDT> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating distribute task for application "my-ear-1.0".>
                      <Apr 9, 2012 3:55:40 PM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
                      java.lang.ArrayIndexOutOfBoundsException: 48188
                           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
                           Truncated. see log file for complete stacktrace
                      Caused By: java.lang.ArrayIndexOutOfBoundsException: 48188
                           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
                           Truncated. see log file for complete stacktrace
                      >
                      <Apr 9, 2012 3:55:40 PM EDT> <Error> <Console> <BEA-240003> <Administration Console encountered the following error: weblogic.application.WrappedDeploymentException: 48188
                           at com.bea.objectweb.asm.ClassReader.readClass(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at com.bea.objectweb.asm.ClassReader.accept(Unknown Source)
                           at weblogic.application.utils.annotation.ClassInfoImpl.<init>(ClassInfoImpl.java:45)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.polulateOneClassInfo(ClassfinderClassInfos.java:145)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.populateClassInfos(ClassfinderClassInfos.java:137)
                           at weblogic.application.utils.annotation.ClassfinderClassInfos.<init>(ClassfinderClassInfos.java:28)
                           at weblogic.servlet.internal.War.initializeClassInfosIfNecessary(War.java:443)
                           at weblogic.servlet.internal.War.getAnnotatedClasses(War.java:373)
                           at weblogic.servlet.internal.WebBaseModuleExtensionContext.getAnnotatedClasses(WebBaseModuleExtensionContext.java:62)
                           at weblogic.j2ee.managedbean.ManagedBeanModuleExtensionFactory.create(ManagedBeanModuleExtensionFactory.java:42)
                           at weblogic.servlet.internal.WebAppModule.initModuleExtensions(WebAppModule.java:562)
                           at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:271)
                           at weblogic.servlet.internal.WebAppModule.init(WebAppModule.java:636)
                           at weblogic.application.internal.flow.ScopedModuleDriver.init(ScopedModuleDriver.java:162)
                           at weblogic.application.internal.ExtensibleModuleWrapper.init(ExtensibleModuleWrapper.java:74)
                           at weblogic.application.internal.flow.ModuleListenerInvoker.init(ModuleListenerInvoker.java:84)
                           at weblogic.application.internal.flow.InitModulesFlow.initModule(InitModulesFlow.java:312)
                           at weblogic.application.internal.flow.InitModulesFlow.initModules(InitModulesFlow.java:325)
                           at weblogic.application.internal.flow.InitModulesFlow.prepare(InitModulesFlow.java:378)
                           at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:706)
                           at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
                           at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:237)
                           at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
                           at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
                           at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
                           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
                           at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:96)
                           at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:229)
                           at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
                           at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
                           at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
                           at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
                           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
                           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
                           at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
                           at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
                           at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                           at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
                      >
                      • 8. Re: Unable to access the selected application. Exception in AppMerge flows'
                        927069
                        I dispatch my ear, and only try to put war, and get this exception, it looks the error is from weblogic.

                        ####<Apr 9, 2012 4:22:17 PM EDT> <Error> <Console> <shenglin.oraclelinux> <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <bstwsdev1> <> <> <1334002937533> <BEA-240003> <Administration Console encountered the following error: weblogic.application.WrappedDeploymentException
                             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 weblogic.management.jmx.CompositeTypeThrowable.reconstitute(CompositeTypeThrowable.java:124)
                             at weblogic.management.jmx.CompositeDataInvocationHandler.newProxyInstance(CompositeDataInvocationHandler.java:61)
                             at weblogic.management.jmx.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:393)
                             at $Proxy104.getError(Unknown Source)
                             at com.bea.console.utils.MBeanChangeManager.distributeChanges(MBeanChangeManager.java:338)
                             at com.bea.console.actions.changemgmt.ActivateChangesAction.execute(ActivateChangesAction.java:40)
                             at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
                             at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
                             at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
                             at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:91)
                             at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
                             at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:261)
                             at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
                             at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
                             at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
                             at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
                             at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
                             at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:262)
                             at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
                             at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:134)
                             at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
                             at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129)
                             at com.bea.portlet.adapter.scopedcontent.framework.internal.PageFlowUtilsBeehiveDelegate.strutsLookupInternal(PageFlowUtilsBeehiveDelegate.java:43)
                             at com.bea.portlet.adapter.scopedcontent.framework.PageFlowUtils.strutsLookup(PageFlowUtils.java:108)
                             at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:707)
                             at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:141)
                             at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.processAction(StrutsStubImpl.java:72)
                             at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
                             at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
                             at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
                             at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
                             at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
                             at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
                             at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
                             at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
                             at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
                             at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
                             at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
                             at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465)
                             at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291)
                             at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219)
                             at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275)
                             at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
                             at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:64)
                             at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:125)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
                             at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
                             at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
                             at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
                             at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
                             at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
                             at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:74)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3288)
                             at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
                             at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                             at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
                             at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
                             at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
                             at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
                             at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
                             at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
                             at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
                             at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
                             at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
                        • 9. Re: Unable to access the selected application. Exception in AppMerge flows'
                          Arunbodap-Oracle
                          My suggestion was a simple java program outside WebLogic, by using a listener we are not doing anything different interms of classloading.
                          During deployment time WebLogic is still trying to load the classes required for the application/listener AND so it fails at deployment time.
                          As suspected earlier, if the issue is due to a library class, the behavior you see is expected.

                          My intent of requesting you to use a standalone java program is to isolate the problem and understand why only your application would throw such an error.
                          Here is the sample program I was intending you would use:
                          ClassLoadTest.java
                          ==================
                          import java.util.List;
                          import java.util.ArrayList;
                          import java.util.jar.JarInputStream;
                          import java.util.jar.JarFile;
                          import java.util.jar.JarEntry;
                          import java.util.Locale;
                          import java.io.FileInputStream;
                          import java.io.IOException;


                          public class ClassLoadTest {

                          public static void main(String[] args) {
                          try {
                          List classList = null;
                          classList = getClassesFromJARFile (args[0]);
                          }
                          catch(Exception e) {
                          System.out.println("Exception = " + e);
                          }
                          }

                          private static List getClassesFromJARFile(String jar)
                          {
                          final List classes = new ArrayList();
                          JarInputStream jarFile = null;
                          try
                          {
                          jarFile = new JarInputStream(new FileInputStream(jar));
                          JarEntry jarEntry = null;
                          do
                          {      
                          try
                          {
                          jarEntry = jarFile.getNextJarEntry();
                          }
                          catch(Exception ioe)
                          {
                          System.out.println("Unable to get next jar entry from jar file '"+jar+"'");
                          ioe.printStackTrace();
                          }
                          if (jarEntry != null)
                          {
                          extractClassFromJar(jar, classes, jarEntry);
                          }
                          } while (jarEntry != null);
                          closeJarFile(jarFile);
                          }
                          catch(Exception ioe)
                          {
                          System.out.println("Unable to get Jar input stream from '"+jar+"'");
                          ioe.printStackTrace();
                          }
                          finally
                          {
                          closeJarFile(jarFile);
                          }
                          return classes;
                          }

                          private static void extractClassFromJar(final String jar, final List classes, JarEntry jarEntry) throws IOException
                          {
                          String className = jarEntry.getName();
                          if (className.endsWith(".class"))
                          {
                          className = className.substring(0, className.length() - ".class".length());
                          try
                          {
                          classes.add(Class.forName(className.replace('/', '.')));
                          System.out.println("Successfully loaded class " + className);
                          } catch (ClassNotFoundException cnfe)
                          {
                          throw new IOException("unable to find class named " + className.replace('/', '.') + "' within jar '" + jar + "'", cnfe);
                          }
                          }
                          }

                          private static void closeJarFile(final JarInputStream jarFile)
                          {
                          if(jarFile != null)
                          {
                          try
                          {
                          jarFile.close();
                          }
                          catch(Exception ioe)
                          {
                          System.out.println("Unable to Close Jar File '"+jarFile+"'");
                          ioe.printStackTrace();
                          }
                          }
                          }

                          }
                          ==================
                          Where you would just pass the jar files in your WEB-INF\lib OR APP-INF\lib as argument
                          Something like:
                          D:\Middleware>D:\Middleware\wls1036\jdk160_29\bin\java -cp asm_1.0.0.0_3-1.jar;. ClassLoadTest asm_1.0.0.0_3-1.jar
                          If everything is good, you should see something like below output:
                          Successfully loaded class org/objectweb/asm/AnnotationVisitor
                          Successfully loaded class org/objectweb/asm/AnnotationWriter
                          Successfully loaded class org/objectweb/asm/Attribute
                          Successfully loaded class org/objectweb/asm/ByteVector
                          .....
                          .....
                          .....
                          Successfully loaded class org/objectweb/asm/signature/SignatureWriter

                          D:\Middleware>


                          Through the above program we would see what classes in the JAR are successfully loading and what classes are failing to load.
                          If all classes of all the JARs in APP-INF\lib are successfully loaded by the simple standalone JVM, then the issue is definitely confirmed to be with WebLogic and a bug would be confirmed.
                          As of now it still does not seems to be a bug.

                          Regarding why the behavior could be different between WLS10.3 and WLS12c, I already made an effort to answer it from my understanding of the changes between these 2 versions.
                          The only change w.r.t classloading is that WLS 10.3.5 didn't load classes that are identified as resource classes while 12c does it. The above change might have triggered this error to happen in 12c
                          It would be hard for me to exactly pin-point which change has contribute to that, this was an effort to guess from the symptoms and thus allowing us to understand the significance of isolating rather than confirming that this is weblogic bug and loosing valuable time in diagnosing a non-existing bug.

                          In any case, if you fee it could be a weblogic bug, feel free to open a support ticket and provide a sample test case (EAR/WAR) that would reproduce the issue.
                          I am sure similar tests will be requested are done before a bug will be opened by support for you.


                          Arun
                          • 10. Re: Unable to access the selected application. Exception in AppMerge flows'
                            976855
                            I wonder if you managed to fix this or not. From servlet 2.5 onwards, weblogic scans the application classes for certain annotations, and here it fails parsing some .class file most likely. I ran into something like this myself.

                            Using metadata-complete="true" in the web.xml descriptor still doesn't stop the scan, despite of what this page suggests http://docs.oracle.com/cd/E13222_01/wls/docs100/webapp/annotateservlet.html . The only thing that worked for me was setting the servlet version to 2.4 in the header of web.xml.