1

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.

siebz0r
  • 18,867
  • 14
  • 64
  • 107

1 Answers1

0

I solved my problem by restarting my computer. Why I didn't do so in the first place? The problem showed itself right after a restart.

I tried several things and it was then I discovered that the problem didn't exist when I ran Eclipse as root. Of course I thought this was a permission related problem so I changed ownership of /usr/lib/eclipse-3.7/ to my user. This didn't help. After trying everything I did a restart and this somehow did the trick.

EDIT:

I recently had this problem again and I finally tracked down the problem. The problem came from an environment variable that was set in /etc/env.d/. One of the files violated the following rule:

You cannot use shell variables when defining other variables. This means things like FOO="$BAR" (where $BAR is another variable) are forbidden.

The result was $PATH getting set in the PATH environment variable resulting in PATH=/usr/bin/:$PATH which of course is wrong.

siebz0r
  • 18,867
  • 14
  • 64
  • 107