-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DG,

On 4/28/12 4:11 PM, dgchristen...@comcast.net wrote:
> I have a small debugging/monitoring app written in Java/Swing that
>  I'd like to run inside Tomcat to help with debugging.

You are asking for all kinds of pain, here.

> The app is started by dynamically loading the monitoring class from
> a webservice running under Tomcat.

So, the GUI monitoring app loads classes from a webservice hosted by
the webapp? Elsewhere in this thread, you said it had to run in the
same JVM because it directly-accesses some of the objects. Those two
statements seem to contradict one another.

> The works in Windows (multiple flavors) but I'm having problems 
> getting this running on Ubuntu.

The presence of the always-running GUI environment in Microsoft
Windows is the reason stuff like this works there.

> What I've tried so far:
> 
> 1) First error I got was an Headless exception. Since the app is a
>  GUI app I can't run in headless mode. After searching around I 
> changed Tomcat's library path (via -Djava.library.path in 
> catalina.sh) to point to the client lib (ie. 
> .../java-6-sun-1.6.0.26/jre/lib/i386/client)> instead of the
> server lib.

You should be able to do this with the "-client" command-line
parameter. I'm not sure why you would need this at all, except maybe
- -server in your environment also implies "headless", which can also be
changed using a command-line parameter. You shouldn't have to mess
with the java.library.path.

> 2) After changing the libs the next error was that DISPLAY wasn't 
> set. After setting DISPLAY=0.0 in catalina.sh I get "Can't connect
> to X11 with DISPLAY=0.0" error. I've tried different values for
> DISPLAY (e.g. localhost:0.0) and nothing makes a difference. I've
> also tried fiddling around with the policies in case there's a
> permissions error. See below for the call stack.

As Mark says, you'll need to set this to your actual DISPLAY. When
you're logged-in to your laptop, open an xterm and type "echo
$DISPLAY". Use whatever value that is to attach to your X display.

If Tomcat is running as a user other than you, then you might also
have to do an "xhost +" as yourself to allow any client to connect to
your X server.

> The webservice app is a simple RESTEasy implementation. Since this 
> works in Windows I'm assuming (perhaps erroneously) that this can 
> work in Linux. Any help would be appreciated.

I'm sure it *can* work in Linux, but the whole thing sounds insane to me.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+epFEACgkQ9CaO5/Lv0PD5TQCfaHXWYeFPrDR2H5OMjOyFMHsI
fjQAniXwykkxw5sMfWlCvI9n0zHYNRT8
=LHQA
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to