users@jersey.java.net

[Jersey] Re: Jersey client in Applets

From: Kevin Duffey <andjarnic_at_yahoo.com>
Date: Fri, 2 Dec 2011 12:19:00 -0800 (PST)

I thought this error was due to incompatible java versions? Like.. is the applet jvm running 1.6? Or is it maybe 1.4 or 1.5 trying to run your 1.6 based code and jersey?

--- On Fri, 12/2/11, António Mota <amsmota_at_gmail.com> wrote:

From: António Mota <amsmota_at_gmail.com>
Subject: [Jersey] Re: Jersey client in Applets
To: users_at_jersey.java.net
Date: Friday, December 2, 2011, 5:33 AM

Hi again.

I was running this without major problems, until I finally got
everything OK running locally from the AppletViwer in Eclipse.
However, when I deploy on my Tomcat server, I end up with the
following error:

java.lang.ClassFormatError: Incompatible magic value 168430140 in
class file com/sun/jersey/api/json/JSONJAXBContext

I know what the magic number is, but this class is on the
jersey-json-1.10.jar that is, I guess, compiled with Java 1.6x, the
jar is loaded by the applet as I can see in the Java Console, is
signed with the same signature as all other jars in my app, and is
declared on the "archive=" of my applet.

Before the error there is indeed a warning saying the app contains
mixed sign and non signed jar, which I don't understand because I
triple checked the signatures, so maybe the classloader is not getting
the  jersey-json-1.10.jar  I think it should be? I only have 2 jars,
one in my applet lib and other in the tomcat lib, and both are
signed...

What other cases can provoke the Magic Number error?


Cheers.




2011/11/9 António Mota <amsmota_at_gmail.com>
>
> Hi Guys:
>
> After some time using a old, customized version of Jersey, we finally upgraded to the last version, and now I'm investigating the use of the jersey client.
>
> My intention at the moment is to investigate its use from inside a java Applet, and I didn't found any info related.
>
> I suppose it will not be too much different than from inside a rich client, but I have no experience with that either, so I can't tell for sure.
>
> Bottom line, if someone has some initial points for me it will be great.
>
> Thanks in advance.
>
> Cheers.
>
>
> Melhores cumprimentos / Beir beannacht / Best regards
> ______________________________________________________
> António Manuel dos Santos Mota
> http://gplus.to/amsmota
> http://www.cardcloud.com/amsmota
> ______________________________________________________
>