Getting java.lang.NoClassDefFoundError in JDeveloper Native Format Builder for JSON
Apparently I've run into an issue with Oracle JDeveloper 12.2.1.4.0 when using the Native Format Builder against a JSON file. Other online posts point to Oracle Doc ID 2628833.1 which tell you to apply patch 30482761 to solve this problem. This did not work.
In this post, I walk through what I did to resolve this.
My JDeveloper version
I am running Oracle JDeveloper 12.2.1.4.0 for Microsoft Windows (Build JDEVADF_PT.12.2.1.4.0_GENERIC_190911.2248.S).
Error encountered using the Native Format Builder
- Create a SOA project.
- Create a REST adapter and select the option Reference will be invoked by components using WSDL interfaces.
- After creating an operation, click on the icon to "Define Schema for Native Format". This starts the Native Format Builder.
- Select JSON Interchange Format.
- Upload a file (e.g.,
pg.json
). - Click on Next.
This is the error that pops up:
Error creating stream factory:
java.lang.NoClassDefFoundError
com/fasterxml/jackson/core/JsonFactory
And here is a screenshot of the error:
The Solution
You need to apply both patches 30482761 and 32363659 to JDeveloper.
set ORACLE_HOME=c:\JDeveloper\Oracle_Home
set JAVA_HOME=c:\Progra~2\Java\jdk1.8.0_241
set PATH=%JAVA_HOME%\bin;%PATH%
cd %ORACLE_HOME%\OPatch
opatch lsinventory
unzip c:\p30482761_122140_Generic.zip
cd 30482761
..\opatch.bat apply
cd ..
unzip c:\p32363659_122140_Generic.zip
cd 32363659
..\opatch.bat apply
cd ..
opatch lsinventory