[jboss-user] [Javassist] - Javaassist and Java Web Start. Its posible?

Telcontar Thorongil do-not-reply at jboss.com
Wed Feb 27 11:23:55 EST 2013


Telcontar Thorongil [https://community.jboss.org/people/telcontarvi] created the discussion

"Javaassist and Java Web Start. Its posible?"

To view the discussion, visit: https://community.jboss.org/message/799924#799924

--------------------------------------------------------------
Hi, i'm triying to deploy a desktop application with one class modified at runtime by javaassist. In my computer it's working fine, but when i deploy and start it by Java Web Start i'm facing several problems, last of them i can't resolve:

- First: ClassPool didnt found the class to modify, it was fixed by cp.insertClassPath(new ClassClassPath(XXXXX.class));

- Second: All .jar of an Java Web Start application must be signed by one and only one certificate, but when javaassist modify the class at runtime i supose the sign it's gone or it's invalid, so that this exception is launched: 

java.lang.SecurityException: class "com.sch.coberturas.db.CobDao"'s signer information does not match signer information of other classes in the same package

Solved by isolating com.sch.coberturas.db.CobDao in a package with only this class in it

- Third: I suposse that Java Web Start detects that the modified class is not signed, or it's sign it's not valid and revokes permissions to the application so it can't do things like connecting to the database or to write files, making the app useless.


How can i solve this third problem?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799924#799924]

Start a new discussion in Javassist at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2062]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130227/fc10a983/attachment-0001.html 


More information about the jboss-user mailing list