dev@glassfish.java.net

RE: QL tests on v3.2 trunk failing on WinXP due to class path length

From: Koper, Dies <diesk_at_fast.au.fujitsu.com>
Date: Tue, 26 Jul 2011 20:53:35 +1000

Thanks Ming, all.

I have added comments to class.path and run.testng.classpath explaining
what they are for.

Regards,
Dies


> -----Original Message-----
> From: Ming Zhang [mailto:ming.zhang_at_oracle.com]
> Sent: Tuesday, 26 July 2011 08:05
> To: Tim Quinn
> Cc: marina.vatkina_at_oracle.com; dev_at_glassfish.java.net
> Subject: Re: QL tests on v3.2 trunk failing on WinXP due to class path
> length
>
> I agree with the idea of reducing the class footprint of QL along with
> the enhancement of shrinking the footprint of the client-required
JARs.
> I'll make a note of it and put in future QL enhancement plan. I don't
> have cycle to work on this currently.
>
> As for Marina's question of gf-client.jar only in "class.path", you'll
> see compilation errors if you make that change and run QL.
>
> Thanks,
> Ming
>
> On 2011-7-25 14:43, Tim Quinn wrote:
> > If the parts of QL in question are client-focused then referring to
> > just gf-client.jar should be sufficient.
> >
> > If, on the other hand, they are not client-related then QL should
not
> > use gf-client.jar which, as its name suggests, is for clients. As
we
> > make progress in shrinking the footprint of the client-required JARs
> > then gf-client.jar will refer to fewer and fewer JARs, regardless of
> > how many JARs it happens to refer to today.
> >
> > - Tim
> >
> > On Jul 25, 2011, at 4:35 PM, Marina Vatkina wrote:
> >
> >> Ming,
> >>
> >> Was it tested with gf-client.jar? Which jars are not referenced
from
> >> it (it references most of GF jars)?
> >>
> >> thanks,
> >> -marina
> >>
> >> Ming Zhang wrote:
> >>> Marina,
> >>>
> >>> The changes Dies proposed were in class.path and this path is used
> >>> in QL build time for building testing apps. So gf-client.jar only
in
> >>> the definition of that path will result in QL build failure. If
you
> >>> are interested in the QL runtime, please see run.testng.classpath.
> >>>
> >>> Thanks,
> >>> Ming
> >>>
> >>> On 2011-7-25 11:33, Marina Vatkina wrote:
> >>>> Dies, Ming,
> >>>>
> >>>> Shouldn't QL just use gf-client.jar?
> >>>>
> >>>> thanks,
> >>>> -marina
> >>>>
> >>>> Koper, Dies wrote:
> >>>>> Since the workspace rearrangement on trunk QL tests fail (and
> >>>>> hang) on
> >>>>> my machine with the following error:
> >>>>>
> >>>>> [INFO] An Ant BuildException has occured: The following error
> >>>>> occurred
> >>>>> while executing this line:
> >>>>>
D:\sources\OSS\GF\V3\main\appserver\tests\quicklook\build.xml:149:
> >>>>> The
> >>>>> following error occurred while executing this line:
> >>>>>
D:\sources\OSS\GF\V3\main\appserver\tests\quicklook\build.xml:234:
> >>>>> The
> >>>>> following error occurred while executing this line:
> >>>>>
D:\sources\OSS\GF\V3\main\appserver\tests\quicklook\amx\build.xml:57:
> >>>>> The following error occurred while executing this line:
> >>>>>
D:\sources\OSS\GF\V3\main\appserver\tests\quicklook\gfproject\build-
> impl
> >>>>>
> >>>>> .xml:123: Error running
d:\programs\Java\jdk1.6.0_25\bin\javac.exe
> >>>>> compiler
> >>>>>
> >>>>> CreateProcess error=87, The parameter is incorrect
> >>>>>
> >>>>> I discovered it's because of the length of the class.path used
in QL.
> >>>>> It's now over 32678 characters, which seems to be javac's limit
on
> >>>>> WinXP.
> >>>>>
> >>>>> The workspace change added 12 characters to glassfish.home's
path.
> >>>>> This path is used in 257 entries in class.path (mostly due to
> >>>>> glassfish/modules/**/*.jar).
> >>>>>
> >>>>> I've done the math.
> >>>>> I can move my workspace to the root of the drive, in which case
> >>>>> I'll be
> >>>>> okay for up to another 40 new modules (with names of no more
than 15
> >>>>> characters long), or, we can limited the modules in QL's
> >>>>> class.path to
> >>>>> the ones that are actually used.
> >>>>>
> >>>>> Would anyone object to me making the following change?
> >>>>>
> >>>>> svn diff main\appserver\tests\quicklook\gfproject
> >>>>> Index: gfproject/build-impl.xml
> >>>>>
===================================================================
> >>>>> --- gfproject/build-impl.xml (revision 48276)
> >>>>> +++ gfproject/build-impl.xml (working copy)
> >>>>> @@ -87,6 +87,19 @@
> >>>>> <path id=class.path>
> >>>>> <fileset dir="${glassfish.home}/modules">
> >>>>> <include name="**/*.jar"/>
> >>>>> + <!-- excluding some known unnecessary jars to reduce
> >>>>> classpath length (> 32kB causes javac to fail on WinXP) -->
> >>>>> + <exclude name="cmp*.jar"/>
> >>>>> + <exclude name="connectors-*.jar"/>
> >>>>> + <exclude name="console-*.jar"/>
> >>>>> + <exclude name="deployment-*.jar"/>
> >>>>> + <exclude name="*help.jar"/>
> >>>>> + <exclude name="orb-*.jar"/>
> >>>>> + <exclude name="org.apache.felix.*"/>
> >>>>> + <exclude name="org.eclipse.persistence.*"/>
> >>>>> + <exclude name="stats77.jar"/>
> >>>>> + <exclude name="trilead-ssh2-repackaged.jar"/>
> >>>>> + <exclude name="virt-core.jar"/>
> >>>>> + <exclude name="woodstox-osgi.jar"/>
> >>>>> </fileset>
> >>>>> <pathelement location="${class.output}"/>
> >>>>> <pathelement location="${test.class.output}"/>
> >>>>>
> >>>>> This change reduces the class.path length by 25% (5654
characters)
> >>>>> on my
> >>>>> machine, bringing the total well under the 32kb.
> >>>>> If anyone knows exactly what jars are required in QL we could
just
> >>>>> specify those but this change is easier and may require less
> >>>>> maintenance.
> >>>>>
> >>>>> Thanks,
> >>>>> Dies
> >>>>>
> >>>
> >
>