Java Class Not Found Exception / Could Not Find Class

Class Not Found

Could not find or load main class

You compiled your Java HelloWorld.java and then you are facing an error? Most likely you added the .class extension when the running the programm:

$ java HelloWorld.class
Error: Could not find or load main class HelloWorld.class

You were running the .class file. Try again:

$ java HelloWorld
Hello, World

Deal with ClassNotFound Exception

If you encounter a class not found exception while working with Oracle WebLogic server I recommend my posting about the Classloader Analysis Tool.

Oracle Service Bus 12c (12.2.1) Native REST: Bug in HTTP GET in Pipeline?

While I was working on an Oracle tech presentation, I discovered the following issue with native REST and Oracle Service Bus 12c.

Version

SOA Quickstart / 12.2.1 OSB, running on RedHat derivative with Oracle JDK 8.

Description

OSB 12.2.1 Native REST pipelines don’t work with GET parameters.

Creating a native REST business services works fine, also adding a REST proxy service.
Once you insert a pipeline HTTP stops working correctly (since the URL parameters aren’t forwarded, a list will be returned by the backend service according to REST semantics), since URL parameters are not forwarded.

Steps to reproduce:

  • Use REST tech adapter to create a REST business service for an existing REST backend.
  • Define GET and POST methods. WADL will be created.
  • Test business service from WADL: both GET and POST will work.
  • Create proxy service from REST business service
  • Test proxy service, again GET and POST methods will work from OSB test client.
  • In JDev, drop a pipeline on the line connecting proxy and business service.
  • In JDev verify the pipeline configuration. it will display correct values.
  • Test the proxy service again, only POST will work. GET does not work anymore (now returns a whole list), since the URL parameters are not forwarded. Even an empty OSB pipeline will swallow the GET URL parameters.

Severity

IMHO this is a bug. I am currently in discussion with Oracle PM about it. Since I am working on another cloud gig, I cannot file a SR myself.

What is next?

I will let you know about updates / fixes or workarounds. Note, you could set the URL parameters as routing options to circumnavigate the issue for a particular use case.

Update 1 (Oct 2016)

I received no feedback from Oracle unfortunately. Anyway, if you experience the same issue let me know. It is important to share the knowledge here – I receive a lot of positive feedback from people with the same issues. Anyhow, also file a SR with MOS if you can. This is the official way to get it possibly fixed.

Update 2 (Jan-12, 2017)

There is a Patch 25184543 now with a backport to 12.2.1.2, see comments below. Gracias a Juan! Kudos for getting this through MOS and for sharing the knowledge.

Web Service Development with NetBeans and Testing with WebLogic Admin Console

Developing of SOAP based web services for WebLogic 12c (or any other application server) with NetBeans is a breeze. You can do it without using any templates or IDE wizards, no XML is required, no modification of deployment descriptors.

The following screencast shows how to develop the most simple web service pobbislbe, how to test it entirely with WebLogic admin console, and how modifying the web service will work without redeployment.