Grails 1.3.7 未随 JBoss 7.1 一起启动

发布于 2025-01-04 00:16:44 字数 8136 浏览 3 评论 0原文

我的公司正在尝试从 JBoss 4.2.3 升级到 JBoss 7。目前我已经设置了 JBoss 7.1 的本地副本并正在尝试让我的 grails 项目在 JBoss 7.1 上运行 完全相同的战争在 JBoss 4.2.3 中运行得很好。奇怪的是没有任何错误。以下是启动信息:

    Calling "C:\JBoss\jboss-as-7.1.0\bin\standalone.conf.bat"
===============================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: C:\JBoss\jboss-as-7.1.0

  JAVA: C:\Java\jdk7\bin\java

  JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.cl
ient.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman

===============================================================================

15:02:53,200 INFO  [org.jboss.modules] JBoss Modules version 1.1.0.GA
15:02:53,414 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
15:02:53,457 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final-SNAPSHOT "Flux Capacitor" starting
15:02:54,062 INFO  [org.xnio] XNIO Version 3.0.0.GA
15:02:54,062 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-h
ttp)
15:02:54,075 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.0.GA
15:02:54,082 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.0.GA
15:02:54,110 INFO  [org.jboss.as.security] JBAS013101: Activating Security Subsystem
15:02:54,112 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.
15:02:54,128 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
15:02:54,133 INFO  [org.jboss.as.naming] JBAS011800: Activating Naming Subsystem
15:02:54,139 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.6.final
15:02:54,139 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 50) JBAS015537: Activating WebServices Exten
sion
15:02:54,145 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 27) JBAS016200: Activating ConfigAdmin Subsy
stem
15:02:54,156 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 41) JBAS011940: Activating OSGi Subsystem
15:02:54,164 INFO  [org.jboss.as.connector] (MSC service thread 1-9) JBAS010408: Starting JCA Subsystem (JBoss IronJacam
ar 1.0.7.Final)
15:02:54,199 INFO  [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
15:02:54,201 INFO  [org.jboss.as.jaxr] (MSC service thread 1-2) Binding JAXR ConnectionFactory: java:jboss/jaxr/Connecti
onFactory
15:02:54,221 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deployi
ng JDBC-compliant driver class org.h2.Driver (version 1.3)
15:02:54,231 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-16) JBAS015400: Bound mail session [java:jboss/ma
il/Default]
15:02:54,254 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010404: Deployi
ng non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
15:02:55,312 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - S
tack CXF Server 4.0.1.GA
15:02:55,416 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447
15:02:55,434 INFO  [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-15) Starting Coyote HTTP/1.1 on ht
tp--127.0.0.1-8080
15:02:55,515 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data sourc
e [java:jboss/datasources/ExampleDS]
15:02:55,521 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-14) JBAS010400: Bound data sour
ce [java:jboss/datasources/MySqlDS]
15:02:55,575 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:9999
15:02:55,584 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-15) JBAS015012: Started FileSystemDepl
oymentService for directory C:\JBoss\jboss-as-7.1.0\standalone\deployments
15:02:55,695 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "ServerC
onfig.war"
15:02:56,941 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-9) JBossOSGi Framework Core -
 1.1.1
15:02:56,975 ERROR [org.jboss.as] (MSC service thread 1-12) JBAS015875: JBoss AS 7.1.0.Final-SNAPSHOT "Flux Capacitor" s
tarted (with errors) in 4090ms - Started 170 of 245 services (1 services failed or missing dependencies, 72 services are
 passive or on-demand)
