Jump to content
Excelsior Forums
Sign in to follow this  
zztop

Techsupport Fairy Tales: That's not a bug, that's a feature (in your application)

Recommended Posts

Definition (Murphy). A working program is one that has only unobserved bugs.

From time to time, our customers send us defect reports like

My app works fine under Sun JVM and does not work after compilation with Excelsior JET. Please fix the bug.

Does it mean that the bug lurks in Excelsior JET? The answer is ?maybe?. Of course, there are bugs escaped our QA and any submission of your defect reports is always welcome. However, sometimes, such problems appear because some code was not properly written in the application or in third-party components it uses.

In this thread, we will publish examples of such support cases. We hope that it will help you write correct code and reduce the workload on our Support (a bit).  B)

Share this post


Link to post
Share on other sites

One day a user submitted the bug report:

I have written a program which just uses XStream (xstream-1.1.3.jar) to create the XML  tag for a  final class variable in my program. I am able to execute directly using the JVM on my system.

Then i tried to create an EXE using JET 4.8 and got the following Error:

Exception in thread "main"

com.thoughtworks.xstream.converters.reflection.ObjectAccessException: Invalid final field xmltest.Main.theValue

We inspected the code in the XStream library that provoked throwing the exception and, to our big surprise, found the following:

private boolean canUseSun14ReflectionProvider() {
        return (isSun() || isApple() || isHPUX() || isIBM() || isBlackdown()) && is14() && loadClass("sun.misc.Unsafe") != null;
}

Well, it proved that we are not on the "white list"!

Fortunately, the next version of XStream did not have such a "face control" checking code. We recommended the user to switch to the next version and the problem has gone.

The only thing that reassured us is that some of other Java SE Licensees were not listed too.

B)

To be continued...

Share this post


Link to post
Share on other sites
My app works fine under Sun JVM and does not work after compilation with Excelsior JET.

Does it mean that the bug lurks in Excelsior JET? Not necessarily...

Continued in this Excelsior's blog post.

Share this post


Link to post
Share on other sites

Excelsior JET customer:

Although the Java .jar version of our server program was able to handle any amount of network traffic our tests could throw at it when run against Sun?s JRE, the JET-compiled executable would freeze within a few minutes.

...

It turned out the problem was in our own code after all!

Improved performance of Java code compiled with Excelsior JET caused a bug lurking in a client-server application to manifest itself...

Continued in this Excelsior's blog post.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×