1

我在 bea 8 中的共享库有问题。我想创建一个 jar 来管理来自 web 服务的响应,因此我为具有以下结构的共享库创建了一个 ear 文件:

mySharedLib.ear
     lib
        wsClient.jar
        some.jar
     META-INF
        application.xml
        MANIFEST.MF
     mySharedLib.jar

在 application.xml 我有这个:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
  <display-name>
    My Shared Lib
  </display-name>
  <module>
    <java>mySharedLib.jar</java>
  </module>
  <library-directory>lib</library-directory>
</application>

在清单中我有这个:

Implementation-Title: mySharedLib
Implementation-Version: 1.0
Specification-Title: mySharedLib
Specification-Version: 1.0
Extension-Name: mySharedLib

然后我将此耳朵作为库部署在管理服务器和托管服务器上。

在 WEB-INF\weblogic.xml 我的 webapp 中,我有这个:

<!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application 8.1//EN" "http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd">
<weblogic-web-app>
    <session-descriptor>
        <session-param>
            <param-name>PersistentStoreType</param-name>
            <param-value>replicated_if_clustered</param-value>
        </session-param>
        <session-param>
            <param-name>TimeoutSecs</param-name>
            <param-value>1800</param-value>
        </session-param>
    </session-descriptor>
       <library-ref>
        <library-name>mySharedLib</library-name>
        <specification-version>1.0</specification-version>
        <implementation-version>1.0</implementation-version>
        <exact-match>true</exact-match>
    </library-ref>
</weblogic-web-app>

当我在服务器上部署 webapp 时,我会检索此错误:

####<Jul 29, 2015 7:26:20 PM CEST> <Error> <Deployer> <bea01> <Server02> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1438190780090> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1438190773715' for task '1388'. Error is: 'weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved Webapp Library references for "weblogic.servlet.internal.WebAppServletContext@2bc856f - appName: 'WebApp', name: 'WebApp.war', context-path: '/WebApp'", defined in weblogic.xml [Extension-Name: mySharedLib, Specification-Version: 1, Implementation-Version: 1.0, exact-match: true].'
weblogic.management.DeploymentException: [J2EE:160149]Error while processing library references. Unresolved Webapp Library references for "weblogic.servlet.internal.WebAppServletContext@2bc856f - appName: 'WebApp', name: 'WebApp.war', context-path: '/WebApp'", defined in weblogic.xml [Extension-Name: mySharedLib, Specification-Version: 1, Implementation-Version: 1.0, exact-match: true].
    at weblogic.application.internal.flow.CheckLibraryReferenceFlow.prepare(CheckLibraryReferenceFlow.java:26)
    at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
    at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
    at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
    at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:98)
    at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:118)
    at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:719)
    at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1186)
    at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
    at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
    at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:464)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
4

0 回答 0