dev@glassfish.java.net

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

From: Ming Zhang <ming.zhang_at_oracle.com>
Date: Mon, 25 Jul 2011 13:27:28 -0700

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
>>