从 Eclipse 启动 JBoss 7.1.1 失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13026766/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Starting JBoss 7.1.1 from eclipse fails
提问by kostja
When starting JBoss from the servers view inside Eclipse Indigo SR2 with JBoss Tools 2.3.0 on my machine, everything runs fine.
在我的机器上使用 JBoss Tools 2.3.0 从 Eclipse Indigo SR2 内的服务器视图启动 JBoss 时,一切运行正常。
I have copied all contents of my work folder containing Eclipse and JBoss-7.1.1.Final to a different machine.
我已将包含 Eclipse 和 JBoss-7.1.1.Final 的工作文件夹的所有内容复制到另一台机器上。
Now, when I try to start the server, it fails with this message:
现在,当我尝试启动服务器时,它失败并显示以下消息:
Starting JBoss 7.1.1 Runtime encountered an error. The archive: /jboss/jboss-modules.jar which is referenced by the classpath, does not exist.
启动 JBoss 7.1.1 运行时遇到错误。类路径引用的存档:/jboss/jboss-modules.jar 不存在。
I don't see anything referencing the jar in the runtime or server or project configurations. And the jboss-modules.jar
is inside the root folder of the JBoss server, as expected. There are no deployments in the standalone.xml
.
Both machines are running SuSe 12. .bashrc
and .profile
are empty.
我在运行时或服务器或项目配置中没有看到任何引用 jar 的内容。而且jboss-modules.jar
是JBoss服务器的根文件夹内,符合市场预期。中没有部署standalone.xml
。两台机器都在运行 SuSe 12..bashrc
并且.profile
是空的。
The server starts fine from command line.
服务器从命令行正常启动。
I have created a new runtime and a server using this runtime from scratch in Eclipse, but get the same error.
我在 Eclipse 中从头开始使用这个运行时创建了一个新的运行时和一个服务器,但是得到了同样的错误。
Any ideas are appreciated.
任何想法表示赞赏。
采纳答案by kostja
I have found the solution just now:
我刚刚找到了解决方案:
- I have found the reference to the jboss-modules.jar in the launch configuration of the server under
User Libraries
. All attempts to delete it failed. After removing or resetting to defaults and applying, I started the server, received the same error and the .jar was in the launch cofig classpath again. - I actually had a project named
jboss
without any facets, just to have the JBoss files visible from the eclipse project browser. This project was closed.
- 我在
User Libraries
. 所有删除它的尝试都失败了。删除或重置为默认值并应用后,我启动了服务器,收到相同的错误,.jar 再次位于启动配置类路径中。 - 我实际上有一个
jboss
没有任何方面命名的项目,只是为了从 eclipse 项目浏览器中看到 JBoss 文件。该项目已关闭。
After I opened it, the server started fine again.
我打开它后,服务器再次正常启动。
I am still clueless about how the reference to the jboss-modules.jar
from a project got into the launch config classpath and why it resisted removing attempts.
我仍然对jboss-modules.jar
项目中对 的引用如何进入启动配置类路径以及为什么它拒绝删除尝试一无所知。
回答by bondkn
modules.jar
is required to run JBOSS 7.1 Runtime, which is missing.
modules.jar
需要运行缺少的JBOSS 7.1 Runtime。
Go to
Window > Preferences > Server > Runtime Environment > Default Classpath
. If you don't see any classpath in the right side menu,you can tweek the classpath setting by-- Change server to JBOSS 7.0 Runtime.
- Again Change server to JBOSS 7.1 Runtime.
去
Window > Preferences > Server > Runtime Environment > Default Classpath
。如果在右侧菜单中没有看到任何类路径,则可以通过以下方式调整类路径设置-- 将服务器更改为 JBOSS 7.0 运行时。
- 再次将服务器更改为 JBOSS 7.1 运行时。
Delete and Add Server Again,
再次删除和添加服务器,
while Add new server,
同时添加新服务器,
- Please Check the 2nd and 3rd checkboxes
-"Listen on all Interfaces to allow remote web connections"
-"Expose your management port as server's hostname"
- 请选中第二个和第三个复选框
-“在所有接口上侦听以允许远程 Web 连接”
-“将您的管理端口公开为服务器的主机名”
now everything will run fine.
现在一切都会好起来的。
回答by Chris
I know this is a late response but in case anyone needs a solution to this issue.
我知道这是一个迟到的回应,但以防万一有人需要解决这个问题。
If you go to Window > Preferences > Servers > Runtime Environments > Default Classpath
如果您转到 Window > Preferences > Servers > Runtime Environments > Default Classpath
You will see that the 'JBoss 7.0 Runtime' does not have 'modules../-[*/.jar]' dependency, which is where the jboss-modules.jar lives. After selecting the 'JBoss 7.0 Runtime' rather than the JBoss 7.1 Runtime, the error relating to the jboss-modules.jar went away, and the server starts without error.
您将看到“JBoss 7.0 运行时”没有“modules../-[* /.jar]”依赖项,这是 jboss-modules.jar 所在的位置。选择'JBoss 7.0 Runtime' 而不是JBoss 7.1 Runtime 后,与jboss-modules.jar 相关的错误消失了,服务器启动没有错误。
My application also started without error. I am using JBoss 7.1.1.
我的应用程序也没有错误地启动。我正在使用 JBoss 7.1.1。