I'm trying to do session replication with hazelcast in grails application as given in Hazelcast docs.
Grails version: 1.2.1
Hazelcast: 2.5.1 (Opensource edition)
I'm getting com.hazelcast.nio.HazelcastSerializationException: java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver when login.
All the domain objects that are added to session are serialized. But org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver is from spring framework. How can i serialize classes from springframework?.
Please help on configuring properly with spring and spring security in grails app.
Log when application is started:
Running Grails application..
loading security config ...
Feb 18, 2016 9:04:11 PM com.hazelcast.config.UrlXmlConfig
INFO: Configuring Hazelcast from 'jndi:/localhost/WEB-INF/hazelcast.xml'.
Feb 18, 2016 9:04:11 PM com.hazelcast.impl.AddressPicker
INFO: Prefer IPv4 stack is true.
Feb 18, 2016 9:04:11 PM com.hazelcast.impl.AddressPicker
INFO: Picked Address[192.168.43.68]:5702, using socket ServerSocket[addr=/0.0.0.0,localport=5702], bind any local is true
Feb 18, 2016 9:04:12 PM com.hazelcast.system
INFO: [192.168.43.68]:5702 [dev] Hazelcast Community Edition 2.5.1 (20130427) starting at Address[192.168.43.68]:5702
Feb 18, 2016 9:04:12 PM com.hazelcast.system
INFO: [192.168.43.68]:5702 [dev] Copyright (C) 2008-2013 Hazelcast.com
Feb 18, 2016 9:04:12 PM com.hazelcast.impl.LifecycleServiceImpl
INFO: [192.168.43.68]:5702 [dev] Address[192.168.43.68]:5702 is STARTING
Feb 18, 2016 9:04:12 PM com.hazelcast.impl.MulticastJoiner
INFO: [192.168.43.68]:5702 [dev] Connecting to master node: Address[192.168.43.68]:5701
Feb 18, 2016 9:04:12 PM com.hazelcast.nio.ConnectionManager
INFO: [192.168.43.68]:5702 [dev] 57981 accepted socket connection from /192.168.43.68:5701
Feb 18, 2016 9:04:18 PM com.hazelcast.cluster.ClusterManager
INFO: [192.168.43.68]:5702 [dev]
Members [2] {
Member [192.168.43.68]:5701
Member [192.168.43.68]:5702 this
}
Feb 18, 2016 9:04:19 PM com.hazelcast.impl.LifecycleServiceImpl
INFO: [192.168.43.68]:5702 [dev] Address[192.168.43.68]:5702 is STARTED
Server running. Browse to http://localhost:8090/
Once I logged in I'm getting HazelcastSerializationException.
Stacktrace:
Feb 18, 2016 9:04:27 PM com.hazelcast.impl.FactoryImpl
WARNING: [192.168.43.68]:5702 [dev] Destroying unknown instance name: a:my-sessions_HZ64E63E3B97D348738114474A17CA7CCE
Feb 18, 2016 9:04:27 PM com.hazelcast.impl.FactoryImpl
WARNING: [192.168.43.68]:5702 [dev] Destroying unknown instance name: a:my-sessions_HZ64E63E3B97D348738114474A17CA7CCE
[/].[default][21:04:27,561][http-8090-4] Servlet.service() for servlet default threw exception
com.hazelcast.nio.HazelcastSerializationException: java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
at com.hazelcast.nio.AbstractSerializer.toByte(AbstractSerializer.java:111)
at com.hazelcast.nio.AbstractSerializer.toByteArray(AbstractSerializer.java:139)
at com.hazelcast.nio.Serializer.writeObject(Serializer.java:56)
...
Caused by: java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
organization.ErrorController[21:04:27,754][http-8090-4] Exception in Controller; Cause=java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver, Message=org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver, forwardURI=/j_spring_security_check
org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
at java.lang.Thread.run(Thread.java:662)
Caused by: com.hazelcast.nio.HazelcastSerializationException: java.io.NotSerializableException: org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver
at com.hazelcast.nio.AbstractSerializer.toByte(AbstractSerializer.java:111)
Process finished with exit code -1
User Domain Class:
class User implements Serializable {
def authenticateService
//domain properties
boolean isAccessingOwnProfile(){
User user = authenticateService.userDomain()
if(user?.id?.toString()?.equalsIgnoreCase(id?.toString())){
return true
}else {
return false
}
}
}
With this i got
com.hazelcast.nio.HazelcastSerializationException: java.io.NotSerializableException: org.grails.plugins.springsecurity.service.AuthenticateService
So i did a quick fix by creating AuthenticateService as below
package com.example
class AuthenticateService extends org.grails.plugins.springsecurity.service.AuthenticateService implements Serializable {
}
after this i'm getting same exception in QualifierAnnotationAutowireCandidateResolver class
Config files:
/src/templates/war/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<filter>
<filter-name>hazelcast-filter</filter-name>
<filter-class>com.hazelcast.web.WebFilter</filter-class>
<init-param>
<param-name>map-name</param-name>
<param-value>my-sessions</param-value>
</init-param>
<init-param>
<param-name>config-location</param-name>
<param-value>/WEB-INF/hazelcast.xml</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>hazelcast-filter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>com.hazelcast.web.SessionListener</listener-class>
</listener>
<display-name>/#grails.project.key#</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>#grails.project.key#</param-value>
</context-param>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>org.codehaus.groovy.grails.web.sitemesh.GrailsPageFilter</filter-class>
</filter>
<filter>
<filter-name>charEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
<init-param>
<param-name>targetBeanName</param-name>
<param-value>characterEncodingFilter</param-value>
</init-param>
<init-param>
<param-name>targetFilterLifecycle</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>charEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.codehaus.groovy.grails.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener</listener-class>
</listener>
<!-- Grails dispatcher servlet -->
<servlet>
<servlet-name>grails</servlet-name>
<servlet-class>org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- The Groovy Server Pages servlet -->
<servlet>
<servlet-name>gsp</servlet-name>
<servlet-class>org.codehaus.groovy.grails.web.pages.GroovyPagesServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>gsp</servlet-name>
<url-pattern>*.gsp</url-pattern>
</servlet-mapping>
<welcome-file-list>
<!--
The order of the welcome pages is important. JBoss deployment will
break if index.gsp is first in the list.
-->
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.gsp</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://www.springframework.org/tags</taglib-uri>
<taglib-location>/WEB-INF/tld/spring.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://grails.codehaus.org/tags</taglib-uri>
<taglib-location>/WEB-INF/tld/grails.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
/WEB-INF/hazelcast.xml
<?xml version="1.0" encoding="UTF-8"?>
<hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-2.5.xsd"
xmlns="http://www.hazelcast.com/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<group>
<name>dev</name>
<password>dev-pass</password>
</group>
<network>
<port auto-increment="true">5701</port>
<join>
<multicast enabled="true">
<multicast-group>224.2.2.3</multicast-group>
<multicast-port>54327</multicast-port>
</multicast>
<tcp-ip enabled="false">
<interface>127.0.0.1</interface>
</tcp-ip>
<aws enabled="false">
<access-key>my-access-key</access-key>
<secret-key>my-secret-key</secret-key>
<!--optional, default is us-east-1 -->
<region>us-west-1</region>
<!-- optional, only instances belonging to this group will be discovered, default will try all running instances -->
<security-group-name>hazelcast-sg</security-group-name>
<tag-key>type</tag-key>
<tag-value>hz-nodes</tag-value>
</aws>
</join>
<interfaces enabled="false">
<interface>10.10.1.*</interface>
</interfaces>
<ssl enabled="false" />
<socket-interceptor enabled="false" />
<symmetric-encryption enabled="false">
<algorithm>PBEWithMD5AndDES</algorithm>
<!-- salt value to use when generating the secret key -->
<salt>thesalt</salt>
<!-- pass phrase to use when generating the secret key -->
<password>thepass</password>
<!-- iteration count to use when generating the secret key -->
<iteration-count>19</iteration-count>
</symmetric-encryption>
<asymmetric-encryption enabled="false">
<!-- encryption algorithm -->
<algorithm>RSA/NONE/PKCS1PADDING</algorithm>
<!-- private key password -->
<keyPassword>thekeypass</keyPassword>
<!-- private key alias -->
<keyAlias>local</keyAlias>
<!-- key store type -->
<storeType>JKS</storeType>
<!-- key store password -->
<storePassword>thestorepass</storePassword>
<!-- path to the key store -->
<storePath>keystore</storePath>
</asymmetric-encryption>
</network>
<partition-group enabled="false"/>
<management-center enabled="false" update-interval="3" >http://localhost:9999</management-center>
<executor-service>
<core-pool-size>16</core-pool-size>
<max-pool-size>64</max-pool-size>
<keep-alive-seconds>60</keep-alive-seconds>
</executor-service>
<queue name="default">
<max-size-per-jvm>0</max-size-per-jvm>
<backing-map-ref>default</backing-map-ref>
</queue>
<map name="default">
<backup-count>1</backup-count>
<time-to-live-seconds>0</time-to-live-seconds>
<max-idle-seconds>0</max-idle-seconds>
<eviction-policy>NONE</eviction-policy>
<max-size policy="cluster_wide_map_size">0</max-size>
<eviction-percentage>25</eviction-percentage>
<merge-policy>hz.ADD_NEW_ENTRY</merge-policy>
</map>
</hazelcast>
The exception is because of injecting service in domain class that implements Serializable interface.
I removed service injection in Domain class and tried logged in.
User domain class after removing dependency injection
class User implements Serializable {
// Removed authenticateService injection
//def authenticateService
//domain properties
/*boolean isAccessingOwnProfile(){
User user = authenticateService.userDomain()
if(user?.id?.toString()?.equalsIgnoreCase(id?.toString())){
return true
}else {
return false
}
}*/
}
and also removed custom AuthenticateService, that implements Serializable.
Now i can login to 1 instance and the session was replicated remaining instances.
Related
Frustrated, i am posting this question. I am sure I have surfed enough to know that the proper answer is not discussed so far. But if the case is the contrary, please accept my Apologies and share with me the apt forum link.
I am testing the concepts of SSE broadcast using Jersey SSE API.
I am not using Maven or anything. Because the pet project i am working on, was started way before i became familiar with Maven, hence i manually add Jar files to the Web-Inf lib folder
I have the following relevant jars-
2/28/2016 06:58 PM 85,147 javax.json-1.0.4.jar
12/28/2016 06:58 PM 85,353 javax.servlet-api-3.0.1.jar
12/28/2016 06:58 PM 115,534 javax.ws.rs-api-2.0.1.jar
12/28/2016 06:58 PM 100,146 jaxb-api-2.2.7.jar
12/28/2016 06:58 PM 117,090 jersey-client-2.2.jar
12/28/2016 06:58 PM 600,514 jersey-common-2.2.jar
12/28/2016 06:58 PM 52,819 jersey-container-servlet-core-2.2.jar
12/28/2016 06:58 PM 18,107 jersey-container-servlet.jar
12/28/2016 06:58 PM 971,310 jersey-guava-2.24.1.jar
12/28/2016 06:58 PM 30,495 jersey-media-sse.jar
12/28/2016 06:58 PM 801,094 jersey-server-2.2.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_3_0.xsd"
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>SDTP-SS-UK-ERP</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
<async-supported>true</async-supported>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/struts/*</url-pattern>
</filter-mapping>
<!-- Jersey Support Configuration for RestFul WebServices -->
<servlet>
<servlet-name>jersey-serlvet</servlet-name>
<!-- <servlet-name>jersey-servlet</servlet-name> -->
<servlet-class>
org.glassfish.jersey.servlet.ServletContainer
</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>com.rest.services,com.sse.services</param-value>
</init-param>
<!--
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
-->
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>jersey-serlvet</servlet-name>
<!-- <servlet-name>jersey-servlet</servlet-name> -->
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
My Test SSE registration file. I use this to register for the SSE:
#Singleton
#Path("/sse")
public class SseTest extends ResourceConfig
{
public SseTest() {
super(SseTest.class, SseFeature.class);
}
public SseBroadcaster BROADCASTER = new SseBroadcaster();
#GET
#Path("/getSSE")
#Produces(SseFeature.SERVER_SENT_EVENTS)
public EventOutput getMessageQueue()
{
EventOutput eventOutput = new EventOutput();
this.BROADCASTER.add(eventOutput);
System.out.println(eventOutput.toString());
return eventOutput;
}
//After this is registered, i trigger broadcast via another service-
#GET
#Path("/test2/{id}")
#Produces(MediaType.TEXT_PLAIN)
//#Consumes(MediaType.TEXT_PLAIN)
public String addMessage(#PathParam("id") final String msg) throws IOException
{
String misg= msg+"\\n\\n";
OutboundEvent.Builder eventBuilder = new OutboundEvent.Builder();
OutboundEvent event = eventBuilder.mediaType(MediaType.TEXT_PLAIN_TYPE).data(String.class, misg).build();
System.out.println(event.getData());
BROADCASTER.broadcast(event);
return "Message '" + msg + "' has been broadcast.";
}
Now i will share what happens in Chrome, or firefox:
When i am calling the service getSSE, the browser is registering event-stream and even there is a tab eventStream in the network details with a blank table- id, type, data.
When i call the service /test2/10, it shows 200 OK for that and the response is displayed in the browser.
In the getSSE tab, the first getSSE shows as complete and another getSSE comes up as pending.
But the eventsource data is still zero.
After calling test2 twice here is the result:
getSSE 200 eventsource sse.html:-Infinity 149 B 35.41 s
getSSE 200 eventsource Other 149 B 11.0 min
getSSE 200 eventsource Other 144 B Pending
Can someone please point out why i am not getting data? I am not getting any runtime errors in Server End Java.
The server is Tomcat 7.0.69
Java is JDK 1.7
Please help me make this work.. I am losing sleep out of curiosity where i am going wrong
Issue solved
Problem with Library versions
So my head really hurts - I have read about Role/Purpose of ContextLoaderListener in Spring and I cannot go one step further.
I have a really old project and I'm upgrading it. So far I've managed to bring it from spring 2.x to spring 4.x and from Java 7 to Java 8, but I stuck on running application on tomcat 8. It loades ContextLoaderListener twice!? On tomcat 7 starts without problem.
Tomcat 7: apache-tomcat-7.0.29
Tomcat 8: apache-tomcat-8.5.11
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>VERSION-1.7.1</display-name>
<context-param>
<param-name>listenPort_http</param-name>
<param-value>80</param-value>
</context-param>
<context-param>
<param-name>listenPort_https</param-name>
<param-value>8443</param-value>
</context-param>
<context-param>
<param-name>daoType</param-name>
<param-value>ibatis</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>ApplicationResources</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
<param-value>en</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:META-INF/applicationContext-*.xml
/WEB-INF/applicationContext-*.xml
</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>
/WEB-INF/faces-specification-config.xml,
/WEB-INF/faces-operating-config.xml,
/WEB-INF/faces-popup-config.xml,
/WEB-INF/faces-mabr-config.xml
</param-value>
<description></description>
</context-param>
<filter>
<filter-name>clickstreamFilter</filter-name>
<filter-class>com.opensymphony.clickstream.ClickstreamFilter</filter-class>
</filter>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>rewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
<filter-name>exportFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter-class>
</filter>
<filter>
<filter-name>uploadExtensionsFilter</filter-name>
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<param-name>uploadMaxFileSize</param-name>
<param-value>10m</param-value>
</init-param>
<init-param>
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
</filter>
<filter>
<filter-name>compressionFilter</filter-name>
<display-name>Compression Filter</display-name>
<filter-class>org.opendls.webapp.filter.GZIPFilter</filter-class>
</filter>
<filter>
<filter-name>mySecurityFilter</filter-name>
<display-name>Security Filter</display-name>
<filter-class>org.opendls.webapp.filter.MySecurityFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>mySecurityFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>mySecurityFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>clickstreamFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>exportFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>compressionFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>uploadExtensionsFilter</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.opensymphony.clickstream.ClickstreamListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener>
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<listener>
<listener-class>org.opendls.webapp.listener.StartupListener</listener-class>
</listener>
<listener>
<listener-class>org.opendls.webapp.listener.SessionListener</listener-class>
</listener>
<listener>
<listener-class>org.opendls.webapp.listener.ShutdownListener</listener-class>
</listener>
<listener>
<listener-class>org.opendls.webapp.listener.UserCounterListener</listener-class>
</listener>
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>wsit-jaxws-fromjava</servlet-name>
<display-name>wsit-jaxws-fromjava</display-name>
<description>JAX-WS endpoint - fromjava</description>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>wsit-jaxws-fromjava</servlet-name>
<url-pattern>/webservices/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>1440</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
<error-page>
<error-code>400</error-code>
<location>/index.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/403.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/viewExpired.jsp</location>
</error-page>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/primary</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/secondary</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
StartupListener.java
public class StartupListener extends ContextLoaderListener
implements ServletContextListener {
private static final Log log = LogFactory.getLog(StartupListener.class);
public void contextInitialized(ServletContextEvent event) {
if (log.isDebugEnabled()) {
log.debug("initializing context...");
}
super.contextInitialized(event);
ServletContext context = event.getServletContext();
String daoType = context.getInitParameter(Constants.DAO_TYPE);
// if daoType is not specified, use DAO as default
if (daoType == null) {
log.warn("No 'daoType' context carameter, using hibernate");
daoType = Constants.DAO_TYPE_HIBERNATE;
}
// Orion starts Servlets before Listeners, so check if the config
// object already exists
Map config = (HashMap) context.getAttribute(Constants.CONFIG);
if (config == null) {
config = new HashMap();
}
// Create a config object to hold all the app config values
config.put(Constants.DAO_TYPE, daoType);
context.setAttribute(Constants.CONFIG, config);
// output the retrieved values for the Init and Context Parameters
if (log.isDebugEnabled()) {
log.debug("daoType: " + daoType);
log.debug("populating ...");
}
setupContext(context);
}
public static void setupContext(ServletContext context) {
ApplicationContext appContext = WebApplicationContextUtils.getRequiredWebApplicationContext(context);
RightsManager rightsManager = (RightsManager) appContext.getBean("rightsManager");
context.setAttribute(Constants.AVAILABLE_ROLES, rightsManager.getAllRights());
if (log.isDebugEnabled()) {
log.debug("initialization complete [OK]");
}
}
}
I have tried many things on web.xml and StartupListener.java but I couldn't manage to load ContextLoaderListener only once. I am getting the same error over and over again:
Error:
27-Jan-2017 02:25:29.217 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
27-Jan-2017 02:25:30.071 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
27-Jan-2017 02:25:33.060 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.opendls.webapp.listener.StartupListener
java.lang.IllegalStateException: Cannot initialize context because there is already a root application context present - check whether you have multiple ContextLoader* definitions in your web.xml!
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:297)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.opendls.webapp.listener.StartupListener.contextInitialized(StartupListener.java:48)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4725)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:952)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1823)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
27-Jan-2017 02:25:33.071 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
27-Jan-2017 02:25:33.075 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext
27-Jan-2017 02:25:33.405 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log ContextListener: contextInitialized()
27-Jan-2017 02:25:33.407 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log SessionListener: contextInitialized()
where is the problem?
ok - the problem is resolved
as M.Denim mentioned there were some duplicate listeners which was triggering the same ApplicationContext to load.
There was .tld file in WEB-INF which was containing the same listeners which was in web.xml, the file was created by ant task. A new implementation of Tomcat 8.x read them as noPluggabilityListeners and load was triggered second time.
I looked at everypost related with this problem and tried nearly all of them. I'm getting this error. I also have created an empty Spring Maven MVC project and duplicated view and controller and named them as example.jsp and ExampleController.java etc. Shortly, I can not get any respond from Tomcat. I do not know it has anything to do with it but I' also getting and error at the beginning of Console log.
Thanks in advance...
Console log beginning warning (I do not know it has an affect on this problem):
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpitterSpring' did not find a matching property.
Here is my actual part of error:
Tem 11, 2014 4:55:32 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFO: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
Tem 11, 2014 4:55:32 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'appServlet': initialization completed in 885 ms
Tem 11, 2014 4:55:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Tem 11, 2014 4:55:32 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Tem 11, 2014 4:55:32 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 9260 ms
Tem 11, 2014 4:55:34 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/spitter/] in DispatcherServlet with name 'appServlet'
Tem 11, 2014 4:55:39 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/spitter/spitter/deneme] in DispatcherServlet with name 'appServlet'
Tem 11, 2014 4:55:45 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/spitter/deneme] in DispatcherServlet with name 'appServlet'
Tem 11, 2014 4:55:52 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/spitter/deneme] in DispatcherServlet with name 'appServlet'
Here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">
<!-- The definition of the Root Spring Container shared by all Servlets
and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/application-config.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</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>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
Here is my servlet-context.xml file
<?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: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/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 />
<context:component-scan base-package="com.ex.spitter.mvc" />
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->
<resources mapping="/resources/**" location="/resources/" />
<!-- Resolves views selected for rendering by #Controllers to .jsp resources in the /WEB-INF/views directory -->
<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>
</beans:beans>
Here is my com.ex.spitter.mvc -> HomeController:
package com.ex.spitter.mvc;
import java.util.Map;
import javax.inject.Inject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.ex.spitter.service.SpitterService;
#Controller
public class HomeController {
private SpitterService spitterService;
#Inject
public HomeController(SpitterService spitterService) {
this.spitterService = spitterService;
}
#RequestMapping(value = { "/", "/home" }, method = RequestMethod.GET)
public String showHomePage(Map<String, Object> model) {
model.put("spittles", spitterService.getRecentSpittles(spittlesPerPage));
return "home";
}
// <start id="spittlesPerPage"/>
public static final int DEFAULT_SPITTLES_PER_PAGE = 25;
private int spittlesPerPage = DEFAULT_SPITTLES_PER_PAGE;
public void setSpittlesPerPage(int spittlesPerPage) {
this.spittlesPerPage = spittlesPerPage;
}
public int getSpittlesPerPage() {
return spittlesPerPage;
}
// <end id="spittlesPerPage"/>
}
The problem was not solved but I changed my workspace and try to do it copy the codes. Besides, I will try to use a different version of Tomcat or install a Jboss
I am development success and failure handlers in Spring Security.
Depends device type I must show one html view or send one json response. To this purpose I use Spring Mobile, but when I create Device object with HtttpServletRequest not found. Some idea?
web.xml
<filter>
<filter-name>deviceResolverRequestFilter</filter-name>
<filter-class>org.springframework.mobile.device.DeviceResolverRequestFilter</filter-class>
</filter>
ApplicationContext.xml
<mvc:annotation-driven>
<mvc:argument-resolvers>
<bean class="org.springframework.mobile.device.DeviceWebArgumentResolver" />
</mvc:argument-resolvers>
</mvc:annotation-driven>
Class
public class AuthFailureHandler implements AuthenticationFailureHandler{
#Override
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException ae) throws IOException, ServletException {
Device device = DeviceUtils.getCurrentDevice(request);
if(device.isNormal()){
response.sendRedirect(response.encodeRedirectURL("./userNoAuth"));
} else {
response.sendRedirect(response.encodeRedirectURL("./rest/userNoAuth"));
}
}
}
Error
java.lang.NullPointerException at com.myapp.security.handler.AuthFailureHandler.onAuthenticationFailure(AuthFailureHandler.java:19)
UPDATE:
I am change .getCurrentDevice(HttpServletRequest) method to getRequiredCurrentDevice(HttpServletRequest).
Now I get this error.
java.lang.IllegalStateException: No currenet device is set in this request and one is required - have you configured a DeviceResolvingHandlerInterceptor?
Verify your web.xml contains a filter-mapping for the deviceResolverRequestFilter. The following is a working example from the Spring Mobile Samples repository. Hope that helps!
https://github.com/SpringSource/spring-mobile-samples/tree/master/lite-device-resolver-xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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">
<!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Use the DeviceResolverRequestFilter OR the DeviceResolverHandlerInterceptor in the servlet-context.xml -->
<filter>
<filter-name>deviceResolverRequestFilter</filter-name>
<filter-class>org.springframework.mobile.device.DeviceResolverRequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>deviceResolverRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Processes application requests -->
<servlet>
<servlet-name>appServlet</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>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
</web-app>
I am trying to activate one set of properties files for one Spring profile and another set for another Spring profile as follows:
<beans profile="cloud">
<context:property-placeholder location="classpath*:META-INF/spring/cloud/*.properties" />
</beans>
<beans profile="default">
<context:property-placeholder location="classpath*:META-INF/spring/default/*.properties" />
</beans>
I have the corresponding and appropriate directory structure in my src/main/resources folder.
I have a simple #Value("${application.url}") in one of my services and I systematically get the following error:
Error creating bean with name 'mailerServiceImpl': Injection of
autowired dependencies failed; nested exception is
org.springframework.beans.factory.Be anCreationException: Could not
autowire field: private java.lang.String
com.kadjoukor.service.MailerServiceImpl.websiteContext; nested
exception is java.lang.IllegalArgumentException: Could not resolve
placeholder 'application.url' in string value "${application.url}"
Note that I have tried adding a spring.profiles.active init-param to my web.xml. It doesn't make any difference...
I am not sure what I am getting wrong. Can anyone please provide advice?
EDIT 1: Could it matter that the above snippets of configuration are located at the bottom of the configuration file?
EDIT 2: Here is the output of my web.xml:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="true">
<display-name>kadjoukor</display-name>
<description>Roo generated kadjoukor application</description>
<!-- Enable escaping of form submission contents -->
<context-param>
<param-name>defaultHtmlEscape</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:META-INF/spring/applicationContext*.xml classpath:META-INF/cloud/cloudfoundry-auto-reconfiguration-context.xml</param-value></context-param>
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>HttpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>HttpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Creates the Spring Container shared by all Servlets and Filters -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.security.web.session.HttpSessionEventPublisher
</listener-class>
</listener>
<!-- Handles Spring requests -->
<servlet>
<servlet-name>kadjoukor</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/spring/webmvc-config.xml classpath:META-INF/cloud/cloudfoundry-auto-reconfiguration-context.xml</param-value></init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>kadjoukor</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout><!-- TODO -->
</session-config>
<context-param><param-name>contextInitializerClasses</param-name><param-value>org.cloudfoundry.reconfiguration.spring.CloudApplicationContextInitializer</param-value></context-param></web-app>
and here is the contents of the WEB-INF/libs directory:
activation-1.1.1.jar 67.8K
antlr-2.7.6.jar 433.0K
aopalliance-1.0.jar 4.4K
asm-3.3.1.jar 42.6K
aspectjrt-1.7.0.RC1.jar 113.5K
aspectjweaver-1.7.0.RC1.jar 1.7M
auto-reconfiguration-0.6.5.jar 693.3K
cglib-2.2.2.jar 280.5K
cglib-nodep-2.2.2.jar 319.3K
commons-beanutils-1.8.3.jar 226.6K
commons-codec-1.5.jar 71.4K
commons-collections-3.2.1.jar 561.9K
commons-dbcp-1.3.jar 145.3K
commons-digester-2.1.jar 192.2K
commons-fileupload-1.2.2.jar 58.2K
commons-io-2.1.jar 159.3K
commons-lang3-3.1.jar 308.4K
commons-logging-1.0.4.jar 37.1K
commons-pool-1.5.6.jar 98.1K
dom4j-1.6.1.jar 306.5K
ehcache-core-2.6.0.jar 1.3M
flexjson-2.1.jar 79.2K
guava-11.0.2.jar 1.6M
hamcrest-core-1.1.jar 74.8K
hibernate-commons-annotations-3.2.0.Final.jar 69.6K
hibernate-core-3.6.9.Final.jar 3.0M
hibernate-entitymanager-3.6.9.Final.jar 416.3K
hibernate-jpa-2.0-api-1.0.1.Final.jar 100.3K
hibernate-validator-4.2.0.Final.jar 358.0K
httpclient-4.1.2.jar 344.0K
httpcore-4.1.2.jar 177.0K
imgscalr-lib-4.2.jar 27.2K
jackson-core-asl-1.9.9.jar 226.7K
jackson-mapper-asl-1.9.9.jar 762.0K
java-xmlbuilder-0.4.jar 18.1K
javassist-3.12.0.GA.jar 618.5K
javassist-3.16.1-GA.jar 643.9K
javax.inject-1.jar 2.4K
jcl-over-slf4j-1.6.4.jar 16.9K
jets3t-0.9.0.jar 527.1K
jmimemagic-0.1.2.jar 44.5K
joda-time-2.1.jar 557.1K
jsr305-1.3.9.jar 32.2K
jstl-api-1.2.jar 29.8K
jstl-impl-1.2.jar 382.8K
jta-1.1.jar 14.7K
junit-dep-4.8.2.jar 213.2K
log4j-1.2.16.jar 470.2K
mail-1.4.3.jar 451.3K
mysema-commons-lang-0.2.4.jar 11.8K
mysql-connector-java-5.1.18.jar 771.4K
ognl-3.0.5.jar 222.5K
oro-2.0.8.jar 63.7K
prettytime-1.0.8.Final.jar 65.4K
querydsl-core-2.9.0.jar 367.3K
querydsl-jpa-2.9.0.jar 93.3K
slf4j-api-1.6.4.jar 25.4K
slf4j-log4j12-1.6.4.jar 9.5K
spring-aop-3.2.0.RELEASE.jar 327.0K
spring-aspects-3.2.0.RELEASE.jar 68.2K
spring-beans-3.2.0.RELEASE.jar 590.6K
spring-context-3.2.0.RELEASE.jar 834.0K
spring-context-support-3.2.0.RELEASE.jar 124.1K
spring-core-3.2.0.RELEASE.jar 842.8K
spring-data-commons-core-1.3.0.RELEASE.jar 215.0K
spring-data-jpa-1.1.0.RELEASE.jar 129.8K
spring-expression-3.2.0.RELEASE.jar 189.2K
spring-jdbc-3.2.0.RELEASE.jar 391.6K
spring-js-resources-2.2.1.RELEASE.jar 4.3M
spring-orm-3.2.0.RELEASE.jar 383.0K
spring-security-acl-3.1.2.RELEASE.jar 77.7K
spring-security-config-3.1.2.RELEASE.jar 198.9K
spring-security-core-3.1.2.RELEASE.jar 332.1K
spring-security-taglibs-3.1.2.RELEASE.jar 20.3K
spring-security-web-3.1.2.RELEASE.jar 245.2K
spring-social-core-1.0.2.RELEASE.jar 113.7K
spring-social-facebook-1.0.2.RELEASE.jar 117.2K
spring-social-web-1.0.2.RELEASE.jar 18.0K
spring-tx-3.2.0.RELEASE.jar 235.3K
spring-web-3.2.0.RELEASE.jar 609.7K
spring-webmvc-3.2.0.RELEASE.jar 621.0K
thymeleaf-2.0.14.jar 677.9K
thymeleaf-extras-tiles2-1.0.0-beta3-SNAPSHOT.jar 46.7K
thymeleaf-spring3-2.0.14.jar 161.9K
tiles-api-2.2.2.jar 35.1K
tiles-core-2.2.2.jar 157.2K
tiles-jsp-2.2.2.jar 49.6K
tiles-servlet-2.2.2.jar 58.3K
tiles-template-2.2.2.jar 23.9K
validation-api-1.0.0.GA.jar 46.3K
xercesImpl-2.7.1.jar 1.1M
xml-apis-1.0.b2.jar 106.8K
xmlParserAPIs-2.0.2.jar 76.6K
Base on the https://cloudfoundry.atlassian.net/browse/CF-132 bug, in order to have the cloud profile work, you would need a ContextLoaderInitializer. So I would suggest you to create a context file, even leave it empty if you have to, to make the cloud profile work.