spring mvc with rest webservices using hibernate - spring

I am working with Customer application using Spring MVC with REstful webservice using Hibernate. I have created this application as a Dynamic web project in Eclipse because if i am using Maven i am getting few dependencies error.
As i am new to these technologies I don’t know where I have done mistake in configuring these files
I have configured as follows in configuration files.
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>SpringWithRestCaseStudy</display-name>
<context-param>
<param-name>root-context</param-name>
<param-value>\WEB-INF\spring\appServlet\root- context.xml</paramvalue>
</context-param>
<servlet>
<servlet-name>servlet-context</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet- class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>\WEB-INF\spring\appServlet\servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>servlet-context</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.RequestContextListener</listener-class>
</listener>
servlet-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:context="http://www.springframework.org/schema /context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.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">
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
<!-- Enables the Spring MVC #Controller programming model -->
<annotation-driven />
<resources location="/resources/" mapping="/resources/**"></resources>
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="com.crud.rest.controllers" />
</beans:beans>
root-context.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:c="htpp://www.springframework.org/schema/c"
xmlns:p="htpp://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver">
</property>
<property name="url" value="jdbc:oracle:thin:#172.16.156.152:1521:orcl">
</property>
<property name="username" value="scott"></property>
<property name="password" value="tiger"></property>
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="annotatedClasses">
<list>
<value>com.crud.rest.beans.MyCustomer</value>
</list>
</property>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="customerDao" class="com.crud.rest.dao.CustomerDaoImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<bean id="customerService" class="com.crud.rest.dao.CustomerServiceImpl">
<property name="CustomerDao" ref="CustomerDao"></property>
</bean>
</beans>
I am getting the error as follows.
Sep 12, 2017 12:52:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ShoppingDemo' did not find a matching property.
Sep 12, 2017 12:52:55 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringWithRestCaseStudy' did not find a matching property.
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.0.37
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Sep 1 2016 10:01:52 UTC
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.37.0
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_66
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_66-b18
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\Narmatha Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: D:\apache-tomcat-8.0.37
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\Narmatha Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\apache-tomcat-8.0.37
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:\Narmatha Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.37\endorsed
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Sep 12, 2017 12:52:55 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_66\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_66/bin/server;C:/Program Files/Java/jre1.8.0_66/bin;C:/Program Files/Java/jre1.8.0_66/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\PROGRA~2\CA\SC\CAM\bin;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ORACLEXE\app\oracle\product\10.2.0\server\bin;C:\Tcl\bin;C:\Windows\SysWOW64\;C:\Windows\SysWOW64\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\eclipse-jee-luna-SR2-win32-x86_64\eclipse;;.
Sep 12, 2017 12:52:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Sep 12, 2017 12:52:55 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 12, 2017 12:52:55 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Sep 12, 2017 12:52:55 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Sep 12, 2017 12:52:55 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1524 ms
Sep 12, 2017 12:52:55 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 12, 2017 12:52:55 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.37
Sep 12, 2017 12:53:00 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.
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet dispatcher as unavailable
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet [dispatcher] in web application [/ShoppingDemo] threw load() exception
java.lang.ClassNotFoundException: org.springframework.web.servlet.DisptacherServlet
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1167)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceMana ger.java:518)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(Defa ultInstanceManager.java:499)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceMa nager.java:118)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:109 1)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1027)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5 038)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5 348)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:140 7)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:139 7)
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)
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1167) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceMa nager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4 775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5 314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:130 9) 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)
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class org.springframework.web.context.RequestContextListener
java.lang.ClassNotFoundException: org.springframework.web.context.RequestContextListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderB ase.java:1167)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceMana ger.java:518)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(Defa ultInstanceManager.java:499)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceMa nager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4 775)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5 314)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
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)
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Sep 12, 2017 12:53:00 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
Sep 12, 2017 12:53:00 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/SpringWithRestCaseStudy] startup failed due to previous errors
Sep 12, 2017 12:53:01 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Sep 12, 2017 12:53:01 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Sep 12, 2017 12:53:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5154 ms
Kindly someone help me to solve this issue.
And it would be more helpful if someone can provide a details of how to configure these 3 files.

Might this is solution.
The solution to this problem is very simple. Double click on your tomcat server. It will open the server configuration. Under server options check ‘Publish module contents to separate XML files’ checkbox. Restart your server. This time your page will come without any issues.
enter image description here

Related

Spring applicationContext (not servlet context) is loaded twice

I created spring config where applicationContext has all 'heavy' beans and
servlet context only controllers. My problem is that applicationContext with all 'big' beans is loaded twice. What I am doing wrong?
I read this and this but not helps:
my web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-conf/applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-conf/dispatcher.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
applicationContext.xml
<context:annotation-config/>
<context:component-scan base-package="kkl.server.error" />
<context:component-scan base-package="kkl.server.services" />
<context:component-scan base-package="kkl.server.log" />
<context:component-scan base-package="kkl.server.model" />
<context:component-scan base-package="kkl.server.security" />
<context:component-scan base-package="kkl.server.utils" />
<context:component-scan base-package="kkl.server.validation" />
<!-- ///////////////// properties ///////////////////// -->
<context:property-placeholder
location="classpath:spring-conf/properties/application.properties"
order='0' ignore-resource-not-found="false" />
<context:property-placeholder
location="classpath:spring-conf/properties/local.properties" order='-1'
ignore-unresolvable='true' ignore-resource-not-found="true"/>
<import resource="classpath:spring-conf/spring-aop_and_transactions.xml" />
<import resource="classpath:spring-conf/spring-security.xml" />
<import resource="classpath:spring-conf/spring-database.xml" />
dispatcher.xml
<context:annotation-config />
<mvc:annotation-driven>
<mvc:message-converters>
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="objectMapper">
<bean class="kkl.fireRpg.server.controllers.utils.json.JsonObjectMapper" />
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<!-- ///////////////// scanned packages //////////////////// -->
<context:component-scan base-package="kkl.server.controllers" />
Update
After when I comment every thing in applicationContext and in web.xml (without listener and context-param) my tomcat output looks like this:
`maj 24, 2016 1:13:54 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:firerpg' did not find a matching property.
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.0.18
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jan 23 2015 11:56:07 UTC
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.0.18.0
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 7
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 6.1
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: x86
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files (x86)\Java\jdk1.8.0_60\jre
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_60-b27
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\endorsed
maj 24, 2016 1:13:54 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=UTF-8
maj 24, 2016 1:13:54 AM 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 (x86)\Java\jdk1.8.0_60\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre1.8.0_60/bin/client;C:/Program Files (x86)/Java/jre1.8.0_60/bin;C:/Program Files (x86)/Java/jre1.8.0_60/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Bitvise SSH Client;D:\programy\java\apache-maven-3.3.9\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;D:\programy\java\eclipseluna\eclipse;;.
maj 24, 2016 1:13:55 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
maj 24, 2016 1:13:55 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
maj 24, 2016 1:13:55 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
maj 24, 2016 1:13:55 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
maj 24, 2016 1:13:55 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 676 ms
maj 24, 2016 1:13:55 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
maj 24, 2016 1:13:55 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.18
maj 24, 2016 1:13:59 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
maj 24, 2016 1:13:59 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
maj 24, 2016 1:13:59 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
maj 24, 2016 1:13:59 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Tue May 24 01:13:59 CEST 2016]; root of context hierarchy
maj 24, 2016 1:13:59 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [spring-conf/applicationContext.xml]
maj 24, 2016 1:13:59 AM org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties
INFO: Loading properties file from class path resource [spring-conf/properties/local.properties]
maj 24, 2016 1:13:59 AM org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties
INFO: Loading properties file from class path resource [spring-conf/properties/application.properties]
maj 24, 2016 1:13:59 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 655 ms
maj 24, 2016 1:14:00 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [265] milliseconds.
maj 24, 2016 1:14:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\docs
maj 24, 2016 1:14:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\docs has finished in 31 ms
maj 24, 2016 1:14:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\examples
maj 24, 2016 1:14:00 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
maj 24, 2016 1:14:00 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
maj 24, 2016 1:14:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\examples has finished in 375 ms
maj 24, 2016 1:14:00 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\firerpg
maj 24, 2016 1:14:03 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
maj 24, 2016 1:14:03 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
maj 24, 2016 1:14:03 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
maj 24, 2016 1:14:04 AM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Tue May 24 01:14:04 CEST 2016]; root of context hierarchy
maj 24, 2016 1:14:04 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [spring-conf/applicationContext.xml]
maj 24, 2016 1:14:04 AM org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties
INFO: Loading properties file from class path resource [spring-conf/properties/local.properties]
maj 24, 2016 1:14:04 AM org.springframework.context.support.PropertySourcesPlaceholderConfigurer loadProperties
INFO: Loading properties file from class path resource [spring-conf/properties/application.properties]
maj 24, 2016 1:14:04 AM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 561 ms
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\firerpg has finished in 3,932 ms
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\host-manager
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\host-manager has finished in 16 ms
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\manager
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\manager has finished in 16 ms
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\ROOT
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory D:\programy\java\apache-tomcat-8.0.18-windows-x86\apache-tomcat-8.0.18\webapps\ROOT has finished in 15 ms
maj 24, 2016 1:14:04 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
maj 24, 2016 1:14:04 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
maj 24, 2016 1:14:04 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 9413 ms`
this line:
INFO: Loading XML bean definitions from class path resource [spring- conf/applicationContext.xml]
shows twice.
I fight a lot with this problem. I disabled almost everything but it still exist.
Then I back to my eclipse tomcat config where I set up 'use real installtion'.
After when I change setting to use 'use workspace metadata' problem disappears.
I am using eclipse luna release 2 and tomcat 8
I hope this will spare someones time.
UPDATE
After few tries I see that eclipse is breaking my tomcat installation.
(I tried on a new one to be sure).When I set up 'use real installation'
problem occurs again. After this, it still exist even when I run tomcat without eclipse.
Solution is: delete yours tomcat installation.Setup a new one and never change 'use workspace metadata'

spring aspectj my classes are not weaved

