1

I am using wso2am-4.1.0 and I have setup wso2is-5.11.0 as the Key Manager. The refresh_token grant fails due to presumably a missing class RefreshTokenValidationDataDO. Accordingly I applied the fix as per the below mentioned steps.

  1. git clone https://github.com/wso2-extensions/identity-inbound-auth-oauth.git
  2. cd identity-inbound-auth-oauth
  3. git checkout v6.4.11
  4. Applied the fixes manually for the 3 files in the pr-1733 (https://github.com/wso2-extensions/identity-inbound-auth-oauth/pull/1733/files)
  5. Disabled style checking from the pom.xml
  6. Changed the repo URLs of nexus from http to https.
  7. mvn clean install -Dcheckstyle.skip -X

After the build finished, I copied the built jar file org.wso2.carbon.identity.oauth-6.4.11.jar to <wso2is_home>/repository/components/plugins and removed the existing org.wso2.carbon.identity.oauth_6.4.111.jar in order to replace it.

Now the startup of the server fails with the below error.

[] ERROR {org.apache.tomcat.util.digester.Digester} - Begin event threw exception java.lang.ClassNotFoundException: org.wso2.carbon.identity.auth.valve.AuthenticationValve
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:139)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:104)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1220)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1495)
        at org.wso2.carbon.tomcat.internal.CarbonTomcat.configure(CarbonTomcat.java:90)
        at org.wso2.carbon.tomcat.internal.ServerManager.init(ServerManager.java:156)
        at org.wso2.carbon.tomcat.internal.TomcatBundleActivator.start(TomcatBundleActivator.java:40)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1013)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
        at org.eclipse.osgi.container.Module.doStart(Module.java:598)
        at org.eclipse.osgi.container.Module.start(Module.java:462)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
[] ERROR {org.wso2.carbon.tomcat.internal.CarbonTomcat} - error while parsing xml stream org.xml.sax.SAXParseException; lineNumber: 37; columnNumber: 93; Error at line [37] column [93]: [org.wso2.carbon.identity.auth.valve.AuthenticationValve]
        at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1902)
        at org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:1934)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1223)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1495)
        at org.wso2.carbon.tomcat.internal.CarbonTomcat.configure(CarbonTomcat.java:90)
        at org.wso2.carbon.tomcat.internal.ServerManager.init(ServerManager.java:156)
        at org.wso2.carbon.tomcat.internal.TomcatBundleActivator.start(TomcatBundleActivator.java:40)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
        at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
        at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1013)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
        at org.eclipse.osgi.container.Module.doStart(Module.java:598)
        at org.eclipse.osgi.container.Module.start(Module.java:462)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Caused by: java.lang.ClassNotFoundException: org.wso2.carbon.identity.auth.valve.AuthenticationValve
        at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:359)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:139)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        at org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:104)
        at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1220)
        ... 32 more

A direction to resolve this issue is highly appreciated. Thanks in advance!

4
  • Did you try the answer given here? Commented Jul 3 at 4:35
  • Since I am using jdk-1.8, I did not try the answer there. Commented Jul 3 at 5:00
  • Can you mention what is the exact output by executing java --version command in your IS running terminal? and what is logged as the java version in INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Home : Commented Jul 11 at 6:49
  • @AnuradhaKarunarathna java -version java version "1.8.0_401" Java(TM) SE Runtime Environment (build 1.8.0_401-b10) Java HotSpot(TM) 64-Bit Server VM (build 25.401-b10, mixed mode) INFO {org.wso2.carbon.core.internal.CarbonCoreActivator} - Java Home : C:\Program Files\Java\jdk-1.8\jre Commented Jul 11 at 7:37

1 Answer 1

0

Instead of replacing the jar in the plugins folder, try patching it using the following steps.

  1. Put back the old jar into the plugins folder and remove the new jar from it.
  2. Navigate into the patches ($IS_HOME/repository/components/patches) folder.
  3. Create a new folder there with the name patch9999.
  4. Add the new jar into the folder created in step 3.
  5. Restart the Identity Server.
1
  • 1
    the jar found in plugins folder is org.wso2.carbon.identity.oauth_6.4.111.jar (three ones) but the output jar from the fix is org.wso2.carbon.identity.oauth_6.4.11.jar. Do we need to rename anything for this patch?
    – Majd Akar
    Commented Jul 18 at 13:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.