Skip to main content
Stack Overflow
  1. About
  2. For Teams

Return to Answer

Post Timeline

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

It’s quite possible that the bug, you have linked the bug, you have linked does apply, if Instrumentation is involved. Consider this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in", that affected all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode failed to access the anonymous classes generated for lambda expressions in early version of Java 8.

While this bug has been fixed, the described behavior of generating classes after a certain number of invocations still exists, so if an agent attempts to instrument these generated classes, it would fail due to the still existing Instrumentation bug and the dependency to the number of invocations is likely the reason why this only occurs occasionally.

While this bug in the Instrumentation/JVM should be fixed (and will be fixed in the next release), it would also help not trying to instrument these classes. Normally, there should be no reason to instrument these internal helper classes.

It’s quite possible that the bug, you have linked does apply, if Instrumentation is involved. Consider this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in", that affected all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode failed to access the anonymous classes generated for lambda expressions in early version of Java 8.

While this bug has been fixed, the described behavior of generating classes after a certain number of invocations still exists, so if an agent attempts to instrument these generated classes, it would fail due to the still existing Instrumentation bug and the dependency to the number of invocations is likely the reason why this only occurs occasionally.

While this bug in the Instrumentation/JVM should be fixed (and will be fixed in the next release), it would also help not trying to instrument these classes. Normally, there should be no reason to instrument these internal helper classes.

It’s quite possible that the bug, you have linked does apply, if Instrumentation is involved. Consider this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in", that affected all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode failed to access the anonymous classes generated for lambda expressions in early version of Java 8.

While this bug has been fixed, the described behavior of generating classes after a certain number of invocations still exists, so if an agent attempts to instrument these generated classes, it would fail due to the still existing Instrumentation bug and the dependency to the number of invocations is likely the reason why this only occurs occasionally.

While this bug in the Instrumentation/JVM should be fixed (and will be fixed in the next release), it would also help not trying to instrument these classes. Normally, there should be no reason to instrument these internal helper classes.

added 239 characters in body
Source Link
Holger
  • 301.1k
  • 43
  • 483
  • 832

ApparentlyIt’s quite possible that the bug, you have linked does apply, you are affected byif Instrumentation is involved. Consider this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in" . This is a bug, that affectsaffected all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode failsfailed to access the anonymous classes generated for lambda expressions in early version of Java 8. The

While this bug has been fixed, the described behavior of generating classes after a certain number of invocations still exists, so if an agent attempts to instrument these generated classes, it would fail due to the still existing Instrumentation bug and the dependency to the number of invocations is likely the reason why this only occurs occasionally.

But note thatWhile this bug has beenin the Instrumentation/JVM should be fixed already(and will be fixed in early versions of Java 8, before the first officialnext release. So apparently, you are using a beta version of Java 8 that is at least three years old...

As a side note), I have no idea what JBoss isit would also help not trying to do with your predicate that you are passing to anyMatchinstrument these classes. Since lambda expressions implement interfacesNormally, there isshould be no reason to invoke anything on them via Reflectioninstrument these internal helper classes.

Apparently, you are affected by this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in" . This is a bug that affects all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode fails to access the anonymous classes generated for lambda expressions. The dependency to the number of invocations is likely the reason why this only occurs occasionally.

But note that this bug has been fixed already in early versions of Java 8, before the first official release. So apparently, you are using a beta version of Java 8 that is at least three years old...

As a side note, I have no idea what JBoss is trying to do with your predicate that you are passing to anyMatch. Since lambda expressions implement interfaces, there is no reason to invoke anything on them via Reflection.

It’s quite possible that the bug, you have linked does apply, if Instrumentation is involved. Consider this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in" , that affected all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode failed to access the anonymous classes generated for lambda expressions in early version of Java 8.

While this bug has been fixed, the described behavior of generating classes after a certain number of invocations still exists, so if an agent attempts to instrument these generated classes, it would fail due to the still existing Instrumentation bug and the dependency to the number of invocations is likely the reason why this only occurs occasionally.

While this bug in the Instrumentation/JVM should be fixed (and will be fixed in the next release), it would also help not trying to instrument these classes. Normally, there should be no reason to instrument these internal helper classes.

Source Link
Holger
  • 301.1k
  • 43
  • 483
  • 832

Apparently, you are affected by this bug, JDK-8027681, "Lambda serialization fails once reflection proxy generation kicks in". This is a bug that affects all Reflection operations that are performed more than 16 times (this is a configurable threshold), as the underlying implementation will optimize subsequent calls by generating an accessor class, consisting of bytecode that HotSpot can inline. This bytecode fails to access the anonymous classes generated for lambda expressions. The dependency to the number of invocations is likely the reason why this only occurs occasionally.

But note that this bug has been fixed already in early versions of Java 8, before the first official release. So apparently, you are using a beta version of Java 8 that is at least three years old...

As a side note, I have no idea what JBoss is trying to do with your predicate that you are passing to anyMatch. Since lambda expressions implement interfaces, there is no reason to invoke anything on them via Reflection.

lang-java

AltStyle によって変換されたページ (->オリジナル) /