Re: Exception while starting tomcat version 9.0.29

2019-12-20 Thread Kushagra Bindal
Thanks Olaf.. It worked..

On Fri, Dec 20, 2019 at 6:51 PM Olaf Kock  wrote:

>
> On 20.12.19 13:28, Kushagra Bindal wrote:
> > Hi,
> >
> > We are working on upgrading our tomcat version from 8.5.24 to 9.0.29. In
> > this process, while starting one of our services we found that while
> > starting catalina.out is having some exception.
> >
> > Note: This exception we are getting before start of tomcat.
> >
> > 20-Dec-2019 09:52:09.144 WARNING [main]
> > org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance
> > org.apache.catalina.UserDatabase is not a valid class name/type for this
> > JNDI factory.
> > 20-Dec-2019 09:52:09.145 SEVERE [main]
> > org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
> > Unexpected error creating MBeans
> > java.lang.NullPointerException
> > at
> >
> org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:129)
> > at
> >
> org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
> > ...
> > 20-Dec-2019 09:52:09.148 SEVERE [main]
> > org.apache.catalina.realm.CombinedRealm.startInternal Failed to start
> > [org.apache.catalina.realm.UserDatabaseRealm] realm
> > org.apache.catalina.LifecycleException: No UserDatabase component
> > found under key [UserDatabase]
> > ...
> >
> > Below is the server.xml file details.
> >
> >
> >
> --
> >
> > ...
> >  >   type="org.apache.catalina.UserDatabase"
> >   description="User database that can be updated and saved"
> >   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
> >
> url="jdbc:postgresql://<>:5444/<>?targetServerType=mastercurrentSchema=common"
> >   pathname="conf/tomcat-users.xml" />
> >   
> > ...
> >
> >
> Phew, that server.xml would have been so much more readable if you'd
> removed all the commented xml before posting.
>
> Anyway, I've shortened the log and server.xml in my quote to what I
> assume is the cause for the error message. The stock server.xml contains
> a MemoryUserDatabaseFactory, while it looks like your declaration is for
> a generic JDBC connection.
>
>type="org.apache.catalina.UserDatabase"
>   description="User database that can be updated and saved"
>   factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
>   pathname="conf/tomcat-users.xml" />
>
> From the top of my head I can't give you the right class name to use,
> but knowing this cause might put you on the right track.
>
> Olaf
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-- 
Regards,
Kushagra Bindal
+91-9013792807


Re: Exception while starting tomcat version 9.0.29

2019-12-20 Thread Olaf Kock


On 20.12.19 13:28, Kushagra Bindal wrote:
> Hi,
>
> We are working on upgrading our tomcat version from 8.5.24 to 9.0.29. In
> this process, while starting one of our services we found that while
> starting catalina.out is having some exception.
>
> Note: This exception we are getting before start of tomcat.
>
> 20-Dec-2019 09:52:09.144 WARNING [main]
> org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance
> org.apache.catalina.UserDatabase is not a valid class name/type for this
> JNDI factory.
> 20-Dec-2019 09:52:09.145 SEVERE [main]
> org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
> Unexpected error creating MBeans
> java.lang.NullPointerException
> at
> org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:129)
> at
> org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
> ...
> 20-Dec-2019 09:52:09.148 SEVERE [main]
> org.apache.catalina.realm.CombinedRealm.startInternal Failed to start
> [org.apache.catalina.realm.UserDatabaseRealm] realm
> org.apache.catalina.LifecycleException: No UserDatabase component
> found under key [UserDatabase]
> ...
>
> Below is the server.xml file details.
>
>
> --
>
> ...
>type="org.apache.catalina.UserDatabase"
>   description="User database that can be updated and saved"
>   factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>  
> url="jdbc:postgresql://<>:5444/<>?targetServerType=mastercurrentSchema=common"
>   pathname="conf/tomcat-users.xml" />
>   
> ...
>
>
Phew, that server.xml would have been so much more readable if you'd
removed all the commented xml before posting.

Anyway, I've shortened the log and server.xml in my quote to what I
assume is the cause for the error message. The stock server.xml contains
a MemoryUserDatabaseFactory, while it looks like your declaration is for
a generic JDBC connection.

    

>From the top of my head I can't give you the right class name to use,
but knowing this cause might put you on the right track.

Olaf




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Exception while starting tomcat version 9.0.29

2019-12-20 Thread Kushagra Bindal
Hi,

We are working on upgrading our tomcat version from 8.5.24 to 9.0.29. In
this process, while starting one of our services we found that while
starting catalina.out is having some exception.

Note: This exception we are getting before start of tomcat.

20-Dec-2019 09:52:08.516 INFO [main]
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based
Apache Tomcat Native library which allows optimal performance in production
environments was not found on the java.library.path:
[/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
20-Dec-2019 09:52:09.099 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["http-nio-8080"]
20-Dec-2019 09:52:09.125 INFO [main]
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler
["ajp-nio-8009"]
20-Dec-2019 09:52:09.127 INFO [main]
org.apache.catalina.startup.Catalina.load Server initialization in [1,231]
milliseconds
20-Dec-2019 09:52:09.144 WARNING [main]
org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance
org.apache.catalina.UserDatabase is not a valid class name/type for this
JNDI factory.
20-Dec-2019 09:52:09.145 SEVERE [main]
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans
Unexpected error creating MBeans
java.lang.NullPointerException
at
org.apache.naming.NamingContextBindingsEnumeration.nextElementInternal(NamingContextBindingsEnumeration.java:129)
at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:71)
at
org.apache.naming.NamingContextBindingsEnumeration.next(NamingContextBindingsEnumeration.java:34)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:127)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.createMBeans(GlobalResourcesLifecycleListener.java:101)
at
org.apache.catalina.mbeans.GlobalResourcesLifecycleListener.lifecycleEvent(GlobalResourcesLifecycleListener.java:76)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:923)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:633)
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:343)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
20-Dec-2019 09:52:09.146 INFO [main]
org.apache.catalina.core.StandardService.startInternal Starting service
[Catalina]
20-Dec-2019 09:52:09.146 INFO [main]
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet
engine: []
20-Dec-2019 09:52:09.148 SEVERE [main]
org.apache.catalina.realm.CombinedRealm.startInternal Failed to start
[org.apache.catalina.realm.UserDatabaseRealm] realm
org.apache.catalina.LifecycleException: No UserDatabase component
found under key [UserDatabase]
at
org.apache.catalina.realm.UserDatabaseRealm.startInternal(UserDatabaseRealm.java:215)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.realm.CombinedRealm.startInternal(CombinedRealm.java:245)
at
org.apache.catalina.realm.LockOutRealm.startInternal(LockOutRealm.java:115)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at