Install completes successfully, 404 error loading start page

Problems with installing OpenKM? No problemo, the solution is closer than you think.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
kmcleod1204
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Fri Sep 13, 2019 2:54 pm

Install completes successfully, 404 error loading start page

Post by kmcleod1204 » Wed Sep 18, 2019 9:48 pm

Windows 10
OpenKM 6.3.8 (community)
Tomcat 8.5.24 (downloaded by OpenKM install)
Java JDK 12.02
OpenKM service is running. Loading 127.0.0.1:8080 returns a 404 error:

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Tomcat is working - ROOT index.jsp correctly forwards to OpenKM\index.jsp which breaks.

I have checked other similar issues posted on the forum and elsewhere. Nothing seems to change the issue. Any help would be appreciated.


Extract from stderr log (all logs attached):

Code: Select all

18-Sep-2019 14:16:16.202 SEVERE [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext Context initialization failed
 java.lang.NoClassDefFoundError: Ljavax/xml/ws/EndpointContext;
	at java.base/java.lang.Class.getDeclaredFields0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3066)
	at java.base/java.lang.Class.getDeclaredFields(Class.java:2253)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:382)
	at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:324)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:872)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:638)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:410)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4745)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.EndpointContext
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
	... 31 more

[b]18-Sep-2019 14:16:16.202 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file[/b]
18-Sep-2019 14:16:16.281 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/OpenKM] startup failed due to previous errors
18-Sep-2019 14:16:16.421 INFO [localhost-startStop-1] org.springframework.context.support.AbstractApplicationContext.doClose Closing Root WebApplicationContext: startup date [Wed Sep 18 14:16:07 PDT 2019]; root of context hierarchy
18-Sep-2019 14:16:16.780 WARNING [localhost-startStop-1] org.springframework.context.support.AbstractApplicationContext.doClose Exception thrown from LifecycleProcessor on context close
 java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: Root WebApplicationContext: startup date [Wed Sep 18 14:16:07 PDT 2019]; root of context hierarchy
	at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:361)
	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1067)
	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1020)
	at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586)
	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4792)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:835)
Attachments
openkm.zip
(15.13 KiB) Downloaded 4 times

kmcleod1204
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Fri Sep 13, 2019 2:54 pm

Re: Install completes successfully, 404 error loading start page

Post by kmcleod1204 » Thu Sep 19, 2019 6:38 pm

Got it running! A number of issues:

1. Using the wrong JDK. "1.8" is required. Oracle call this JDK version 8, which is confusing. The link to download "1.8" is https://www.oracle.com/technetwork/java ... 3151.html - it installs as "1.8"

2. Uninstalled JDK v 12 and installed "1.8" then reset JAVA_HOME and JRE_HOME to point to the correct locations as seen in service.bat. Ran "service remove" deleted tomcat folder and reinstalled per instructions. Still couldn't get the login, but found I was getting SQL connect errors which appeared to be firewall issues. Turned off the firewall and still got the same errors.

3. Found a password discrepancy on the openkm user and reset that (copied what was in conf\server.xml and pasted in sqlserver user object properties). Not sure how this came about as I copied and pasted it originally from my first install and subsequently changed the generated password every time in reinstalled OpenKM - about 10 times!

4. Still wasn't working but now I was getting a java error instead of the 404 error. More SQL errors indicating openkm tables were not being found, for example:

Code: Select all

WARN  o.h.util.JDBCExceptionReporter - SQL Error: 208, SQLState: S0002
ERROR o.h.util.JDBCExceptionReporter - Invalid object name 'OKM_CONFIG'.
ERROR com.openkm.core.Config - ** Error reading configuration table **
5. Discovered OpenKM.cfg hibernate options were commented out and hibernate.hbm2ddl=none was what would have been there if not commented out - not sure why since the docs require it to be "create" rather than "none". Entered the correct info per the docs:

Code: Select all

hibernate.dialect=org.hibernate.dialect.SQLServerDialect
hibernate.hbm2ddl=create
6. Restart OpenKM service and ... Voila!

jllort
Moderator
Moderator
Posts: 10876
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Install completes successfully, 404 error loading start page

Post by jllort » Sat Sep 21, 2019 3:34 pm

The main issue was the JAVA version and an incorrect database password. When the startup process fails at the beginning these are steps what must follow in the next tries:

Code: Select all

* remove repository folder ( when created )
* set hibernate.hbm2ddl=create in OpenKM.cfg

Post Reply