java.lang.SecurityException: Prohibited package name: java.util.concurrent.locks

Atlassian JIRA | Adrian Hempel [Atlassian] | 9 years ago
  1. 0

    In [BSP-661|https://support.atlassian.com/browse/BSP-661], there are cases of Remote Agents on JDK 1.5 throwing the following exception and exiting: {noformat} java.lang.SecurityException: Prohibited package name: java.util.concurrent.locks at java.lang.ClassLoader.preDefineClass(ClassLoader.java:534) at java.lang.ClassLoader.defineClass(ClassLoader.java:669) at java.lang.ClassLoader.defineClass(ClassLoader.java:520) at com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.findClass(AgentClassLoader.java:113) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.loadClass(AgentClassLoader.java:233) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.activemq.util.ClassLoading.load(ClassLoading.java:112) at org.apache.activemq.util.ClassLoading.loadClass(ClassLoading.java:51) at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.load(ClassLoadingAwareObjectInputStream.java:55) at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:37) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479) at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1399) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:166) at org.springframework.jms.support.converter.SimpleMessageConverter.extractSerializableFromMessage(SimpleMessageConverter.java:222) at org.springframework.jms.support.converter.SimpleMessageConverter.fromMessage(SimpleMessageConverter.java:109) at org.springframework.jms.core.JmsTemplate.doConvertFromMessage(JmsTemplate.java:763) at org.springframework.jms.core.JmsTemplate.receiveSelectedAndConvert(JmsTemplate.java:742) at com.atlassian.bamboo.v2.build.queue.AgentQueueAccessorImpl.takeBuildContext(AgentQueueAccessorImpl.java:29) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:65) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32) at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34) at java.lang.Thread.run(Thread.java:613) {noformat} I suspect that the server is running on JDK 1.6 (I am seeking confirmation from the customer), and that a serialised BuildContext object graph containing a reference to a member of the java.util.concurrent.locks package that appears in JDK 1.6 but not JDK 1.5 is being sent to the remote agent. I will use the debug logging message converter to take a look at the object graph.

    Atlassian JIRA | 9 years ago | Adrian Hempel [Atlassian]
    java.lang.SecurityException: Prohibited package name: java.util.concurrent.locks
  2. 0

    In [BSP-661|https://support.atlassian.com/browse/BSP-661], there are cases of Remote Agents on JDK 1.5 throwing the following exception and exiting: {noformat} java.lang.SecurityException: Prohibited package name: java.util.concurrent.locks at java.lang.ClassLoader.preDefineClass(ClassLoader.java:534) at java.lang.ClassLoader.defineClass(ClassLoader.java:669) at java.lang.ClassLoader.defineClass(ClassLoader.java:520) at com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.findClass(AgentClassLoader.java:113) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.loadClass(AgentClassLoader.java:233) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.activemq.util.ClassLoading.load(ClassLoading.java:112) at org.apache.activemq.util.ClassLoading.loadClass(ClassLoading.java:51) at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.load(ClassLoadingAwareObjectInputStream.java:55) at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:37) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479) at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1399) 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:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:166) at org.springframework.jms.support.converter.SimpleMessageConverter.extractSerializableFromMessage(SimpleMessageConverter.java:222) at org.springframework.jms.support.converter.SimpleMessageConverter.fromMessage(SimpleMessageConverter.java:109) at org.springframework.jms.core.JmsTemplate.doConvertFromMessage(JmsTemplate.java:763) at org.springframework.jms.core.JmsTemplate.receiveSelectedAndConvert(JmsTemplate.java:742) at com.atlassian.bamboo.v2.build.queue.AgentQueueAccessorImpl.takeBuildContext(AgentQueueAccessorImpl.java:29) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:65) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32) at edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34) at java.lang.Thread.run(Thread.java:613) {noformat} I suspect that the server is running on JDK 1.6 (I am seeking confirmation from the customer), and that a serialised BuildContext object graph containing a reference to a member of the java.util.concurrent.locks package that appears in JDK 1.6 but not JDK 1.5 is being sent to the remote agent. I will use the debug logging message converter to take a look at the object graph.

    Atlassian JIRA | 9 years ago | Adrian Hempel [Atlassian]
    java.lang.SecurityException: Prohibited package name: java.util.concurrent.locks
  3. 0

    Cannot require 'openssl' in a signed jruby jar as of jruby 1.7.3

    GitHub | 3 years ago | jeffgran
    java.lang.SecurityException: class "org.jruby.ext.openssl.OpenSSLReal$OpenSSLModule$INVOKER$s$0$0$errors"'s signer information does not match signer information of other classes in the same package
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    LoadError: ... signer information does not match ...

    GitHub | 5 years ago | fjenett
    java.lang.SecurityException: class "arjdbc.jdbc.RubyJdbcConnection$s$1$0$select_p"'s signer information does not match signer information of other classes in the same package
  6. 0

    Serialize/deserialize Instant class

    GitHub | 2 years ago | maxd
    java.lang.SecurityException: Prohibited package name: java.time

    2 unregistered visitors
    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.SecurityException

      Prohibited package name: java.util.concurrent.locks

      at java.lang.ClassLoader.preDefineClass()
    2. Java RT
      ClassLoader.defineClass
      1. java.lang.ClassLoader.preDefineClass(ClassLoader.java:534)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:669)
      3. java.lang.ClassLoader.defineClass(ClassLoader.java:520)
      3 frames
    3. com.atlassian.bamboo
      AgentClassLoader.findClass
      1. com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.findClass(AgentClassLoader.java:113)
      1 frame
    4. Java RT
      ClassLoader.loadClass
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:316)
      1 frame
    5. com.atlassian.bamboo
      AgentClassLoader.loadClass
      1. com.atlassian.bamboo.agent.bootstrap.AgentClassLoader.loadClass(AgentClassLoader.java:233)
      1 frame
    6. Java RT
      ClassLoader.loadClass
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      1 frame
    7. ActiveMQ :: Broker
      ClassLoadingAwareObjectInputStream.resolveClass
      1. org.apache.activemq.util.ClassLoading.load(ClassLoading.java:112)
      2. org.apache.activemq.util.ClassLoading.loadClass(ClassLoading.java:51)
      3. org.apache.activemq.util.ClassLoadingAwareObjectInputStream.load(ClassLoadingAwareObjectInputStream.java:55)
      4. org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:37)
      4 frames
    8. Java RT
      ObjectInputStream.readObject
      1. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
      2. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      3. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
      4. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      5. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
      6. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      7. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
      8. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
      9. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
      10. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      11. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      12. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      13. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      14. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      15. java.io.ObjectInputStream.readArray(ObjectInputStream.java:1634)
      16. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
      17. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      18. java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
      19. java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1399)
      20. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      21. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      22. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      23. java.lang.reflect.Method.invoke(Method.java:585)
      24. java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
      25. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
      26. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      27. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      28. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      29. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      30. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      31. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      32. java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
      33. java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
      34. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
      35. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
      36. java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      36 frames
    9. ActiveMQ :: Core
      ActiveMQObjectMessage.getObject
      1. org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:166)
      1 frame
    10. Spring Framework
      JmsTemplate.receiveSelectedAndConvert
      1. org.springframework.jms.support.converter.SimpleMessageConverter.extractSerializableFromMessage(SimpleMessageConverter.java:222)
      2. org.springframework.jms.support.converter.SimpleMessageConverter.fromMessage(SimpleMessageConverter.java:109)
      3. org.springframework.jms.core.JmsTemplate.doConvertFromMessage(JmsTemplate.java:763)
      4. org.springframework.jms.core.JmsTemplate.receiveSelectedAndConvert(JmsTemplate.java:742)
      4 frames
    11. com.atlassian.bamboo
      NamedThreadFactory$1.run
      1. com.atlassian.bamboo.v2.build.queue.AgentQueueAccessorImpl.takeBuildContext(AgentQueueAccessorImpl.java:29)
      2. com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:65)
      3. com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:101)
      4. com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$1.run(NamedThreadFactory.java:32)
      4 frames
    12. Backport of JSR 166
      ThreadHelpers$1.run
      1. edu.emory.mathcs.backport.java.util.concurrent.helpers.ThreadHelpers$1.run(ThreadHelpers.java:34)
      1 frame
    13. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:613)
      1 frame