Infrastructure at your Service

Some time ago I blogged about how to install PL/JAVA in Postgres Plus Advanced Server 9.5. This resulted in an interesting comment from the maintainer of PL/Java. After exchanging some emails and some more testing it turned out that there really is an issue with my build of PostgreSQL. I usually compile PostgreSQL from source and use the “–with-extra-version” flag when I do the “./configure” and that seems to be an issue (at least in 1.5.0-BETA3). So, lets try to install PL/JAVA into a PostgreSQL 9.5.1 instance which was not compiled with the “–with-extra-version” option.

If you take a look at the build instructions for PL/JAVA there are a few requirements before we can start:

  • We need to be able to compile and link C code
  • We need a java compiler
  • We need pg_config. This is available by default once PostgreSQL is installed.
  • We need Maven for building PL/JAVA

As I am on a RedHat based distribution installing the C and Java compiler is just a matter of using yum:

[[email protected] ~]$ yum install gcc-c++ gcc java-1.8.0-openjdk-devel

Once these are installed the first two requirements are met:

[email protected]:/home/postgres/ [PG11] g++ -version
g++: error: unrecognized command line option ‘-version’
g++: fatal error: no input files
compilation terminated.
[email protected]:/home/postgres/ [PG11] g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[email protected]:/home/postgres/ [PG11] javac -version
javac 1.8.0_71

For pg_config I do not need to do anything as my PostgreSQL environment is already set:

[email protected]:/home/postgres/ [PG11] which pg_config
/u01/app/postgres/product/95/db_1/bin/pg_config
[email protected]:/home/postgres/ [PG11] pg_config
BINDIR = /u01/app/postgres/product/95/db_1/bin
DOCDIR = /u01/app/postgres/product/95/db_1/doc/postgresql
HTMLDIR = /u01/app/postgres/product/95/db_1/doc/postgresql
INCLUDEDIR = /u01/app/postgres/product/95/db_1/include
PKGINCLUDEDIR = /u01/app/postgres/product/95/db_1/include/postgresql
INCLUDEDIR-SERVER = /u01/app/postgres/product/95/db_1/include/postgresql/server
LIBDIR = /u01/app/postgres/product/95/db_1/lib
PKGLIBDIR = /u01/app/postgres/product/95/db_1/lib/postgresql
LOCALEDIR = /u01/app/postgres/product/95/db_1/share/locale
MANDIR = /u01/app/postgres/product/95/db_1/share/man
SHAREDIR = /u01/app/postgres/product/95/db_1/share/postgresql
SYSCONFDIR = /u01/app/postgres/product/95/db_1/etc/postgresql
PGXS = /u01/app/postgres/product/95/db_1/lib/postgresql/pgxs/src/makefiles/pgxs.mk
CONFIGURE = '--with-libs=/opt/local/Current/lib' '--with-includes=/opt/local/Current/include/libxml2:/opt/local/Current/include' '--prefix=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64' '--with-ldap' '--with-openssl' '--with-perl' '--with-python' '--with-tcl' '--with-tclconfig=/opt/local/EnterpriseDB/LanguagePack/9.5/Tcl-8.5/lib' '--with-pam' '--enable-thread-safety' '--with-libxml' '--with-ossp-uuid' '--docdir=/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/doc/postgresql' '--with-libxslt' '--with-libedit-preferred' '--with-gssapi' 'LD_LIBRARY_PATH=/opt/local/Current/lib' 'CFLAGS=-DMAP_HUGETLB=0x40000'
CC = gcc
CPPFLAGS = -D_GNU_SOURCE -I/opt/local/Current/include/libxml2 -I/opt/local/Current/include
CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -DMAP_HUGETLB=0x40000
CFLAGS_SL = -fpic
LDFLAGS = -L../../../src/common -L/opt/local/Current/lib -Wl,--as-needed -Wl,-rpath,'/mnt/hgfs/pginstaller.auto/server/staging/linux-x64/lib',--enable-new-dtags
LDFLAGS_EX = 
LDFLAGS_SL = 
LIBS = -lpgcommon -lpgport -lxslt -lxml2 -lpam -lssl -lcrypto -lgssapi_krb5 -lz -ledit -lrt -lcrypt -ldl -lm 
VERSION = PostgreSQL 9.5.1

The last requirement is Maven and this is trivial to install, too:

