On Sat, Oct 22, 2011 at 1:13 AM, Stefan Bodewig <[email protected]> wrote:
> Hi Michael,
>
> On 2011-10-21, Michael B Allen wrote:
>
>> I'm posting this to dev instead of users because my best guess is that
>> this is a bug.
>
> Probably not.
>
>> Consider the following target which runs a Java program MakeFoo.class:
>
>> <target name="foo">
>> <java classname="MakeFoo">
>> <classpath>
>> <pathelement location="."/>
>> </classpath>
>> <arg line="-o foo -d 'maken some foo'"/>
>> </java>
>> </target>
>
>> This generates the following exception:
>
>> $ ant foo
>> Buildfile: /some/path/to/build.xml
>
>> foo:
>> [java] java.lang.NoClassDefFoundError:
>> com/sun/net/ssl/internal/ssl/Provider
>> [java] at
>> org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
> [...]
>> [java] Java Result: -1
>
>> Java and Ant versions are pretty much the latest:
>
>> If I remove the pathelement directive, the build works.
>
> If you don't specify the <classpath> explicitly your Java process runs
> with the same CLASSPATH that is used by Ant internally - which includes
> jsse.jar.
>
> If you specify it, then you only get what you have asked for (unless you
> fiddle with the build.sysclasspath property), or close to it. I think
> it should work if you explicitly add
>
> <pathelement path="${java.class.path}"/>
Hi Stefan,
Adding that pathelement had no effect. I still get precisely the same error.
I would argue that if pathelement requires jsse.jar, it should
automatically include it in the classpath just as it does rt.jar.
> if you don't like hardcoding jsse.jar (which you could address relative
> to ${java.home}).
I ended up just copying jsse.jar into my jars directory which is part
of the classpath using a fileset so that the issue would at least no
pollute my build.xml. Of course when I update Java this could break.
But I could not think of another way to do it.
Thanks anyway. I just posted for posterity mostly.
Mike
--
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]