OAM ASDK Oraclepki.jar Maven project complilation 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 JUNE 01, 2017

Applies to:

Oracle Access Manager - Version and later
Information in this document applies to any platform.


On : version, Configuration Service


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



"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: https://en.wikipedia.org/wiki/Apache_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:


• 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.




Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms