3 Replies Latest reply on Nov 23, 2012 11:50 AM by sguilhen

    Exception in jboss.security.SubjectInfo

    soma3080

      Hi,

       

      In my application I added jboss-security-spi.jar file.

      while executing the script, I got an exception as

      Exception in thread "main" java.lang.NoSuchMethodError: org.jboss.security.SubjectInfo.getAuthenticationPrincipal()Ljava/security/Principal;

      when I see the API SubjectInfo there no method called getAuthenticationPrincipal.

      Please guide me to resolve this issue.

        • 1. Re: Exception in jboss.security.SubjectInfo
          jfclere

          what is the complete stack trace?

          • 2. Re: Exception in jboss.security.SubjectInfo
            soma3080

            Hello Jean-Frederic,

             

            Thanks! for looking into my issue.

             

            Please find the stacktrace below,

            Exception in thread "main" java.lang.NoSuchMethodError: org.jboss.security.SubjectInfo.getAuthenticationPrincipal()Ljava/security/Principal;
                    at org.jboss.security.plugins.JBossSecurityContextUtil.getUserPrincipal(JBossSecurityContextUtil.java:81)
                    at org.jboss.proxy.SecurityActions$1.getPrincipal(SecurityActions.java:62)
                    at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:58)
                    at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:184)
                    at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:101)
                    at $Proxy0.create(Unknown Source)

            • 3. Re: Exception in jboss.security.SubjectInfo
              sguilhen

              This is probably caused by a conflict between the jboss-security-spi.jar that you added to your app and the one shipped within the lib folder of the app server. Why do you need to add the lib to your app?