Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2228

Selecting an interface of a signed jar can lead to a SecurityException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Critical
    • None
    • 2.3.5.Final, 2.4.0.CR1
    • Proxies
    • None
    • Hide

      CDI.current().select(MyInterface.class, MyQualifierLiteral("test")).get()

      @MyQualifier("test")
      @ApplicationScoped
      public class MyImpl extends AbstractImpl {
      ...
      }

      abstract class AbstractImpl implements MyInterface {
      ...
      }

      Show
      CDI.current().select(MyInterface.class, MyQualifierLiteral("test")).get() @MyQualifier("test") @ApplicationScoped public class MyImpl extends AbstractImpl { ... } abstract class AbstractImpl implements MyInterface { ... }

    Description

      The reason seems to be that the proxiedBeanType in ProxyFactory is Object.class

      Stacktrace

      Caused by: java.lang.RuntimeException: java.lang.SecurityException: class "my.package.MyImpl$1431353132$Proxy$_$$_WeldClientProxy"'s signer information does not match signer information of other classes in the same package
      at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:101)
      at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:491)
      at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:364)
      ... 152 more
      Caused by: java.lang.SecurityException: class "my.package.MyImpl$1431353132$Proxy$_$$_WeldClientProxy"'s signer information does not match signer information of other classes in the same package
      at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
      at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:761)
      at sun.reflect.GeneratedMethodAccessor143.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:108)
      at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:97)

      Attachments

        Activity

          People

            Unassigned Unassigned
            thomas.woeckinger@gmail.com Thomas Wöckinger-Biermair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: