Oracle ADF:DCA-29000:捕获意外异常:java.lang.InstantiationException

Oracle ADF: DCA-29000: Unexpected exception caught: java.lang.InstantiationException

我需要使用 JavaBean 创建 DataControl。下面是我的beanclass

package com.wip.easyrun.model.datacontrol;

public class MainMenu {
    private String mainMenuItem;

    public MainMenu(String mainMenuItem) {
        super();
        this.mainMenuItem = mainMenuItem;
    }

    public final void setMainMenuItem(String mainMenuItem) {
        this.mainMenuItem = mainMenuItem;
    }

    public final String getMainMenuItem() {
        return mainMenuItem;
    }
}

以下是我的服务class

package com.wip.easyrun.model.datacontrol;

import java.util.ArrayList;
import java.util.List;

public class MainMenuDC {
    private List<MainMenu> mainMenuList = new ArrayList<>();

    public MainMenuDC(List<MainMenu> mainMenuList) {
        super();
        mainMenuList.add(new MainMenu("Business Health"));
        mainMenuList.add(new MainMenu("Operational Health"));
        mainMenuList.add(new MainMenu("Batch Job DashBoard"));
        mainMenuList.add(new MainMenu("Customization Health"));
        mainMenuList.add(new MainMenu("Admin"));
        this.mainMenuList = mainMenuList;
    }

    public final void setMainMenuList(List<MainMenu> mainMenuList) {
        this.mainMenuList = mainMenuList;
    }

    public final List<MainMenu> getMainMenuList() {
        return mainMenuList;
    }
}

我通过右键单击 MainMenuDC.java 创建了一个数据控件。之后我将它拖到 test.jsf。 test.jsf 包含一个 panelgrouplayout,我将其拖入其中作为 listView。当我 运行 此页面时,我得到以下异常。

[4288:6328:0325/105259:ERROR:connection_factory_impl.cc(354)] Failed to connect to MCS endpoint with error -111
    [4288:6920:0325/105312:ERROR:get_updates_processor.cc(240)] PostClientToServerMessage() failed during GetUpdates
    [4288:6328:0325/105319:ERROR:connection_factory_impl.cc(354)] Failed to connect to MCS endpoint with error -111
    <oracle.adf.model> <BeanDataControl> <<init>> <Fail to load datacontrol provider> 
    <oracle.adf.model> <DataControlFactoryImpl> <createSession> <Exception: > 
    oracle.adf.model.adapter.AdapterException: DCA-29000: Unexpected exception caught: java.lang.InstantiationException, msg=com.wip.easyrun.model.datacontrol.MainMenuDC
        at oracle.adf.model.adapter.bean.BeanDataControl.<init>(BeanDataControl.java:62)
        at oracle.adf.model.adapter.bean.BeanDCDefinitionDataControl.<init>(BeanDCDefinitionDataControl.java:43)
        at oracle.adf.model.adapter.bean.BeanDCDefinition.createDataControl(BeanDCDefinition.java:56)
        at oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:199)
        at oracle.adf.model.adapter.bean.BeanDCFactoryImpl.createSession(BeanDCFactoryImpl.java:74)
        at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:234)
        at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1351)
        at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1790)
        at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1652)
        at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1612)
        at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1484)
        at oracle.adf.model.BindingContext.get(BindingContext.java:1434)
        at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
        at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
        at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2752)
        at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2800)
        at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
        at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:340)
        at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1483)
        at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1614)
        at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2598)
        at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2533)
        at oracle.jbo.uicli.binding.MyIteratorBinding.initDataControl(JUAccessorIteratorDef.java:766)
        at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2533)
        at oracle.adf.model.binding.DCIteratorBinding.refresh(DCIteratorBinding.java:4671)
        at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:341)
        at oracle.jbo.uicli.binding.JUCtrlHierBinding.getRootNodeBinding(JUCtrlHierBinding.java:108)
        at oracle.adfinternal.view.faces.model.binding.BaseRowDataManager.calculateParent(BaseRowDataManager.java:131)
        at oracle.adfinternal.view.faces.model.binding.RowDataManager.getParent(RowDataManager.java:256)
        at oracle.adfinternal.view.faces.model.binding.RowDataManager.setRowIndex(RowDataManager.java:51)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$FacesModel.setRowIndex(FacesCtrlHierBinding.java:921)
        at org.apache.myfaces.trinidad.component.UIXCollection.setRowIndex(UIXCollection.java:572)
        at oracle.adfinternal.view.faces.renderkit.rich.ListViewRenderer._renderDataBlockItems(ListViewRenderer.java:1019)
        at oracle.adfinternal.view.faces.renderkit.rich.ListViewRenderer._encodeAllListViewContent(ListViewRenderer.java:599)
        at oracle.adfinternal.view.faces.renderkit.rich.ListViewRenderer.encodeAll(ListViewRenderer.java:445)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:676)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:455)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access00(PanelGroupLayoutRenderer.java:30)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:761)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:653)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:295)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:366)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2367)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer.encodeDeckChild(DeckRenderer.java:709)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer.access00(DeckRenderer.java:41)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer$DeckEncoderCallback.processComponent(DeckRenderer.java:870)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer$DeckEncoderCallback.processComponent(DeckRenderer.java:748)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:295)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer._encodeAllOrVisitChildrenForEncodingImpl(DeckRenderer.java:603)
        at oracle.adfinternal.view.faces.renderkit.rich.DeckRenderer.encodeAll(DeckRenderer.java:407)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2367)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer.encodeCellComponent(PanelGridLayoutRenderer.java:1224)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellChildrenEncoderCallback.processComponent(CellChildrenEncoderCallback.java:38)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellChildrenEncoderCallback.processComponent(CellChildrenEncoderCallback.java:20)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:249)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellEncoderCallback.processComponent(CellEncoderCallback.java:271)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellEncoderCallback.processComponent(CellEncoderCallback.java:24)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:249)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.RowEncoderCallback.processComponent(RowEncoderCallback.java:74)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.RowEncoderCallback.processComponent(RowEncoderCallback.java:22)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:295)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer._encodeAllOrVisitChildrenForEncodingImpl(PanelGridLayoutRenderer.java:1042)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer.encodeAll(PanelGridLayoutRenderer.java:314)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeFacet(DecorativeBoxRenderer.java:633)
        at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeCenterPane(DecorativeBoxRenderer.java:1088)
        at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer._encodeWithSimpleBorders(DecorativeBoxRenderer.java:594)
        at oracle.adfinternal.view.faces.renderkit.rich.DecorativeBoxRenderer.encodeAll(DecorativeBoxRenderer.java:326)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2367)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer.encodeCellComponent(PanelGridLayoutRenderer.java:1224)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellChildrenEncoderCallback.processComponent(CellChildrenEncoderCallback.java:38)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellChildrenEncoderCallback.processComponent(CellChildrenEncoderCallback.java:20)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:249)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellEncoderCallback.processComponent(CellEncoderCallback.java:271)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.CellEncoderCallback.processComponent(CellEncoderCallback.java:24)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:249)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.RowEncoderCallback.processComponent(RowEncoderCallback.java:74)
        at oracle.adfinternal.view.faces.renderkit.rich.grid.RowEncoderCallback.processComponent(RowEncoderCallback.java:22)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:198)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:330)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:295)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer._encodeAllOrVisitChildrenForEncodingImpl(PanelGridLayoutRenderer.java:1042)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGridLayoutRenderer.encodeAll(PanelGridLayoutRenderer.java:314)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:664)
        at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3234)
        at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:275)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:647)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:664)
        at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3234)
        at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1507)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1600)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:525)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:1217)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782)
        at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:102)
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
        at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)
        at org.apache.myfaces.trinidad.view.ViewDeclarationLanguageWrapper.renderView(ViewDeclarationLanguageWrapper.java:101)
        at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:338)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
        at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:170)
        at oracle.adfinternal.view.faces.lifecycle.ResponseRenderManager.runRenderView(ResponseRenderManager.java:52)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1095)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:389)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:255)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:502)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at oracle.security.jps.ee.http.JpsAbsFilter.run(JpsAbsFilter.java:137)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:460)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:120)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:217)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:81)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:220)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
        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:2285)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
        at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:263)
    Caused by: java.lang.InstantiationException: com.wip.easyrun.model.datacontrol.MainMenuDC
        at java.lang.Class.newInstance(Class.java:359)
        at oracle.adf.model.adapter.bean.BeanDCConfiguration.getDCProvider(BeanDCConfiguration.java:104)
        at oracle.adf.model.adapter.bean.BeanDataControl.<init>(BeanDataControl.java:51)
        ... 194 more
    ## Detail 0 ##
    java.lang.InstantiationException: com.wip.easyrun.model.datacontrol.MainMenuDC
        at java.lang.Class.newInstance(Class.java:359)
        at oracle.adf.model.adapter.bean.BeanDCConfiguration.getDCProvider(BeanDCConfiguration.java:104)
        at oracle.adf.model.adapter.bean.BeanDataControl.<init>(BeanDataControl.java:51)
        at oracle.adf.model.adapter.bean.BeanDCDefinitionDataControl.<init>(BeanDCDefinitionDataControl.java:43)
        at oracle.adf.model.adapter.bean.BeanDCDefinition.createDataControl(BeanDCDefinition.java:56)
        at oracle.adf.model.adapter.DataControlFactoryImpl.createSession(DataControlFactoryImpl.java:199)
        at oracle.adf.model.adapter.bean.BeanDCFactoryImpl.createSession(BeanDCFactoryImpl.java:74)
        at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:234)
        at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1351)
        at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1790)
        at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1652)
        at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1612)
        at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1484)
        at oracle.adf.model.BindingContext.get(BindingContext.java:1434)
        at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
        at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
        at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2752)
        at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2800)
        at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
        at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:340)
        at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1483)
        at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1614)
        at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2598)
        at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2533)
        at oracle.jbo.uicli.binding.MyIteratorBinding.initDataControl(JUAccessorIteratorDef.java:766)
        at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2533)

你不能有带参数的构造函数,例如:

public MainMenuDC(List<MainMenu> mainMenuList)

您的数据控件需要一个默认构造函数,没有参数:

public MainMenuDC()

MainMenuDC 需要有一个默认构造函数,因为在运行时它会被反射实例化并引用默认构造函数。

此外,据我所知,您实际上不需要构造函数中的 List 参数。将其重构为如下形式:

public MainMenuDC() {
    mainMenuList.add(new MainMenu("Business Health"));
    mainMenuList.add(new MainMenu("Operational Health"));
    mainMenuList.add(new MainMenu("Batch Job DashBoard"));
    mainMenuList.add(new MainMenu("Customization Health"));
    mainMenuList.add(new MainMenu("Admin"));
}

然后,再次右键单击 class 并重新生成数据控件。