Hi Dinesh,
comments inline...
On 11/10/06, Dinesh Patil <Dinesh.Patil_at_sun.com> wrote:
> my comments inline..
> Jerome Dochez wrote:
>
> > Hi Dinesh
> >
> > Can you look at Petr questions ? I have to agree with him that the
> > differences between unix/linux might not be necessary as well as
> > setting the lib +x flag.
>
> This is due to the issue #1149 and the problem we saw with chmod ant
> task not working on Linux, so we had to explicitely call Shell command
> using exec task.
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1149
The bug #1149 does not specify the JDK version used. Does it?
The error looks like the same as in the bug #1342.
>
> > Thanks, Jerome
> >
> > On Nov 10, 2006, at 2:46 AM, Hadraba Petr wrote:
> >
> >> Hi Jerome, Hi all,
> >>
> >> I'm working on the GlassFish issue #1342
> >> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1342
> >>
> >> Here are current results.
> >>
> >> The problem is in the setup-cluster.xml ANT file. The ANT target
> >> do.chmod.unix does not work at all; but using Java 6 this issue is
> >> "visible". There is in the Java 6 in the Runtime.exec() method (in the
> >> underlayering JNI UNIXProcess_md.c) the check for the maximum length
> >> of the arguments. The Java 5 simply returnes exit code 255 instead of
> >> the IOException like Java 6 does.
> >
> I didn't get this, is "chmod" target produces IOException with Java 6 on
> Solaris?
It depends on the PATH_MAX in the limits.h header file... See
UNIXProcess_md.c for more details:
$JDK_SOURCE_HOME/j2se/src/solaris/native/java/lang/UNIXProcess_md.c.
I can't test it; I have no Solaris installed.
>
> >> There is one quection: Why the do.chmod.unix ANT target sets the
> >> executable bit for all the files in the lib/ directory? I find this
> >> unnecessary.
> >
> Yes, there is bundled ANT located in lib/ant and that need to have
> execute permission for build and runtime purpose.
Yes, but no. There is in the documentation (quick install howto) the
recomandation to use the ANT bundled with GlassFish. But the
JARInstaller does not sets the executable bit... Something is wrong:-(
The Apache ANT is not the only which needs the executable permissions
for the build and runtime purpose.
>
> >> There is the second question: Why are in the setup*.xml files two
> >> targets do.chmod.unix and do.chmod.linux? The difference betwen these
> >> is in the mechanism of the chmod execution. In the do.chmod.linux the
> >> chmod command is executed for each directory with the -R additional
> >> argument.
> >
> this is due to the issue #1149 that on linux chmod task doesn't work so
> need to call throght exec.
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=1149
Hmm, this is in my opinion because of wrongly written do.chmod.unix:-(
>
> >> I don't see any reason to have two tasks doing the same. I also don't
> >> see any reason to set the execution bit for the jar files. Am I
> >> missing something?
> >>
> >> I'm working on the patch for booth setup.xml and setup-cluster.xml.
> >
> the patch needs to work on pre-JDK 6 for other 9.x releases. so pls let
> me know if you need any further info.
> thanks
> Dinesh
>
I included the patches for both setup-cluster.xml and setup.xml.
All the files in the GlassFish distribution that require the
executable permissions (and only these) are separated into thematic
groups so the command line can't exceed the PATH_MAX.
Please test the patch on all the supported UNIX platforms and then you
can simply accept the patch---I have the Sun Contribution Agreement
indeed for the JDK-Collaboration but it never mind... I hope...
Thank you for your time
PETR
> >> Have a nice day and thank you for your time.
> >>
> >> PETR
> >>
> >>
> >> On 10/19/06, Hadraba Petr <hadrabap_at_bluetone.cz> wrote:
> >>
> >>> Hi Jerome,
> >>>
> >>> there is no problem to fix this issue by myself, but I think, the bug
> >>> can be in the JDK:-(
> >>>
> >>> Follow me:
> >>>
> >>> 1. Glassfish ant build script runs successfuly with JDK 5
> >>> 1.1. The problem is in the `chmod' "feature"
> >>> 1.2. There is in the Windoze OSes the restrictions for the maximum
> >>> length of the command line (8192 for XP, 2096 for older). It looks
> >>> like the JDK 6 has this restriction fixed also for the UNIX systems.
> >>>
> >>> According to the points 1.1. and 1.2. I'll check sources of both--- the
> >>> included ANT (in the GlassFish distribution) and the JDK.
> >>>
> >>> I'll contact you after a few days with the result.
> >>>
> >>> Thanks and have a nice day (or night)
> >>>
> >>> PETR
> >>>
> >>>
> >>> On 10/19/06, Jerome Dochez <Jerome.Dochez_at_sun.com> wrote:
> >>> > Petr
> >>> >
> >>> > would you consider fixing it yourself ;-)
> >>> > we are open source and welcome all contributions. Since you
> >>> already have
> >>> > a fix, you would just need to get things reviewed by the module
> >>> owner
> >>> > and officially become a GlassFish developer...
> >>> >
> >>> > Let us know, we will let you know what you need to do to get
> >>> started.
> >>> >
> >>> > Jerome
> >>> >
> >>> > Hadraba Petr wrote:
> >>> > > Thanks,
> >>> > >
> >>> > > filled as bug 1342:
> >>> > > https://glassfish.dev.java.net/issues/show_bug.cgi?id=1342
> >>> > >
> >>> > > PETR
> >>> > >
> >>> > >
> >>> > > On 10/19/06, Shreedhar Ganapathy <Shreedhar.Ganapathy_at_sun.com>
> >>> wrote:
> >>> > >> Hi Hadraba
> >>> > >> Thanks for bringing this up.
> >>> > >> Please report an issue using the following link. (You will
> >>> have to login
> >>> > >> to be able to file issues)
> >>> > >> https://glassfish.dev.java.net/servlets/ProjectIssues
> >>> > >>
> >>> > >> regards
> >>> > >> Shreedhar Ganapathy
> >>> > >> Project GlassFish Community Manager
> >>> > >>
> >>> > >> Hadraba Petr wrote:
> >>> > >> > Hi all,
> >>> > >> >
> >>> > >> > there is in the bug in the installation procedure using JDK
> >>> 6 (b102).
> >>> > >> > The following error message is displayed while the ant -f
> >>> > >> > setup-cluster.xml:
> >>> > >> >
> >>> > >> > /home/petr/java/glassfish/setup-cluster.xml:125: The
> >>> following error
> >>> > >> > occurred while executing this line:
> >>> > >> > /home/petr/java/glassfish/setup-cluster.xml:380: Execute
> >>> failed:
> >>> > >> > java.io.IOException: Cannot run program "chmod":
> >>> java.io.IOException:
> >>> > >> > error=7, Argument list too long
> >>> > >> >
> >>> > >> > With jdk5 is all OK.
> >>> > >> >
> >>> > >> > Workaround:
> >>> > >> > Modify the setup-cluster.xml as follows:
> >>> > >> > diff setup-cluster.xml setup-cluster.xml.org
> >>> > >> > 377c377
> >>> > >> > < <target name="do.chmod" depends="do.chmod.linux"/>
> >>> > >> > ---
> >>> > >> >> <target name="do.chmod" depends="do.chmod.unix,
> >>> do.chmod.linux"/>
> >>> > >> >
> >>> > >> > Now, all is working properly with JDK 6.
> >>> > >> >
> >>> > >> > I'm using SuSE Linux on x86 machine (i686).
> >>> > >> >
> >>> > >> > Where can I report this bug?
> >>> > >> >
> >>> > >> > Thank you very much
> >>> > >> >
> >>> > >> > PETR
> >>> > >> >
> >>> > >> >
> >>> ---------------------------------------------------------------------
> >>> > >> > To unsubscribe, e-mail: users-
> >>> unsubscribe_at_glassfish.dev.java.net
> >>> > >> > For additional commands, e-mail: users-
> >>> help_at_glassfish.dev.java.net
> >>> > >> >
> >>> > >>
> >>> > >>
> >>> ---------------------------------------------------------------------
> >>> > >> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> >>> > >> For additional commands, e-mail: users-
> >>> help_at_glassfish.dev.java.net
> >>> > >>
> >>> > >>
> >>> > >
> >>> > >
> >>> ---------------------------------------------------------------------
> >>> > > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> >>> > > For additional commands, e-mail: users- help_at_glassfish.dev.java.net
> >>> > >
> >>> >
> >>> >
> >>> ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> >>> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >>> >
> >>> >
> >>>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>