I am using spring release 4.1.4. I am also using axis2.
Here is my aop.xml
<!DOCTYPE aspectj PUBLIC
"-//AspectJ//DTD//EN" "http://www.eclipse.org/aspectj/dtd/aspectj.dtd">
<aspectj>
<weaver options="-verbose -debug -showWeaveInfo">
<!-- only weave classes in our application-specific packages -->
<include within="com.alu.motive.smdm.mediation.process.orchestration.process.*" />
<include within="com.alu.motive.smdm.mediation.process.orchestration.activity.*" />
</weaver>
<aspects>
<aspect name="com.alu.motive.smdm.mediation.process.orchestration.process.TransitionGovernorAspect" />
</aspects>
</aspectj>
here is my jvm args (i am suing Tomcat 8):
-Dcatalina.base="C:\PCRefresh\workspace-luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="C:\Tomcat\apache-tomcat-8.0.18" -Dwtp.deploy="C:\PCRefresh\workspace-luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="C:\Tomcat\apache-tomcat-8.0.18\endorsed" -javaagent:"C:\PCRefresh\DATA\SNE\_CVS\SchneiderElectric\LWM2M\MediationLayer\Cpmv215\lib\spring-instrument-4.1.4.RELEASE.jar" -XX:-UseSplitVerifier
Here is my application context:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- will register load time weaver needed to weave Aspect which controls activity transition,
TransitionGovernorAspect -->
<context:load-time-weaver/>
<!-- PART 1 – Process Assembly -->
<aop:config>
<!-- we are using "bean" pointcut in conjunction with execution pointcut
which will allow us to assemble some other process from another instance of
GenericProcessImpl -->
<aop:pointcut id="serviceToAssociatePointcut"
expression="bean(serviceToAssociate) and
execution(void com.alu.motive.smdm.mediation.process.orchestration.process.GenericProcessImpl.execute(..))"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="validateServiceDataFlter" order="1"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="associateServiceInM2MFlter" order="2"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="storeSessionStepFlter" order="3"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="retryFlter" order="4"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="processAsyncResponseFlter" order="5"/>
<aop:advisor pointcut-ref="serviceToAssociatePointcut"
advice-ref="processAsyncErrorResponseFlter" order="6"/>
</aop:config>
<!-- PART 2 – Activity Interceptors (Filters) Configuration -->
<!-- Individual Intercepting filters wired with corresponding
Activities and simple Fact rules-->
<bean id="genericFlter" class="com.alu.motive.smdm.mediation.process.orchestration.activity.ActivityFilterInterceptor"
abstract="true"/>
<bean id="validateServiceDataFlter" parent="genericFlter">
<constructor-arg ref="validateServiceDataActivity"/>
<property name="facts" value="!VALIDATED_SERVICE"/>
</bean>
<bean id="associateServiceInM2MFlter" parent="genericFlter">
<constructor-arg ref="associateServiceInM2MActivity"/>
<property name="facts" value="VALIDATED_SERVICE,!ASSOCIATED_SERVICE,!STORE_SESSION_ASSOCIATED_SERVICE,!ASSOCIATION_ERROR"/>
</bean>
<bean id="storeSessionStepFlter" parent="genericFlter">
<constructor-arg ref="storeSessionActivity"/>
<property name="facts" value="VALIDATED_SERVICE,ASSOCIATED_SERVICE,!STORE_SESSION_ASSOCIATED_SERVICE,!ASSOCIATION_ERROR"/>
</bean>
<bean id="retryFlter" parent="genericFlter">
<constructor-arg ref="RetryActivity"/>
<property name="facts" value="VALIDATED_SERVICE,ASSOCIATED_SERVICE,STORE_SESSION_ASSOCIATED_SERVICE,RETRY"/>
</bean>
<bean id="processAsyncResponseFlter" parent="genericFlter">
<constructor-arg ref="processAsyncResponseActivity"/>
<property name="facts" value="VALIDATED_SERVICE,ASSOCIATED_SERVICE,STORE_SESSION_ASSOCIATED_SERVICE,!ASYNC_RESPONSE,!ASSOCIATION_ERROR"/>
</bean>
<bean id="processAsyncErrorResponseFlter" parent="genericFlter">
<constructor-arg ref="processAsyncErrorResponseActivity"/>
<property name="facts" value="!ASYNC_RESPONSE,ACTIVITY_ERROR,!ASYNC_ERROR_RESPONSE"/>
</bean>
<!-- PART 3 – POJO Activities -->
<bean id="validateServiceDataActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.ValidateServiceDataActivity"/>
<bean id="associateServiceInM2MActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.AssociateServiceInFM2SActivity"/>
<bean id="storeSessionActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.StoreSessionActivity"/>
<bean id="RetryActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.RetryActivity"/>
<bean id="processAsyncResponseActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.ProcessAsyncResponseActivity"/>
<bean id="processAsyncErrorResponseActivity"
class="com.alu.motive.smdm.mediation.process.orchestration.activity.ProcessAsyncErrorResponseActivity"/>
</beans>
Here is the trace of the application:
févr. 27, 2015 10:22:01 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
AVERTISSEMENT: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Cpmv215' did not find a matching property.
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server version: Apache Tomcat/8.0.18
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server built: Jan 23 2015 11:56:07 UTC
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Server number: 8.0.18.0
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Name: Windows 7
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: OS Version: 6.1
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Architecture: amd64
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Java Home: C:\Program Files\Java\jre7
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Version: 1.7.0_75-b13
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: JVM Vendor: Oracle Corporation
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_BASE: C:\PCRefresh\workspace-luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: CATALINA_HOME: C:\Tomcat\apache-tomcat-8.0.18
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dcatalina.base=C:\PCRefresh\workspace-luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dcatalina.home=C:\Tomcat\apache-tomcat-8.0.18
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dwtp.deploy=C:\PCRefresh\workspace-luna\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Djava.endorsed.dirs=C:\Tomcat\apache-tomcat-8.0.18\endorsed
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -javaagent:C:\PCRefresh\DATA\SNE\_CVS\SchneiderElectric\LWM2M\MediationLayer\Cpmv215\lib\spring-instrument-4.1.4.RELEASE.jar
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -XX:-UseSplitVerifier
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.VersionLoggerListener log
INFOS: Command line argument: -Dfile.encoding=Cp1252
févr. 27, 2015 10:22:02 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFOS: 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\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Microsoft Online Services;C:\Program Files (x86)\Common Files\Microsoft Shared\Microsoft Online Services;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Oracle_universal\10_32;C:\Program Files\TortoiseSVN\bin;C:\ProgramFiles\nodejs\;C:\PCRefresh\oracle\instantclient\instantclient_11_2;C:\ProgramFiles\ApacheSoftwareFoundation\apache-maven-3.2.1\bin;C:\Program Files (x86)\CVSNT\;C:\Program Files\Java\jdk1.8.0_05\bin;C:\Users\claveri1\AppData\Roaming\npm;C:\ProgramFiles\nodejs;C:\PCRefresh\oracle\instantclient\instantclient_12_1;.
févr. 27, 2015 10:22:02 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["http-nio-8080"]
févr. 27, 2015 10:22:02 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFOS: Using a shared selector for servlet write/read
févr. 27, 2015 10:22:02 PM org.apache.coyote.AbstractProtocol init
INFOS: Initializing ProtocolHandler ["ajp-nio-8009"]
févr. 27, 2015 10:22:02 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFOS: Using a shared selector for servlet write/read
févr. 27, 2015 10:22:02 PM org.apache.catalina.startup.Catalina load
INFOS: Initialization processed in 886 ms
févr. 27, 2015 10:22:02 PM org.apache.catalina.core.StandardService startInternal
INFOS: Démarrage du service Catalina
févr. 27, 2015 10:22:02 PM org.apache.catalina.core.StandardEngine startInternal
INFOS: Starting Servlet Engine: Apache Tomcat/8.0.18
févr. 27, 2015 10:22:02 PM org.apache.jasper.servlet.TldScanner scanJars
INFOS: 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.
févr. 27, 2015 10:22:02 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFOS: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [182] milliseconds.
2015-02-27 22:22:16,310 [localhost-startStop-1] WARN org.apache.axis2.transport.http.AxisAdminServlet - line:39 - Web application uses org.apache.axis2.transport.http.AxisAdminServlet; please update web.xml to use org.apache.axis2.webapp.AxisAdminServlet instead
2015-02-27 22:22:19,705 [localhost-startStop-1] WARN org.apache.axis2.transport.http.AxisServlet - line:165 - No transportReceiver for org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP will be configured automatically. Please update your axis2.xml file!
févr. 27, 2015 10:22:19 PM org.apache.coyote.AbstractProtocol start
INFOS: Starting ProtocolHandler ["http-nio-8080"]
févr. 27, 2015 10:22:19 PM org.apache.coyote.AbstractProtocol start
INFOS: Starting ProtocolHandler ["ajp-nio-8009"]
févr. 27, 2015 10:22:19 PM org.apache.catalina.startup.Catalina start
INFOS: Server startup in 17470 ms
2015-02-27 22:22:34,987 [http-nio-8080-exec-3] INFO com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:64 - associateService: beg - responseURI=http://localhost:8882/foo - endpointId=myEndPointId - sgwId=mySgwId - serviceID=myServiceId - serviceDeliveryID=mySDid
2015-02-27 22:22:34,988 [http-nio-8080-exec-3] DEBUG com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:71 - first check input parameters
2015-02-27 22:22:34,989 [http-nio-8080-exec-3] DEBUG com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:99 - All mandatory parameters found
2015-02-27 22:22:34,989 [http-nio-8080-exec-3] TRACE com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:100 - Instanciating service from input parameters
2015-02-27 22:22:34,991 [http-nio-8080-exec-3] DEBUG com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:107 - transaction id generated is: mPqRdhR5ASWc7bBB
2015-02-27 22:22:34,992 [http-nio-8080-exec-3] TRACE com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:113 - Service LCS is null with errorSubCode=null
2015-02-27 22:22:34,992 [http-nio-8080-exec-3] TRACE com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:114 - set synchronous answer to OK since there is no additional check
2015-02-27 22:22:34,993 [http-nio-8080-exec-3] DEBUG com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:129 - Launch the association orchestration
2015-02-27 22:22:35,001 [http-nio-8080-exec-3] INFO com.alu.motive.if_dm_sm.IF_DM_SMSkeleton - line:176 - associateService: end (return the synchronous response)
2015-02-27 22:22:35,019 [Thread-8] DEBUG com.alu.motive.if_dm_sm.ThreadForAssociateService - line:22 - Begin of ThreadForAssociateService:run
2015-02-27 22:22:35,020 [Thread-8] DEBUG com.alu.motive.if_dm_sm.ThreadForAssociateService - line:27 - Load application configuration: application-config-associateService.xml
[TomcatInstrumentableClassLoader#4dee3a29] info AspectJ Weaver Version 1.8.5 built on Thursday Jan 29, 2015 at 01:03:58 GMT
[TomcatInstrumentableClassLoader#4dee3a29] info register classloader org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader#4dee3a29
[TomcatInstrumentableClassLoader#4dee3a29] info using configuration /C:/PCRefresh/workspace-luna/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Cpmv215/WEB-INF/classes/META-INF/aop.xml
[TomcatInstrumentableClassLoader#4dee3a29] info using configuration file:/C:/PCRefresh/workspace-luna/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Cpmv215/WEB-INF/lib/spring-aspects-4.1.4.RELEASE.jar!/META-INF/aop.xml
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect com.alu.motive.smdm.mediation.process.orchestration.process.TransitionGovernorAspect
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect org.springframework.beans.factory.aspectj.AnnotationBeanConfigurerAspect
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect org.springframework.scheduling.aspectj.AnnotationAsyncExecutionAspect
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect org.springframework.transaction.aspectj.AnnotationTransactionAspect
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect org.springframework.cache.aspectj.AnnotationCacheAspect
[TomcatInstrumentableClassLoader#4dee3a29] info register aspect org.springframework.cache.aspectj.JCacheCacheAspect
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.TargetSource'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.TargetClassAware'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator$BeanFactoryAdvisorRetrievalHelperAdapter'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.aspectj.autoproxy.AspectJPrecedenceComparator'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.adapter.GlobalAdvisorAdapterRegistry'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.adapter.AdvisorAdapterRegistry'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.adapter.UnknownAdviceTypeException'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving
...
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.BeforeAdvice'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.AfterReturningAdvice'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.AfterAdvice'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.ThrowsAdvice'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.TrueMethodMatcher'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.support.MethodMatchers'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.ReflectiveMethodInvocation'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.ProxyMethodInvocation'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'org.springframework.aop.framework.InterceptorAndDynamicMethodMatcher'
2015-02-27 22:22:39,142 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.ActivityFilterInterceptor - line:47 - >>>> Executing com.alu.motive.smdm.mediation.process.orchestration.activity.ValidateServiceDataActivity
2015-02-27 22:22:39,143 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.ActivityFilterInterceptor - line:51 - >>>> with Facts
2015-02-27 22:22:39,143 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.ValidateServiceDataActivity - line:17 - Checking service data (nothing to check)
2015-02-27 22:22:39,143 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.ActivityFilterInterceptor - line:47 - >>>> Executing com.alu.motive.smdm.mediation.process.orchestration.activity.AssociateServiceInFM2SActivity
2015-02-27 22:22:39,143 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.ActivityFilterInterceptor - line:51 - >>>> with Facts VALIDATED_SERVICE
2015-02-27 22:22:39,143 [Thread-8] DEBUG com.alu.motive.smdm.mediation.process.orchestration.activity.AssociateServiceInFM2SActivity - line:42 - AssociateServiceInFM2SActivity:process - BEG
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'com.sun.jersey.api.client.Client'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'com.sun.jersey.api.client.ClientHandler'
[TomcatInstrumentableClassLoader#4dee3a29] debug not weaving 'com.sun.jersey.api.client.filter.Filterable'
My issue:
My own classes (com.alu.motive.smdm.mediation.process.orchestration.activity.*) are never weaved.
A advice will be apreciated to understand my issues.
I have resolved my issue.
My jvm arguments were wrong. Note with the correction, the classes are loaded at the beginning and not only during the application context loading.
Before, my jvm arg included:
-javaagent:C:\PCRefresh\DATA\SNE\_CVS\SchneiderElectric\LWM2M\MediationLayer\Cpmv215\lib\spring-instrument-4.1.4.RELEASE.jar
The correction was to set it like as follows:
-javaagent:"C:\PCRefresh\DATA\SNE\_CVS\SchneiderElectric\LWM2M\MediationLayer\Cpmv215\lib\aspectjweaver.jar"
Tomcat needs to scan the classpath to find classes with Servlet 3.0 annotations, which it does by loading all your classes. Because this happens before Spring configures AspectJ, your classes don't get woven. There are two ways to deal with this: either specify Servlet 2.5 in your web.xml, or add metadata-complete="true" to <web-app> in web.xml. If you're using Servlet 3.0 annotations (#Servlet, etc), that puts you in a pickle--AFAIK there's no way to combine LTW with Servlet 3.0 annotations on Tomcat.
thanks
Here is my web.xml before the change.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5">
<display-name>Cpmv215</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
<welcome-file>/axis2-web/index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<display-name>Apache-Axis Servlet</display-name>
<servlet-name>AxisServlet</servlet-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/servlet/AxisServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>*.jws</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet>
<display-name>Apache-Axis Admin Servlet Web Admin</display-name>
<servlet-name>AxisAdminServlet</servlet-name>
<servlet-class>org.apache.axis2.transport.http.AxisAdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>AxisAdminServlet</servlet-name>
<url-pattern>/axis2-admin/*</url-pattern>
</servlet-mapping>
</web-app>
Here is the the beginning of the web.xml after the change you have suggested:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5"
metadata-complete="true">
But, i have the same trace. Spring never tries to weave my own classes.

Securing SOAP Web-Services using WSS4J Library (Spring WITHOUT MVC)

I am new to spring web services.I am doing an interceptor on the sage.xml (otherwse, known as spring-ws-servlet.xml) in my project by using eclipse.
Without the interceptors and it's handler. The web services work fine, but once added the interceptor the error was prompt.
I have no idea why it is prompting errors.I suspected the libraries problem. I can't figure it out can anyone help me with this?
The following is the error message.
Apr 30, 2014 2:27:47 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.
Apr 30, 2014 2:27:47 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Apr 30, 2014 2:27:48 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
Apr 30, 2014 2:27:48 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-8080"]
Apr 30, 2014 2:27:48 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-apr-8009"]
Apr 30, 2014 2:27:48 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1173 ms
Apr 30, 2014 2:27:48 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 30, 2014 2:27:48 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.52
Apr 30, 2014 2:27:48 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor C:\Java\apache-tomcat-7.0.52\conf\Catalina\localhost\task4.xml
Apr 30, 2014 2:27:51 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Apr 30, 2014 2:27:51 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Wed Apr 30 14:27:51 SGT 2014]; root of context hierarchy
Apr 30, 2014 2:27:51 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/config/sage.xml]
Apr 30, 2014 2:27:51 PM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
Apr 30, 2014 2:27:51 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#1655d7e: defining beans [govUserEndpoint,govUserInterfaceImplementation,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,final,org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0,org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#1,callbackHandler,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
Apr 30, 2014 2:27:52 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#1655d7e: defining beans [govUserEndpoint,govUserInterfaceImplementation,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,final,org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#0,org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#1,callbackHandler,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
Apr 30, 2014 2:27:52 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.ws.soap.server.endpoint.interceptor.DelegatingSmartSoapEndpointInterceptor#1': Cannot create inner bean 'wss4jSecurityInterceptor' of type [org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wss4jSecurityInterceptor' defined in ServletContext resource [/WEB-INF/config/sage.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xml/security/Init
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:616)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)
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.springframework.beans.factory.BeanCreationException: Error creating bean with name 'wss4jSecurityInterceptor' defined in ServletContext resource [/WEB-INF/config/sage.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/xml/security/Init
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
... 30 more
Caused by: java.lang.NoClassDefFoundError: org/apache/xml/security/Init
at org.apache.ws.security.WSSConfig.setXmlSecIgnoreLineBreak(WSSConfig.java:400)
at org.apache.ws.security.WSSConfig.init(WSSConfig.java:420)
at org.apache.ws.security.WSSConfig.getNewInstance(WSSConfig.java:455)
at org.apache.ws.security.WSSecurityEngine.getWssConfig(WSSecurityEngine.java:142)
at org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor.afterPropertiesSet(Wss4jSecurityInterceptor.java:496)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 33 more
Caused by: java.lang.ClassNotFoundException: org.apache.xml.security.Init
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
... 40 more
Apr 30, 2014 2:27:52 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Apr 30, 2014 2:27:52 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/task4] startup failed due to previous errors
Apr 30, 2014 2:27:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Java\apache-tomcat-7.0.52\webapps\docs
Apr 30, 2014 2:27:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Java\apache-tomcat-7.0.52\webapps\examples
Apr 30, 2014 2:27:54 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Java\apache-tomcat-7.0.52\webapps\host-manager
Apr 30, 2014 2:27:55 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Java\apache-tomcat-7.0.52\webapps\manager
Apr 30, 2014 2:27:56 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Java\apache-tomcat-7.0.52\webapps\ROOT
Apr 30, 2014 2:27:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-apr-8080"]
Apr 30, 2014 2:27:56 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-apr-8009"]
Apr 30, 2014 2:27:56 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8494 ms
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-apr-8080"]
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-apr-8009"]
Apr 30, 2014 2:39:57 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-apr-8080"]
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-apr-8009"]
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-apr-8080"]
Apr 30, 2014 2:39:57 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-apr-8009"]
The libraries I have are,
aopalliance-1.0.jar
commons-collections-3.2.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
spring-aop-3.1.1.RELEASE.jar
spring-asm-3.1.1.RELEASE.jar
spring-aspects-3.1.1.RELEASE.jar
spring-beans-3.1.1.RELEASE.jar
spring-context-3.1.1.RELEASE.jar
spring-context-support-3.1.1.RELEASE.jar
spring-core-3.1.1.RELEASE.jar
spring-expression-3.1.1.RELEASE.jar
spring-oxm-3.1.1.RELEASE.jar
spring-web-3.0.5.RELEASE.jar
spring-webmvc-3.0.5.RELEASE.jar
spring-ws-core-2.0.0.RELEASE.jar
spring-ws-security-2.1.4.RELEASE .jar
spring-xml-2.0.0.RELEASE.jar
stax-api-1.0-2.jar
wsdl4j-1.6.1.jar
wss4j-1.6.13.jar
XmlSchema-1.4.3.jar
My web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID"
version="2.5">
<!--
Spring-ws-configuraion file.
-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/config/sage.xml
</param-value>
</context-param>
<!--
Loads the Spring web application context, using the files defined above.
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!--
Define the Spring WS Servlet. The 'transformWsldLocations' param means
that any WSDLs generated are context-aware and contain the correct
path to their exposed port types. The 'contextConfigLocation' param
with an empty value means that the Spring context won't try to load
a file called webservices-servlet.xml
-->
<servlet>
<servlet-name>webservices</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value></param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>webservices</servlet-name>
<url-pattern>*.wsdl</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>webservices</servlet-name>
<url-pattern>/endpoints/*</url-pattern>
</servlet-mapping>
</web-app>
My sage.xml (spring-ws-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:sws="http://www.springframework.org/schema/web-services"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/web-services
http://www.springframework.org/schema/web-services/web-services-2.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd ">
<!-- Here point to your interface and implementation package -->
<context:component-scan base-package="org.example.service" />
<!-- Here is the name for the web address -->
<bean id="final"
class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition"
lazy-init="true">
<property name="schemaCollection">
<bean
class="org.springframework.xml.xsd.commons.CommonsXsdSchemaCollection">
<property name="inline" value="true" />
<property name="xsds">
<list>
<!-- Here point to schemas folder of the operation service XSD!! -->
<value>schema/GovUserOperationService.xsd</value>
</list>
</property>
</bean>
</property>
<property name="portTypeName" value="GovUserServices" />
<property name="serviceName" value="GovUserService" />
<property name="locationUri" value="/endpoints" />
</bean>
<sws:interceptors>
<bean
class="org.springframework.ws.soap.server.endpoint.interceptor.SoapEnvelopeLoggingInterceptor" />
<bean id="wss4jSecurityInterceptor"
class="org.springframework.ws.soap.security.wss4j.Wss4jSecurityInterceptor">
<property name="validationCallbackHandler" ref="callbackHandler" />
<property name="validationActions" value="UsernameToken" />
</bean>
</sws:interceptors>
<bean id="callbackHandler"
class="org.springframework.ws.soap.security.wss4j.callback.SimplePasswordValidationCallbackHandler">
<property name="users">
<props>
<prop key="admin">password</prop>
</props>
</property>
</bean>
</beans>

The requested resource is not available. Spring MVC

I have 5 hello world projects that have the same error:
"description: The requested resource is not available."
I'm using jdk7, tomcat7, maven3.1.1. I always use mvn clean/package.
Here is one of this projects
/WEB-INF/dispatcher-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:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- the package is right( checked it twice) -->
<context:component-scan base-package="ua.abond.tutor.controller" />
<!-- without this tag I get "No mapping found for HTTP request with URI [/SecondSite/hello.htm] in DispatcherServlet with name 'dispatcher'" -->
<mvc:default-servlet-handler />
<!-- also tried mvc:annotation-driven and context:annotation-config tags
didnt help too-->
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/pages/" p:suffix=".jsp">
</bean>
<!-- prefix is right, if I had permission, I would have shared my root screenshot -->
</beans>
/WEB-INF/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_2_5.xsd"
version="2.5">
<display-name>SecondSite</display-name>
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.htm</url-pattern>
<!-- also tried /*, *, /dispatcher/*, /dispatcher/*.htm and / -->
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/dispatcher-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
controller
#Controller
public class Home {
String message = "Welcome to your 1st Maven Spring project !";
#RequestMapping(value = "/hello")//also tried: hello, /hello.htm ... no result
public ModelAndView showMessage() {
System.out.println("from controller");
return new ModelAndView("hello", "message", message);
}
}
and my pages
1)index.jsp
<html>
<head>
<title>Tutorial | Spring</title>
</head>
<body>
<h4>
Click Here
</h4>
</body>
</html>
2)WEB-INF/pages/hello.jsp ------ The page I cant reach
<html>
<head>
<title>Tutorial | Spring</title>
</head>
<body>
<h4>${message}</h4>
</body>
</html>
console
Jan 28, 2014 8:57:15 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: D:\Programmes\JRE7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\iis express\PHP\v5.4;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;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\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SQL ;;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files (x86)\nodejs\ ;C:\Program Files\Apache Software Foundation\apache-maven-3.1.1\bin;C:\Program Files (x86)\Java\jre7\bin;C:\Users\Alex\AppData\Roaming\npm\;.
Jan 28, 2014 8:57:15 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SecondSite' did not find a matching property.
Jan 28, 2014 8:57:15 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jan 28, 2014 8:57:15 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jan 28, 2014 8:57:15 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 475 ms
Jan 28, 2014 8:57:15 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jan 28, 2014 8:57:15 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Jan 28, 2014 8:57:16 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Jan 28, 2014 8:57:16 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jan 28, 2014 8:57:16 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
Jan 28, 2014 8:57:16 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Tue Jan 28 20:57:16 EET 2014]; root of context hierarchy
Jan 28, 2014 8:57:16 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
Jan 28, 2014 8:57:17 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
Jan 28, 2014 8:57:17 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization completed in 692 ms
Jan 28, 2014 8:57:17 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'dispatcher'
Jan 28, 2014 8:57:17 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'dispatcher': initialization started
Jan 28, 2014 8:57:17 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Tue Jan 28 20:57:17 EET 2014]; parent: Root WebApplicationContext
Jan 28, 2014 8:57:17 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
Jan 28, 2014 8:57:17 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
Jan 28, 2014 8:57:17 PM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'dispatcher': initialization completed in 178 ms
Jan 28, 2014 8:57:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jan 28, 2014 8:57:17 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jan 28, 2014 8:57:17 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2025 ms
The dispatcher servlet is only configured to handle *.htm files, so when accessing /hello it won't work.
Try this:
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Try with this,
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Put the <mvc:annotation-driven /> in spring configuration.

ClassNotFoundException with Spring 3.1 and Tomcat 7

I have found similar questions on StackOverflow, but not quite the same as mine:
I've configured a Spring bean 'ontologyClient' that is a POJO that I have imported from a library which is added to my Maven dependencies. I have checked and double checked that the produced WAR file contains the org.erasmusmc.ontology.OntologyClient class. However, when Spring wants to instantiate the bean, Tomcat's classloader throws a ClassNotFoundException. I am out of ideas, hopefully somebody can help me out!
applicationContext.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:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd">
<context:component-scan base-package="nl.lumc.conceptrecognizer" />
<context:component-scan base-package="org.nbic.interop.conceptlinker.service.impl" />
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:8080/" />
</bean>
<bean id="ontologyClient" class="org.erasmusmc.ontology.OntologyClient">
<constructor-arg index="0" value="localhost" />
<constructor-arg index="1" value="abcde"/>
<constructor-arg index="2" value="abcde" />
<constructor-arg index="3" value="Anni2_1_june2009" />
</bean>
<bean id="conceptRecognizerService"
class="nl.lumc.conceptrecognizer.services.ConceptRecognizerService"
p:ontologyClient-ref="ontologyClient"
/>
</beans>
Tomcat log:
Using CATALINA_BASE: /usr/local/apache-tomcat-7.0.22
Using CATALINA_HOME: /usr/local/apache-tomcat-7.0.22
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.22/temp
Using JRE_HOME: /usr/java/jdk1.7.0
Using CLASSPATH: /usr/local/apache-tomcat-7.0.22/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.22/bin/tomcat-juli.jar
feb 20, 2012 7:56:13 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: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
feb 20, 2012 7:56:13 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-7080"]
feb 20, 2012 7:56:13 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
feb 20, 2012 7:56:13 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 673 ms
feb 20, 2012 7:56:14 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
feb 20, 2012 7:56:14 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.22
feb 20, 2012 7:56:14 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml from /usr/local/apache-tomcat-7.0.22/conf/Catalina/localhost
feb 20, 2012 7:56:14 PM org.springframework.web.context.ContextLoader initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
feb 20, 2012 7:56:14 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Mon Feb 20 19:56:14 CET 2012]; root of context hierarchy
feb 20, 2012 7:56:14 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
feb 20, 2012 7:56:15 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#7b6d63d5: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,ontologyClient,groundhogManager,conceptProfilesGroundhog,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
feb 20, 2012 7:56:15 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons
INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#7b6d63d5: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,ontologyClient,groundhogManager,conceptProfilesGroundhog,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
feb 20, 2012 7:56:15 PM org.springframework.web.context.ContextLoader initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.erasmusmc.ontology.OntologyClient] for bean with name 'ontologyClient' defined in ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.erasmusmc.ontology.OntologyClient
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1262)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1331)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:897)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:566)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: org.erasmusmc.ontology.OntologyClient
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:417)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1283)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1254)
... 17 more
One thing to note is that the ontology dependency is a locally installed Maven artifact. However I don't see how this could be the cause, because the required Jar file is copied to WEB-INF/lib like it should.
UPDATE: It turns out that Tomcat was launching the wrong codebase. I had renamed my webapp because I started a new branch, but context.xml still pointed to the old context.
This is maybe a stupid answer, but did you remove the unzipped war before you copied the new one? Maybe the previous version of your was did not have the OntologyClient class.
I have checked and double checked that the produced WAR file contains the org.erasmusmc.ontology.OntologyClient class
Is the class inside a .jar file? if so, what is the location relative to the WAR.
Are there any other .class or .jar files inside the same directory?

Resources