You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Dimple Bhatia <di...@gmail.com> on 2007/04/19 00:43:09 UTC

Errors hen building derby using eclipse

Hi,
I am tryin to build the derby source using eclipse. I am using this link i
found on the derby wiki
-
http://wiki.apache.org/db-derby/BuildingDerby#head-0c0abaf557bc2cfe0efdbdd9a6098de1db0f6bb2
I have followed the instructions in building.txt but when I build i see a
lot of errors such as below: I tried to add the jce1_2_2.ajr, junit.jar and
jdbc2_0-stdext.jar as extnal jars to the project libraries under java build
path but still the same problem. I am using the Ant builder asper the
istrauctions on the above website.
I woudl appreciate your hints.


[javac] Compiling 3 source files to C:\Documents and
Settings\dimple\workspace\DerbySource\classes

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:55:
package javax.crypto does not exist

[javac] import javax.crypto.KeyGenerator;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:56:
package javax.crypto does not exist

[javac] import javax.crypto.SecretKey;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:57:
package javax.crypto does not exist

[javac] import javax.crypto.SecretKeyFactory;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:58:
package javax.crypto.spec does not exist

[javac] import javax.crypto.spec.DESKeySpec;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:59:
package javax.crypto.spec does not exist

[javac] import javax.crypto.spec.SecretKeySpec;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:101:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] private SecretKey mainSecretKey;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:303:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] private SecretKey generateKey(byte[] secretKey) throws
StandardException

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:394:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] private CipherProvider createNewCipher(int mode, SecretKey
secretKey,

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:37:
package javax.crypto does not exist

[javac] import javax.crypto.Cipher;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:38:
package javax.crypto.spec does not exist

[javac] import javax.crypto.spec.IvParameterSpec;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:39:
package javax.crypto does not exist

[javac] import javax.crypto.SecretKeyFactory;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:40:
package javax.crypto.spec does not exist

[javac] import javax.crypto.spec.SecretKeySpec;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:41:
package javax.crypto does not exist

[javac] import javax.crypto.SecretKey;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:51:
cannot resolve symbol

[javac] symbol : class Cipher

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] private Cipher cipher;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:54:
cannot resolve symbol

[javac] symbol : class IvParameterSpec

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] private final IvParameterSpec ivspec;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:59:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] private SecretKey cryptixKey;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:61:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] JCECipherProvider(int mode, SecretKey secretKey, byte[] iv, String
algorithm, String provider)

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:153:
cannot resolve symbol

[javac] symbol : class KeyGenerator

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] KeyGenerator keyGen;

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:156:
cannot resolve symbol

[javac] symbol : variable KeyGenerator

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] keyGen = KeyGenerator.getInstance(cryptoAlgorithmShort);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:162:
cannot resolve symbol

[javac] symbol : variable KeyGenerator

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] keyGen = KeyGenerator.getInstance(cryptoAlgorithmShort, provider);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:167:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] SecretKey key = keyGen.generateKey();

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:203:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] SecretKey key = generateKey(muck);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:270:
cannot resolve symbol

[javac] symbol : class SecretKey

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] SecretKey key = generateKey(muck);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:314:
cannot resolve symbol

[javac] symbol : variable DESKeySpec

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] if (DESKeySpec.isWeak(secretKey, 0))

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherFactory.java:322:
cannot resolve symbol

[javac] symbol : class SecretKeySpec

[javac] location: class org.apache.derby.impl.services.jce.JCECipherFactory

[javac] return new SecretKeySpec(secretKey, cryptoAlgorithmShort);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:65:
cannot resolve symbol

[javac] symbol : class IvParameterSpec

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] ivspec = new IvParameterSpec(iv);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:72:
cannot resolve symbol

[javac] symbol : variable Cipher

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] cipher = Cipher.getInstance(algorithm);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:101:
cannot resolve symbol

[javac] symbol : variable Cipher

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] cipher = Cipher.getInstance(algorithm,provider);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:115:
cannot resolve symbol

[javac] symbol : variable Cipher

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] cipher.init(Cipher.ENCRYPT_MODE, secretKey);

[javac] ^

[javac] C:\Documents and
Settings\dimple\workspace\DerbySource\java\engine\org\apache\derby\impl\services\jce\JCECipherProvider.java:117:
cannot resolve symbol

[javac] symbol : variable Cipher

[javac] location: class org.apache.derby.impl.services.jce.JCECipherProvider

[javac] cipher.init(Cipher.ENCRYPT_MODE, secretKey,ivspec);

Re: Errors hen building derby using eclipse

Posted by Andrew McIntyre <mc...@gmail.com>.
On 4/19/07, Dimple Bhatia <di...@gmail.com> wrote:
> Hi Andrew,
> I did follow the instructions in BUILDING.txt in the 10.2 branch which i am
> trying to build. Here are the content sof my ant.properties
>
>
> j14lib=c:/myddrive/J2Se1.4/jre/lib
>
> j13lib=c:/myddrive/jdk1.3/jre/lib
>
> proceed=true
>
> I am notsure whether the IBM JVM is being used but i tried to add the
> java14compileclasspth tot he properties file and that did not help either.
> Fromt he compile errors, it looks like it doesn't find the classes in the
> JCE. I have palced those jarsin %derbsource%/tools/javaas per the
> instructions in BUILDING.txt I don't see the classpath being set to
> %derbsource%/tools/java So I don't understand how it will find it.
>
> I also tried to build the source in the workspace from the command line
> using ant all but i see the same errors.
>
> Any other suggestions?

