Hello all
I'm trying to build tomcat6 from the SRPMs provided at [1], but I appear to have hit a wall. One of the dependencies of tomcat6-6.0.18-8.18.1.noarch [2] is jakarta-commons-dbcp-tomcat5 (provided by jakarta-commons-dbcp [3]). (I don't see why it's requiring tomcat5 components, maybe that's my problem).
When I try to build jakarta-commons-dbcp, compilation fails:
BEGIN BUILD OUTPUT
[root@testserver build]# rpmbuild --rebuild --without maven jakarta-commons-dbcp-1.2.1-7jpp.ep1.2.ep5.el5.src.rpm > buildlog 2>&1 warning: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 37017186 warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root warning: user mockbuild does not exist - using root warning: group mockbuild does not exist - using root Installing jakarta-commons-dbcp-1.2.1-7jpp.ep1.2.ep5.el5.src.rpm Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.70693 + umask 022 + cd /root/rpmbuild/BUILD + cat
If you dont want to build with maven, give rpmbuild option '--without maven'
+ rm -rf /var/tmp/jakarta-commons-dbcp-1.2.1-buildroot + cd /root/rpmbuild/BUILD + rm -rf commons-dbcp-1.2.1 + /usr/bin/bzip2 -dc /root/rpmbuild/SOURCES/commons-dbcp-1.2.1-src-RHCLEAN.tar.bz2 + tar -xf - + STATUS=0 + '[' 0 -ne 0 ']' + cd commons-dbcp-1.2.1 ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chown -Rhf root . ++ /usr/bin/id -u + '[' 0 = 0 ']' + /bin/chgrp -Rhf root . + /bin/chmod -Rf a+rX,u+w,g-w,o-w . + cp LICENSE.txt ../LICENSE + find . -name '*.jar' -exec rm -f '{}' ';' + gzip -dc /root/rpmbuild/SOURCES/commons-build.tar.gz + tar xf - + cp -p /root/rpmbuild/SOURCES/dbcp-tomcat5-build.xml . + echo 'Patch #0 (commons-dbcp-1.2.1-project_xml.patch):' Patch #0 (commons-dbcp-1.2.1-project_xml.patch): + patch -p0 -b --suffix .sav -s + echo 'Patch #1 (commons-dbcp-1.2.1-TestJOCLed.patch):' Patch #1 (commons-dbcp-1.2.1-TestJOCLed.patch): + patch -p0 -b --suffix .sav -s + echo 'Patch #2 (commons-dbcp-1.2.1-TestConnectionPool.patch):' Patch #2 (commons-dbcp-1.2.1-TestConnectionPool.patch): + patch -p0 -b --suffix .sav -s + echo 'Patch #3 (commons-dbcp-1.2.1-navigation_xml.patch):' Patch #3 (commons-dbcp-1.2.1-navigation_xml.patch): + patch -p0 -b --suffix .sav -s + echo 'Patch #4 (commons-dbcp-1.2.1-project_properties.patch):' Patch #4 (commons-dbcp-1.2.1-project_properties.patch): + patch -p0 -b --suffix .sav -s + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.70693 + umask 022 + cd /root/rpmbuild/BUILD + cd commons-dbcp-1.2.1 ++ build-classpath jdbc-stdext xerces-j2 + export CLASSPATH=/usr/lib/jvm-exports/java/jdbc-stdext.jar:/usr/share/java/xerces-j2.jar + CLASSPATH=/usr/lib/jvm-exports/java/jdbc-stdext.jar:/usr/share/java/xerces-j2.jar ++ build-classpath commons-pool ++ build-classpath commons-collections ++ build-classpath junit ++ build-classpath jndi ++ build-classpath xml-commons-apis + ant -Dbuild.sysclasspath=first -Dcommons-pool.jar=/usr/share/java/commons-pool.jar -Dcommons-collections.jar=/usr/share/java/commons-collections.jar -Djunit.jar=/usr/share/java/junit.jar -Djndi.jar=/usr/lib/jvm-exports/java/jndi.jar -Dsax2.jar=/usr/share/java/xml-commons-apis.jar -Djava.io.tmpdir=. -Dtest.failonerror=false dist test Buildfile: build.xml
init:
clean:
prepare-nojdbc3:
prepare-jdbc3: [echo] JDBC 3 was detected.
prepare:
compile: [mkdir] Created dir: /root/rpmbuild/BUILD/commons-dbcp-1.2.1/build/classes [javac] Compiling 39 source files to /root/rpmbuild/BUILD/commons-dbcp-1.2.1/build/classes [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/BasicDataSource.java:43: org.apache.commons.dbcp.BasicDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper [javac] public class BasicDataSource implements DataSource { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingStatement.java:45: org.apache.commons.dbcp.DelegatingStatement is not abstract and does not override abstract method isPoolable() in java.sql.Statement [javac] public class DelegatingStatement extends AbandonedTrace implements Statement { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingStatement.java:130: isClosed() in org.apache.commons.dbcp.DelegatingStatement cannot implement isClosed() in java.sql.Statement; attempting to assign weaker access privileges; was public [javac] protected boolean isClosed() { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingPreparedStatement.java:49: org.apache.commons.dbcp.DelegatingPreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java.sql.PreparedStatement [javac] public class DelegatingPreparedStatement extends DelegatingStatement [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingCallableStatement.java:52: org.apache.commons.dbcp.DelegatingCallableStatement is not abstract and does not override abstract method setNClob(java.lang.String,java.io.Reader) in java.sql.CallableStatement [javac] public class DelegatingCallableStatement extends DelegatingPreparedStatement [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingConnection.java:50: org.apache.commons.dbcp.DelegatingConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection [javac] public class DelegatingConnection extends AbandonedTrace [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/DelegatingResultSet.java:54: org.apache.commons.dbcp.DelegatingResultSet is not abstract and does not override abstract method updateNClob(java.lang.String,java.io.Reader) in java.sql.ResultSet [javac] public class DelegatingResultSet extends AbandonedTrace implements ResultSet { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/PoolablePreparedStatement.java:40: org.apache.commons.dbcp.PoolablePreparedStatement is not abstract and does not override abstract method setNClob(int,java.io.Reader) in java.sql.PreparedStatement [javac] public class PoolablePreparedStatement extends DelegatingPreparedStatement implements PreparedStatement { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/PoolingConnection.java:37: org.apache.commons.dbcp.PoolingConnection is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection [javac] public class PoolingConnection extends DelegatingConnection implements Connection, KeyedPoolableObjectFactory { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/PoolingDataSource.java:44: org.apache.commons.dbcp.PoolingDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper [javac] public class PoolingDataSource implements DataSource { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/SQLNestedException.java:38: warning: non-varargs call of varargs method with inexact argument type for last parameter; [javac] cast to java.lang.Class<?> for a varargs call [javac] cast to java.lang.Class<?>[] for a non-varargs call and to suppress this warning [javac] getCauseMethod = Throwable.class.getMethod("getCause", null); [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/cpdsadapter/ConnectionImpl.java:40: org.apache.commons.dbcp.cpdsadapter.ConnectionImpl is not abstract and does not override abstract method createStruct(java.lang.String,java.lang.Object[]) in java.sql.Connection [javac] class ConnectionImpl implements Connection { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/cpdsadapter/PooledConnectionImpl.java:42: org.apache.commons.dbcp.cpdsadapter.PooledConnectionImpl is not abstract and does not override abstract method removeStatementEventListener(javax.sql.StatementEventListener) in javax.sql.PooledConnection [javac] class PooledConnectionImpl [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/cpdsadapter/PoolablePreparedStatementStub.java:33: isClosed() in org.apache.commons.dbcp.DelegatingStatement cannot implement isClosed() in java.sql.Statement; attempting to assign weaker access privileges; was public [javac] class PoolablePreparedStatementStub extends PoolablePreparedStatement { [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/datasources/PerUserPoolDataSource.java:49: org.apache.commons.dbcp.datasources.PerUserPoolDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper [javac] public class PerUserPoolDataSource [javac] ^ [javac] /root/rpmbuild/BUILD/commons-dbcp-1.2.1/src/java/org/apache/commons/dbcp/datasources/SharedPoolDataSource.java:43: org.apache.commons.dbcp.datasources.SharedPoolDataSource is not abstract and does not override abstract method isWrapperFor(java.lang.Class<?>) in java.sql.Wrapper [javac] public class SharedPoolDataSource [javac] ^ [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 15 errors [javac] 1 warning
BUILD FAILED /root/rpmbuild/BUILD/commons-dbcp-1.2.1/build.xml:126: Compile failed; see the compiler error output for details.
Total time: 5 seconds error: Bad exit status from /var/tmp/rpm-tmp.70693 (%build)
RPM build errors: InstallSourcePackage: Header V3 DSA signature: NOKEY, key ID 37017186 user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root user mockbuild does not exist - using root group mockbuild does not exist - using root Bad exit status from /var/tmp/rpm-tmp.70693 (%build)
END BUILD OUTPUT
I have found a few references on the errors with some conclusive information on the tomcat mailinglist [4], stating that dbcp won't build with a java 6 compiler.
So at this point my mind is blank, "now what?".
Thanks,
Best regards,
Glenn Matthys
[1] ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/ [2] ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/JBEAP/SRPMS/tomcat6-6.0.18-8.18.1.ep5.el5.src.rpm [3] ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/JBEAP/SRPMS/jakarta-commons-dbcp-1.2.1-7jpp.ep1.2.ep5.el5.src.rpm [4] http://marc.info/?l=tomcat-user&m=121730068831452&w=2
Hi,
On Mon, Aug 10, 2009 at 10:25, RedShiftredshift@pandora.be wrote:
I have found a few references on the errors with some conclusive information on the tomcat mailinglist [4], stating that dbcp won't build with a java 6 compiler.
So at this point my mind is blank, "now what?".
Well, you can try to install JDK 1.5.0 from Sun and see if it builds then.
For instructions: http://wiki.centos.org/HowTos/JavaOnCentOS#head-3f98853bcb757ab29ddf3aa8e2b5...
I would also recommend that you use the JPackage (www.jpackage.org) repositories for Java software, they package Java software in RPMs for and IMO it works very well.
HTH, Filipe
Filipe Brandenburger wrote:
Hi,
On Mon, Aug 10, 2009 at 10:25, RedShiftredshift@pandora.be wrote:
I have found a few references on the errors with some conclusive information on the tomcat mailinglist [4], stating that dbcp won't build with a java 6 compiler.
So at this point my mind is blank, "now what?".
Well, you can try to install JDK 1.5.0 from Sun and see if it builds then.
For instructions: http://wiki.centos.org/HowTos/JavaOnCentOS#head-3f98853bcb757ab29ddf3aa8e2b5...
I would also recommend that you use the JPackage (www.jpackage.org) repositories for Java software, they package Java software in RPMs for and IMO it works very well.
HTH, Filipe
Hello
I've installed the JDK 1.5 and used alternatives --config java to use the 1.5 JDK from Sun. However, the same compilation error still occurs. How do I tell rpmbuild or the .spec to use the Sun JDK?
Thanks,
Best regards,
Glenn Matthys
Hi,
On Mon, Aug 10, 2009 at 13:56, RedShiftredshift@pandora.be wrote:
I've installed the JDK 1.5 and used alternatives --config java to use the 1.5 JDK from Sun. However, the same compilation error still occurs. How do I tell rpmbuild or the .spec to use the Sun JDK?
I believe it should be using JDK 1.5.
From a closer look at the output, I believe the problem might be in
file /usr/lib/jvm-exports/java/jdbc-stdext.jar, which might be JDBC (from where I think java.sql.Wrapper comes) for Java 6. Where do you have this file installed from?
I wonder why the build procedure is looking at that file... Do you have CLASSPATH exported when you run rpmbuild? If so, try unsetting it before running the command.
You may also try to move that file (and maybe the Xerces file) to another directory and then try to build the package again.
I also see you are building the RPM as root, that is not advisable (as a bogus or malicious spec file might damage your system), you should build RPMs as a regular user, if you want more details on how to do that look at this Wiki article: http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment#head-556b8aa080c4fc42...
HTH, Filipe
Filipe Brandenburger wrote:
Hi,
On Mon, Aug 10, 2009 at 13:56, RedShiftredshift@pandora.be wrote:
I've installed the JDK 1.5 and used alternatives --config java to use the 1.5 JDK from Sun. However, the same compilation error still occurs. How do I tell rpmbuild or the .spec to use the Sun JDK?
I believe it should be using JDK 1.5.
From a closer look at the output, I believe the problem might be in
file /usr/lib/jvm-exports/java/jdbc-stdext.jar, which might be JDBC (from where I think java.sql.Wrapper comes) for Java 6. Where do you have this file installed from?
Hello
[root@testserver build]# rpm -qf /usr/lib/jvm-exports/java/jdbc-stdext.jar java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5
I wonder why the build procedure is looking at that file... Do you have CLASSPATH exported when you run rpmbuild? If so, try unsetting it before running the command.
I did not have the CLASSPATH environment variable set.
You may also try to move that file (and maybe the Xerces file) to another directory and then try to build the package again.
That jdbc-stdext.jar file gave me a clue, I did a yum remove java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5, and now the package builds.
As I'm using the Sun implementation now the openjdk one is obsolete, however, I wonder how Red Hat builds the RPMs. Did they use the Sun JDK as well?
I also see you are building the RPM as root, that is not advisable (as a bogus or malicious spec file might damage your system), you should build RPMs as a regular user, if you want more details on how to do that look at this Wiki article: http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment#head-556b8aa080c4fc42...
I know, but this is only on a test machine, security is not really a high priority at the moment.
HTH, Filipe
Thank you for your help. Up to the next challenge.
Best regards,
Glenn
On 8/10/09, RedShift redshift@pandora.be wrote:
Filipe Brandenburger wrote:
On Mon, Aug 10, 2009 at 13:56, RedShiftredshift@pandora.be wrote:
I've installed the JDK 1.5 and used alternatives --config java to use the 1.5 JDK from Sun. However, the same compilation error still occurs. How do I tell rpmbuild or the .spec to use the Sun JDK?
<snip>
[root@testserver build]# rpm -qf /usr/lib/jvm-exports/java/jdbc-stdext.jar java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5
<snip>
I also see you are building the RPM as root, that is not advisable (as a bogus or malicious spec file might damage your system), you should build RPMs as a regular user, if you want more details on how to do that look at this Wiki article: http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment#head-556b8aa080c4fc42...
I know, but this is only on a test machine, security is not really a high priority at the moment.
If you do not care about the test machine, continue to build as root. If you do not want to risk it being trashed, build as another user. It's not about security, it's about not trashing the box.
RedShift wrote:
Filipe Brandenburger wrote:
Hi,
On Mon, Aug 10, 2009 at 13:56, RedShiftredshift@pandora.be wrote:
I've installed the JDK 1.5 and used alternatives --config java to use the 1.5 JDK from Sun. However, the same compilation error still occurs. How do I tell rpmbuild or the .spec to use the Sun JDK?
I believe it should be using JDK 1.5.
From a closer look at the output, I believe the problem might be in
file /usr/lib/jvm-exports/java/jdbc-stdext.jar, which might be JDBC (from where I think java.sql.Wrapper comes) for Java 6. Where do you have this file installed from?
Hello
[root@testserver build]# rpm -qf /usr/lib/jvm-exports/java/jdbc-stdext.jar java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5
I wonder why the build procedure is looking at that file... Do you have CLASSPATH exported when you run rpmbuild? If so, try unsetting it before running the command.
I did not have the CLASSPATH environment variable set.
You may also try to move that file (and maybe the Xerces file) to another directory and then try to build the package again.
That jdbc-stdext.jar file gave me a clue, I did a yum remove java-1.6.0-openjdk-1.6.0.0-1.2.b09.el5, and now the package builds.
As I'm using the Sun implementation now the openjdk one is obsolete, however, I wonder how Red Hat builds the RPMs. Did they use the Sun JDK as well?
I also see you are building the RPM as root, that is not advisable (as a bogus or malicious spec file might damage your system), you should build RPMs as a regular user, if you want more details on how to do that look at this Wiki article: http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment#head-556b8aa080c4fc42...
I know, but this is only on a test machine, security is not really a high priority at the moment.
HTH, Filipe
Thank you for your help. Up to the next challenge.
Best regards,
Glenn
Hello
I managed to build tomcat6 and it's working! I have documented the process and if allowed I'll put it on the wiki.
Thanks again for your help,
Best regards,
Glenn