Subject RE: [Firebird-Java] Re: Compiling Type2 driver
Author Ryan Baldwin
Hi,

>What is really weird is following: if I DON'T put cpptasks.jar into
>jre\lib\ext, then ant outputs this

This is exactly the same as I get if I remove cpptasks.jar from the
client-java/lib directory.

What JDK Version are you using ?
What OS are you using ?

Also if you could try:

1)Go to client-java/bin and open ant.bat.
2)The first line says '@echo off' change this to read '@echo on'.
3)Do 'build compile-native' again.
4)Just before the init: line there will be the command issued to start the
VM and run the ant script. Mine looks like this at present(along with a
little context)

"
C:\development\client-java>goto checkJikes

C:\development\client-java>if not "" == "" goto runAntWithJikes

C:\development\client-java>"C:\jdks\j2sdk1.4.2\bin\java" -classpath
"C:\jdks\j2s
dk1.4.2\lib\tools.jar;C:\development\client-java\bin\\..\lib\cpptasks.jar;C:
\dev
elopment\client-java\bin\\..\lib\ant.jar;" -Dant.home="C:\development\client
-jav
a\bin\\.." org.apache.tools.ant.Main
compile-native -Djavax.xml.parsers.Documen
tBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" -Djavax.
xml.
parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"
Buildfile: build.xml

init:

compile-native:

init:
"

If you could grab this and post it it may help.


Perhaps also for sanity's sake - if you have the time and are willing - you
could attempt this:



1) Install a fresh jdk 1.4.1_XX or jdk 1.4.2. Dont copy any jars into this
JDK's subdirectries.
2) Checkout via anonymous CVS a fresh client-java module.
2) Open a command prompt and ensure ANT_HOME is not set.
3) cd to the root of the new client-java source tree.
4) Type 'SET JAVA_HOME={THE LOCATION WHERE THE FRESH jdk 1.4.1_XX was
installed}.
5) Type 'build compile-native'.


and if this still does not work grab the command that starts the VM like
before.

This should reproduce exactly the steps that work for me and by looking at
the lines that start the VM it should be possible to verify that nothing
else is interfering.

If this doesent work then I would begin to suspect that maybe this might be
due to the MSCV6 not being correcty set up - although I have always had
rather more informative error messages when the native build tools have not
been found - but we would be getting to the stage where there would be few
possibilities. I will try testing on a box without MSVC set up and see if I
can reproduce this that way.

Thanks
Ryan







-----Original Message-----
From: Luca Lafranchi [mailto:luca.lafranchi@...]
Sent: 19 August 2003 18:15
To: firebird-java@yahoogroups.com
Subject: Re: [Firebird-Java] Re: Compiling Type2 driver


Hi Ryan

>
> Which JDK version does JAVA_HOME point too(or is overwise being used) ?
>

I'm now home, and here I am using j2sdk1.4.2

> If you actually look inside cpptasks.jar - Can you see the class
> 'net.sf.antcontrib.cpptasks.CCTask'
> and is the size of cpptasks.jar 195K ? (Just I'm wondering if maybe this
> could be corrupted somehow.)
>

File appears not corrupted, and class is present.

What is really weird is following: if I DON'T put cpptasks.jar into
jre\lib\ext, then ant outputs this

"init:

compile-native:
[taskdef] Could not load definitions from resource cpptasks.tasks. It
could not be found.
[typedef] Could not load definitions from resource cpptasks.types. It
could not be found.
Overriding previous definition of reference to jaybird.compiler
Overriding previous definition of reference to jaybird.linker
Overriding previous definition of reference to jaybird.compiler
Overriding previous definition of reference to jaybird.linker

init:

set_platform_properties:

prepare_mingw:

prepare_msvc:

BUILD FAILED
file:D:/programming/opensource_projects/client-java/build_native.xml:185:
Could not create task or type of type: compiler.

Ant could not find the task or a class this task relies upon.

Total time: 1 second
"

otherwise it's

"
init:

compile-native:

BUILD FAILED
file:D:/programming/opensource_projects/client-java/build_native.xml:31:
taskdef class net.sf.antcontrib.cpptasks.CCTask cannot be found

Total time: 1 second
"

From the log above I see that if cpptasks.jar is not found, then
"taskdef" and "typedef" cannot be evaluated and the build fails, but
then I don't understand why ant finds "cpptasks.task" and
"cpptasks.types" (which are also in the jar) and not the class defined
in "cpptasks.task".

Ciao
Luca



To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/