On 10/26/2019 5:26 PM, Thomas Trepl via blfs-support wrote:
Hi all,
i have for some reason to use openjdk8 for which i used the
instructions just like if would be jdk-12. Java (jdk8) works pretty
fine so far.
Now i wanted to build ant (as a prerequisite to Tomcat) but failed at
the
$ bootstrap/bin/ant -Ddest=optional -f fetch.xml
command. It reports an error which has something to do with SSL:
...
$ bootstrap/bin/ant -Ddest=optional -f fetch.xml
Buildfile: /home/lfs/apache-ant-1.10.7/fetch.xml
pick-dest:
[echo] Downloading to /home/lfs/apache-ant-1.10.7/lib/optional
probe-m2:
download-m2:
[echo] Downloading to /home/lfs/apache-ant-1.10.7/lib/optional
[get] Getting:
https://archive.apache.org/dist/maven/ant-tasks/2.1.3/binaries/maven-ant-tasks-2.1.3.jar
[get] To: /home/lfs/apache-ant-1.10.7/lib/optional/maven-ant-
tasks-2.1.3.jar
[get] Error getting
https://archive.apache.org/dist/maven/ant-tasks/2.1.3/binaries/maven-ant-tasks-2.1.3.jar
to /home/lfs/apache-ant-1.10.7/lib/optional/maven-ant-tasks-2.1.3.jar
BUILD FAILED
/home/lfs/apache-ant-1.10.7/get-m2.xml:85: javax.net.ssl.SSLException:
java.lang.RuntimeException: Unexpected error:
java.security.InvalidAlgorithmParameterException: the trustAnchors
parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1959)
at
sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
at
sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1899
)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1420)
at
sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at sun.net.
www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.
www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.
www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at
org.apache.tools.ant.taskdefs.Get$GetThread.openConnection(Get.java:76
6)
at
org.apache.tools.ant.taskdefs.Get$GetThread.get(Get.java:676)
at
org.apache.tools.ant.taskdefs.Get$GetThread.run(Get.java:666)
...
Unfortunatly, i'm a real expert in SSL and certificate stuff so i've
no clue what to do and where to look, got stuck here.
Would you mind to point me in a direction to have look?
Btw, its a LFS-9.0 build, make-ca-1.5.
Any ideas on how that could be fixed? Thank you!
It's using the wrong invocation of java (might be able to fix it in the
build, but I really don't remember how). It might be as simple as
symlinking /etc/pki/tls/java/cacerts to /opt/jdk/jre/lib/cacerts or
/opt/jdk/lib/cacerts. Optionally, you can look at the get-m2.xml file
(or loop through it) and manually download the files and just drop them
into lib/optional/ so that the build script doesn't try to do it for
you. Honestly, the best option is probably to drop back to an earlier
ant version to build Tomcat with JDK-8 . Then export the JDK8 and old
ant environment only in the Tomcat environment (just source the
environment files (not in profile.d) directly from the startup script) -
that way you can use newer java and ant for the rest of the system.
--DJ
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page