My Oracle Support Banner

Oracle Access Manager 11g R2PS3 (OAM 11.1.2.3) ASDK: Oraclepki.jar Maven Project Compilation With oraclepki.jar From The ASDK Fails - "The default package '.' is not permitted by the Import-Package syntax. " (Doc ID 2272986.1)

Last updated on FEBRUARY 22, 2020

Applies to:

Oracle Access Manager - Version 11.1.2.3.0 and later
Information in this document applies to any platform.
Oracle is not responsible for instructions/information from 3rd party sites that may be contained in this KM note.

Symptoms

On : Oracle Access Manager 11g R2PS3 (OAM 11.1.2.3)

Issue
-------------

Cannot build maven project with dependency on oraclepki.jar from OAM ASDK 11.1.2.3

 

ERROR
-------------

"The default package '.' is not permitted by the Import-Package syntax."

 

Setup details provided by customer.
-------------
• Maven is a hugely popular build tool from the Apache stable. Here is a quick sneak peek into maven.
• Maven pulls all the project build dependencies from the nexus repository, adds them to the build class path and builds/compiles the project.
• Oraclepki.jar is added to the nexus repository. It is referenced in the POM file as follows:

oamsdk.dependency.oraclepki
oamsdk.dependency.oraclepki
11.1.1

• And then the build is run as “mvn clean install”. This would start maven; it will read through the pom file to build a dependency tree, pull the dependencies from the nexus repository, add them to the classpath and then compile it.
• With oraclepki.jar as a dependency, “mvn clean install” fails compilation with the following error:
[ERROR] Bundle com.xxxnx.cms:site-myprofile:bundle:1.1.27-SNAPSHOT : The default package '.' is not permitted by the Import-Package syntax.This can be caused by compile errors in Eclipse because Eclipse creates
valid class files regardless of compile errors.
The following package(s) import from the default package null
[ERROR] Error(s) found in bundle configuration
• Maven expects all dependent jar files/projects to be bundled tightly with no class lurking in the default/unnamed package. And that is precisely the problem with oraclepki.jar.

 

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.