The Derby build sets a number of properties that point to various jar
files and resources by reading in several properties files from
tools/ant/properties. If for some reason Ant cannot find the JCE jar
in tools/java/jce1_2_2.jar, as specified in
tools/ant/properties/compilepath.properties, you can try overriding
that setting by adding 'jce1_2_1=/full/path/to/jce1_2_2.jar' in your
~/ant.properties.

HTH,
andrew

Re: Errors hen building derby using eclipse

Posted by Dimple Bhatia <di...@gmail.com>.
Hi Andrew,
I did follow the instructions in BUILDING.txt in the 10.2 branch which i am
trying to build. Here are the content sof my ant.properties

j14lib=c:/myddrive/J2Se1.4/jre/lib

j13lib=c:/myddrive/jdk1.3/jre/lib

proceed=true

I am notsure whether the IBM JVM is being used but i tried to add the
java14compileclasspth tot he properties file and that did not help either.
Fromt he compile errors, it looks like it doesn't find the classes in the
JCE. I have palced those jarsin %derbsource%/tools/javaas per the
instructions in BUILDING.txt I don't see the classpath being set to
%derbsource%/tools/java
So I don't understand how it will find it.

I also tried to build the source in the workspace from the command line
using ant all but i see the same errors.

Any other suggestions?

Thanks

Dimple




On 4/18/07, Andrew McIntyre <mc...@gmail.com> wrote:
>
> On 4/18/07, Dimple Bhatia <di...@gmail.com> wrote:
> > Hi,
> > I am tryin to build the derby source using eclipse. I am using this link
> i
> > found on the derby wiki
> > -
> >
> http://wiki.apache.org/db-derby/BuildingDerby#head-0c0abaf557bc2cfe0efdbdd9a6098de1db0f6bb2
> > I have followed the instructions in building.txt but when I build i see
> a
> > lot of errors such as below: I tried to add the jce1_2_2.ajr, junit.jarand
> > jdbc2_0-stdext.jar as extnal jars to the project libraries under java
> build
> > path but still the same problem. I am using the Ant builder asper the
> > istrauctions on the above website.
> > I woudl appreciate your hints.
>
> The classpath for the build is not determined by Eclipse's Java Build
> Path when building inside Eclipse using a custom Ant Builder. Several
> Ant properties need to be set in your ~/ant.properties file or loaded
> with Ant's -propertyfile option. See the file BUILDING.txt that is
> included in your checkout of the Derby source tree for more
> information about how to set these properties. The brief version is:
>
> * If you are building the trunk, make sure that j14lib is set to the
> location of a JDK 1.4 installation's 'jre/lib' directory in your
> ~/ant.properties and that you can build from the command-line using
> Ant.
>
> * If you are building one of the branches, be sure to follow all of
> the instructions in BUILDING.txt included with the branch and make
> sure that you have at least the j13lib and j14lib properties set in
> your ~/ant.properties.
>
> * If you are using an IBM JVM, be sure to follow the instructions in
> section 3.2.2 of BUILDING.txt regarding the setting of the
> java14compile.classpath property.
>
> HTH,
> andrew
>

Re: Errors hen building derby using eclipse

Posted by Andrew McIntyre <mc...@gmail.com>.
On 4/18/07, Dimple Bhatia <di...@gmail.com> wrote:
> Hi,
> I am tryin to build the derby source using eclipse. I am using this link i
> found on the derby wiki
> -
> http://wiki.apache.org/db-derby/BuildingDerby#head-0c0abaf557bc2cfe0efdbdd9a6098de1db0f6bb2
> I have followed the instructions in building.txt but when I build i see a
> lot of errors such as below: I tried to add the jce1_2_2.ajr, junit.jar and
> jdbc2_0-stdext.jar as extnal jars to the project libraries under java build
> path but still the same problem. I am using the Ant builder asper the
> istrauctions on the above website.
> I woudl appreciate your hints.

The classpath for the build is not determined by Eclipse's Java Build
Path when building inside Eclipse using a custom Ant Builder. Several
Ant properties need to be set in your ~/ant.properties file or loaded
with Ant's -propertyfile option. See the file BUILDING.txt that is
included in your checkout of the Derby source tree for more
information about how to set these properties. The brief version is:

* If you are building the trunk, make sure that j14lib is set to the
location of a JDK 1.4 installation's 'jre/lib' directory in your
~/ant.properties and that you can build from the command-line using
Ant.

* If you are building one of the branches, be sure to follow all of
the instructions in BUILDING.txt included with the branch and make
sure that you have at least the j13lib and j14lib properties set in
your ~/ant.properties.

* If you are using an IBM JVM, be sure to follow the instructions in
section 3.2.2 of BUILDING.txt regarding the setting of the
java14compile.classpath property.

HTH,
andrew