You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jeff Ramsdale <je...@earthlink.net> on 2003/03/14 23:42:34 UTC
[Patch] cocoon.bat issues
With recent updates of Cocoon 2.1-dev from CVS I haven't been able to get
the embedded Jetty to start up (Windows ME, j2sdk1.4.0). Turning echo on I
discovered 2 endless loops in cocoon.bat. Initially there were duplicate
gotPort and gotWebapp labels; I changed the duplicate names.
I then received an error of: "The program issued a command but the command
length is incorrect." Checking out the file again I was confused by the
following code to set EXEC:
if not "%EXEC%" == "" goto gotExec
set EXEC=start "Cocoon" /D. /MAX
:gotExec
I have no idea what this is supposed to do but it just didn't look right.
Forward slashes in a .bat file? So I deleted the code and references to
%EXEC in doServlet, doServletAdmin, and doDebug and everything seemed to
work fine. Any clues for me?
I've included my first Cocoon patch, generated with Eclipse. I didn't submit
to Bugzilla--let me know if I should--but I wanted feedback on the EXEC
issue before I went that far.
Jeff
Re: [Patch] cocoon.bat issues
Posted by Stefano Mazzocchi <st...@apache.org>.
Jeff Ramsdale wrote:
> Duh, I've used command switches before in DOS! I guess I just didn't
> recognize THOSE switches, (not have moved to NT or XP yet) so I was thrown
> off. My bad! Fix works just fine.
Glad to hear that.
> I had another question I forgot to address in my original message. When
> starting up Jetty with cocoon.bat a message is displayed: "Use SHUTDOWN to
> close normally. Use [Ctrl]+[C] to abort abruptly."
this is a message output by the database shipped with cocoon. if you
remove that block the message goes away. Unfortunately, that message is
not configurable and we can't get rid of if :/
> Like many others, I used
> Tomcat before switching to Jetty; Tomcat has a startup.bat and shutdown.bat.
> Is this a legacy message? Or is SHUTDOWN a reference to using the NT/XP Task
> Manager to shut it down (missing from Windows ME)?
As I said, this has nothing to do with cocoon and appears in tomcat logs
as well. It's just that tomcat scripts redirect stdout and stderr to log
files.
RE: [Patch] cocoon.bat issues
Posted by Jeff Ramsdale <je...@earthlink.net>.
Duh, I've used command switches before in DOS! I guess I just didn't
recognize THOSE switches, (not have moved to NT or XP yet) so I was thrown
off. My bad! Fix works just fine.
I had another question I forgot to address in my original message. When
starting up Jetty with cocoon.bat a message is displayed: "Use SHUTDOWN to
close normally. Use [Ctrl]+[C] to abort abruptly." Like many others, I used
Tomcat before switching to Jetty; Tomcat has a startup.bat and shutdown.bat.
Is this a legacy message? Or is SHUTDOWN a reference to using the NT/XP Task
Manager to shut it down (missing from Windows ME)?
My understanding is that in my case I have to do a CTRL-C to shutdown the
Jetty process. I feel it's cleaner, though, the Tomcat way--where it spawns
another session and a startup/shutdown in process A opens and then closes
process B.
Ideas?
Jeff
> -----Original Message-----
> From: Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: Saturday, March 15, 2003 4:54 AM
> To: cocoon-dev@xml.apache.org
> Subject: Re: [Patch] cocoon.bat issues
>
>
> Jeff Ramsdale wrote:
> > With recent updates of Cocoon 2.1-dev from CVS I haven't been
> able to get
> > the embedded Jetty to start up (Windows ME, j2sdk1.4.0).
> Turning echo on I
> > discovered 2 endless loops in cocoon.bat. Initially there were duplicate
> > gotPort and gotWebapp labels; I changed the duplicate names.
> >
> > I then received an error of: "The program issued a command but
> the command
> > length is incorrect." Checking out the file again I was confused by the
> > following code to set EXEC:
> >
> > if not "%EXEC%" == "" goto gotExec
> > set EXEC=start "Cocoon" /D. /MAX
> > :gotExec
>
> ah, right, the above works with 'cmd.exe' (NT/2k/XP) not with
> 'command.com' (95/98/ME)
>
> > I have no idea what this is supposed to do but it just didn't
> look right.
>
> this means
>
> start -> start a window
> /D. -> with directory '.'
> /MAX -> maximize the window
>
> but this only works on NT/2k/XP, I forgot to add a check for that.
>
> > Forward slashes in a .bat file?
>
> Oh, yes. almost all DOS commands used forward slashes as command line
> parameters.
>
> > So I deleted the code and references to
> > %EXEC in doServlet, doServletAdmin, and doDebug and everything seemed to
> > work fine. Any clues for me?
> >
> > I've included my first Cocoon patch, generated with Eclipse. I
> didn't submit
> > to Bugzilla--let me know if I should--but I wanted feedback on the EXEC
> > issue before I went that far.
>
> I just patched it but I won't be able to test it now that I don't have a
> win95/98/ME machine to test it on. So tell me if it worked.
>
> Stefano.
>
>
>
>
>
Re: [Patch] cocoon.bat issues
Posted by Stefano Mazzocchi <st...@apache.org>.
Jeff Ramsdale wrote:
> With recent updates of Cocoon 2.1-dev from CVS I haven't been able to get
> the embedded Jetty to start up (Windows ME, j2sdk1.4.0). Turning echo on I
> discovered 2 endless loops in cocoon.bat. Initially there were duplicate
> gotPort and gotWebapp labels; I changed the duplicate names.
>
> I then received an error of: "The program issued a command but the command
> length is incorrect." Checking out the file again I was confused by the
> following code to set EXEC:
>
> if not "%EXEC%" == "" goto gotExec
> set EXEC=start "Cocoon" /D. /MAX
> :gotExec
ah, right, the above works with 'cmd.exe' (NT/2k/XP) not with
'command.com' (95/98/ME)
> I have no idea what this is supposed to do but it just didn't look right.
this means
start -> start a window
/D. -> with directory '.'
/MAX -> maximize the window
but this only works on NT/2k/XP, I forgot to add a check for that.
> Forward slashes in a .bat file?
Oh, yes. almost all DOS commands used forward slashes as command line
parameters.
> So I deleted the code and references to
> %EXEC in doServlet, doServletAdmin, and doDebug and everything seemed to
> work fine. Any clues for me?
>
> I've included my first Cocoon patch, generated with Eclipse. I didn't submit
> to Bugzilla--let me know if I should--but I wanted feedback on the EXEC
> issue before I went that far.
I just patched it but I won't be able to test it now that I don't have a
win95/98/ME machine to test it on. So tell me if it worked.
Stefano.