Closed glassfishrobot closed 9 years ago
Reported by marens
marens said: Here is gmbal's typelib debugging that shows the details of the TypeEvaluator at work https://gist.github.com/dermarens/982b632c17aca0b8ce01
marens said: Same problem for grizzly 2.3.18 after reading up on the monitoring changes for 2.3 and adding the modules mentioned in https://grizzly.java.net/monitoring.html. So please change the affected version.
oleksiys said: I approached folks responsible for gmbal, but for now I don't have any estimate from them on how long it may take to fix this.
marens said: Thanks for the feedback Alexey.
salvadormacedo said: I'm having the same issue in AIX 7.1 With any version of IBM Java while deploying and app in Glassfish..
omplete Message enterprise_util.excep_in_createorb java.lang.TypeNotPresentException: Type javax.rcm.ResourceAttributes not present at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:130) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:62) at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:81) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:151) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:62) at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:81) at java.lang.reflect.Method.getGenericReturnType(Method.java:259) at .....
Caused by: java.lang.ClassNotFoundException: javax.rcm.ResourceAttributes at java.lang.Class.forNameImpl(Native Method) at java.lang.Class.forName(Class.java:296) at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:127) ... 270 more
marens said: @salvadormacedo you might be able to work around it by using ibm java 1.6 until this bug gets fixed
salvadormacedo said: Unfortunately I'm using primefaces framework that requires java 1.7..! :|
marens said: We retested the Latest SLES12 Updates (Jun-16-2015, Kernel 3.12.43-52.6.1) and this version desn't seem to suffer from this problem anylonger
cat /etc/SUSE-brand SLE VERSION = 12
java -version java version "1.7.0" Java(TM) SE Runtime Environment (build pxa6470_27sr3-20150415_01(SR3)) IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20150407_243189 (JIT enabled, AOT enabled) J9VM - R27_Java727_SR3_20150407_1831_B243189 JIT - tr.r13.java_20150406_89182 GC - R27_Java727_SR3_20150407_1831_B243189_CMPRSS J9CL - 20150407_243189) JCL - 20150414_01 based on Oracle 7u79-b14
yet gmbal should be made more robust.
oleksiys said: thank you for the update!
@rlubke said: Closing this issue out for now. Gmbal team has been notified of the issue. Might still be worth logging an issue on their public tracker as well.
This issue was imported from java.net JIRA GRIZZLY-1732
Marked as won't fix on Friday, October 16th 2015, 1:29:35 pm
Trying to start a minmal grizzly project on ibm java fails with java.lang.TypeNotPresentException: Type javax.rcm.ResourceAttributes not present
This "magically" works when trying with grizzly 2.3.18 but the underlying cause keeps worrying me enough to open this as i see potential that it will pop up again or at least somebody else might find this useful when stumbling upon this problem.
The underlying problem seems to be:
Grizzly uses gmbal annotations for management objects and methods. When registering such a management object (org.glassfish.grizzly.http.server.jmx.HttpServer) with gmbal's ManagedObjectManagerImpl the type of the object to register is evaluated. "Given any generic java type, evaluate all of its type bounds and return an evaluated type.". While trying to evaluate all the type bounds and depending on the jvm in use the lib somehow ends up in:
class com.ibm.tenant.TenantConfiguration.getResourceConstraints() which has a signature of ()Ljava/util/Map<Ljavax/rcm/ResourceAttributes;Lcom/ibm/rcm/resource/config/ResourceConfig;>;
Class.forName(String, boolean, ClassLoader) line: 252
CoreReflectionFactory.makeNamedType(String) line: 127
Reifier.visitClassTypeSignature(ClassTypeSignature) line: 138
ClassTypeSignature.accept(TypeTreeVisitor<?>) line: 62
Reifier.reifyTypeArguments(TypeArgument[]) line: 81
Reifier.visitClassTypeSignature(ClassTypeSignature) line: 151
ClassTypeSignature.accept(TypeTreeVisitor<?>) line: 62
MethodRepository.getReturnType() line: 81
Method.getGenericReturnType() line: 259 [local variables unavailable]
TypeEvaluator$TypeEvaluationVisitor.visitMethodDeclaration(EvaluatedClassDeclaration, Method) line: 564
A simple project with the mentioned grizzly versions in pom.xml can be found at https://github.com/dermarens/grizzly.hello
The full error is shown here https://gist.github.com/dermarens/353208676dc79bb621e7
I have no idea how exactly we ended up in com.ibm.tenant.TenantConfiguration.getResourceConstraints starting from org.glassfish.grizzly.http.server.jmx.HttpServer and why this doesn't happen with grizzly-2.3.18. (doesn't happen with openjdk on sles either btw.) I hope somebody could explain this or at least forward it to the right developer as gmbal seems to be part of glassfish/grizzly
Environment
Suse Linux Enterprise Server 12 java -version java version "1.7.0" Java(TM) SE Runtime Environment (build pxa6470_27sr1fp1-20140708_01(SR1 FP1)) IBM J9 VM (build 2.7, JRE 1.7.0 Linux amd64-64 Compressed References 20140707_205525 (JIT enabled, AOT enabled) J9VM - R27_Java727_SR1_20140707_1408_B205525 JIT - tr.r13.java_20140410_61421.07 GC - R27_Java727_SR1_20140707_1408_B205525_CMPRSS J9CL - 20140707_205525) JCL - 20140707_01 based on Oracle 7u65-b16
Affected Versions
[2.2.22, 2.3.18]