0

I am currently trying to use the secrets manager on my running deployment of WSO2IS 5.3.0 . Upon turning on the configuration, I am getting the below error when starting WSO2

TID: [-1234] [] [2021-03-01 09:44:24,700] FATAL {org.wso2.carbon.tomcat.internal.TomcatBundleActivator} -  Error while starting server NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
org.w3c.dom.DOMException: NOT_FOUND_ERR: An attempt is made to reference a node in a context where it does not exist.
        at org.apache.xerces.dom.AttributeMap.internalRemoveNamedItem(Unknown Source)
        at org.apache.xerces.dom.AttributeMap.removeNamedItem(Unknown Source)
        at org.wso2.carbon.tomcat.internal.ServerManager.init(ServerManager.java:106)
        at org.wso2.carbon.tomcat.internal.TomcatBundleActivator.start(TomcatBundleActivator.java:45)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
        at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
        at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
        at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
        at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
        at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)

I believe this is fixed by (mostly the last part of) this commit https://github.com/wso2/carbon-kernel/commit/213bacaa7ecdd5a16ce1b73f8333c35ef136ce65 , so I am trying to replace my org.wso2.carbon.tomcat jar . However, when doing that, I run into the below error when starting WSO2

Caused by: javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory not found]
        at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:491)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:341)
        at javax.naming.InitialContext.createSubcontext(InitialContext.java:489)
        at org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:230)
        ... 45 more
Caused by: java.lang.ClassNotFoundException: class org.wso2.carbon.tomcat.jndi.CarbonJavaURLContextFactory not found
        at org.wso2.carbon.context.internal.CarbonContextDataHolder.classForName(CarbonContextDataHolder.java:1208)
        at org.wso2.carbon.context.internal.CarbonContextDataHolder.access$700(CarbonContextDataHolder.java:94)
        at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:456)

Any help resolving this issue would be greatly appreciated

Community
  • 1
  • 1
maggiomj
  • 174
  • 12
  • If you are trying to patch a component by yourself, best option would be to checkout the component version tag and apply the required change to the tag. Build the source code and then copy the jar to the patches folder. – Maduranga Siriwardena Mar 04 '21 at 08:59
  • That was something else I tried but wasn't able to get working on it's own (this has worked in the past with other components, but something about this component and it's dependency/interaction with tomcat did not make this enough). I was able to get this working by also copying in the proper version of the "tomcat-juli" jar into the bin folder (in this particular case, from 7.0.73 to 7.0.82) . Copying this answer out – maggiomj Mar 04 '21 at 11:56

1 Answers1

0

I was required to also put an updated version of the tomcat-juli jar in my bin folder (in this particular case, from 7.0.73 to 7.0.82).

maggiomj
  • 174
  • 12