[email protected]:/home/postgres/ [PG11] mkdir -p /u01/app/postgres/product/maven
[email protected]:/home/postgres/ [PG11] cd /u01/app/postgres/product/maven
[email protected]:/u01/app/postgres/product/maven/ [PG11] wget http://mirror.easyname.ch/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
[email protected]:/u01/app/postgres/product/maven/ [PG11] tar -axf apache-maven-3.3.9-bin.tar.gz 
[email protected]:/u01/app/postgres/product/maven/ [PG11] cd apache-maven-3.3.9
[email protected]:/u01/app/postgres/product/maven/apache-maven-3.3.9/ [PG11] bin/mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /u01/app/postgres/product/maven/apache-maven-3.3.9
Java version: 1.8.0_71, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.71-2.b15.el7_2.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.8.13-118.4.1.el7uek.x86_64", arch: "amd64", family: "unix"

That’s it. Maven is ready and we can start with building PL/JAVA ( Release 1.5.0-BETA3 for the scope of this post ):

[email protected]:/u01/app/postgres/product/maven/apache-maven-3.3.9/ [PG11] mkdir -p /u01/app/postgres/product/pljava
[email protected]:/u01/app/postgres/product/maven/apache-maven-3.3.9/ [PG11] cd /u01/app/postgres/product/pljava
[email protected]:/u01/app/postgres/product/pljava/ [PG11] wget https://github.com/tada/pljava/archive/V1_5_0b3.tar.gz
[email protected]:/u01/app/postgres/product/pljava/ [PG11] tar -axf V1_5_0b3.tar.gz 
[email protected]:/u01/app/postgres/product/pljava/ [PG11] cd pljava-1_5_0b3/
[email protected]:/u01/app/postgres/product/pljava/pljava-1_5_0b3/ [PG11] export PATH=/u01/app/postgres/product/maven/apache-maven-3.3.9/bin/:$PATH
[email protected]:/u01/app/postgres/product/pljava/pljava-1_5_0b3/ [PG11] mvn clean install

The last command produces plenty of output. The important notes are at the end:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] PostgreSQL PL/Java ................................. SUCCESS [  6.739 s]
[INFO] PL/Java API ........................................ SUCCESS [  5.920 s]
[INFO] PL/Java backend Java code .......................... SUCCESS [  3.444 s]
[INFO] PL/Java backend native code ........................ SUCCESS [ 46.330 s]
[INFO] PL/Java Deploy ..................................... SUCCESS [  3.397 s]
[INFO] PL/Java Ant tasks .................................. SUCCESS [  1.346 s]
[INFO] PL/Java examples ................................... SUCCESS [  3.731 s]
[INFO] PL/Java packaging .................................. SUCCESS [  7.674 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:21 min
[INFO] Finished at: 2016-03-23T10:25:14+01:00
[INFO] Final Memory: 38M/93M
[INFO] ------------------------------------------------------------------------

Looks fine so far. Following the installation instructions to install PL/JAVA:

[email protected]:/u01/app/postgres/product/pljava/pljava-1_5_0b3/ [PG11] java -jar pljava-packaging/target/pljava-pg9.5-amd64-Linux-gpp.jar
/u01/app/postgres/product/95/db_1/lib/postgresql/libpljava-so-1.5.0-BETA3.so as bytes
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava-1.5.0-BETA3.jar as bytes
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava-api-1.5.0-BETA3.jar as bytes
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava-examples-1.5.0-BETA3.jar as bytes
/u01/app/postgres/product/95/db_1/share/postgresql/extension/pljava.control as lines (ASCII)
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava--1.5.0-BETA3.sql as lines (UTF8)
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava--unpackaged--1.5.0-BETA3.sql as lines (UTF8)
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava--1.5.0-BETA2--1.5.0-BETA3.sql as lines (UTF8)
/u01/app/postgres/product/95/db_1/share/postgresql/pljava/pljava--1.5.0-BETA1--1.5.0-BETA3.sql as lines (UTF8)

Looks fine, too. Everything needed by PostgreSQL to install the extension should be there now. Lets try:

[email protected]:/u01/app/postgres/product/pljava/pljava-1_5_0b3/ [PG11] psql postgres
Null display is "NULL".
Timing is on.
psql.bin (9.5.1)
Type "help" for help.

([email protected][local]:7777) [postgres] > create extension pljava;
CREATE EXTENSION
Time: 1947.125 ms
([email protected][local]:7777) [postgres] > \dx
                                   List of installed extensions
  Name   |   Version   |   Schema   |                         Description                          
---------+-------------+------------+--------------------------------------------------------------
 pljava  | 1.5.0-BETA3 | sqlj       | PL/Java procedural language (https://tada.github.io/pljava/)
 plpgsql | 1.0         | pg_catalog | PL/pgSQL procedural language
(2 rows)

Ready to be used …

13 Comments

  • Hi, me again.

    Just thought I’d point out that 1.5.0 (none of that BETA jazz) is now released, with that PG-version parsing loosened up so you can now use –with-extra-version all you want. 🙂

    Thanks for helping find that issue, and thanks for the follow-up!

  • Daniel Westermann says:

    Hi Chap,

    thanks for the notification. It was a pleasure to debug with you 🙂

    Cheers,
    Daniel

    • Bladimir says:

      Hello guys,

      I’m having an issue while trying to build PL/Java to Postgresql-9.5.

      [[email protected] pljava]# g++ –version
      g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
      Copyright (C) 2010 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions. There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

      [[email protected] pljava]# javac -version
      javac 1.8.0_91

      [[email protected] pljava]# service postgresql-9.5 status
      postgresql-9.5 (pid 23433) is running…

      [[email protected] pljava]# /root/PL/apache-maven-3.3.9/bin/mvn -version
      Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
      Maven home: /root/PL/apache-maven-3.3.9
      Java version: 1.8.0_91, vendor: Oracle Corporation
      Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el6.x86_64/jre
      Default locale: en_US, platform encoding: UTF-8
      OS name: “linux”, version: “2.6.32-279.14.1.el6.x86_64″, arch: “amd64″, family: “unix”

      But, when I try to load the PL/java I got the following error:

      [[email protected] pljava]# ll
      total 52
      -rw-r–r– 1 root root 1687 May 30 14:39 COPYRIGHT
      drwxr-xr-x 2 root root 4096 May 30 14:39 docs
      -rw-r–r– 1 root root 9 May 30 14:39 freenode.ver
      drwxr-xr-x 4 root root 4096 May 30 14:39 pljava
      drwxr-xr-x 4 root root 4096 May 30 14:39 pljava-ant
      drwxr-xr-x 4 root root 4096 May 30 14:39 pljava-api
      drwxr-xr-x 4 root root 4096 May 30 14:39 pljava-examples
      drwxr-xr-x 3 root root 4096 May 30 14:39 pljava-packaging
      drwxr-xr-x 4 root root 4096 May 30 14:39 pljava-so
      -rw-r–r– 1 root root 4116 May 30 14:39 pom.xml
      -rw-r–r– 1 root root 414 May 30 14:39 README.md
      drwxr-xr-x 4 root root 4096 May 30 14:39 src

      [[email protected] pljava]# /root/PL/apache-maven-3.3.9/bin/mvn clean install
      [INFO] Scanning for projects…
      Downloading: https://repo.maven.apache.org/maven2/com/github/maven-nar/nar-maven-plugin/3.2.3/nar-maven-plugin-3.2.3.pom
      [ERROR] [ERROR] Some problems were encountered while processing the POMs:
      [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3 @
      [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /root/PL/pljava/pljava-so/pom.xml, line 14, column 13
      @
      [ERROR] The build could not read 1 project -> [Help 1]
      [ERROR]
      [ERROR] The project org.postgresql:pljava-so:1.6.0-SNAPSHOT (/root/PL/pljava/pljava-so/pom.xml) has 2 errors
      [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException -> [Help 2]
      [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /root/PL/pljava/pljava-so/pom.xml, line 14, column 13
      [ERROR]
      [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [ERROR]
      [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
      [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

      -I have followed step by step your guide, as well as downloaded the packages directly from the official sources, but no luck. Any help will be really appreciated.
      -I have google it, but couldn’t find much information. Not sure what am I missing here.

      Thanks

  • Daniel Westermann says:

    Hi Bladimir,

    just to be sure: Can you connect to the Internet from your PostgreSQL box?

    Cheers,
    Daniel

  • Bladimir says:

    Hello Daniel,

    Sorry I have been out of town. Here is the output:

    [[email protected] pljava]# /root/PL/apache-maven-3.3.9/bin/mvn clean install -X
    Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
    Maven home: /root/PL/apache-maven-3.3.9
    Java version: 1.8.0_91, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el6.x86_64/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: “linux”, version: “2.6.32-279.14.1.el6.x86_64”, arch: “amd64”, family: “unix”
    [DEBUG] Created new class realm maven.api
    [DEBUG] Importing foreign packages into class realm maven.api
    [DEBUG] Imported: javax.enterprise.inject.* < plexus.core
    [DEBUG] Imported: javax.enterprise.util.* < plexus.core
    [DEBUG] Imported: javax.inject.* < plexus.core
    [DEBUG] Imported: org.apache.maven.* < plexus.core
    [DEBUG] Imported: org.apache.maven.artifact < plexus.core
    [DEBUG] Imported: org.apache.maven.classrealm < plexus.core
    [DEBUG] Imported: org.apache.maven.cli < plexus.core
    [DEBUG] Imported: org.apache.maven.configuration < plexus.core
    [DEBUG] Imported: org.apache.maven.exception < plexus.core
    [DEBUG] Imported: org.apache.maven.execution < plexus.core
    [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
    [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
    [DEBUG] Imported: org.apache.maven.model < plexus.core
    [DEBUG] Imported: org.apache.maven.monitor < plexus.core
    [DEBUG] Imported: org.apache.maven.plugin < plexus.core
    [DEBUG] Imported: org.apache.maven.profiles < plexus.core
    [DEBUG] Imported: org.apache.maven.project < plexus.core
    [DEBUG] Imported: org.apache.maven.reporting < plexus.core
    [DEBUG] Imported: org.apache.maven.repository < plexus.core
    [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
    [DEBUG] Imported: org.apache.maven.settings < plexus.core
    [DEBUG] Imported: org.apache.maven.toolchain < plexus.core
    [DEBUG] Imported: org.apache.maven.usability < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
    [DEBUG] Imported: org.codehaus.classworlds < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.* < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.component < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.container < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.context < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
    [DEBUG] Imported: org.eclipse.aether.* < plexus.core
    [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
    [DEBUG] Imported: org.eclipse.aether.collection < plexus.core
    [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
    [DEBUG] Imported: org.eclipse.aether.graph < plexus.core
    [DEBUG] Imported: org.eclipse.aether.impl < plexus.core
    [DEBUG] Imported: org.eclipse.aether.installation < plexus.core
    [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
    [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
    [DEBUG] Imported: org.eclipse.aether.repository < plexus.core
    [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
    [DEBUG] Imported: org.eclipse.aether.spi < plexus.core
    [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
    [DEBUG] Imported: org.eclipse.aether.version < plexus.core
    [DEBUG] Imported: org.slf4j.* < plexus.core
    [DEBUG] Imported: org.slf4j.helpers.* < plexus.core
    [DEBUG] Imported: org.slf4j.spi.* [Help 1]
    org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
    [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3 @
    [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /root/PL/pljava/pljava-so/pom.xml, line 14, column 13

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
    at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
    at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    [ERROR]
    [ERROR] The project org.postgresql:pljava-so:1.6.0-SNAPSHOT (/root/PL/pljava/pljava-so/pom.xml) has 2 errors
    [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException -> [Help 2]
    org.apache.maven.plugin.PluginManagerException: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:846)
    at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:196)
    at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:99)
    at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:44)
    at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1295)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:441)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:421)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:620)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:626)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:411)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
    at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
    at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:214)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.resolveExtensionArtifacts(DefaultMavenPluginManager.java:908)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:839)
    … 27 more
    Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:202)
    … 30 more
    Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
    … 32 more
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
    … 34 more
    Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    … 37 more
    Caused by: org.apache.maven.wagon.TransferFailedException: java.security.ProviderException: java.security.KeyException
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1066)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:960)
    at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
    at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
    at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
    at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
    at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
    at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
    … 42 more
    Caused by: javax.net.ssl.SSLException: java.security.ProviderException: java.security.KeyException
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:86)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:832)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:983)
    … 51 more
    Caused by: java.security.ProviderException: java.security.KeyException
    at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:147)
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:703)
    at sun.security.ssl.ECDHCrypt.(ECDHCrypt.java:77)
    at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:721)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:281)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    … 65 more
    Caused by: java.security.KeyException
    at sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method)
    at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:128)
    … 74 more
    [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /root/PL/pljava/pljava-so/pom.xml, line 14, column 13
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
    [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

  • Daniel Westermann says:

    are you behind a proxy?

  • Bladimir says:

    Hello Daniel,

    Thanks for your reply. I’m not behind a proxy, I have a public IP connect to the internet on this server. Do you have any other idea on this?

    I noticed the following error message:
    [DEBUG] Imported: org.slf4j.spi.* [Help 1]
    org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
    [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3 @
    [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /root/PL/pljava/pljava-so/pom.xml, line 14, column 13

    I have google this issue, and it looks like there is an issue on the package, however, I have downloaded the package directly from the official source as you can see on my previous response.

  • Daniel Westermann says:

    I had these kind of issues when I was behind a proxy….why do you run this as root?

    [[email protected] pljava]# /root/PL/apache-maven-3.3.9/bin/mvn clean install -X

  • Bladimir says:

    Hello Daniel,

    There was no reason.

    I tried using user postgres, but same thing:

    Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T11:41:47-05:00)
    Maven home: /var/lib/pgsql/PL/apache-maven-3.3.9
    Java version: 1.8.0_91, vendor: Oracle Corporation
    Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el6.x86_64/jre
    Default locale: en_US, platform encoding: UTF-8
    OS name: “linux”, version: “2.6.32-279.14.1.el6.x86_64”, arch: “amd64”, family: “unix”
    [DEBUG] Created new class realm maven.api
    [DEBUG] Importing foreign packages into class realm maven.api
    [DEBUG] Imported: javax.enterprise.inject.* < plexus.core
    [DEBUG] Imported: javax.enterprise.util.* < plexus.core
    [DEBUG] Imported: javax.inject.* < plexus.core
    [DEBUG] Imported: org.apache.maven.* < plexus.core
    [DEBUG] Imported: org.apache.maven.artifact < plexus.core
    [DEBUG] Imported: org.apache.maven.classrealm < plexus.core
    [DEBUG] Imported: org.apache.maven.cli < plexus.core
    [DEBUG] Imported: org.apache.maven.configuration < plexus.core
    [DEBUG] Imported: org.apache.maven.exception < plexus.core
    [DEBUG] Imported: org.apache.maven.execution < plexus.core
    [DEBUG] Imported: org.apache.maven.execution.scope < plexus.core
    [DEBUG] Imported: org.apache.maven.lifecycle < plexus.core
    [DEBUG] Imported: org.apache.maven.model < plexus.core
    [DEBUG] Imported: org.apache.maven.monitor < plexus.core
    [DEBUG] Imported: org.apache.maven.plugin < plexus.core
    [DEBUG] Imported: org.apache.maven.profiles < plexus.core
    [DEBUG] Imported: org.apache.maven.project < plexus.core
    [DEBUG] Imported: org.apache.maven.reporting < plexus.core
    [DEBUG] Imported: org.apache.maven.repository < plexus.core
    [DEBUG] Imported: org.apache.maven.rtinfo < plexus.core
    [DEBUG] Imported: org.apache.maven.settings < plexus.core
    [DEBUG] Imported: org.apache.maven.toolchain < plexus.core
    [DEBUG] Imported: org.apache.maven.usability < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.* < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.authentication < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.authorization < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.events < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.observers < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.proxy < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.repository < plexus.core
    [DEBUG] Imported: org.apache.maven.wagon.resource < plexus.core
    [DEBUG] Imported: org.codehaus.classworlds < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.* < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.classworlds < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.component < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.configuration < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.container < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.context < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.lifecycle < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.logging < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.personality < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
    [DEBUG] Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
    [DEBUG] Imported: org.eclipse.aether.* < plexus.core
    [DEBUG] Imported: org.eclipse.aether.artifact < plexus.core
    [DEBUG] Imported: org.eclipse.aether.collection < plexus.core
    [DEBUG] Imported: org.eclipse.aether.deployment < plexus.core
    [DEBUG] Imported: org.eclipse.aether.graph < plexus.core
    [DEBUG] Imported: org.eclipse.aether.impl < plexus.core
    [DEBUG] Imported: org.eclipse.aether.installation < plexus.core
    [DEBUG] Imported: org.eclipse.aether.internal.impl < plexus.core
    [DEBUG] Imported: org.eclipse.aether.metadata < plexus.core
    [DEBUG] Imported: org.eclipse.aether.repository < plexus.core
    [DEBUG] Imported: org.eclipse.aether.resolution < plexus.core
    [DEBUG] Imported: org.eclipse.aether.spi < plexus.core
    [DEBUG] Imported: org.eclipse.aether.transfer < plexus.core
    [DEBUG] Imported: org.eclipse.aether.version < plexus.core
    [DEBUG] Imported: org.slf4j.* < plexus.core
    [DEBUG] Imported: org.slf4j.helpers.* < plexus.core
    [DEBUG] Imported: org.slf4j.spi.* [Help 1]
    org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
    [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3 @
    [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /var/lib/pgsql/PL/pljava/pljava-so/pom.xml, line 14, column 13

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
    at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
    at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    [ERROR]
    [ERROR] The project org.postgresql:pljava-so:1.6.0-SNAPSHOT (/var/lib/pgsql/PL/pljava/pljava-so/pom.xml) has 2 errors
    [ERROR] Unresolveable build extension: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException -> [Help 2]
    org.apache.maven.plugin.PluginManagerException: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:846)
    at org.apache.maven.project.DefaultProjectBuildingHelper.createProjectRealm(DefaultProjectBuildingHelper.java:196)
    at org.apache.maven.project.DefaultModelBuildingListener.buildExtensionsAssembled(DefaultModelBuildingListener.java:99)
    at org.apache.maven.model.building.ModelBuildingEventCatapult$1.fire(ModelBuildingEventCatapult.java:44)
    at org.apache.maven.model.building.DefaultModelBuilder.fireEvent(DefaultModelBuilder.java:1295)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:441)
    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:421)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:620)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:626)
    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:411)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
    at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
    at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.PluginResolutionException: Plugin com.github.maven-nar:nar-maven-plugin:3.2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:214)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolve(DefaultPluginDependenciesResolver.java:149)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.resolveExtensionArtifacts(DefaultMavenPluginManager.java:908)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupExtensionsRealm(DefaultMavenPluginManager.java:839)
    … 27 more
    Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:208)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
    at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.resolveInternal(DefaultPluginDependenciesResolver.java:202)
    … 30 more
    Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.github.maven-nar:nar-maven-plugin:jar:3.2.3
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:282)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:198)
    at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:202)
    … 32 more
    Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:267)
    … 34 more
    Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.github.maven-nar:nar-maven-plugin:pom:3.2.3 from/to central (https://repo.maven.apache.org/maven2): java.security.ProviderException: java.security.KeyException
    at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
    at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
    at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
    … 37 more
    Caused by: org.apache.maven.wagon.TransferFailedException: java.security.ProviderException: java.security.KeyException
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:1066)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:960)
    at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
    at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
    at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
    at org.eclipse.aether.transport.wagon.WagonTransporter$GetTaskRunner.run(WagonTransporter.java:560)
    at org.eclipse.aether.transport.wagon.WagonTransporter.execute(WagonTransporter.java:427)
    at org.eclipse.aether.transport.wagon.WagonTransporter.get(WagonTransporter.java:404)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
    at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
    … 42 more
    Caused by: javax.net.ssl.SSLException: java.security.ProviderException: java.security.KeyException
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
    at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1906)
    at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1889)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1410)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
    at org.apache.maven.wagon.providers.http.httpclient.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
    at org.apache.maven.wagon.providers.http.httpclient.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec.execute(RetryExec.java:86)
    at org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
    at org.apache.maven.wagon.providers.http.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.execute(AbstractHttpClientWagon.java:832)
    at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:983)
    … 51 more
    Caused by: java.security.ProviderException: java.security.KeyException
    at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:147)
    at java.security.KeyPairGenerator$Delegate.generateKeyPair(KeyPairGenerator.java:703)
    at sun.security.ssl.ECDHCrypt.(ECDHCrypt.java:77)
    at sun.security.ssl.ClientHandshaker.serverKeyExchange(ClientHandshaker.java:721)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:281)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    … 65 more
    Caused by: java.security.KeyException
    at sun.security.ec.ECKeyPairGenerator.generateECKeyPair(Native Method)
    at sun.security.ec.ECKeyPairGenerator.generateKeyPair(ECKeyPairGenerator.java:128)
    … 74 more
    [ERROR] Unknown packaging: nar @ org.postgresql:pljava-so:[unknown-version], /var/lib/pgsql/PL/pljava/pljava-so/pom.xml, line 14, column 13
    [ERROR]
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
    [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginManagerException

  • Sekhar says:

    Do you find solution for this ?

  • Daniel Westermann says:

    Hi Sekhar,

    I didn’t have the time yet. I’ll update when I have any news. Did you follow steps in the post?

    Cheers,
    Daniel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Daniel Westermann
Daniel Westermann

Principal Consultant & Technology Leader Open Infrastructure