Jersey/Spring application debugged inside Netbeans and deployed to Netbean's Tomcat server has its application context loaded twice. It is loaded, unloaded, and loaded again.
BLOODY WHY?!?!
EDIT: It looks like if I comment out the servlet and servlet-mapping in web.xml, the application context is still loaded twice! If I delete /conf/web.xml file, it is STILL loaded twice. ###$#! Netbeans/Tomcat
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>ServletAdaptor</servlet-name>
<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
<init-param>
<param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
<param-value>com.sun.jersey.api.container.filter.PostReplaceFilter</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ServletAdaptor</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Tomcat output:
Using CATALINA_BASE: "C:\Users\adubi_000\AppData\Roaming\NetBeans\7.2\apache-tomcat-7.0.27.0_base"
Using CATALINA_HOME: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27"
Using CATALINA_TMPDIR: "C:\Users\adubi_000\AppData\Roaming\NetBeans\7.2\apache-tomcat-7.0.27.0_base\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.7.0_07"
Using CLASSPATH: "C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Apache Tomcat 7.0.27\bin\tomcat-juli.jar"
Listening for transport dt_shmem at address: tomcat_shared_memory_id
Sep 15, 2012 9:19:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:
Sep 15, 2012 9:19:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-80"]
Sep 15, 2012 9:19:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2012 9:19:22 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 821 ms
Sep 15, 2012 9:19:22 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 15, 2012 9:19:22 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Sep 15, 2012 9:19:22 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\adubi_000\AppData\Roaming\NetBeans\7.2\apache-tomcat-7.0.27.0_base\conf\Catalina\localhost\manager.xml
Sep 15, 2012 9:19:23 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\adubi_000\AppData\Roaming\NetBeans\7.2\apache-tomcat-7.0.27.0_base\conf\Catalina\localhost\ROOT.xml
Sep 15, 2012 9:19:26 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Sep 15, 2012 9:19:26 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Sat Sep 15 21:19:26 EST 2012]; root of context hierarchy
Sep 15, 2012 9:19:26 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
Sep 15, 2012 9:19:27 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#2829abfd: defining beans [...]; root of factory hierarchy
Sep 15, 2012 9:19:28 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Sep 15, 2012 9:19:28 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.6.Final}
Sep 15, 2012 9:19:28 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Sep 15, 2012 9:19:28 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Sep 15, 2012 9:19:28 PM org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator instantiateExplicitConnectionProvider
INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
Sep 15, 2012 9:19:28 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://127.0.0.1:3306/...
Sep 15, 2012 9:19:28 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH000046: Connection properties: {user=root, autocommit=true, release_mode=auto}
Sep 15, 2012 9:19:28 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH000006: Autocommit mode: true
Sep 15, 2012 9:19:28 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Sep 15, 2012 9:19:28 PM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
Sep 15, 2012 9:19:29 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
INFO: Initializing c3p0 pool...
Sep 15, 2012 9:19:29 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
Sep 15, 2012 9:19:29 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Sep 15, 2012 9:19:29 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
Sep 15, 2012 9:19:29 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Sep 15, 2012 9:19:29 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000228: Running hbm2ddl schema update
...
Sep 15, 2012 9:19:31 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 4806 ms
Sep 15, 2012 9:19:31 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-80"]
Sep 15, 2012 9:19:31 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 15, 2012 9:19:31 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8866 ms
Sep 15, 2012 9:19:31 PM com.sun.jersey.spi.spring.container.servlet.SpringServlet getContext
INFO: Using default applicationContext
Sep 15, 2012 9:19:31 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registerSpringBeans
INFO: Registering Spring bean, ...
Sep 15, 2012 9:19:31 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.13 06/29/2012 05:14 PM'
Sep 15, 2012 9:19:32 PM org.springframework.context.support.AbstractApplicationContext doClose
INFO: Closing Root WebApplicationContext: startup date [Sat Sep 15 21:19:26 EST 2012]; root of context hierarchy
Sep 15, 2012 9:19:32 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#2829abfd: defining beans [...]; root of factory hierarchy
Sep 15, 2012 9:19:32 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [] 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.
Sep 15, 2012 9:19:32 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] 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.
Sep 15, 2012 9:19:32 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [] appears to have started a thread named [java-sdk-http-connection-reaper] but has failed to stop it. This is very likely to create a memory leak.
Sep 15, 2012 9:19:32 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [] created a ThreadLocal with key of type [com.sun.xml.bind.v2.ClassFactory$1] (value [com.sun.xml.bind.v2.ClassFactory$1#911a094]) and a value of type [java.util.WeakHashMap] (value [{class javax.xml.bind.annotation.W3CDomHandler=java.lang.ref.WeakReference#64455932}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Sep 15, 2012 9:19:33 PM org.apache.catalina.startup.HostConfig checkResources
INFO: Undeploying context []
Sep 15, 2012 9:19:33 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Users\adubi_000\AppData\Roaming\NetBeans\7.2\apache-tomcat-7.0.27.0_base\conf\Catalina\localhost\ROOT.xml
Sep 15, 2012 9:19:36 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Sep 15, 2012 9:19:36 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Sat Sep 15 21:19:36 EST 2012]; root of context hierarchy
Sep 15, 2012 9:19:36 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
Sep 15, 2012 9:19:37 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#6b63d42f: defining beans [...]; root of factory hierarchy
Sep 15, 2012 9:19:37 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
Sep 15, 2012 9:19:37 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.6.Final}
Sep 15, 2012 9:19:37 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Sep 15, 2012 9:19:37 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Sep 15, 2012 9:19:38 PM org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator instantiateExplicitConnectionProvider
INFO: HHH000130: Instantiating explicit connection provider: org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider
Sep 15, 2012 9:19:38 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH010002: C3P0 using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://127.0.0.1:3306/....
Sep 15, 2012 9:19:38 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH000046: Connection properties: {user=root, autocommit=true, release_mode=auto}
Sep 15, 2012 9:19:38 PM org.hibernate.service.jdbc.connections.internal.C3P0ConnectionProvider configure
INFO: HHH000006: Autocommit mode: true
Sep 15, 2012 9:19:38 PM com.mchange.v2.log.MLog <clinit>
INFO: MLog clients using java 1.4+ standard logging.
Sep 15, 2012 9:19:38 PM com.mchange.v2.c3p0.C3P0Registry banner
INFO: Initializing c3p0-0.9.1 [built 16-January-2007 14:46:42; debug? true; trace: 10]
Sep 15, 2012 9:19:38 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
INFO: Initializing c3p0 pool...
Sep 15, 2012 9:19:38 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
Sep 15, 2012 9:19:38 PM org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Sep 15, 2012 9:19:38 PM org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000268: Transaction strategy: org.hibernate.engine.transaction.internal.jdbc.JdbcTransactionFactory
Sep 15, 2012 9:19:38 PM org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Sep 15, 2012 9:19:39 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute
INFO: HHH000228: Running hbm2ddl schema update
...
Sep 15, 2012 9:19:40 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 4264 ms
Sep 15, 2012 9:19:40 PM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] after start() had already been called. The second call will be ignored.
Sep 15, 2012 9:19:41 PM com.sun.jersey.spi.spring.container.servlet.SpringServlet getContext
INFO: Using default applicationContext
Sep 15, 2012 9:19:41 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registerSpringBeans
INFO: Registering Spring bean, ...
Sep 15, 2012 9:19:41 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.13 06/29/2012 05:14 PM'
It is the work of Netbean's maven deploy plugin, which waits for tomcat to start (and load the application as specified in Netbeans-generared ROOT.xml) then tells it to reload it (from a different temporary XML).
A workaround is to edit %CATALINA_BASE%/conf/tomcat-users.xml and change the password of user 'ide' (through which netbeans controls tomcat). Tomcat still loads fine, but deploy-on-save and probably other features won't work.
I'll try looking at the source code of netbeans to see if a better solution is available. This behavior of the deploy plugin is just bizare. Surely it could start Tomcat empty, and then load the app as it's doing in the second step.
Related
I have a scheduled pipeline which runs daily.
There was an error that I faced yesterday.One of my jobs in the pipeline failed abruptly.The console log didn't return any FAILURE status.But strangely the pipeline shows as SUCCESSFUL,despite the job failing.
My job uses chef to download files from object storage location.I checked the logs it is successful.But still somehow the job failed/interrupted.
One more thing I noticed is that though the job ran fully it still shows completed in 0ms
Started 23 hr ago
Took 0 ms
Below is the jenkins log at the time when the job started:
` **Nov 28, 2017 1:47:10 PM hudson.plugins.logparser.LogParserReader readLogPart
INFO: Start reading log part 0 in thread #0
Nov 28, 2017 1:47:10 PM hudson.plugins.logparser.LogParserReader readLogPart
INFO: Done reading log part 0
Nov 28, 2017 1:47:11 PM hudson.plugins.logparser.LogParserThread getLineStatuses
INFO: LogParserThread: Start parsing log part 0
Nov 28, 2017 1:47:11 PM hudson.plugins.logparser.LogParserThread getLineStatuses
INFO: LogParserThread: Done parsing log part 0
Nov 28, 2017 1:47:11 PM hudson.plugins.logparser.LogParserParser parseLogBody
INFO: LogParserParser: Parsing took 0 minutes (0) seconds.
Running from: /usr/lib/jenkins/jenkins.war
Nov 28, 2017 2:17:08 PM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file /tmp/winstone/jenkins.war
Nov 28, 2017 2:17:08 PM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized #858ms to org.eclipse.jetty.util.log.JavaUtilLog
Nov 28, 2017 2:17:09 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Nov 28, 2017 2:17:09 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
Nov 28, 2017 2:17:09 PM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Nov 28, 2017 2:17:10 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Nov 28, 2017 2:17:10 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Nov 28, 2017 2:17:10 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Nov 28, 2017 2:17:10 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: Scavenging every 660000ms
Jenkins home directory: /var/lib/jenkins found at: SystemProperties.getProperty("JENKINS_HOME")
Nov 28, 2017 2:17:11 PM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.#d23e042{/,file:///var/cache/jenkins/war/,AVAILABLE}{/var/cache/jenkins/war}
Nov 28, 2017 2:17:11 PM org.eclipse.jetty.server.AbstractConnector doStart
INFO: Started ServerConnector#13d73f29{HTTP/1.1,[http/1.1]}{127.0.0.1:8081}
Nov 28, 2017 2:17:11 PM org.eclipse.jetty.server.Server doStart
INFO: Started #3487ms
Nov 28, 2017 2:17:11 PM winstone.Logger logInternal
INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
Nov 28, 2017 2:17:12 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
Nov 28, 2017 2:17:13 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
Nov 28, 2017 2:17:18 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
Nov 28, 2017 2:17:18 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
Nov 28, 2017 2:17:19 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
INFO: Failed to instantiate optional component org.biouno.unochoice.model.ScriptlerScript$DescriptorImpl; skipping
Nov 28, 2017 2:17:19 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
Nov 28, 2017 2:17:20 PM jenkins.model.RunIdMigrator migrate
INFO: Migrating build records in /var/lib/jenkins/jobs/build_spark_repo/builds
Nov 28, 2017 2:17:20 PM jenkins.model.RunIdMigrator doMigrate
WARNING: found unexpected dir lastSuccessfulBuild
Nov 28, 2017 2:17:20 PM jenkins.model.RunIdMigrator doMigrate
WARNING: found unexpected dir lastStableBuild
Nov 28, 2017 2:17:20 PM jenkins.model.RunIdMigrator migrate
WARNING: Build record migration (https://jenkins.io/redirect/build-record-migration) is one-way. If you need to downgrade Jenkins, run: java -classpath "/var/cache/jenkins/war/WEB-INF/lib/jenkins-core-2.73.2.jar:/var/cache/jenkins/war/WEB-INF/lib/commons-io-2.4.jar:/var/cache/jenkins/war/WEB-INF/lib/stapler-1.250.jar:/var/cache/jenkins/war/WEB-INF/lib/ant-1.8.4.jar:/var/cache/jenkins/war/WEB-INF/lib/commons-lang-2.6.jar" jenkins.model.RunIdMigrator "/var/lib/jenkins"
Nov 28, 2017 2:17:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
Nov 28, 2017 2:17:20 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Download metadata
Nov 28, 2017 2:17:20 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Nov 28, 2017 2:17:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#479f04e6: display name [Root WebApplicationContext]; startup date [Tue Nov 28 14:17:21 CET 2017]; root of context hierarchy
Nov 28, 2017 2:17:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#479f04e6]: org.springframework.beans.factory.support.DefaultListableBeanFactory#5eedf60f
Nov 28, 2017 2:17:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#5eedf60f: defining beans [authenticationManager]; root of factory hierarchy
Nov 28, 2017 2:17:21 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext#4a772b39: display name [Root WebApplicationContext]; startup date [Tue Nov 28 14:17:21 CET 2017]; root of context hierarchy
Nov 28, 2017 2:17:21 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext#4a772b39]: org.springframework.beans.factory.support.DefaultListableBeanFactory#5e76549c
Nov 28, 2017 2:17:21 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#5e76549c: defining beans [filter,legacy]; root of factory hierarchy**`
This worked after I re-run the job.
Just wanted to know what could be the cause of the error?
I'm aware there are a bunch of topics with same issues, but after 3 days researching I couldn't solve my problem.
If anyone spot the answer somewhere else, please feel free to mark this as duplicate and lead me there.
I'm trying to map a request in my Controller and then redirect to a subfolder under my default view folder. However, I'm getting a 404 error.
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<display-name>SIGCOM</display-name>
<servlet>
<servlet-name>springController</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springController</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/springController.xml</param-value>
</context-param>
<filter>
<filter-name>SpringFilter</filter-name>
<filter-class>br.com.sigcom.filter.SpringFilter</filter-class>
<init-param>
<param-name>requestEncoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SpringFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!--
<listener>
<listener-class>br.com.sigcom.listener.SpringListener</listener-class>
</listener>
-->
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/WebContent/WEB-INF/views/errorHandling/errorPage.jsp</location>
</error-page>
<error-page>
<!-- Missing resource -->
<error-code>404</error-code>
<location>/WebContent/WEB-INF/views/errorHandling/error404.jsp</location>
</error-page>
</web-app>
My servlet XML:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/task
http://www.springframework.org/schema/task/spring-task.xsd">
<context:component-scan base-package="br.com.sigcom.controller" />
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp" />
</bean>
<mvc:annotation-driven />
<mvc:resources mapping="/resources/**" location="/resources/" cache-period="31556926" />
</beans>
As you see, my default views folder is WEB-INF/views. So far so good. I made a subfolder like this:
WEB-INF/
|-views/
|-admin/
|-default.jsp
In my Controller, I can't access WEB-INF/views/admin/default.jsp, for I get this 404 error.
My Controller:
package br.com.sigcom.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
#Controller
public class SpringController {
#RequestMapping(value = {"", "/", "home", "default", "index"})
public String redirectDefaultPage() {
return "default";
}
#RequestMapping("admin")
public String redirectAdminPage() {
return "admin/default";
}
}
I tried a lot, searched a lot, however without success. I know this must be a simple detail, but I'm exhausted. Thank you in advance!
PS.: my console:
mai 02, 2017 9:36:23 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SIGCOM' did not find a matching property.
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server version: Apache Tomcat/8.0.43
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server built: Mar 28 2017 14:42:59 UTC
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Server number: 8.0.43.0
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Name: Windows 8.1
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: OS Version: 6.3
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Architecture: amd64
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Java Home: C:\Program Files (x86)\Java
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Version: 1.8.0_131-b11
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: JVM Vendor: Oracle Corporation
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_BASE: C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: CATALINA_HOME: C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\wtpwebapps
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\endorsed
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.VersionLoggerListener log
INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252
mai 02, 2017 9:36:23 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/bin/server;C:/Program Files (x86)/Java/bin;C:/Program Files (x86)/Java/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\Program Files (x86)\Borland\Delphi7\Bin;C:\Program Files (x86)\Borland\Delphi7\Projects\Bpl\;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.6\;C:\Arquivos de programas\Borland\Delphi7\Projects\Bpl;C:\morais_san\Development\Delphi\Repository\Components\JVCL3.33\jcl;C:\morais_san\Development\Java\Maven\apache-maven-3.5.0\bin;C:\morais_san\Development\Eclipse\eclipse-jee-neon-R-win32-x86_64\eclipse;;.
mai 02, 2017 9:36:23 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"]
mai 02, 2017 9:36:23 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 02, 2017 9:36:23 PM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"]
mai 02, 2017 9:36:23 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFORMAÇÕES: Using a shared selector for servlet write/read
mai 02, 2017 9:36:23 PM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 982 ms
mai 02, 2017 9:36:23 PM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
mai 02, 2017 9:36:23 PM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.0.43
mai 02, 2017 9:36:25 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: 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.
mai 02, 2017 9:36:26 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: No Spring WebApplicationInitializer types detected on classpath
mai 02, 2017 9:36:26 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Initializing Spring FrameworkServlet 'springController'
mai 02, 2017 9:36:26 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFORMAÇÕES: FrameworkServlet 'springController': initialization started
mai 02, 2017 9:36:26 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFORMAÇÕES: Refreshing WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:36:26 BRT 2017]; root of context hierarchy
mai 02, 2017 9:36:26 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFORMAÇÕES: Loading XML bean definitions from ServletContext resource [/WEB-INF/springController-servlet.xml]
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[/search],methods=[GET]}" onto public java.lang.String br.com.sigcom.controller.SearchController.redirectSearchPage()
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[/admin]}" onto public java.lang.String br.com.sigcom.controller.SpringController.redirectAdminPage()
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[ || / || /home || /default || /index]}" onto public java.lang.String br.com.sigcom.controller.SpringController.redirectDefaultPage()
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
INFORMAÇÕES: Looking for #ControllerAdvice: WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:36:26 BRT 2017]; root of context hierarchy
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
INFORMAÇÕES: Looking for #ControllerAdvice: WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:36:26 BRT 2017]; root of context hierarchy
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFORMAÇÕES: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
mai 02, 2017 9:36:28 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFORMAÇÕES: FrameworkServlet 'springController': initialization completed in 2250 ms
mai 02, 2017 9:36:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\docs
mai 02, 2017 9:36:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\docs has finished in 35 ms
mai 02, 2017 9:36:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\examples
mai 02, 2017 9:36:29 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: ContextListener: contextInitialized()
mai 02, 2017 9:36:29 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: SessionListener: contextInitialized()
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\examples has finished in 456 ms
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\host-manager
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\host-manager has finished in 45 ms
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\manager
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\manager has finished in 44 ms
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deploying web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\ROOT
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMAÇÕES: Deployment of web application directory C:\morais_san\Development\Tomcat\apache-tomcat-8.0.43\webapps\ROOT has finished in 32 ms
mai 02, 2017 9:36:29 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"]
mai 02, 2017 9:36:29 PM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8009"]
mai 02, 2017 9:36:29 PM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 5763 ms
mai 02, 2017 9:59:25 PM org.apache.catalina.core.StandardContext reload
INFORMAÇÕES: Reloading Context with name [/SIGCOM] has started
mai 02, 2017 9:59:25 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Destroying Spring FrameworkServlet 'springController'
mai 02, 2017 9:59:25 PM org.springframework.web.context.support.XmlWebApplicationContext doClose
INFORMAÇÕES: Closing WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:36:26 BRT 2017]; root of context hierarchy
mai 02, 2017 9:59:27 PM org.apache.jasper.servlet.TldScanner scanJars
INFORMAÇÕES: 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.
mai 02, 2017 9:59:27 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: No Spring WebApplicationInitializer types detected on classpath
mai 02, 2017 9:59:27 PM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Initializing Spring FrameworkServlet 'springController'
mai 02, 2017 9:59:27 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFORMAÇÕES: FrameworkServlet 'springController': initialization started
mai 02, 2017 9:59:27 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFORMAÇÕES: Refreshing WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:59:27 BRT 2017]; root of context hierarchy
mai 02, 2017 9:59:27 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFORMAÇÕES: Loading XML bean definitions from ServletContext resource [/WEB-INF/springController-servlet.xml]
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[/search],methods=[GET]}" onto public java.lang.String br.com.sigcom.controller.SearchController.redirectSearchPage()
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[/admin]}" onto public java.lang.String br.com.sigcom.controller.SpringController.redirectAdminPage()
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping register
INFORMAÇÕES: Mapped "{[ || / || /home || /default || /index]}" onto public java.lang.String br.com.sigcom.controller.SpringController.redirectDefaultPage()
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
INFORMAÇÕES: Looking for #ControllerAdvice: WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:59:27 BRT 2017]; root of context hierarchy
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter initControllerAdviceCache
INFORMAÇÕES: Looking for #ControllerAdvice: WebApplicationContext for namespace 'springController-servlet': startup date [Tue May 02 21:59:27 BRT 2017]; root of context hierarchy
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFORMAÇÕES: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
mai 02, 2017 9:59:28 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFORMAÇÕES: FrameworkServlet 'springController': initialization completed in 1456 ms
mai 02, 2017 9:59:28 PM org.apache.catalina.core.StandardContext reload
INFORMAÇÕES: Reloading Context with name [/SIGCOM] is completed
I've tried setup a project with the same setting you had except there is no filter, filter-mapping, error-page, listener in the web.xml and I'm able to access the access the URL without 404.
The controller is able to resolve the template as well.
Did you enter your URL correctly with the context path as well?
e.g. http://localhost:8080/SIGCOM/admin
I've create a new project with your code. But at last, i get the right thing. Maybe you can check you url like first floor says.
SOLVED. As you guys runned without filter, I've commented mine and worked. Now I know what to do. Appreciate your your help, guys!
dynamic web module version
StackTrace:
Nov 30, 2015 8:44:53 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:QuoteBuilderAdmin' did not find a matching property.
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.0.28
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Oct 7 2015 18:25:21 UTC
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.28.0
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 8.1
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.3
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_51
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_51-b16
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\wtpwebapps
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\endorsed
Nov 30, 2015 8:44:53 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Nov 30, 2015 8:44:53 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_51\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_51/bin/server;C:/Program Files/Java/jre1.8.0_51/bin;C:/Program Files/Java/jre1.8.0_51/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Broadcom\Broadcom 802.11;;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\TortoiseSVN\bin;D:\Balvinder\software\eclipse;;.
Nov 30, 2015 8:44:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Nov 30, 2015 8:44:54 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Nov 30, 2015 8:44:54 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Nov 30, 2015 8:44:54 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Nov 30, 2015 8:44:54 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1111 ms
Nov 30, 2015 8:44:54 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 30, 2015 8:44:54 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.28
Nov 30, 2015 8:44:57 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.
Nov 30, 2015 8:44:57 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Nov 30, 2015 8:44:57 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Nov 30, 2015 8:44:57 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Nov 30 20:44:57 IST 2015]; root of context hierarchy
Nov 30, 2015 8:44:57 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-dispatcher-servlet.xml]
Nov 30, 2015 8:44:58 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#3cd78871: defining beans [login,user,messageSource,viewResolver]; root of factory hierarchy
Nov 30, 2015 8:44:58 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 619 ms
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\docs
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\docs has finished in 30 ms
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\examples
Nov 30, 2015 8:44:58 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Nov 30, 2015 8:44:58 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\examples has finished in 345 ms
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\host-manager
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\host-manager has finished in 40 ms
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\manager
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\manager has finished in 33 ms
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\ROOT
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\Balvinder\balvinder\Quote builder\apache-tomcat-8.0.28\webapps\ROOT has finished in 23 ms
Nov 30, 2015 8:44:58 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Nov 30, 2015 8:44:58 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Nov 30, 2015 8:44:58 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4546 ms
Nov 30, 2015 8:45:06 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'spring-dispatcher'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'spring-dispatcher': initialization started
Nov 30, 2015 8:45:06 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'spring-dispatcher-servlet': startup date [Mon Nov 30 20:45:06 IST 2015]; parent: Root WebApplicationContext
Nov 30, 2015 8:45:06 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-dispatcher-servlet.xml]
Nov 30, 2015 8:45:06 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#3ac24067: defining beans [login,user,messageSource,viewResolver]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory#3cd78871
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/login] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/login.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/login/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePasswordRequest] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePasswordRequest.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePasswordRequest/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPasswordSendMail] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPasswordSendMail.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPasswordSendMail/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePassword] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePassword.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/changePassword/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/logOutPage] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/logOutPage.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/logOutPage/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPassword] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPassword.*] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resetPassword/] onto handler 'login'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/editUser] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/editUser.*] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/editUser/] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/CreateUser] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/CreateUser.*] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/CreateUser/] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/saveUser] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/saveUser.*] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/saveUser/] onto handler 'user'
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'spring-dispatcher': initialization completed in 177 ms
Nov 30, 2015 8:45:06 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/QuoteBuilderAdmin/] in DispatcherServlet with name 'spring-dispatcher'
My code is
Web.xml:
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Archetype Created Web Application</display-name>
<servlet>
<servlet-name>spring-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring-dispatcher-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet-mapping>
<servlet-name>spring-dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.gif</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/WEB-INF/index.jsp</welcome-file>
</welcome-file-list>
And pom.xml is
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.logiquebrain</groupId>
<artifactId>QuoteBuilderAdmin</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>QuoteBuilderAdmin Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.0.7.RELEASE</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
</dependency>
<!-- Hibernate core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.0.2.Final</version>
</dependency>
<!-- optional -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-osgi</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-envers</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-proxool</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-infinispan</artifactId>
<version>5.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>5.0.2.Final</version>
</dependency>
</dependencies>
<build>
<finalName>QuoteBuilderAdmin</finalName>
</build>
And spring-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="login" class="controller.LoginController" />
<bean id="user" class="controller.UserController" />
<bean id="messageSource"
class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
<property name="basenames" value="WEB-INF/properties/messages" />
</bean>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
I am using tomcat 8.0.
while compiling i am getting the following error:
I am getting error as(In problems: 2 error)enter image description here:
- Description Resource Path Location Type JavaServer Faces 1.2 can not
be installed : One or more constraints have not been
satisfied. QuoteBuilderAdmin line 1 Maven Java EE Configuration
Problem
- Description Resource Path Location Type JavaServer Faces 1.2 requires
Dynamic Web Module 2.5 or newer. QuoteBuilderAdmin line 1 Maven Java
EE Configuration Problem
Please help me to run my project.
Thanks in advance.
I want to access either remote or local EJB which is deployed in TomEE server.
My Client program is also deployed in the same. But when I look-up and cast it as interface it throws ClassCastException.
Is there any particulate EJB path to look-up ?
My local/remote EJB jar log in TomEE server:
May 15, 2015 9:35:34 PM org.apache.openejb.config.ConfigurationFactory configureApplication
INFO: Configuring enterprise application: C:\Users\Sudhir\Desktop\apacheEjb\apache-tomee-webprofile-1.7.1\webapps\remoteejb.jar
May 15, 2015 9:35:34 PM org.apache.openejb.config.InitEjbDeployments deploy
INFO: Auto-deploying ejb UuidSrvcImpl: EjbDeployment(deployment-id=UuidSrvcImpl)
May 15, 2015 9:35:34 PM org.apache.openejb.config.AppInfoBuilder build
INFO: Enterprise application "C:\Users\Sudhir\Desktop\apacheEjb\apache-tomee-webprofile-1.7.1\webapps\remoteejb.jar" loaded.
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Assembling app: C:\Users\Sudhir\Desktop\apacheEjb\apache-tomee-webprofile-1.7.1\webapps\remoteejb.jar
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=UuidSrvcImplLocal) --> Ejb(deployment-id=UuidSrvcImpl)
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=global/remoteejb/UuidSrvcImpl!com.service.uuidgen.UuidSrvc) --> Ejb(deployment-id=UuidSrvcImpl)
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.JndiBuilder bind
INFO: Jndi(name=global/remoteejb/UuidSrvcImpl) --> Ejb(deployment-id=UuidSrvcImpl)
May 15, 2015 9:35:34 PM org.apache.openejb.cdi.CdiBuilder initSingleton
INFO: Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl#5a8fddea
May 15, 2015 9:35:34 PM org.apache.openejb.cdi.OpenEJBLifecycle startApplication
INFO: OpenWebBeans Container is starting...
May 15, 2015 9:35:34 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
May 15, 2015 9:35:34 PM org.apache.webbeans.plugins.PluginLoader startUp
INFO: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
May 15, 2015 9:35:34 PM org.apache.webbeans.config.BeansDeployer validateInjectionPoints
INFO: All injection points were validated successfully.
May 15, 2015 9:35:34 PM org.apache.openejb.cdi.OpenEJBLifecycle startApplication
INFO: OpenWebBeans Container has started, it took 16 ms.
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.Assembler startEjbs
INFO: Created Ejb(deployment-id=UuidSrvcImpl, ejb-name=UuidSrvcImpl, container=Default Stateless Container)
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.Assembler startEjbs
INFO: Started Ejb(deployment-id=UuidSrvcImpl, ejb-name=UuidSrvcImpl, container=Default Stateless Container)
May 15, 2015 9:35:34 PM org.apache.openejb.assembler.classic.Assembler createApplication
INFO: Deployed Application(path=C:\Users\Sudhir\Desktop\apacheEjb\apache-tomee-webprofile-1.7.1\webapps\remoteejb.jar)
May 15, 2015 9:37:24 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive C:\Users\Sudhir\Desktop\apacheEjb\apache-tomee-webprofile-1.7.1\webapps\ejb-examples-1.1.1-SNAPSHOT.war
May 15, 2015 9:37:24 PM org.apache.tomee.catalina.TomcatWebAppBuilde`enter code here`r init
My Client program is:
properties.setProperty("openejb.embedded.remotable", "false");
properties.setProperty("openejb.validation.output.level ", "medium");
properties.put("java.naming.factory.initial ", "org.apache.openejb.client.LocalInitialContextFactory");
InitialContext initialContext = new InitialContext(properties);
(UuidSrvc)initialContext.lookup("java:global/remoteejb/UuidSrvcImpl"); (Here I get error)
I am using tomcat server from eclipse for my projects. All these days it is working fine. But since 3 days tomcat is not starting sometimes from eclipse. I checked in Internet and tried lot many solutions. Even solutions given in other posts in stack-overflow related to this problem are not helping me. The console messages are
Oct 07, 2014 11:08:06 AM org.apache.catalina.core.AprLifecycleListener init
INFO: 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
Oct 07, 2014 11:08:06 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:dims' did not find a matching property.
Oct 07, 2014 11:08:06 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DReST' did not find a matching property.
Oct 07, 2014 11:08:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8181"]
Oct 07, 2014 11:08:06 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 07, 2014 11:08:06 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 303 ms
Oct 07, 2014 11:08:06 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 07, 2014 11:08:06 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Oct 07, 2014 11:08:07 AM org.apache.tiles.impl.BasicTilesContainer init
INFO: Initializing Tiles2 container. . .
Oct 07, 2014 11:08:07 AM org.apache.tiles.impl.BasicTilesContainer initializeDefinitionsFactory
INFO: Tiles2 container initialization complete.
Oct 07, 2014 11:08:07 AM org.apache.tiles.access.TilesAccess setContainer
INFO: Publishing TilesContext for context: org.apache.catalina.core.ApplicationContextFacade
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-default.xml]
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts-plugin.xml]
Oct 07, 2014 11:08:07 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider info
INFO: Parsing configuration file [struts.xml]
Oct 07, 2014 11:08:07 AM org.apache.struts2.config.BeanSelectionProvider info
INFO: Loading global messages from ApplicationResources
Servlet Context --call back method--contextInitialized()
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/StudentDao.properties
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
/home/saipavan/apache-tomcat-7.0.54/wtpwebapps/dims/
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/manager
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/manager has finished in 75 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/ROOT
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/ROOT has finished in 67 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/host-manager
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/host-manager has finished in 70 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/examples
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Oct 07, 2014 11:08:09 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache#7e7a19e7')
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/examples has finished in 142 ms
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/docs
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /home/saipavan/apache-tomcat-7.0.54/webapps/docs has finished in 68 ms
Oct 07, 2014 11:08:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8181"]
Oct 07, 2014 11:08:09 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Oct 07, 2014 11:08:09 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2670 ms
I am able to start tomcat through terminal. but when i try to open tomcat in browser after starting, I am getting error
Firefox can't establish a connection to the server at localhost:8181.
What might be the problem? Can anyone help me? Thankyou.
seems localhost is not getting resolved to IP address. Try to ping localhost ping -c localhost or try your systems IP address instead of localhost.