Announcement

Collapse
No announcement yet.

Java trust anchors

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Java trust anchors

    So I'm having problems running sbt a java application in Kubuntu 18.04:

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo1.maven.org/maven2/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-releases/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.pom

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/maven-snapshots/org/scala-sbt/sbt/1.1.4/sbt-1.1.4.jar

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.1.4/ivys/ivy.xml

    Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.4/ivys/ivy.xml

    This is running fine in Ubuntu 18.04, using the same Oracle jvm:
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    JAVA_HOME="/usr/lib/jvm/java-8-oracle" //in /etc/environment

    Any thoughts appreciated.

    #2
    Kubuntu and Ubuntu are identical in this regard in terms of files, locations, and dependencies, so my guess there is something missing or the java package missed configuring something, probably related to certs. Do you have ca-certificates-java installed? Have you run sudo update-ca-certificates -f?
    I have read that this third party PPA package may not have the ca-certificates-java as a dependency.

    Comment


      #3
      They seem to be different. Ubuntu 18.04 comes with out Java installed. Both the full and minimal versions of Kubuntu come with Java installed. When I do java-version I get:

      $ java -version
      openjdk version "10.0.1" 2018-04-17
      OpenJDK Runtime Environment (build 10.0.1+10-Ubuntu-3ubuntu1)
      OpenJDK 64-Bit Server VM (build 10.0.1+10-Ubuntu-3ubuntu1, mixed mode)

      However when I look in /usr/lib/jvm I get 2 sim links and a Java 11 installition, which is weird because Java 11 hasn't even been released. Very confused!

      /usr/lib/jvm$ ls -a
      . .. default-java java-1.11.0-openjdk-amd64 .java-1.11.0-openjdk-amd64.jinfo java-11-openjdk-amd64

      Comment


        #4
        I installed Kubuntu 18.04 yesterday and ran into that issue when I attempted to run Minecraft to be sure it worked. It didn't.
        I found that openjdk-11 was the installed java.
        The problem in my case was that the ca.certificates were not valid or were corrupted.
        I tried
        sudo update-ca-certificates -f
        but that didn't make the problem go away.

        A little DDG searching revealed that most got relief by replacing openjdk-11 with openjdk-9 or -8. It seems that -9 wasn't in my repository so I purged -11 and installed openjdk-8 and all its associated packages, including java-common, of course.
        That solved my problem. Minecraft loaded and ran, and gave me 462 fps with my NVidia GT 650M video chip.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          Originally posted by GreyGeek View Post
          so I purged -11 and installed openjdk-8 and all its associated packages, including java-common, of course.
          That solved my problem.
          Sorry, could you give us the exact purge commands. Couldn't work out how to properly uninstall openjdk-11. OpenJdk still seems to produce problems with JavaFx, so I want to purge openjdk completely and then install oracle java8. The Scala compiler's current not working with later versions of Java.

          Comment


            #6
            I wouldn't waste time installing Oracle's java8.
            IF you have Muon installed use it.
            IF you don't have Muon installed then in a Konsole issue
            sudo apt update
            sudo apt install muon

            After it installs you'll find it the system menu. It looks like a cardboard box.
            Open it. In the search bar put "opensdk". Click on the "Status" column header to sort it so the green "installed" designations stack at the top. If they are not at the top then click on the "Status" column header again to reverse the sort.
            Everything with openjdk-11 AND java-common should be selected by clicking on the "Requested" column for that app and choosing "purge". If a dialog box pops up saying additional files will be deleted click OK.

            (IF you've done something inadvisable, like installing apps from locations other than the repository accessed by Muon, you MIGHT notice that "plasma-desktop" is in the list that will be added to those being purged. If it is, your system is already borked and at your skill level the wisest thing to do is reinstall, because if you continue with the uninstall it will blow your desktop. If it does, you can issue from a terminal sudo apt install plasma-desktop" to restore it.)

            After openjdk-11 and its friends are gone then, while still running Muon, put "openjdk-8 in the search bar and when the indexer finishes and then displays the list right click on the "Requested" column and select "install". Do it with java-common and the other openjdk-8 apps.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Originally posted by Rich Oliver View Post
              So I'm having problems running sbt a java application in Kubuntu 18.04:

              Server access Error: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.scala-sbt/sbt/1.1.4/ivys/ivy.xml

              This is running fine in Ubuntu 18.04, using the same Oracle jvm:
              sudo add-apt-repository ppa:webupd8team/java
              sudo apt-get update
              sudo apt-get install oracle-java8-installer
              JAVA_HOME="/usr/lib/jvm/java-8-oracle" //in /etc/environment

              Any thoughts appreciated.
              ye you can install muon or synaptic for delete java but this is java-certs error and you can change alternatives for oracle java8

              this help for me
              • mv ~/bin/jdk-9/lib/security/cacerts{,.original}
              • ln -s /etc/java/cacerts ~/bin/jdk-9/lib/security/cacerts

              • sudo dpkg --purge --force-depends ca-certificates-java
              • sudo apt install ca-certificates-java
              • sudo update-alternatives --config java
                sudo update-alternatives --all

              Comment


                #8
                Originally posted by johnyx View Post

                ye you can install muon or synaptic for delete java but this is java-certs error and you can change alternatives for oracle java8

                this help for me
                • mv ~/bin/jdk-9/lib/security/cacerts{,.original}
                • ln -s /etc/java/cacerts ~/bin/jdk-9/lib/security/cacerts

                • sudo dpkg --purge --force-depends ca-certificates-java
                • sudo apt install ca-certificates-java
                • sudo update-alternatives --config java
                  sudo update-alternatives --all

                Thanks those last 4 commands did the job. I couldn't quite follow the first 2 but that didn't seem to matter.

                Is Kubuntu 18.04 really working as designed? I've never had to manually uninstall certificates before.

                Comment


                  #9
                  Have to say I just ran into this with Minecraft. Took some doing to purge properly but even after that ca-certificates-java was broken so the last four commands johnyx had fixed it the rest of the way.

                  Will version 11 ever be fixed or is this a Minecraft issue with their launcher? As far as I know they have no plans to update that launcher. Hate to have to stay on version 8 as 11 does have a lot of fixes.

                  Comment

                  Working...
                  X