[CentOS] Building tomcat6, SRPM jakarta-commons-dbcp-1.2.1-7jpp.ep1.2.ep5.el5.src.rpm fails to build

Mon Aug 10 18:55:40 UTC 2009
RedShift <redshift at pandora.be>

Filipe Brandenburger wrote:
> Hi,
> 
> On Mon, Aug 10, 2009 at 13:56, RedShift<redshift at 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 at 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-556b8aa080c4fc427757f25b9c229f600827f09d
> 

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