[jboss-user] [Javassist user questions] - Re: Illegal class modifiers

2006-12-09 Thread wessan
OK ... this is as much deatils as I can provide:

This is an example exception thrown:
Exception in thread "main" java.lang.ClassFormatError: Illegal class modifiers 
in class test/cz/solari/shards/example/app1/EmployeeImpl: 0x431
  | at java.lang.ClassLoader.defineClass1(Native Method)
  | at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
  | at java.lang.ClassLoader.defineClass(ClassLoader.java:465)
  | at cz.solari.shards.loader.Loader.findClass(Loader.java:136)
  | at cz.solari.shards.loader.Loader.loadClass(Loader.java:70)
  | at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  | at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
  | at 
test.cz.solari.shards.source.DefaultSourceTest.main(DefaultSourceTest.java:23)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:597)

It seems that the generated bytecode is incorrect. The code passed to 
defineClass method is generated using CtClass.toByteCode() method. The class 
may be altered (fields/methods may be added) by the custom ClassLoader however 
the class modifiers are never changed. It seems that Javassist doesn't throw 
any excetion during compilation, just the ClassLoader does.
I tried it with both JDK 1.6 and JDK 1.5 with both of them the same exception 
is thrown.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992436#3992436

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992436
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [Javassist user questions] - Illegal class modifiers

2006-12-07 Thread wessan
Hi,

I'm getting java.lang.ClassFormatError: Illegal class modifiers in class 
test/app1/EmployeeImpl: 0x431

This is probably caused by JDK 1.6 as I switched the JDK. I don't modify the 
modifiers of the class. Is this a known problem, or am I doing something wrong? 
Is there any solution?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992113#3992113

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992113
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user