tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karen Goh <karenwo...@yahoo.com.INVALID>
Subject Re: Help needed - JPA probem - No connection specified with project
Date Mon, 02 Oct 2017 08:01:20 GMT

--------------------------------------------
On Fri, 9/29/17, Konstantin Kolinko <knst.kolinko@gmail.com> wrote:

 Subject: Re: Help needed - JPA probem - No connection specified with project
 To: "Karen Goh" <karenworld@yahoo.com>
 Cc: "Tomcat Users List" <users@tomcat.apache.org>
 Date: Friday, September 29, 2017, 9:16 PM
 
 >>
 >>  1. See a link to Eclipse IDE FAQ
 here:
 >>
 >>  https://wiki.apache.org/tomcat/FAQ/Developing#Q6
 
 The actual Tomcat
 configuration that is running is in
 ".metadata/.plugins/org.eclipse.wst.server.core"
 directory (the
 Eclipse Web Tools FAQ should
 provide more pointers). There may be
 situations when it becomes stale.
 
 >>  2. See the
 >>  following thread on how to turn on
 "Publish module
 >>  context to
 separate XML files" option in Eclipse.
 >>
 >>  By
 default
 >>  (without that option)
 Eclipse IDE places <Context>
 >>  elements into server.xml, which is a
 rather
 >>  discourage practice.
 >>
 >>  http://markmail.org/message/7zkyocvph56b6t6q
 >
 > OK.  I managed to
 turn on "Publish module context..but my problem of
 context not bound is still there.
 >
 >>  3.
 >> 
 Documentation on Context:
 >>
 >>  http://tomcat.apache.org/tomcat-8.0-doc/config/context.html
 >>
 >>  The
 <Context> element in
 >>  your
 context.xml has a lot of attributes that
 >>  should not be there, starting
 with
 >>  "debug". What
 (bad) example were
 >>  they copied
 from?
 >
 >  4. The
 current version of
 >  Tomcat 8.0 is
 8.0.46.
 >  There were security
 >  fixes in Java as well (8u141 was a
 security update
 >  in July 2017)
 >
 >  Also EOL date for
 Tomcat 8.0 has been
 >  announced. Users
 are advised to
 >  migrate to
 >  8.5.
 >  http://tomcat.apache.org/tomcat-80-eol.html
 >
 > Hi kolinko, I have
 now installed Tomcat 8.5.20 but same problem.
 
 Even if it is "the same
 problem", it 'd better if you provide the
 actual log messages and stacktraces. Those
 differ between versions.
 
Here's my latest error in which I really don't know what have cause the JPA no connection
is specified :

