You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Lily Wei <li...@yahoo.com> on 2009/06/08 23:29:39 UTC

Help with build issue

Hi:
     I am trying to build trunk with sun JDK 1.6, ANT 1.7.1 and junit 3.8.2.

     I am getting error like:
c:\derby\10.5\build.xml:203: Don't know how to set java15compile.classpath, java
16compile.classpath using this environment:
java.vendor = Sun Microsystems Inc.
java.home = c:\sun\sdk\jdk\jre
java.version = 1.6.0_13
os.name = Windows Vista
j14lib = null
j15lib = null
j16lib = null
Please consult BUILDING.html for instructions on how to set the compiler-classpa
th properties.

     After setting ant.properties under my user directionry like:
bash-3.1$ cat ant.properties
jdk16=c:/sun/sdk/jdk
j16lib=${jdk16}/jre/lib
j14lib=${jdk16}/jre/lib
j15lib=${jdk16}/jre/lib

     I get a different error. The error is relate to XPath.class:
compile_types:
    [javac] org\apache\derby\iapi\types\SqlXmlUtil.java added as org\apache\derb
y\iapi\types\SqlXmlUtil.class doesn't exist.
    [javac] Compiling 1 source file to c:\derby\trunk\classes
    [javac] Using modern compiler
    [javac] Compilation arguments:
    [javac] '-nowarn'
    [javac] '-deprecation'
    [javac] '-d'
    [javac] 'c:\derby\trunk\classes'
    [javac] '-classpath'
    [javac] 'c:\derby\trunk\classes;c:\sun\sdk\jdk\jre\lib\charsets.jar;c:\sun\s
dk\jdk\jre\lib\deploy.jar;c:\sun\sdk\jdk\jre\lib\javaws.jar;c:\sun\sdk\jdk\jre\l
ib\jce.jar;c:\sun\sdk\jdk\jre\lib\jsse.jar;c:\sun\sdk\jdk\jre\lib\management-age
nt.jar;c:\sun\sdk\jdk\jre\lib\plugin.jar;c:\sun\sdk\jdk\jre\lib\resources.jar;c:
\sun\sdk\jdk\jre\lib\rt.jar;c:\derby\trunk\tools\java\xercesImpl.jar'
    [javac] '-sourcepath'
    [javac] 'c:\derby\trunk\java\engine'
    [javac] '-target'
    [javac] '1.4'
    [javac] '-bootclasspath'
    [javac] 'c:\derby\trunk\classes\empty'
    [javac] '-g'
    [javac] '-source'
    [javac] '1.4'
    [javac]
    [javac] The ' characters around the executable and arguments are
    [javac] not part of the command.
    [javac] File to be compiled:
    [javac]     c:\derby\trunk\java\engine\org\apache\derby\iapi\types\SqlXmlUti
l.java
    [javac] c:\derby\trunk\java\engine\org\apache\derby\iapi\types\SqlXmlUtil.ja
va:60: package org.apache.xpath does not exist
    [javac] import org.apache.xpath.XPath;
    [javac]                        ^
    [javac] c:\derby\trunk\java\engine\org\apache\derby\iapi\types\SqlXmlUtil.ja
va:61: package org.apache.xpath does not exist
    [javac] import org.apache.xpath.XPathContext;

    I notice xalan.jar where org.apache.xpath.XPath is not in my class list. Any idea what the problem might be.

Thank you so much,
Lily



      

Re: Help with build issue

Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Kathey Marsden <km...@sbcglobal.net> writes:

> I have seen this before after recent message changes.  I am guessing
> that perhaps the tool checks the values in the jars in your classpath
> instead of the build tree, but haven't verified this, because usually

Yes, I think that's correct; have seen this too. I typically see it if
my CLASSPATH is set to a another Derby version/(or sandbox) when
compiling.

Dag

