我最近将我们的 grails 应用程序从 1.3.7 升级到了 2.1.1。
我正在尝试将它部署到 JBoss 5.1,但遇到了问题。
我在部署期间收到以下错误:
Failed to create Resource myapp-2.0.war - cause: java.lang.RuntimeException:org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/myapp-2.0.war/ -> org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/myapp-2.0.war/ deployment failed DEPLOYMENTS IN ERROR:
Deployment "vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/myapp-2.0.war/" is in error due to the following reason(s): org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed -> org.jboss.deployers.client.spi.IncompleteDeploymentException:Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
*** DEPLOYMENTS IN ERROR: Name -> Error vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/app-2.0.war/ -> org.jboss.deployers.spi.DeploymentException:
URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed DEPLOYMENTS IN ERROR: Deployment "vfszip:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/deploy/app-2.0.war/" is in error due to the following reason(s):
org.jboss.deployers.spi.DeploymentException: URL file:/C:/Users/e034791/Documents/tools/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/tmp/4sp3y1b-x797w6-haf9ykfc-1-hafaajh5-ng/app-2.0.war/ deployment failed
经过多次谷歌搜索,我在 web-app/WEB-INF 下添加了以下文件:
jboss-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">
<jboss-web>
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
com.app.deals:loader=app-2.0.war
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
</jboss-web>
jboss-classloading.xml:
<?xml version="1.0" encoding="UTF-8"?>
<classloading xmlns="urn:jboss:classloading:1.0"
export-all="NON_EMPTY" import-all="true" domain="DefaultDomain"
top-level-classloader="true" parent-first="false">
</classloading>
jboss-scanning.xml
<?xml version='1.0' encoding='UTF-8' ?>
<scanning xmlns='urn:jboss:scanning:1.0'>
<path name='WEB-INF/lib/grails-datastore-gorm-*.jar'>
<include name='org.grails.datastore' />
</path>
</scanning>
阅读此链接
后,我添加了扫描文件。
但仍然没有运气。
有任何想法吗?