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 Mikhail Umorin <mi...@sbcglobal.net> on 2007/09/19 16:35:53 UTC
compiling Derby under java 1.6
Hello --
I am trying to run derby under java 1.6 on Solaris 10 on Sungrid and I get the
following error:
org.apache.derby.client.am.SqlException: Java exception: ':
java.lang.IncompatibleClassChangeError'.
at org.apache.derby.client.am.ResultSet.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetResultSetReply.parseFetchError(Unknown
Source)
at org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply(Unknown
Source)
at org.apache.derby.client.net.NetResultSetReply.readFetch(Unknown Source)
at org.apache.derby.client.net.ResultSetReply.readFetch(Unknown Source)
at org.apache.derby.client.net.NetResultSet.readFetch_(Unknown Source)
at org.apache.derby.client.am.ResultSet.flowFetch(Unknown Source)
at org.apache.derby.client.net.NetCursor.getMoreData_(Unknown Source)
at org.apache.derby.client.am.Cursor.next(Unknown Source)
at org.apache.derby.client.am.ResultSet.nextX(Unknown Source)
at org.apache.derby.client.am.ResultSet.next(Unknown Source)
at meteorology.TAtmosphere.averageSurfaceQuery(TAtmosphere.java:906)
at meteorology.TAtmosphere.temperature(TAtmosphere.java:341)
at meteorology.TAtmosphere.temperature(TAtmosphere.java:321)
at interactors.SmallLakeSetting.stepSetup(SmallLakeSetting.java:146)
at simulation.Simulation.stepSetup(Simulation.java:141)
at simulation.LakeWacoSimulation.stepSetup(LakeWacoSimulation.java:564)
at simulation.Simulation.execute(Simulation.java:195)
at runs.LakeWacoSimulationRun.main(LakeWacoSimulationRun.java:42)
I suspect that it's the jvm version incompatibility problem (correct me if I
am wrong). So, I decided to recompile derby purely under jdk 1.6. I use ant
1.7.0 from command line. I set up ant.properties as:
j14lib=/usr/local/jdk1.6.0_02/jre/lib
jdk16=/usr/local/jdk1.6.0_02
proceed=true
sane=false
JAVA_HOME, ANT_HOME, and paths are set. xalan-j2-2.7.0 is in CLASSPATH
I get ant output:
[mike@mikedesk db-derby-10.3.1.4-src]$ ant all
Buildfile: build.xml
init:
[mkdir] Created dir: /tmp/db-derby-10.3.1.4-src/classes
ensuresanitystate:
evaluate.sane:
ensuresanitystate.sane:
ensuresanitystate.insane:
insane:
[propertyfile] Creating new property
file: /tmp/db-derby-10.3.1.4-src/java/engine/state.properties
setissane:
showenv:
[echo]
[echo] Ant environment:
[echo] Base Directory: /tmp/db-derby-10.3.1.4-src
[echo] Build output: /tmp/db-derby-10.3.1.4-src/classes
[echo] Compiler: modern
[echo] Sane = false
[echo] Proceed = true
[echo]
getstate:
state:
[echo] Generating SanityState.java...
[copy] Copying 1 file
to /tmp/db-derby-10.3.1.4-src/java/shared/org/apache/derby/shared/common/sanity
[propertyfile] Updating property
file: /tmp/db-derby-10.3.1.4-src/java/engine/state.properties
shared:
compile:
[javac] Compiling 12 source files to /tmp/db-derby-10.3.1.4-src/classes
shared:
parsers:
parser:
chkparser:
genParser:
[echo] Generating ij parser...
[java] Java Compiler Compiler Version 4.0 (Parser Generator)
[java] (type "javacc" with no arguments for help)
[java] Reading from file ij.jj . . .
[java] Note: UNICODE_INPUT option is specified. Please make sure you
create the parser/lexer using a Reader with the correct character encoding.
[java] Warning: Lookahead adequacy checking not being performed since
option LOOKAHEAD is more than 1. Set option FORCE_LA_CHECK to true to force
checking.
[java] File "TokenMgrError.java" does not exist. Will create one.
[java] File "Token.java" does not exist. Will create one.
[java] File "CharStream.java" does not exist. Will create one.
[java] Parser generated with 0 errors and 1 warnings.
chkparser:
genParser:
[echo] Generating mtGrammar parser...
[java] Java Compiler Compiler Version 4.0 (Parser Generator)
[java] (type "javacc" with no arguments for help)
[java] Reading from file mtGrammar.jj . . .
[java] Note: UNICODE_INPUT option is specified. Please make sure you
create the parser/lexer using a Reader with the correct character encoding.
[java] File "SimpleCharStream.java" does not exist. Will create one.
[java] Parser generated successfully.
parser:
chkparser:
genParser:
[echo] Generating SQL parser...
[java] Java Compiler Compiler Version 4.0 (Parser Generator)
[java] (type "javacc" with no arguments for help)
[java] Reading from file sqlgrammar.jj . . .
[java] Note: UNICODE_INPUT option is specified. Please make sure you
create the parser/lexer using a Reader with the correct character encoding.
[java] File "TokenMgrError.java" does not exist. Will create one.
[java] Warning: ParseException.java: File is obsolete. Please rename or
delete this file so that a new one can be generated for you.
[java] Warning: Token.java: File is obsolete. Please rename or delete
this file so that a new one can be generated for you.
[java] Warning: CharStream.java: File is obsolete. Please rename or
delete this file so that a new one can be generated for you.
[java] Parser generated with 0 errors and 3 warnings.
engine:
engine_169:
compile_reference:
[javac] Compiling 11 source files to /tmp/db-derby-10.3.1.4-src/classes
[javac] Compiling 2 source files to /tmp/db-derby-10.3.1.4-src/classes
compile_authentication:
[javac] Compiling 2 source files to /tmp/db-derby-10.3.1.4-src/classes
authentication:
compile_io:
[javac] Compiling 4 source files to /tmp/db-derby-10.3.1.4-src/classes
storage:
compile_iapi_error_jsr169:
compile_reference:
[javac] Compiling 4 source files to /tmp/db-derby-10.3.1.4-src/classes
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:60:
package org.apache.xpath does not exist
[javac] import org.apache.xpath.XPath;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:61:
package org.apache.xpath does not exist
[javac] import org.apache.xpath.XPathContext;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:62:
package org.apache.xpath.objects does not exist
[javac] import org.apache.xpath.objects.XObject;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:63:
package org.apache.xpath.objects does not exist
[javac] import org.apache.xpath.objects.XNodeSet;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:65:
package org.apache.xml.utils does not exist
[javac] import org.apache.xml.utils.PrefixResolverDefault;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:67:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.DOMSerializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:68:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.Serializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:69:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.SerializerFactory;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:70:
package org.apache.xalan.templates does not exist
[javac] import org.apache.xalan.templates.OutputProperties;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:125:
cannot find symbol
[javac] symbol : class Serializer
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private Serializer serializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:129:
cannot find symbol
[javac] symbol : class XPath
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPath query;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:130:
cannot find symbol
[javac] symbol : class XPathContext
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPathContext xpContext;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:668:
cannot find symbol
[javac] symbol : class XPathContext
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPathContext getXPathContext()
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/impl/jdbc/EmbedStatement.java:61:
org.apache.derby.impl.jdbc.EmbedStatement is not abstract and does not
override abstract method isWrapperFor(java.lang.Class) in java.sql.Wrapper
[javac] public class EmbedStatement extends ConnectionChild
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/impl/jdbc/EmbedResultSetMetaData.java:59:
org.apache.derby.impl.jdbc.EmbedResultSetMetaData is not abstract and does
not override abstract method isWrapperFor(java.lang.Class) in
java.sql.Wrapper
[javac] public class EmbedResultSetMetaData
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:267:
cannot find symbol
[javac] symbol : class XPath
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] query = new XPath(queryExpr, null,
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:268:
cannot find symbol
[javac] symbol : class PrefixResolverDefault
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] new PrefixResolverDefault(dBuilder.newDocument()),
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:269:
cannot find symbol
[javac] symbol : variable XPath
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] XPath.SELECT);
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:401:
cannot find symbol
[javac] symbol : class DOMSerializer
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] DOMSerializer dSer = serializer.asDOMSerializer();
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:597:
cannot find symbol
[javac] symbol : class XObject
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] XObject xOb = query.execute(xpContext, docNode, null);
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:604:
cannot find symbol
[javac] symbol : class XNodeSet
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] if ((xOb instanceof XNodeSet) &&
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:605:
cannot find symbol
[javac] symbol : class XNodeSet
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] (((XNodeSet)xOb).nodelist().getLength() > 0))
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:611:
cannot find symbol
[javac] symbol : class XNodeSet
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] else if (!(xOb instanceof XNodeSet))
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:625:
cannot find symbol
[javac] symbol : class XNodeSet
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] if (!(xOb instanceof XNodeSet))
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:671:
cannot find symbol
[javac] symbol : class XPathContext
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] xpContext = new XPathContext();
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:686:
cannot find symbol
[javac] symbol : variable OutputProperties
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] Properties props =
OutputProperties.getDefaultMethodProperties("xml");
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:723:
cannot find symbol
[javac] symbol : variable SerializerFactory
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] serializer = SerializerFactory.getSerializer(props);
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/impl/jdbc/EmbedDatabaseMetaData.java:90:
org.apache.derby.impl.jdbc.EmbedDatabaseMetaData is not abstract and does not
override abstract method autoCommitFailureClosesAllResultSets() in
java.sql.DatabaseMetaData
[javac] public class EmbedDatabaseMetaData extends ConnectionChild
[javac] ^
and so on...
What is the problem?
I appreciate any help.
Mikhail.
Re: compiling Derby under java 1.6
Posted by Mikhail Umorin <mi...@sbcglobal.net>.
Thanks for ideas, Dag --
On Wed September 19 2007, Dag H. Wanvik wrote:
> Mikhail Umorin <mi...@sbcglobal.net> writes:
>
> As for the IncompatibleClassChangeError, I don't know why you get this
> here, you may want to print out any nested exceptions you get, which
> might provide more information on the cause.
> (http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html#getNextEx
>ception()) .
>
> Also, do you see anything in derby.log on the server?
here is more details on the nested exceptions (I submitted a but report and
waiting for its confirmation):
---SQLException Caught---
SQLState: XJ001
Severity: -1
Message: Java exception: ': java.lang.IncompatibleClassChangeError'.
org.apache.derby.client.am.SqlException: Java exception: ':
java.lang.IncompatibleClassChangeError'.
at org.apache.derby.client.am.ResultSet.completeSqlca(Unknown Source)
at org.apache.derby.client.net.NetResultSetReply.parseFetchError(Unknown
Source)
at org.apache.derby.client.net.NetResultSetReply.parseCNTQRYreply(Unknown
Source)
at org.apache.derby.client.net.NetResultSetReply.readFetch(Unknown Source)
at org.apache.derby.client.net.ResultSetReply.readFetch(Unknown Source)
at org.apache.derby.client.net.NetResultSet.readFetch_(Unknown Source)
at org.apache.derby.client.am.ResultSet.flowFetch(Unknown Source)
at org.apache.derby.client.net.NetCursor.getMoreData_(Unknown Source)
at org.apache.derby.client.am.Cursor.next(Unknown Source)
at org.apache.derby.client.am.ResultSet.nextX(Unknown Source)
at org.apache.derby.client.am.ResultSet.next(Unknown Source)
at meteorology.TAtmosphere.averageSurfaceQuery(TAtmosphere.java:906)
at meteorology.TAtmosphere.temperature(TAtmosphere.java:341)
at meteorology.TAtmosphere.temperature(TAtmosphere.java:321)
at interactors.SmallLakeSetting.stepSetup(SmallLakeSetting.java:146)
at simulation.Simulation.stepSetup(Simulation.java:141)
at simulation.LakeWacoSimulation.stepSetup(LakeWacoSimulation.java:564)
at simulation.Simulation.execute(Simulation.java:195)
at runs.LakeWacoSimulationRun.main(LakeWacoSimulationRun.java:42)
---SQLException Caught---
#
# An unexpected error has been detected by Java Runtime Environment:
#
# Internal Error (53484152454432554E54494D450E435050020F), pid=10433, tid=2
#
# Java VM: Java HotSpot(TM) Server VM (1.6.0_02-b05 mixed mode)
# An error report file with more information is saved as hs_err_pid10433.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
derbyError.log says:
Server is ready to accept connections on port 1527.
Server is ready to accept connections on port 1527.
Connection number: 1.
----------------------------------------------------------------
2007-09-20 00:26:26.437 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby -
10.1.1.1 - (292855): instance c013800d-0115-204e-e638-000013609dc5
on database directory /home/user0106/derbyDB/reservoirDB
Database Class Loader started - derby.database.classpath=''
2007-09-20 00:26:26.632 GMT Thread[DRDAConnThread_4,5,derby.daemons] (DATABASE
= reservoirDB), (DRDAID = {1}), Cloudscape Network Server connected to
database reservoirDB
Connection number: 2.
----------------------------------------------------------------
2007-09-20 00:26:26.669 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby -
10.1.1.1 - (292855): instance a816c00e-0115-204e-e638-000013609dc5
on database directory /home/user0106/derbyDB/streamDB
Database Class Loader started - derby.database.classpath=''
2007-09-20 00:26:26.681 GMT Thread[DRDAConnThread_5,5,derby.daemons] (DATABASE
= streamDB), (DRDAID = {2}), Cloudscape Network Server connected to database
streamDB
Connection number: 3.
----------------------------------------------------------------
2007-09-20 00:26:26.704 GMT:
Booting Derby version The Apache Software Foundation - Apache Derby -
10.1.1.1 - (292855): instance 601a400f-0115-204e-e638-000013609dc5
on database directory /home/user0106/derbyDB/weatherDB
Database Class Loader started - derby.database.classpath=''
2007-09-20 00:26:26.716 GMT Thread[DRDAConnThread_6,5,derby.daemons] (DATABASE
= weatherDB), (DRDAID = {3}), Cloudscape Network Server connected to database
weatherDB
2007-09-20 00:26:31.028 GMT Thread[DRDAConnThread_6,5,derby.daemons] (XID =
31), (SESSIONID = 0), (DATABASE = weatherDB), (DRDAID =
NF000001.O2FB-4124733118469966341{3}), Cleanup action starting
2007-09-20 00:26:31.029 GMT Thread[DRDAConnThread_6,5,derby.daemons] (XID =
31), (SESSIONID = 0), (DATABASE = weatherDB), (DRDAID =
NF000001.O2FB-4124733118469966341{3}), Failed Statement is: Select
min(datetime) from instant_weather inner join instant_surface on
instant_weather.instant_weather_id = instant_surface.instant_weather_id where
datetime >= ? and dry_bulb_temperature IS NOT NULL
java.lang.IncompatibleClassChangeError
at
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.doProjection(Unknown
Source)
at
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCore(Unknown
Source)
at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getNextRow(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.movePosition(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedResultSet.next(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.writeFDODTA(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.writeQRYDTA(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.processCommands(Unknown Source)
at org.apache.derby.impl.drda.DRDAConnThread.run(Unknown Source)
Cleanup action completed
Connection number: 4.
Shutdown successful.
Connection number: 1.
Connection number: 2.
Connection number: 3.
Connection number: 4.
Connection number: 5.
Connection number: 6.
Connection number: 7.
Connection number: 8.
Connection number: 9.
Connection number: 10.
Connection number: 11.
Connection number: 12.
Connection number: 13.
Connection number: 14.
Connection number: 15.
Connection number: 16.
Connection number: 17.
Connection number: 18.
Connection number: 19.
Connection number: 20.
>
> As for compiling Derby with JDK 1.6:
>
> I think i use a plain "xalan.jar", which in addition to xalan-j2-2.7.0
> contains some supporting packages, perhaps that is why you have an
> compile time issue with xpath and serializer.
> (see http://xml.apache.org/xalan-j/downloads.html).
I downloaded latest xalan distribution binary
(xalan-j_2_7_0-bin-2jars.tar.gz). Added jars to the CLASSPATH. They do
contain org.apache.xpath and other packages but ant still complains that they
are missing.
>
> As for the problem with the the abstract method
> (EmbedDatabaseMetaData), this line in ant.properties is wrong:
>
> j14lib=/usr/local/jdk1.6.0_02/jre/lib
>
> It should point to the JDK 1.4, not to JDK 1.6, even if you use the
> 1.6 compiler. (Derby needs to compile some of the sources with a
> JDK1.4 source level and runtime, in order for the resulting product to
> be runnable on multiple platform versions).
>
Does this mean that apps compiled under java 1.6 may not be cross-platform?
Could this be the reason why I get the error because some derby classes were
compiled with 1.4 level but those classes are different in jvm 1.6?
Thank you for the input,
Mikhail
Re: compiling Derby under java 1.6
Posted by Mikhail Umorin <mi...@sbcglobal.net>.
On Wed September 19 2007, Dag H. Wanvik wrote:
>
> As for compiling Derby with JDK 1.6:
>
> I think i use a plain "xalan.jar", which in addition to xalan-j2-2.7.0
> contains some supporting packages, perhaps that is why you have an
> compile time issue with xpath and serializer.
> (see http://xml.apache.org/xalan-j/downloads.html).
>
Despite all downloads and setting classpath I still get
% ant
/usr/bin/build-classpath: error: Could not find ant-launcher Java extension
for this JVM
/usr/bin/build-classpath: error: Could not find jaxp_parser_impl Java
extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
Buildfile: build.xml
init:
[mkdir] Created dir: /tmp/db-derby-10.3.1.4-src/classes
...
compile_iapi_error_jsr169:
compile_reference:
[javac] Compiling 4 source files to /tmp/db-derby-10.3.1.4-src/classes
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:60:
package org.apache.xpath does not exist
[javac] import org.apache.xpath.XPath;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:61:
package org.apache.xpath does not exist
[javac] import org.apache.xpath.XPathContext;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:62:
package org.apache.xpath.objects does not exist
[javac] import org.apache.xpath.objects.XObject;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:63:
package org.apache.xpath.objects does not exist
[javac] import org.apache.xpath.objects.XNodeSet;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:65:
package org.apache.xml.utils does not exist
[javac] import org.apache.xml.utils.PrefixResolverDefault;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:67:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.DOMSerializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:68:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.Serializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:69:
package org.apache.xalan.serialize does not exist
[javac] import org.apache.xalan.serialize.SerializerFactory;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:70:
package org.apache.xalan.templates does not exist
[javac] import org.apache.xalan.templates.OutputProperties;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:125:
cannot find symbol
[javac] symbol : class Serializer
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private Serializer serializer;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:129:
cannot find symbol
[javac] symbol : class XPath
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPath query;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:130:
cannot find symbol
[javac] symbol : class XPathContext
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPathContext xpContext;
[javac] ^
[javac] /tmp/db-derby-10.3.1.4-src/java/engine/org/apache/derby/iapi/types/SqlXmlUtil.java:668:
cannot find symbol
[javac] symbol : class XPathContext
[javac] location: class org.apache.derby.iapi.types.SqlXmlUtil
[javac] private XPathContext getXPathContext()
[javac] ^
and so on.
my CLASSPATH:
$ echo $CLASSPATH
/usr/java/db/lib/derby.jar:/usr/java/db/lib/derbyclient.jar:/usr/java/db/lib/derbynet.jar:
/usr/java/db/lib/derbyrun.jar:/usr/java/db/lib/derbytools.jar:/usr/share/java/antlr-2.7.7.jar:/usr/share/java/antlr.jar:
/usr/share/java/bcmail-jdk16-136.jar:/usr/share/java/bcpg-jdk16-136.jar:/usr/share/java/bcprov-jdk16-136.jar:
/usr/share/java/bctest-jdk16-136.jar:/usr/share/java/bctsp-jdk16-136.jar:/usr/share/java/cairo1.0-1.0.8.jar:
/usr/share/java/cairo1.0.jar:/usr/share/java/classpathx-mail-1.3.2-monolithic-1.1.1.jar:
/usr/share/java/classpathx-mail-1.3.2-monolithic.jar:/usr/share/java/com-sun-javadoc-0.7.7.jar:
/usr/share/java/com-sun-javadoc.jar:/usr/share/java/com-sun-tools-doclets-Taglet-0.7.7.jar:
/usr/share/java/com-sun-tools-doclets-Taglet.jar:/usr/share/java/dom.jar:/usr/share/java/gconf2.12-2.12.6.jar:
/usr/share/java/gconf2.12.jar:/usr/share/java/geronimo-jaf-1.0.2-api-1.0.jar:/usr/share/java/geronimo-jaf-1.0.2-api.jar:
/usr/share/java/geronimo-jms-1.1-api-1.0.jar:/usr/share/java/geronimo-jms-1.1-api.jar:/usr/share/java/glib0.4-0.4.2.jar:
/usr/share/java/glib0.4.jar:/usr/share/java/gnu-classpath-tools-gjdoc-0.7.7.jar:/usr/share/java/gnu-classpath-tools-gjdoc.jar:
/usr/share/java/gtk2.10-2.10.2.jar:/usr/share/java/gtk2.10.jar:/usr/share/java/jaf.jar:/usr/share/java/javamail.jar:
/usr/share/java/jaxp13.jar:/usr/share/java/jaxp.jar:/usr/share/java/jimi.jar:/usr/share/java/jms.jar:/usr/share/java/libgcj-4.1.2.jar:
/usr/share/java/postgresql-8.2-504.jdbc4.jar:/usr/share/java/sax2.jar:/usr/share/java/sax.jar:/usr/share/java/xml-commons-apis.jar:
/usr/share/java/xml-commons-jaxp-1.3-apis-1.3.03.jar:/usr/share/java/xml-commons-jaxp-1.3-apis.jar:
/usr/share/java/xml-commons-resolver11-1.3.03.jar:/usr/share/java/xml-commons-resolver11.jar:/usr/share/java/xml-commons-resolver.jar:
/usr/share/java/xslt.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-1.7.0.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-antlr.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-apache-bcel.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-apache-bsf.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-apache-log4j.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-apache-oro.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-apache-regexp.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-apache-resolver.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-commons-logging.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-commons-net.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-jai.jar:/usr/share/java/apache-ant-1.7.0/lib/ant.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-javamail.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-jdepend.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-jmf.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-jsch.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-junit.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-launcher.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-netrexx.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-nodeps.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-starteam.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-stylebook.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-swing.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-testutil.jar:/usr/share/java/apache-ant-1.7.0/lib/ant-trax.jar:
/usr/share/java/apache-ant-1.7.0/lib/ant-weblogic.jar:/usr/share/java/apache-ant-1.7.0/lib/xercesImpl.jar:
/usr/share/java/apache-ant-1.7.0/lib/xml-apis.jar:/usr/share/java/xalan-j_2_7_0/serializer.jar:/usr/share/java/xalan-j_2_7_0/xalan.jar:
/usr/share/java/xalan-j_2_7_0/xercesImpl.jar:/usr/share/java/xalan-j_2_7_0/xml-apis.jar:/usr/share/java/xalan-j_2_7_0/xsltc.jar:
/usr/share/java/xerces-2_9_1/resolver.jar:/usr/share/java/xerces-2_9_1/serializer.jar:/usr/share/java/xerces-2_9_1/xercesImpl.jar:
/usr/share/java/xerces-2_9_1/xercesSamples.jar:/usr/share/java/xerces-2_9_1/xml-apis.jar
What is the problem?
Can someone help me?
Mikhail.
Re: compiling Derby under java 1.6
Posted by "Dag H. Wanvik" <Da...@Sun.COM>.
Mikhail Umorin <mi...@sbcglobal.net> writes:
As for the IncompatibleClassChangeError, I don't know why you get this
here, you may want to print out any nested exceptions you get, which
might provide more information on the cause.
(http://java.sun.com/javase/6/docs/api/java/sql/SQLException.html#getNextException())
.
Also, do you see anything in derby.log on the server?
As for compiling Derby with JDK 1.6:
I think i use a plain "xalan.jar", which in addition to xalan-j2-2.7.0
contains some supporting packages, perhaps that is why you have an
compile time issue with xpath and serializer.
(see http://xml.apache.org/xalan-j/downloads.html).
As for the problem with the the abstract method
(EmbedDatabaseMetaData), this line in ant.properties is wrong:
j14lib=/usr/local/jdk1.6.0_02/jre/lib
It should point to the JDK 1.4, not to JDK 1.6, even if you use the
1.6 compiler. (Derby needs to compile some of the sources with a
JDK1.4 source level and runtime, in order for the resulting product to
be runnable on multiple platform versions).
Thanks,
Dag