> when I rebuild the issue goes away.  Try the following from your
> source root:
>
> svn update
> rm -rf jars/*
> ant all
>
>
> Kathey
>

-- 
Dag H. Wanvik, staff engineer
Sun Microsystems, Databases (Java DB/Derby)
Haakon VII gt. 7b, N-7485 Trondheim, Norway
Tel: x43496/+47 73842196, Fax:  +47 73842101

Re: Help with build issue

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I have seen this before after recent message changes.  I am guessing 
> that perhaps the tool checks the values in the jars in your classpath 
> instead of the build tree, but haven't verified this, because usually 
> when I rebuild the issue goes away.  Try the following from your source 
> root:
> 
> svn update
> rm -rf jars/*
> ant all

Yes, I had the same problem too, about a month ago.

As an alternate to the 'rm -rf' command, you can do

   ant clobber cleanjars cleandocs junit-clean

Which does a very thorough clean of your svn client.

thanks,

bryan


Re: Help with build issue

Posted by Kathey Marsden <km...@sbcglobal.net>.
Lily Wei wrote:
> Thank you, Knut.
>  
> I was able to build all the source after changin my jdk to jdk1.6.0.
>  
> I am seeing the following error when I try to build my test:
> runmessagecheck:
> [runMessageBundleTest] WARNING: Message id XRE04.U.2 in 
> messages_en.properties i
> s not referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE04.U.1 in 
> messages_en.properties i
> s not referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE11 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE09 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE05 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE41 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE42 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE21 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id XRE22 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> [runMessageBundleTest] WARNING: Message id 42Y03 in 
> messages_en.properties is no
> t referenced in either SQLState.java or MessageId.java
> BUILD FAILED
> c:\derby\trunk\build.xml:514: Message check failed.
> See error in build output or call ant runmessagecheck.
>         at 
> org.apache.derbyBuild.MessageBundleTest.execute(MessageBundleTest.jav
> a:69)
>         at 
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
>         at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
> a:106)
>         at org.apache.tools.ant.Task.perform(Task.java:348)
>         at org.apache.tools.ant.Target.execute(Target.java:357)
>         at org.apache.tools.ant.Target.performTasks(Target.java:385)
>         at 
> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>         at 
> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
> cutor.java:41)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
>         at org.apache.tools.ant.Main.runBuild(Main.java:758)
>         at org.apache.tools.ant.Main.startAnt(Main.java:217)
>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> Total time: 10 seconds
>  
>  
I have seen this before after recent message changes.  I am guessing 
that perhaps the tool checks the values in the jars in your classpath 
instead of the build tree, but haven't verified this, because usually 
when I rebuild the issue goes away.  Try the following from your source 
root:

svn update
rm -rf jars/*
ant all


Kathey


Re: Help with build issue

Posted by Lily Wei <li...@yahoo.com>.
Thank you, Knut.
 
I was able to build all the source after changin my jdk to jdk1.6.0.
 
I am seeing the following error when I try to build my test:
runmessagecheck:
[runMessageBundleTest] WARNING: Message id XRE04.U.2 in messages_en.properties i
s not referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE04.U.1 in messages_en.properties i
s not referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE11 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE09 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE05 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE41 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE42 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE21 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id XRE22 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
[runMessageBundleTest] WARNING: Message id 42Y03 in messages_en.properties is no
t referenced in either SQLState.java or MessageId.java
BUILD FAILED
c:\derby\trunk\build.xml:514: Message check failed.
See error in build output or call ant runmessagecheck.
        at org.apache.derbyBuild.MessageBundleTest.execute(MessageBundleTest.jav
a:69)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Total time: 10 seconds
 
 
        Any idea wil help.
 
Thanks,
Lily
Knut Anders Hatlen <Kn...@Sun.COM> writes:

> Since Derby's build script is supposed to do the right thing with the
> classpath if it only finds JDK 6, you may have more luck if you try
> again with only this in ant.properties:
>
> jdk16=c:/sun/sdk/jdk
> j16lib=${jdk16}/jre/lib
>
> But with your setup this shold have been detected automatically.

It looks like we only detect that it's JDK 6 if the directory in which
it is installed contains the string "1.6". I have logged this as a bug
here: https://issues.apache.org/jira/browse/DERBY-4263

For now, setting (only) j16lib as described above or renaming your jdk
directory to jdk1.6.0 should make it build.

Hope this helps,

-- 
Knut Anders


________________________________

From: Knut Anders Hatlen <Kn...@Sun.COM>
To: derby-dev@db.apache.org
Sent: Monday, June 8, 2009 4:29:41 PM
Subject: Re: Help with build issue



      

Re: Help with build issue

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Knut Anders Hatlen <Kn...@Sun.COM> writes:

> Since Derby's build script is supposed to do the right thing with the
> classpath if it only finds JDK 6, you may have more luck if you try
> again with only this in ant.properties:
>
> jdk16=c:/sun/sdk/jdk
> j16lib=${jdk16}/jre/lib
>
> But with your setup this shold have been detected automatically.

It looks like we only detect that it's JDK 6 if the directory in which
it is installed contains the string "1.6". I have logged this as a bug
here: https://issues.apache.org/jira/browse/DERBY-4263

For now, setting (only) j16lib as described above or renaming your jdk
directory to jdk1.6.0 should make it build.

Hope this helps,

-- 
Knut Anders

Re: Help with build issue

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
Lily Wei <li...@yahoo.com> writes:

> Hi:
>      I am trying to build trunk with sun JDK 1.6, ANT 1.7.1 and junit 3.8.2.
>  
>      I am getting error like:
> c:\derby\10.5\build.xml:203: Don't know how to set java15compile.classpath,
> java
> 16compile.classpath using this environment:
> java.vendor = Sun Microsystems Inc.
> java.home = c:\sun\sdk\jdk\jre
> java.version = 1.6.0_13
> os.name = Windows Vista
> j14lib = null
> j15lib = null
> j16lib = null
> Please consult BUILDING.html for instructions on how to set the
> compiler-classpa
> th properties.

Hi Lily,

It looks like some of the magic in the build script has problems
understanding your environment. That's strange, since it has detected
that you're using Java 1.6.0 so there's no reason why it shouldn't be
able to set java16compile.classpath. Have you installed the full JDK and
not only the JRE? Do you see any other warnings/errors printed before
this one? You may get more information about what's going on if you set
the printCompilerProperties flag, like this:

  ant -DprintCompilerProperties=true

>      After setting ant.properties under my user directionry like:
> bash-3.1$ cat ant.properties
> jdk16=c:/sun/sdk/jdk
> j16lib=${jdk16}/jre/lib
> j14lib=${jdk16}/jre/lib
> j15lib=${jdk16}/jre/lib

If you set any of the j1[456]lib properties, they must all point to a
JDK with the corresponding version number. In your ant.properties all of
them point to a JDK 6 installation, so the build script mistakenly
thinks that no special magic is needed for j14lib and j15lib. That's
probably why you see the XPath errors.

Since Derby's build script is supposed to do the right thing with the
classpath if it only finds JDK 6, you may have more luck if you try
again with only this in ant.properties:

jdk16=c:/sun/sdk/jdk
j16lib=${jdk16}/jre/lib

But with your setup this shold have been detected automatically.

-- 
Knut Anders