INFO: Starting service Catalina
Oct 02, 2017 3:53:51 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.29
Oct 02, 2017 3:53:52 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\Karen Goh Seow Hui\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\conf\Catalina\localhost\Hi5S.xml
Oct 02, 2017 3:53:53 PM org.apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Hi5S'
did not find a matching property.
Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
INFO: Name = hi5 Ignoring unknown property: value of "" for "description" property
Oct 02, 2017 3:53:57 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
INFO: Name = hi5 Ignoring unknown property: value of "" for "mappedName" property
Oct 02, 2017 3:53:58 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for
this logger for a complete list of JARs that were scanned but no TLDs were found in them.
Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-10-02 15:53:59,962 localhost-startStop-1 ERROR Error processing element Configuration
([Configuration: null]): CLASS_NOT_FOUND
2017-10-02 15:54:00,324 localhost-startStop-1 ERROR No ConnectionSource provided: connectionSource
2017-10-02 15:54:00,327 localhost-startStop-1 ERROR Unable to inject fields into builder class
for plugin type class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender, element
Jdbc. org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element
Jdbc are invalid
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:198)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,339 localhost-startStop-1 ERROR Unable to invoke factory method in class
class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender for element Jdbc. java.lang.IllegalStateException:
No factory method found for class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,347 localhost-startStop-1 ERROR Null object returned for Jdbc in appenders.
2017-10-02 15:54:00,351 localhost-startStop-1 ERROR No ConnectionSource provided: connectionSource
2017-10-02 15:54:00,355 localhost-startStop-1 ERROR Unable to inject fields into builder class
for plugin type class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender, element
Jdbc. org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element
Jdbc are invalid
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:198)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,364 localhost-startStop-1 ERROR Unable to invoke factory method in class
class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender for element Jdbc. java.lang.IllegalStateException:
No factory method found for class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,370 localhost-startStop-1 ERROR Null object returned for Jdbc in appenders.
2017-10-02 15:54:00,375 localhost-startStop-1 ERROR No ConnectionSource provided: connectionSource
2017-10-02 15:54:00,388 localhost-startStop-1 ERROR Unable to inject fields into builder class
for plugin type class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender, element
Jdbc. org.apache.logging.log4j.core.config.ConfigurationException: Arguments given for element
Jdbc are invalid
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:198)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,456 localhost-startStop-1 ERROR Unable to invoke factory method in class
class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender for element Jdbc. java.lang.IllegalStateException:
No factory method found for class org.apache.logging.log4j.core.appender.db.jdbc.JdbcAppender
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
	at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
	at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
	at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
	at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
	at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:242)
	at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
	at org.apache.logging.log4j.LogManager.getContext(LogManager.java:174)
	at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:618)
	at org.jboss.logging.Log4j2Logger.<init>(Log4j2Logger.java:36)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:30)
	at org.jboss.logging.Log4j2LoggerProvider.getLogger(Log4j2LoggerProvider.java:26)
	at org.jboss.logging.LoggerProviders.logProvider(LoggerProviders.java:156)
	at org.jboss.logging.LoggerProviders.tryLog4j2(LoggerProviders.java:129)
	at org.jboss.logging.LoggerProviders.findProvider(LoggerProviders.java:91)
	at org.jboss.logging.LoggerProviders.find(LoggerProviders.java:34)
	at org.jboss.logging.LoggerProviders.<clinit>(LoggerProviders.java:31)
	at org.jboss.logging.Logger.getLogger(Logger.java:2465)
	at org.jboss.logging.Logger.getLogger(Logger.java:2490)
	at util.HibernateSessionFactoryListener.<init>(HibernateSessionFactoryListener.java:15)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:121)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4715)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

2017-10-02 15:54:00,463 localhost-startStop-1 ERROR Null object returned for Jdbc in appenders.
2017-10-02 15:54:00,509 localhost-startStop-1 ERROR Unknown object "Logger" of type org.apache.logging.log4j.core.config.LoggerConfig
is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts",
"CustomLevels"].
2017-10-02 15:54:00,526 localhost-startStop-1 ERROR Unknown object "Logger" of type org.apache.logging.log4j.core.config.LoggerConfig
is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts",
"CustomLevels"].
2017-10-02 15:54:00,529 localhost-startStop-1 ERROR Unknown object "logger" of type org.apache.logging.log4j.core.config.LoggerConfig
is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts",
"CustomLevels"].
2017-10-02 15:54:00,533 localhost-startStop-1 ERROR Unknown object "logger" of type org.apache.logging.log4j.core.config.LoggerConfig
is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts",
"CustomLevels"].
2017-10-02 15:54:00,536 localhost-startStop-1 ERROR Unknown object "Root" of type org.apache.logging.log4j.core.config.LoggerConfig
is ignored: try nesting it inside one of: ["Appenders", "Loggers", "Properties", "Scripts",
"CustomLevels"].
2017-10-02 15:54:00,539 localhost-startStop-1 ERROR Unable to locate appender "databaseAppender"
for logger config "root"
Oct 02, 2017 3:54:03 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class util.HibernateSessionFactoryListener
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:271)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:233)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51)
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111)
	at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
	at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:418)
	at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:87)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:691)
	at util.HibernateSessionFactoryListener.contextInitialized(HibernateSessionFactoryListener.java:34)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4793)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1777)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/hi5"/>]
	at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:100)
	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:98)
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:242)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
	at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88)
	at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:259)
	... 26 more
Caused by: javax.naming.NameNotFoundException: Name [hi5"/>] is not bound in this Context.
Unable to find [hi5"].
	at org.apache.naming.NamingContext.lookup(NamingContext.java:818)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:829)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
	at org.apache.naming.SelectorContext.lookup(SelectorContext.java:134)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:97)
	... 35 more

