Darran Lofthouse created DIRKRB-89:
--------------------------------------
Summary: Incorrect caller detection for
'ServerAnnotationProcessor' when running under IBM Java7 JRE
Key: DIRKRB-89
URL: https://issues.apache.org/jira/browse/DIRKRB-89
Project: Directory Kerberos
Issue Type: Bug
Affects Versions: 2.0.0-M11
Environment: java version "1.7.0"
Java(TM) SE Runtime Environment (build pxa6470sr4fp1-20130325_01(SR4 FP1))
IBM J9 VM (build 2.6, JRE 1.7.0 Linux amd64-64 Compressed References
20130306_140761 (JIT enabled, AOT enabled)
J9VM - R26_Java726_SR4_FP1_20130306_1011_B140761
JIT - r11.b03_20130131_32403ifx1
GC - R26_Java726_SR4_FP1_20130306_1011_B140761_CMPRSS
J9CL - 20130306_140761)
JCL - 20130315_01 based on Oracle 7u13-b08
Reporter: Darran Lofthouse
Assignee: Emmanuel Lecharny
When running under the Java 7 IBM JDK the detection of the @CreateKdcServer
annotation fails as the caller is incorrectly identified.
The stack elements are: -
[0] java.lang.Thread.getStackTraceImpl(Native Method)
[1] java.lang.Thread.getStackTrace(Thread.java:1113)
[2]
org.apache.directory.server.factory.ServerAnnotationProcessor.getAnnotation(ServerAnnotationProcessor.java:339)
[3]
org.apache.directory.server.factory.ServerAnnotationProcessor.getKdcServer(ServerAnnotationProcessor.java:373)
[4]
org.jboss.remoting3.test.RemoteKerberosChannelTest.createKDCServer(RemoteKerberosChannelTest.java:170)
Stack element 3 was chosen where it should actually have been stack element 4
chosen to search for the annotation.
This sounds to be a similar issue to the Java 5 specific check where there is
this additional native method at the top, unfortunately it has a different name
on Java 7. Changing the String compared from "dumpThreads" to "(Native
Method)" may be better to cover both scenarios.
Alternatively the
'org.apache.directory.server.core.annotations.AnnotationUtils' used to create
the directory server works fine as this works by iterating it's way back up the
call stack so additional elements do not affect it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira