无法从Eclipse中启动JBoss(Cannot start JBoss from Eclipse

2019-10-17 00:23发布

I'm developing with Eclipse and JBoss AS 7.1.1 on Linux. I've installed the JBoss tools so I can deploy to JBoss from Eclipse.

Now I've got a problem, the JBoss server won't start (run/debug) from Eclipse. The message I get is: Reference to undefined variable PATH.

This is not making sense to me at all. There is nothing in the server logs and when I run eclipse from console the only output is:

Jul 12, 2012 1:38:55 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
Jul 12, 2012 1:38:56 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
Jul 12, 2012 1:38:56 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA

I think the error occurred after I shut down Eclipse while JBoss was running.

Starting JBoss from the command line works without a problem, eclipse can even connect to it that way. If Eclipse is connected to JBoss it can shut it down, so the problem is purely the starting of the server.

I've tried with a clean JBoss install, but the same problem exists.

UPDATE: I've tried using a clean workspace and a clean config directory (~/.eclipse), reinstalled the JBoss tools and experienced the same problem.

Answer 1:

我重新启动我的电脑解决我的问题。 为什么我没有在第一时间做到这一点? 重启之后,问题就表现出来了。

我试了好东西,这是后来我发现,当我跑Eclipse作为根本不存在这个问题。 当然,我认为这是一个权限相关的问题,所以我改变了所有权/usr/lib/eclipse-3.7/到我的用户。 这并没有帮助。 乱投医后,我做了重新启动,这在某种程度上做的伎俩。

编辑:

我最近再次有这个问题,我终于找到了问题所在。 问题就来了从在设置环境变量/etc/env.d/ 。 其中一个文件违反了以下规则:

定义其他变量时不能使用shell变量。 这意味着这样的FOO =“$ BAR”(其中$ BAR是另一变量)是被禁止的。

其结果是$PATH凑了设置PATH导致环境变量PATH=/usr/bin/:$PATH这当然是错误的。



文章来源: Cannot start JBoss from Eclipse