Oct 02, 2017 3:54:03 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate
container log file
Oct 02, 2017 3:54:03 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/Hi5S] startup failed due to previous errors
Oct 02, 2017 3:54:03 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
WARNING: The web application [Hi5S] registered the JDBC driver [com.mysql.jdbc.Driver] but
failed to unregister it when the web application was stopped. To prevent a memory leak, the
JDBC Driver has been forcibly unregistered.
Oct 02, 2017 3:54:03 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [Hi5S] appears to have started a thread named [Abandoned connection
cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack
trace of thread:
 java.lang.Object.wait(Native Method)
 java.lang.ref.ReferenceQueue.remove(Unknown Source)
 com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
Oct 02, 2017 3:54:03 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor C:\Users\Karen Goh Seow Hui\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\conf\Catalina\localhost\Hi5S.xml
has finished in 10,695 ms
Oct 02, 2017 3:54:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8013"]
Oct 02, 2017 3:54:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Oct 02, 2017 3:54:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 12543 ms





 >>  5. Your
 >> 
 META-INF/context.xml is broken: [...]
 >>
 >
 > I have changed my context.xml as follows
 :
 >
 > <?xml
 version="1.0" encoding="UTF-8"?>
 > <Context path="/Hi5S"
 docBase="Hi5S" crossContext="true"
 reloadable="true" >
 
 "path" and "docBase" should
 not be here.
 
Here's my latest context.xml ;

<?xml version="1.0" encoding="UTF-8"?>
<Context>
	<Resource name="jdbc/hi5" auth="Container" type="javax.sql.DataSource"
		maxTotal="8" maxActive="100" maxIdle="30" maxWait="-1" username="root"
		singleton="true" override="true"
		factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" password="password"
		alternateUsernameAllowed="true" driverClassName="com.mysql.jdbc.Driver"
		url="jdbc:mysql://localhost:3306/hi5">
	</Resource>
</Context>


 >
 <Resource
 >        
 name="jdbc/hi5"
 >        
 auth="Container"
 >        
 type="javax.sql.DataSource"
 > 
        maxTotal="8"
 >   
      maxActive="100"
 >   
      maxIdle="30"
 >     
    maxWait="-1"
 >        
 username="root"
 >        
 singleton="true"
 >        
 override="true"
 >        
 factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
 >        
 password="password"
 >     
       alternateUsernameAllowed="true"
 >        
 driverClassName="com.mysql.jdbc.Driver"
 >        
 url="jdbc:mysql://localhost:3306/hi5" />
 >    </Context>
 >
 > And my web.xml ;
 >
 > <?xml
 version="1.0" encoding="UTF-8"?>
 > <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns="http://xmlns.jcp.org/xml/ns/javaee"
 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
 version="3.1">
 >  
 <display-name>Hi5S</display-name>
 >   <welcome-file-list>
 >    
 <welcome-file>Index.jsp</welcome-file>
 
 Are you sure? Usually the name
 of a welcome file is "index.jsp" (lowercase).
 
 >  
 </welcome-file-list>
 >  
 <resource-ref>
 >    
 <description>MySQL dataSource</description>
 >    
 <res-ref-name>JDBC/hi5</res-ref-name>
 
 "JDBC/hi5" here !=
 "jdbc/hi5" used in your Resource
 
 Case matters.

I managed to turn off the error such that I can now correct it with "jdbc/hi5".
 
 >    
 <res-type>javax.sql.DataSource</res-type>
 >    
 <res-auth>Container</res-auth>
 >   </resource-ref>
 >    <listener>
 >        
 <listener-class>util.HibernateSessionFactoryListener</listener-class>
 // I do not know if this is necessary.  Wld like to have
 your comments. Tks.
 >    
 </listener>
 > </web-app>
 
 Best regards,
 Konstantin Kolinko
 
 ---------------------------------------------------------------------
 To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
 For additional commands, e-mail: users-help@tomcat.apache.org
 
 


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


Mime
View raw message