java.lang.ClassCastException: com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction

Atlassian JIRA | Partha Kamal [Atlassian] | 8 years ago
  1. 0

    Steps to reproduce. 1) Install confluence 2.9.2 and crucible 1.6.5 2) Setup trusted apps to crucible (specify a "IP address Matches as 10.0.100.123) 3) Install the confluence crucible plugin [https://maven.atlassian.com/contrib/com/atlassian/confluence/plugins/crucible/confluence-crucible-plugin/1.6/confluence-crucible-plugin-1.6.jar] via the admin > plugins 4) In crucible create a confluence repository (via the plugin in crucible) 5) Try and create a review using the confluence repository, you will get the following: {noformat} Failed to create input stream: Server returned HTTP response code: 500 for URL: http://localhost:8080/rpc/xmlrpc {noformat} Looking at the confluence logs, you see {noformat} 2008-12-16 16:28:15,937 ERROR [http-8080-Processor6] [[Standalone].[localhost].[/].[xmlrpc]] invoke Servlet.service() for servlet xmlrpc threw exception java.lang.ClassCastException: com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction at com.atlassian.security.auth.trustedapps.DefaultIPMatcher.<init>(DefaultIPMatcher.java:66) at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getIpMatcher(SeraphTrustedApplicationIntegration.java:42) at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getTrustedApplication(SeraphTrustedApplicationIntegration.java:25) at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy63.getTrustedApplication(Unknown Source) at com.atlassian.seraph.filter.TrustedApplicationsFilter$AuthenticatorImpl.authenticate(TrustedApplicationsFilter.java:441) at com.atlassian.seraph.filter.TrustedApplicationsFilter.authenticate(TrustedApplicationsFilter.java:133) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:110) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) {noformat} If you go back to Administration > Trusted Applications (within confluence) and remove the "IP Address Matches" and leave it blank, you cannot reproduce the issue.

    Atlassian JIRA | 8 years ago | Partha Kamal [Atlassian]
    java.lang.ClassCastException: com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction
  2. 0

    Steps to reproduce. 1) Install confluence 2.9.2 and crucible 1.6.5 2) Setup trusted apps to crucible (specify a "IP address Matches as 10.0.100.123) 3) Install the confluence crucible plugin [https://maven.atlassian.com/contrib/com/atlassian/confluence/plugins/crucible/confluence-crucible-plugin/1.6/confluence-crucible-plugin-1.6.jar] via the admin > plugins 4) In crucible create a confluence repository (via the plugin in crucible) 5) Try and create a review using the confluence repository, you will get the following: {noformat} Failed to create input stream: Server returned HTTP response code: 500 for URL: http://localhost:8080/rpc/xmlrpc {noformat} Looking at the confluence logs, you see {noformat} 2008-12-16 16:28:15,937 ERROR [http-8080-Processor6] [[Standalone].[localhost].[/].[xmlrpc]] invoke Servlet.service() for servlet xmlrpc threw exception java.lang.ClassCastException: com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction at com.atlassian.security.auth.trustedapps.DefaultIPMatcher.<init>(DefaultIPMatcher.java:66) at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getIpMatcher(SeraphTrustedApplicationIntegration.java:42) at com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getTrustedApplication(SeraphTrustedApplicationIntegration.java:25) at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy63.getTrustedApplication(Unknown Source) at com.atlassian.seraph.filter.TrustedApplicationsFilter$AuthenticatorImpl.authenticate(TrustedApplicationsFilter.java:441) at com.atlassian.seraph.filter.TrustedApplicationsFilter.authenticate(TrustedApplicationsFilter.java:133) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:110) at com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94) at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595) {noformat} If you go back to Administration > Trusted Applications (within confluence) and remove the "IP Address Matches" and leave it blank, you cannot reproduce the issue.

    Atlassian JIRA | 8 years ago | Partha Kamal [Atlassian]
    java.lang.ClassCastException: com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction
  3. 0

    GitHub comment 3247#169011193

    GitHub | 11 months ago | tomca32
    java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.ClassCastException: java.util.ArrayList

    Stack Overflow | 5 years ago | TechFind
    java.lang.ClassCastException: java.util.ArrayList
  6. 0

    Non Standard Field 127 Problem (not a bitmap but a IFA_LLLCHAR)

    Google Groups | 10 years ago | chhil
    java.lang.ClassCastException: java.lang.String

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.atlassian.confluence.security.trust.TrustedApplicationIpRestriction

      at com.atlassian.security.auth.trustedapps.DefaultIPMatcher.<init>()
    2. com.atlassian.security
      DefaultIPMatcher.<init>
      1. com.atlassian.security.auth.trustedapps.DefaultIPMatcher.<init>(DefaultIPMatcher.java:66)
      1 frame
    3. com.atlassian.confluence
      SeraphTrustedApplicationIntegration.getTrustedApplication
      1. com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getIpMatcher(SeraphTrustedApplicationIntegration.java:42)
      2. com.atlassian.confluence.security.trust.seraph.SeraphTrustedApplicationIntegration.getTrustedApplication(SeraphTrustedApplicationIntegration.java:25)
      2 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy63.getTrustedApplication
      1. $Proxy63.getTrustedApplication(Unknown Source)
      1 frame
    9. com.atlassian.seraph
      TrustedApplicationsFilter.doFilter
      1. com.atlassian.seraph.filter.TrustedApplicationsFilter$AuthenticatorImpl.authenticate(TrustedApplicationsFilter.java:441)
      2. com.atlassian.seraph.filter.TrustedApplicationsFilter.authenticate(TrustedApplicationsFilter.java:133)
      3. com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:110)
      3 frames
    10. com.atlassian.confluence
      AbstractBootstrapHotSwappingFilter.doFilter
      1. com.atlassian.confluence.util.AbstractBootstrapHotSwappingFilter.doFilter(AbstractBootstrapHotSwappingFilter.java:28)
      1 frame
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    12. com.atlassian.seraph
      BaseLoginFilter.doFilter
      1. com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125)
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    14. com.atlassian.confluence
      ClusterHeaderFilter.doFilter
      1. com.atlassian.confluence.util.ClusterHeaderFilter.doFilter(ClusterHeaderFilter.java:35)
      1 frame
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    16. com.atlassian.gzipfilter
      GzipFilter.doFilter
      1. com.atlassian.gzipfilter.GzipFilter.doFilterInternal(GzipFilter.java:94)
      2. com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:64)
      2 frames
    17. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
      8 frames
    18. Grizzly HTTP
      LeaderFollowerWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
      2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
      3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
      4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
      4 frames
    19. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
      1 frame
    20. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame