Page 1 of 1

ERRORs - Name [UserDatabase] is not bound in this Context ; Failed to start component [Realm[UserDatabaseRealm]]

PostPosted:Fri Jan 25, 2019 2:56 pm
by kefren69
Greetings

before I try to attempt to resolve other issues (cannot create folders in openKM) I would like to be sure my start up has a clean bill of health.

I get as soon as I start the following errors (see log:).

I run openKM on a W10 machine with MySQL.
I tried to lookup the error but I could not find anything that leads to a solution.

Any hints?

Thanks for the usual valuable support.

Giancarlo

My OpenKM config is as follow (all paths are tested):
Code: Select all
# OpenKM Hibernate configuration values
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.hbm2ddl=none
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#hibernate.hbm2ddl=none

# Initial configuration - Linux
#system.imagemagick.convert=C:\Program Files (x86)\OpenOffice 4
#system.openoffice.path=/usr/lib/libreoffice
#system.swftools.pdf2swf=/opt/openkm/bin/pdf2swf -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}

# Initial configuration - Windows
system.imagemagick.convert=C:/openkm-6.3.2-community/tomcat/bin/convert.exe
system.openoffice.path=C:/Program Files (x86)/OpenOffice 4
system.swftools.pdf2swf=C:/openkm-6.3.2-community/tomcat/bin/df2swf.exe -f -T 9 -t -s storeallcharacters ${fileIn} -o ${fileOut}
Log:
Code: Select all
2019-01-25 09:48:18,473 [main] ERROR org.apache.catalina.core.ContainerBase.[Catalina]- Exception looking up UserDatabase under key UserDatabase
javax.naming.NameNotFoundException: Name [UserDatabase] is not bound in this Context. Unable to find [UserDatabase].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
        at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:253)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
        at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1109)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
2019-01-25 09:48:18,473 [main] ERROR org.apache.catalina.realm.CombinedRealm- Failed to start "org.apache.catalina.realm.UserDatabaseRealm/1.0" realm
org.apache.catalina.LifecycleException: Failed to start component [Realm[UserDatabaseRealm]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:201)
        at org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:120)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1109)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:731)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:689)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:321)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: No UserDatabase component found under key UserDatabase
        at org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 17 more

Re: ERRORs - Name [UserDatabase] is not bound in this Context ; Failed to start component [Realm[UserDatabaseRealm]]

PostPosted:Sat Jan 26, 2019 10:24 am
by jllort
Did you downladed tomcat-8.5.24 from our OpenKM sourceforge repository ?
Did you created the database as is explained here https://docs.openkm.com/kcenter/view/ok ... tedatabase ?
Did you configured server.xml as is explained here https://docs.openkm.com/kcenter/view/ok ... html#MySQL: commenting the HSQL section what now will not be used.
Id the database is empty you should ( with OpenKM stopped ):
1- delete repository folder
2- set hibernate.hbm2ddl=create
3- start openkm
4- Repeat the last process until the tables be created.

Re: ERRORs - Name [UserDatabase] is not bound in this Context ; Failed to start component [Realm[UserDatabaseRealm]]

PostPosted:Sun Jan 27, 2019 4:12 pm
by kefren69
Thanks

the learning curve on Openkm is fast for new to the environment.
I followed the steps and now it runs ok. Not necessarily well but at least I have no errors.

thanks for the instructions.

GIancarlo