Forum Stats

  • 3,734,722 Users
  • 2,247,033 Discussions
  • 7,857,471 Comments

Discussions

java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path]

user11980779
user11980779 Member Posts: 7 Blue Ribbon
edited Oct 12, 2018 6:24AM in SQLcl

Hallo,

I tried to upgrade sqlcl from 17.4 to 18.1 on Solaris 11 and I get now the following error:

#export JAVA_HOME=/usr/

#java -version

java version "1.8.0_131"

Java(TM) SE Runtime Environment (build 1.8.0_131-b11)

Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

#/u01/orabin/system/sqlcl/dbtools-sqlcl-18.1.0/bin/sql

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path]

        at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)

        at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)

        at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)

        at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)

        at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)

        at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:429)

thx

Andreas

Answers

  • Suresh-Sangaran-Oracle
    Suresh-Sangaran-Oracle Member Posts: 147 Employee
    edited Apr 6, 2018 4:05AM

    Can you try with latest version of 1.8 java

    Java SE Development Kit 8 - Downloads

  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited Apr 6, 2018 4:25AM

    #echo $JAVA_HOME

    /u01/orabin/system/sqlcl/jdk_8u162/jdk1.8.0_162

    #which java

    /u01/orabin/system/sqlcl/jdk_8u162/jdk1.8.0_162/bin/java

    #java -version

    java version "1.8.0_162"

    Java(TM) SE Runtime Environment (build 1.8.0_162-b12)

    Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

    #/u01/orabin/system/sqlcl/dbtools-sqlcl-18.1.0/bin/sql

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path]

            at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)

            at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)

            at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)

            at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)

            at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:429)

  • Suresh-Sangaran-Oracle
    Suresh-Sangaran-Oracle Member Posts: 147 Employee
    edited Apr 6, 2018 4:30AM
  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited Apr 6, 2018 4:56AM

    I do not get the "Access is denied"

  • Steve S.
    Steve S. Member Posts: 26 Bronze Badge
    edited May 2, 2018 1:10PM

    I'm getting the same issue with sql 18.1.1 and java 1.8.0.72.

    sql     

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path]

            at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)

            at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)

            at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)

            at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)

            at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:429)

    java version "1.8.0_172"

    Java(TM) SE Runtime Environment (build 1.8.0_172-b11)

    Java HotSpot(TM) 64-Bit Server VM (build 25.172-b11, mixed mode)

    Steve

  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited May 18, 2018 2:59AM

    I´ve opened a SR and the engineer confirmed that there is an issue with jline.jar in 18.1 version.

    Workaround: replace jline.jar from 18.1 by the one provided by 17.4

  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited Jun 6, 2018 6:47AM

    The bug number is 28086841: SQLCL COMMAND FAILS TO START WITH ERROR JANSI (NOT FOUND IN JAVA.LIBRARY.PATH)

    According to the engineer this bug should be fixed in upcoming 18.2 release

  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited Jul 9, 2018 6:11AM

    issue not fixed in 18.2

    bug note is now public and it says fixed in 18.3

  • user11980779
    user11980779 Member Posts: 7 Blue Ribbon
    edited Oct 9, 2018 4:07AM

    issue not fixed in 18.3 either

  • onedbguru
    onedbguru Member Posts: 831 Silver Badge
    edited Oct 12, 2018 6:24AM

    Yep, same problem in 18.3.0.259.2029

    (Solaris 10)

    unsupported major.minor version 52.0

    OR

    Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no jansi in java.library.path]

            at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:182)

            at org.fusesource.hawtjni.runtime.Library.load(Library.java:140)

            at org.fusesource.jansi.internal.CLibrary.<clinit>(CLibrary.java:42)

            at org.fusesource.jansi.AnsiConsole.wrapOutputStream(AnsiConsole.java:48)

            at org.fusesource.jansi.AnsiConsole.<clinit>(AnsiConsole.java:38)

            at oracle.dbtools.raptor.scriptrunner.cmdline.SqlCli.main(SqlCli.java:429)

    java version "1.8.0_172"

    Java(TM) SE Runtime Environment (build 1.8.0_172-b25)

    Java HotSpot(TM) 64-Bit Server VM (build 25.172-b25, mixed mode)

Sign In or Register to comment.