By: Daniel Chase user 21 Mar 2018 at 9:26 a.m. CDT

5 Responses
Daniel Chase gravatar
java.lang.NullPointerException at gluu.scim2.client.TestModeScimClient.updateTokens(TestModeScimClient.java:99) ~[SCIM-Client-3.1.2.Final.jar:?] at gluu.scim2.client.TestModeScimClient.<init>(TestModeScimClient.java:54) ~[SCIM-Client-3.1.2.Final.jar:?] at gluu.scim2.client.factory.ScimClientFactory.getTestClient(ScimClientFactory.java:29) ~[SCIM-Client-3.1.2.Final.jar:?] at com.cspire.bs.profile.model.GluuClient.<init>(GluuClient.java:16) ~[GluuClient.class:?] I can verify that I am passing in the correct domainUrl and metadataUrl, as I was able to get this working in a different context with the same URLs. The TestModeScimClient constructor makes a call to updateTokens, passing in GrantType.CLIENT_CREDENTIALS. This function in turn calls getTokens() on the grant type. Ultimately it looks like tokenClient.exec() is returning null, hence the null pointer when trying to call .getAccessToken() against the TokenResponse object. Any ideas what could be causing this? It seems like this code is getting updated for version 3.1.3, but in the meantime is there any workaround? *UPDATE 1: On further inspection, it appears that the above null pointer may be a red herring. It seems that the real error is being introduced just before the SCIM Client constructor is called: SecurityProviderUtility.installBCProvider(); For some reason this function is not playing nice with our instance of Tomcat, which is running Java v1.7 (in particular, the errors are related to org.aspectj.weaver). Do you know if SCIM Client is supported for Tomcat running on Java v1.7? **UPDATE 2: It appears that this error is encountered even if I bypass the SecurityProviderUtility.installBCProvider() call by instantiating UmaScimClient directly. Here is the error I am seeing in all cases: org.aspectj.apache.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18 at org.aspectj.apache.bcel.classfile.Constant.readConstant(Constant.java:133) at org.aspectj.apache.bcel.classfile.ConstantPool.<init>(ConstantPool.java:45) at org.aspectj.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:186) at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:131) at org.aspectj.apache.bcel.util.ClassLoaderRepository.loadClass(ClassLoaderRepository.java:323) ***UPDATE 3 Simply adding the SCIM-Client dependency to the maven pom is enough to trigger this issue in tomcat 7... even if the SCIM-Client library is never explicitly accessed.

By Daniel Chase user 26 Mar 2018 at 1:41 p.m. CDT

Daniel Chase gravatar
Dear Gluu Support: Have you been able to make any headway on this ticket? Do you know whether SCIM-Client java API is incompatible with Tomcat v7?

By Thomas Gasmyr Mougang staff 27 Mar 2018 at 3:32 a.m. CDT

Thomas Gasmyr Mougang gravatar
Hi **Daniel**, We apologize for answering a little late. The issue seems to be related to something else. We don't have all information to reproduce the issue. A quick google search about that error lead us to the following link that can help: 1. [First](https://stackoverflow.com/questions/32810492/java-7-and-tomcat-7-0-64-classformatexception-invalid-byte-tag-in-constant-po) 1. [Second](https://stackoverflow.com/questions/23484098/org-apache-tomcat-util-bcel-classfile-classformatexception-invalid-byte-tag-in) 1. [Third](https://stackoverflow.com/questions/6751920/tomcat-7-servlet-3-0-invalid-byte-tag-in-constant-pool/12730059#12730059) Let's know if that fix your issue. Thanks, Gasmyr.

By Thomas Gasmyr Mougang staff 28 Mar 2018 at 1:57 a.m. CDT

Thomas Gasmyr Mougang gravatar
Hello Daniel, Still need assistance?

By Thomas Gasmyr Mougang staff 29 Mar 2018 at 3:12 a.m. CDT

Thomas Gasmyr Mougang gravatar
Hello **Daniel**, We are going to close this ticket for inactivity. Feel free to reopen it.

By Daniel Chase user 29 Mar 2018 at 8:56 a.m. CDT

Daniel Chase gravatar
Dear Gluu Support, Apologies for my delayed response. It turns out that the symptoms above are in fact not exclusive to a gluu-integrated build. I am going to open another ticket so that I can make a clear presentation of the actual issue. Thank you, Dan