将ear文件部署到weblogic 10g

时间:2013-02-21 11:52:39

标签: java weblogic ear

我在java ee中编写了项目。通过使用java ee版本6.当我尝试将我的ear文件部署到weblogic 10g时,我收到以下错误:

我怎样才能实现它?如何正确部署文件?

  

无法访问所选应用程序。       AppMerge流程中的例外情况'级数       AppMerge流程中的例外情况'级数       [J2EE:160161]解析1BB.ear的应用程序描述符时出错:       weblogic.descriptor.DescriptorException:Unmarshaller失败了       weblogic.descriptor.internal.MarshallerFactory $ 1.createDescriptor(MarshallerFactory.java:152)at at       weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)at at       weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)at at       weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)at at       weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)at at       weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)at at       weblogic.application.ApplicationDescriptor.getWeblogicApplicationDescriptor(ApplicationDescriptor.java:339)at at       weblogic.application.compiler.CompilerCtx.setApplicationDescriptor(CompilerCtx.java:139)位于weblogic.application.compiler.AppcUtils.setDDs(AppcUtils.java:142)at at       weblogic.application.compiler.flow.DescriptorParsingFlow.compile(DescriptorParsingFlow.java:57)       at weblogic.application.compiler.FlowDriver $ FlowStateChange.next(FlowDriver.java:69)       在       weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)       在weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)       at weblogic.application.compiler.FlowDriver $ CompilerFlowDriver.compile(FlowDriver.java:96)       at weblogic.application.compiler.ReadOnlyEarMerger.merge(ReadOnlyEarMerger.java:49)       在weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:94)       在weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:47)       at weblogic.application.compiler.FlowDriver $ FlowStateChange.next(FlowDriver.java:69)       在weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)       在weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)       at weblogic.application.compiler.FlowDriver $ CompilerFlowDriver.compile(FlowDriver.java:96)       在weblogic.application.compiler.AppMerge.runBody(AppMerge.java:157)       在weblogic.utils.compiler.Tool.run(Tool.java:158)       在weblogic.utils.compiler.Tool.run(Tool.java:115)       在weblogic.application.compiler.AppMerge.merge(AppMerge.java:169)       在weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:88)       在weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:63)       at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:181)       at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createLazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:156)       在weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:661)       在com.bea.console.actions.app.install.Flow $ 2.execute(Flow.java:463)       在com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.java:4625)       在com.bea.console.actions.app.install.Flow.appSelected(Flow.java:461)       at sun.reflect.GeneratedMethodAccessor1036.invoke(Unknown Source)       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)       在java.lang.reflect.Method.invoke(Method.java:597)       在org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)       在org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)       在org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)       在org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)       在org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)       在org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52)       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)       在org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access $ 201(PageFlowRequestProcessor.java:97)       在org.apache.beehive.netui.pageflow.PageFlowRequestProcessor $ ActionRunner.execute(PageFlowRequestProcessor.java:2044)       在org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors $ WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64)       在org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184)       在org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors $ WrapActionInterceptorChain.invoke(ActionInterceptors.java:50)       在org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors $ WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58)       在org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87)       在org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)       在com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:255)       在org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)       在org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)       在org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)       在org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)       在org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)       在com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)       在org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)       在com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)       在org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)       在com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:686)       在com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)       在com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:106)       在com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)       在com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)       在com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)       在com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)       在com.bea.netuix.nf.ControlLifecycle $ 2.visit(ControlLifecycle.java:180)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)       在com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)       在com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)       在com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)       在com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)       在com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)       在com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)       在com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)       在com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)       在com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)       在com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)       在javax.servlet.http.HttpServlet.service(HttpServlet.java:820)       在com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:54)       在weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)       在weblogic.servlet.internal.StubSecurityHelper $ ServletServiceAction.run(StubSecurityHelper.java:227)       在weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)       在weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)       在weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)       在weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)       在weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)       at weblogic.servlet.internal.WebAppServletContext $ ServletInvocationAction.run(WebAppServletContext.java:3496)       在weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)       在weblogic.security.service.SecurityManager.runAs(未知来源)       在weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)       在weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)       在weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)       在weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)       在weblogic.work.ExecuteThread.run(ExecuteThread.java:173)       引起:com.bea.xml.XmlException:无法加载与e = weblogic-application @ http://xmlns.oracle.com/weblogic/weblogic-application对应的java类型       在com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:361)       在com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:316)       在com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:326)       在com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:307)       在com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:158)       在com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)       在weblogic.descriptor.internal.MarshallerFactory $ 1.createDescriptor(MarshallerFactory.java:141)... 119以上。

这是我的weblogic-application.xml文件:

    <?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.0/weblogic-application.xsd"/>

3 个答案:

答案 0 :(得分:0)

尝试将3个文件添加到EAR:

1) META-INF \ application.xml

<?xml version="1.0" encoding="ASCII"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd" version="5">
  <display-name>My App</display-name>
  <module>
    <ejb>appEJB.jar</ejb>
  </module>
  <module>
    <web>
      <web-uri>app.war</web-uri>
      <context-root>app</context-root>
    </web>
  </module>
</application>

2) META-INF \ weblogic-application.xml

<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="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.0/weblogic-application.xsd">
    <!--weblogic-version:10.3.2-->
    <wls:application-param>
        <wls:param-name>webapp.encoding.default</wls:param-name>
        <wls:param-value>UTF-8</wls:param-value>
    </wls:application-param>
</wls:weblogic-application>

3) META-INF \ MANIFEST.MF

Manifest-Version: 1.0
Class-Path: 
Weblogic-Application-Version: 1.0

答案 1 :(得分:0)

在两种情况下可能会出现此错误,

  1. web.xml文件已损坏
  2. web.xml文件中缺少任何配置。
  3. web-app标签可能无法正确定义,具体取决于您的项目。
  4. 在我的情况下,错误原因是第一点。

答案 2 :(得分:0)

尝试保留web.xml @ WebContent而不是WEB-INF(如果有的话)。这解决了我的问题。