15:02:57,047 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-10) Install bundle: system.bu
ndle:0.0.0
15:02:57,269 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-10) Install bundle: javax.api
:0.0.0
15:02:57,270 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-5) Install bundle: javax.tran
saction.api:0.0.0
15:02:57,270 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-12) Install bundle: jbosgi-re
pository-api:1.0.4
15:02:57,330 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-2) Install bundle: jboss-as-o
sgi-configadmin:7.1.0.Final-SNAPSHOT
15:02:57,348 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-3) Install bundle: jboss-osgi
-logging:1.0.0
15:02:57,378 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-8) Install bundle: org.apache
.felix.log:1.0.0
15:02:57,379 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-1) Install bundle: org.apache
.felix.configadmin:1.2.8
15:02:57,378 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-11) Install bundle: jbosgi-ht
tp-api:1.0.5
15:02:57,535 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-6) Install bundle: osgi.enter
prise:4.2.0.201003190513
15:02:57,931 INFO  [org.jboss.osgi.framework.internal.StartLevelPlugin] (MSC service thread 1-2) Starting bundles for st
art level: 1
15:02:57,936 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: osgi.ent
erprise:4.2.0.201003190513
15:02:57,941 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: javax.ap
i:0.0.0
15:02:57,952 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jboss-os
gi-logging:1.0.0
15:02:57,959 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: javax.tr
ansaction.api:0.0.0
15:02:57,964 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jbosgi-h
ttp-api:1.0.5
15:02:57,967 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jbosgi-r
epository-api:1.0.4
15:02:57,984 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: org.apac
he.felix.configadmin:1.2.8
15:02:58,001 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: org.apac
he.felix.log:1.0.0
15:02:58,007 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jboss-as
-osgi-configadmin:7.1.0.Final-SNAPSHOT
15:02:58,013 INFO  [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-2) OSGi Framework started
15:02:58,030 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-12) Install bundle: ServerCon
fig:0.1.0
15:02:58,071 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ServerConfig.war"
15:02:58,568 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-14) Bundle started: ServerConfig:0.1.0

============================================ =======================================

我还检查了 JBoss 7 server.log 并没有显示错误。谁能帮我解决这个问题吗?

My company is trying to upgrade from JBoss 4.2.3 to JBoss 7. Currently I've setup a local copy of JBoss 7.1 and am trying to get my grails project to work on JBoss 7.1
The exact same war works just fine in JBoss 4.2.3. The weird thing is that there aren't any errors. Here is the info from the startup:

    Calling "C:\JBoss\jboss-as-7.1.0\bin\standalone.conf.bat"
===============================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: C:\JBoss\jboss-as-7.1.0

  JAVA: C:\Java\jdk7\bin\java

  JAVA_OPTS: -XX:+TieredCompilation -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.cl
ient.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.war
ning=true -Djboss.modules.system.pkgs=org.jboss.byteman

===============================================================================

15:02:53,200 INFO  [org.jboss.modules] JBoss Modules version 1.1.0.GA
15:02:53,414 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
15:02:53,457 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final-SNAPSHOT "Flux Capacitor" starting
15:02:54,062 INFO  [org.xnio] XNIO Version 3.0.0.GA
15:02:54,062 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-h
ttp)
15:02:54,075 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.0.GA
15:02:54,082 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.0.GA
15:02:54,110 INFO  [org.jboss.as.security] JBAS013101: Activating Security Subsystem
15:02:54,112 INFO  [org.jboss.as.clustering.infinispan] JBAS010280: Activating Infinispan subsystem.
15:02:54,128 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
15:02:54,133 INFO  [org.jboss.as.naming] JBAS011800: Activating Naming Subsystem
15:02:54,139 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.6.final
15:02:54,139 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 50) JBAS015537: Activating WebServices Exten
sion
15:02:54,145 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 27) JBAS016200: Activating ConfigAdmin Subsy
stem
15:02:54,156 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 41) JBAS011940: Activating OSGi Subsystem
15:02:54,164 INFO  [org.jboss.as.connector] (MSC service thread 1-9) JBAS010408: Starting JCA Subsystem (JBoss IronJacam
ar 1.0.7.Final)
15:02:54,199 INFO  [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
15:02:54,201 INFO  [org.jboss.as.jaxr] (MSC service thread 1-2) Binding JAXR ConnectionFactory: java:jboss/jaxr/Connecti
onFactory
15:02:54,221 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010403: Deployi
ng JDBC-compliant driver class org.h2.Driver (version 1.3)
15:02:54,231 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-16) JBAS015400: Bound mail session [java:jboss/ma
il/Default]
15:02:54,254 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 28) JBAS010404: Deployi
ng non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
15:02:55,312 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) JBoss Web Services - S
tack CXF Server 4.0.1.GA
15:02:55,416 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:4447
15:02:55,434 INFO  [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-15) Starting Coyote HTTP/1.1 on ht
tp--127.0.0.1-8080
15:02:55,515 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Bound data sourc
e [java:jboss/datasources/ExampleDS]
15:02:55,521 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-14) JBAS010400: Bound data sour
ce [java:jboss/datasources/MySqlDS]
15:02:55,575 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on /127.0.0.1:9999
15:02:55,584 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-15) JBAS015012: Started FileSystemDepl
oymentService for directory C:\JBoss\jboss-as-7.1.0\standalone\deployments
15:02:55,695 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "ServerC
onfig.war"
15:02:56,941 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-9) JBossOSGi Framework Core -
 1.1.1
