Skip to content

Broken login after reinstall on farm #4

@oanat

Description

@oanat

Steps to reproduce on XWiki 13.8

  • install the Microsoft Azure Active Directory Single Sign-On (SSO) (Pro) v1.1
  • get the licence and fill in the Azure AD config
  • check the login in a private window -> you should get the Azure login button
  • uninstall the application (do not remove the config page to reuse the settings)
  • reinstall the application on farm (do not override the Azure Ad config file during the merge)
  • refresh the login

Result:

  • velocity error on the login
    Screenshot 2021-09-30 at 17 30 32
    Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [xwiki:IdentityOAuth.LoginUIExtension^XWiki.UIExtensionClass[0]] at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:288) at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321) at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131) ... 199 more Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'doesDetectReturn' in class com.xwiki.identityoauth.IdentityOAuthScriptService threw exception java.lang.ClassCastException: class com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo cannot be cast to class com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo (com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @7d106ed7; com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @159314ca) at xwiki:IdentityOAuth.LoginUIExtension^XWiki.UIExtensionClass[0][line 7, column 21] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:308) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:235) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368) at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:676) at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:65) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:169) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439) at org.apache.velocity.Template.merge(Template.java:358) at org.apache.velocity.Template.merge(Template.java:262) at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:280) ... 201 more Caused by: java.lang.ClassCastException: class com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo cannot be cast to class com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo (com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @7d106ed7; com.xwiki.identityoauth.internal.IdentityOAuthSessionInfo is in unnamed module of loader org.xwiki.classloader.NamespaceURLClassLoader @159314ca) at com.xwiki.identityoauth.internal.IdentityOAuthSessionInfoProvider.get(IdentityOAuthSessionInfoProvider.java:48) at com.xwiki.identityoauth.internal.IdentityOAuthSessionInfoProvider.get(IdentityOAuthSessionInfoProvider.java:37) at com.xwiki.identityoauth.internal.DefaultIdentityOAuthManager.doesDetectReturn(DefaultIdentityOAuthManager.java:332) at com.xwiki.identityoauth.IdentityOAuthScriptService.doesDetectReturn(IdentityOAuthScriptService.java:120) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571) at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554) at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221) ... 214 more

After wiki restart:

Screenshot 2021-09-30 at 17 36 02

Expected result: no velocity error, the button is displayed correctly

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions