2

I'm trying to include javax.json.jar to my project in Jdeveloper 12c IDE

The final phillplugin.jar includes:

  • META-INF folder containing MANIFEST.MF file
  • phillplugin folder which includes my phillplugin.class
  • javax.json-1.0.2.jar file
  • phillplugin.xml

Although the server crashes because it doesn't recognize my javax.json class from the MANIFEST.MF file with the following Error:

Unable to resolve 2.0: missing requirement [2.0] osgi.wiring.package; (osgi.wiring.package=javax.json)

This is how i'm exporting it:

  1. Right click the project -> properties
  2. Libraries / Classpath -> checking the javax.json-1.0.2.jar
  3. Deployment -> editing deployed my profile
  4. File Groups -> new -> type: Libraries name: lib
  5. Contributors : Everything is checked
  6. Filters: checking the javax.json-1.0.2.jar

and then im deploying it.

Is the way i'm doing it wrong?

Phill Alexakis
  • 1,449
  • 1
  • 12
  • 31

1 Answers1

1

i had to include in my MANIFEST.MF like so: org.json;resolution:= optional,org.json.JSONObject;resolution:=optional

Manifest-Version: 1.0
Bundle-SymbolicName: PhillPlugin
Bundle-Version: 10
Bundle-Name: PhillPlugin
Bundle-Activator: phillplugin.PhillPlugin
Bundle-ManifestVersion: 2
Import-Package: org.osgi.framework;version="1.3.0",oracle.security.am.
 plugin,oracle.security.am.plugin.authn,oracle.security.am.plugin.impl
 ,oracle.security.am.plugin.api,oracle.security.am.common.utilities.pr
 incipal,oracle.security.idm,javax.security.auth,org.json;resolution:=
 optional,org.json.JSONObject;resolution:=optional

as well as the .jar and the library

enter image description here

Phill Alexakis
  • 1,449
  • 1
  • 12
  • 31