Posts

Showing posts from February, 2009

What does: "Fault occurred while processing" in the client mean? and how do you reveal the real exception?

I have this CXF client which sometimes throws normal exceptions but some of the other times it throws me a "Fault occurred while processing", well, what does that mean?

When you get back a "Fault occurred while processing" it means that a web service threw an unchecked exception.  The CXF framework catches it and puts together a fault message which it sends back to the client.  The client’s stack trace at that point is pretty-much irrelevant.
There may be a way to get CXF to log the server stack trace, but I haven’t found it yet (feel free to comment on the post if you found one).  There may also be a way to stick a handler into the flow to get the exception before constructing the fault message, but I haven’t found that yet either (ditto).
If a checked-exception is thrown, then the exception – or at least its message – gets sent back to the client where it’s reconstructed and rethrown to be caught by the client.
Debugging a problem like this, once you can recreat…

Embed Nimbus's look and feel to your Java programs using Netbeans

This one gave me a little headache, cause it shouldn't really be an issue, but it turned out to be a non trivial tweak.
What's the story? I use Netbeans 6.5 and Java 1.6.0_11 and I wanted my gui programs to "wear" the nimbus look and feel.
How should I configure my netbeans gui builder to dress my program with the nimbus l&f?
First thing I needed to configure my current project to use the latest JDK, it used as a default a previous version (1.6.0_07) which doesn't support the nimbus l&f.
First thing was to add the latest jdk to the netbeans platform, go to Tools --> java platform and add the new jdk.
The next task is to add the new jdk to the specific project; project properties --> Libraries and under the Java platform pick the new JDK to run this program. 
Now that the JDK issue is set, it's time to set the actual L&F:  Project properties --> Application --> Desktop app --> Look & Feel --> com.sun.java.swing.plaf.nimbus.NimbusLookAn…

Ant Explorer graphical Ant build tool

Every serious java developer needs to create or edit some ant building script.

Eclipse offers nice ant handling features which make the task much easier, eclipse's plugin (which is embeded into eclipse since version 3.1 or so) understands the ant scripting language thus enables not only syntax coloring but also nice mouse hovering which reveals values of properties, variable names which enables finding the source of each variable and also some nice debugging features.

But, there is one field in which eclipse's ant handling lacks perfection, its in viewing the whole build file in one gaze graphically feature, that feature isn't supported by eclipse.

Luckily enough, it is supported by YWorks, which created a nice and free util which loads an ant script file and shows it in a beautiful and so very useful way.

I think that this util (which was released as a standalone as well as an eclipse and idea) is a must for any serious java developer.

Unluckily, YWorks have removed the u…