15:02:56,975 ERROR [org.jboss.as] (MSC service thread 1-12) JBAS015875: JBoss AS 7.1.0.Final-SNAPSHOT "Flux Capacitor" s
tarted (with errors) in 4090ms - Started 170 of 245 services (1 services failed or missing dependencies, 72 services are
 passive or on-demand)
15:02:57,047 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-10) Install bundle: system.bu
ndle:0.0.0
15:02:57,269 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-10) Install bundle: javax.api
:0.0.0
15:02:57,270 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-5) Install bundle: javax.tran
saction.api:0.0.0
15:02:57,270 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-12) Install bundle: jbosgi-re
pository-api:1.0.4
15:02:57,330 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-2) Install bundle: jboss-as-o
sgi-configadmin:7.1.0.Final-SNAPSHOT
15:02:57,348 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-3) Install bundle: jboss-osgi
-logging:1.0.0
15:02:57,378 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-8) Install bundle: org.apache
.felix.log:1.0.0
15:02:57,379 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-1) Install bundle: org.apache
.felix.configadmin:1.2.8
15:02:57,378 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-11) Install bundle: jbosgi-ht
tp-api:1.0.5
15:02:57,535 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-6) Install bundle: osgi.enter
prise:4.2.0.201003190513
15:02:57,931 INFO  [org.jboss.osgi.framework.internal.StartLevelPlugin] (MSC service thread 1-2) Starting bundles for st
art level: 1
15:02:57,936 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: osgi.ent
erprise:4.2.0.201003190513
15:02:57,941 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: javax.ap
i:0.0.0
15:02:57,952 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jboss-os
gi-logging:1.0.0
15:02:57,959 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: javax.tr
ansaction.api:0.0.0
15:02:57,964 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jbosgi-h
ttp-api:1.0.5
15:02:57,967 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jbosgi-r
epository-api:1.0.4
15:02:57,984 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: org.apac
he.felix.configadmin:1.2.8
15:02:58,001 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: org.apac
he.felix.log:1.0.0
15:02:58,007 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-2) Bundle started: jboss-as
-osgi-configadmin:7.1.0.Final-SNAPSHOT
15:02:58,013 INFO  [org.jboss.osgi.framework.internal.FrameworkActive] (MSC service thread 1-2) OSGi Framework started
15:02:58,030 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-12) Install bundle: ServerCon
fig:0.1.0
15:02:58,071 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ServerConfig.war"
15:02:58,568 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-14) Bundle started: ServerConfig:0.1.0

===============================================================================

I also checked the JBoss 7 server.log and no errors were shown. Can anyone help me with this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

北城孤痞 2025-01-11 00:16:44

Jboss 7 试图将应用程序视为 OSGI 项目而不是常规 Web 应用程序。
关键是从 grails 项目的清单中删除 osgi 或在 Jboss 7 配置中禁用它。我无法在 grails 项目的清单中找到如何禁用它,因此我从 Jboss 7 中删除了 osgi。
您可以通过打开standalone.xml 并找到标记为 的子系统

<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
...

...

</subsystem>

并将其注释掉或删除它,将其从Jboss 7 中删除。我把我的注释掉了,在我重新启动Jboss后,Jboss自动为我删除了它。完成此操作后,我的 grails 项目就已正确加载。

大卫

Jboss 7 was trying to treat the application as an OSGI project rather than a regular web application.
The key was to either remove osgi from the grails project's manifest or disable it in Jboss 7 configuration. I wasn't able to find out how to disable it on the grails project's manifest so I removed osgi from Jboss 7.
You can remove it from Jboss 7 by opening up standalone.xml and finding the subsystem labelled as

<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
...

...

</subsystem>

and either commenting this out or delete it. I commented mine out and Jboss automatically deleted it for me after I restarted Jboss. Right after I did this my grails project was loaded properly.

David

怪我鬧 2025-01-11 00:16:44

另一个解决方案是将:设置

grails.project.war.osgi.headers = false

为BuildConfig.groovy。

请参阅此处的 jboss 讨论:https://issues.jboss.org/browse/WFK2-65

Another solution is to set:

grails.project.war.osgi.headers = false

into BuildConfig.groovy.

See jboss discussion here: https://issues.jboss.org/browse/WFK2-65

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文