Re: Can't start with JavaMonitor (resolved w/ alternative ending)

From: Chuck Hill (chil..lobal-village.net)
Date: Tue Aug 12 2003 - 13:06:20 EDT

  • Next message: Christian Edward Gruber: "RE: Can't start with JavaMonitor (resolved w/ alternative ending)"

    Is there any chance you are starting this with a JDK other than 1.3.1?

    Christian Edward Gruber wrote:
    > Hi guys,
    >
    > I'm working on this issue again, and I get this (appended) error. I
    > set the output args to > /tmp/launch.tmp and all and got a
    > ClassCastException in WOApplication. It seems to be at the point of
    > specifying the WOOutputPath. Any clues? The path exists
    > (/var/log/WebObjects/) and it creates the (empty) file. I can't
    > actually see what the object is that's being incorrectly cast.
    >
    > Cg.
    >
    > ----------------------------------------------------
    > [12:05:40,746] <main> ERROR (WebObjects:5042) WOApplication: Renamed
    > previous WOOutputPath file to /var/log/WebObjects/OCS-1.2003081
    > 2120540656
    > [12:05:40,786] <main> ERROR (WebObjects:628) <WOApplication>: Cannot be
    > initialized.null
    > [12:05:40,789] <main> ERROR (WebObjects:304) A fatal exception occurred:
    > null: <WOApplication>: Cannot be initialized.
    > [12:05:40,796] <main> ERROR (WebObjects:305) Exception thrown:
    > com.webobjects.foundation.NSForwardException for
    > java.lang.ClassCastException
    > at
    > com.webobjects.appserver.WOApplication._initWOOuputPath(WOApplication.ja
    > va:5075)
    > at
    > com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:501
    > 3)
    > at
    > com.webobjects.appserver.WOApplication.<init>(WOApplication.java:485)
    > at Application.<init>(Application.java:39)
    > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
    > Method)
    > at
    > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorA
    > ccessorImpl.java:39)
    > at
    > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
    > tructorAccessorImpl.java:27)
    > at
    > java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    > at java.lang.Class.newInstance0(Class.java:306)
    > at java.lang.Class.newInstance(Class.java:259)
    > at
    > com.webobjects.appserver.WOApplication.main(WOApplication.java:296)
    > at Application.main(Application.java:35)
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > at
    > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
    > a:39)
    > at
    > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
    > Impl.java:25)
    > at java.lang.reflect.Method.invoke(Method.java:324)
    > at
    > com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:71)
    >
    >
    >
    >
    >>-----Original Message-----
    >>From: Kaelin Colclasure [mailto:kaeli..cm.org]
    >>Sent: Monday, August 11, 2003 11:48 PM
    >>To: Chuck Hill
    >>Cc: Christian Edward Gruber; 'Marc Respass';
    >>woproject-de..bjectstyle.org
    >>Subject: Re: Can't start with JavaMonitor (resolved w/
    >>alternative ending)
    >>
    >>
    >>On Wednesday, July 30, 2003, at 12:38 PM, Chuck Hill wrote:
    >>
    >>
    >>>A couple of things to try to get more information on the launch
    >>>failure...
    >>>
    >>>
    >>>1. Add this to the launch arguments in Monitor and try to start the
    >>>instance:
    >>> 1>/tmp/launch.txt 2>&1
    >>>
    >>> This will record what happens while the Java process is being
    >>>launched
    >>>and will show failures due to classpath problems etc.
    >>
    >>For the benefit of posterity, if you're having the "Can't start with
    >>JavaMonitor" problem and adding these arguments does *not* result in
    >>/tmp/launch.txt being created then the problem *may* be the
    >>one I just
    >>finally diagnosed:
    >>
    >>I had added my host to JavaMonitor using the machines external DNS
    >>name, 'staging'. wotaskd, however, was assuming the machines
    >>hostname,
    >>'staging-1' (e.g. as returned by `hostname -s`) and while JavaMonitor
    >>was perfectly happy to talk to wotaskd with this
    >>configuration, wotaskd
    >>was secretly convinced that JavaMonitor was babbling nonsense and,
    >>while happy to make polite small talk, refused to undertake any real
    >>work at JavaMonitor's behest...
    >>
    >>Changing the JavaMonitor configuration to use 'staging-1'
    >>(and the DNS
    >>configuration to resolve that name into an IP) has restored order to
    >>the realm.
    >>
    >>-- Kaelin
    >>
    >>
    >>>2. Add logging to the public static void main(String
    >>
    >>argv[]) method to
    >>
    >>>log
    >>>interesting information. NSLog may not be functional this
    >>
    >>early in the
    >>
    >>>process so try using System.out.println and output
    >>
    >>redirection as in
    >>
    >>>the
    >>>previous step, or add code like this to sent logging
    >>
    >>information to a
    >>
    >>>file:
    >>>
    >>>FileWriter fos = null;
    >>>try
    >>>{
    >>> fos = new FileWriter("C:/temp/PostLaunch.txt");
    >>> fos.write("Starting....\n");
    >>>
    >>> fos.write(<whatever else you need to log>);
    >>>
    >>> fos.flush();
    >>> fos.close();
    >>>
    >>> WOApplication.main(argv, Application.class);
    >>>}
    >>>catch (Exception e)
    >>>{
    >>> System.out.println(e);
    >>>}
    >>>
    >>>
    >>>FWIW
    >>>
    >>>
    >>>Chuck
    >>>
    >>>
    >>>At 03:25 PM 30/07/2003 -0400, Christian Edward Gruber wrote:
    >>>
    >>>>Hi Marc,
    >>>>
    >>>> I have exactly the same problem, and have had for
    >>>
    >>months, but have
    >>
    >>>>temporarily given up on it pending more time to fix it. What is
    >>>>maddening, is that no matter how much I fiddle with the
    >>>
    >>log settings
    >>
    >>>>in
    >>>>JavaMonitor, I can't get ANY debug output - only the file being
    >>>>created.
    >>>>It's always empty. I've taken to starting at the command-line and
    >>>>piping all output into a log file and using logadm to
    >>>
    >>manage the file,
    >>
    >>>>but I won't really be able to get the whole load-balancing
    >>>
    >>ecosystem
    >>
    >>>>to
    >>>>work if I can't even get JavaMonitor to start an instance.
    >>>>
    >>>> I hadn't tried building from project builder, because
    >>>
    >>we're in an
    >>
    >>>>all-eclipse environment. That's a new and important clue.
    >>>>
    >>>>Christian.
    >>>>
    >>>>
    >>>>
    >>>>>-----Original Message-----
    >>>>>From: Marc Respass [mailto:mar..arcrespass.com]
    >>>>>Sent: Wednesday, July 30, 2003 2:09 PM
    >>>>>To: Ulrich Köster
    >>>>>Cc: woproject-de..bjectstyle.org
    >>>>>Subject: Re: Can't start with JavaMonitor
    >>>>>
    >>>>>
    >>>>>Hi Ulrich,
    >>>>>
    >>>>>This is WO 5.2.1. I don't know what resources are
    >>>>
    >>missing. I can't
    >>
    >>>>>find any difference. I agree that the build scripts seem to be
    >>>>>identical which is why I wonder if anyone else has seen this
    >>>>>problem. I don't get
    >>>>>any logs written so I can't even figure out what is happening.
    >>>>>
    >>>>>Marc
    >>>>>
    >>>>>On Wednesday, July 30, 2003, at 01:08 PM, Ulrich Köster wrote:
    >>>>>
    >>>>>
    >>>>>>Hi Marc,
    >>>>>>
    >>>>>>is this with WO 5.1 or 5.2? I've tested it with WO5.2 and the
    >>>>>>buildscripts seems to be identically.
    >>>>>>
    >>>>>>Of what kind is the missing resource?
    >>>>>>
    >>>>>>Ulrich
    >>>>>>
    >>>>>>On Mittwoch, 30. Juli 2003, at 17:17 Uhr, Marc Respass wrote:
    >>>>>>
    >>>>>>
    >>>>>>>Hi,
    >>>>>>>
    >>>>>>>I'm using Eclipse 2.1.1 and WOLips 1.0.4 on Mac OS X
    >>>>>>
    >>(10.2.6). I'm
    >>
    >>>>>>>building on Mac OS X and copying the build to Solaris to
    >>>>>>
    >>>>>test. When I
    >>>>>
    >>>>>>>build with Eclipse, the application starts at the command
    >>>>>>
    >>>>>line but it
    >>>>>
    >>>>>>>will not start with JavaMonitor. I tested this a lot. What
    >>>>>>
    >>>>>does work
    >>>>>
    >>>>>>>is to import the PB.project into Project Builder and build
    >>>>>>
    >>>>>using PBX.
    >>>>>
    >>>>>>>Then I copy the build to Solaris and it starts in JavaMonitor.
    >>>>>>>
    >>>>>>>Has anyone else experienced this? Is there something
    >>>>>>
    >>that I'm not
    >>
    >>>>>>>doing? I admit that I've only read enough docs to get
    >>>>>>
    >>>>>builds working
    >>>>>
    >>>>>>>locally in Eclipse. I cannot figure out what is wrong but
    >>>>>>
    >>>>>I know that
    >>>>>
    >>>>>>>if I build using PBX, everything works fine. If I build
    >>>>>>
    >>>>>with Eclipse,
    >>>>>
    >>>>>>>it will not start in JavaMonitor. Also, I have not tested
    >>>>>>
    >>>>>enough but
    >>>>>
    >>>>>>>my application would not find its resources in a framework
    >>>>>>
    >>>>>built with
    >>>>>
    >>>>>>>Eclipse. I built it with PBX and deployed and it
    >>>>>>
    >>worked. I notice
    >>
    >>>>>>>that a WO framework directory is a little different if
    >>>>>>
    >>>>>built from PBX
    >>>>>
    >>>>>>>and though it *shouldn't* matter it does seem to for me.
    >>>>>>>
    >>>>>>>Any help is greatly appreciated. We will be moving to full
    >>>>>>
    >>>>>ant builds
    >>>>>
    >>>>>>>using woproject and building on Solaris instead of the
    >>>>>>
    >>>>>build and copy
    >>>>>
    >>>>>>>we do now so maybe that is the real solution.
    >>>>>>>
    >>>>>>>Thanks
    >>>>>>>Marc
    >>>>>>>
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>--
    >>>
    >>>Chuck Hill chil..lobal-village.net
    >>>Global Village Consulting Inc.
    >>>http://www.global-village.net
    >>
    >>
    >
    >

    -- 
    

    Chuck Hill chil..lobal-village.net Global Village Consulting Inc. http://www.global-village.net

    Progress is the mother of all problems. - G. K. Chesterton



    This archive was generated by hypermail 2.0.0 : Tue Aug 12 2003 - 12:56:46 EDT