[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Messages posted by: tanmoy  XML
Profile for tanmoy -> Messages posted by tanmoy [8]
Author Message
i have a single stripe terracotta cluster with 2 tomcats registered as clients. These 2 tomcat instances are load balanced without sticky sessions.

Now, when I hit the application home page for the first time, a jsession is created, and the dev console shows it. However, along with this, a no of session hops happen too, and also when i press refresh, it hops a number of sessions again. For example, session hops were 56, as i press F5, the number increases to 61.

let me know what it means, why session is changing application servers so many times?
I am getting an error when i deploy an ehcache configuration to implement a write-through. I guess i am missing some configuration, and would appreciate help in this.

this is my ehcache.xml

Code:
<?xml version="1.0" encoding="UTF-8"?>
 <ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:noNamespaceSchemaLocation="ehcache.xsd">
 	
 
 	<defaultCache maxElementsInMemory="500" eternal="true"
 		memoryStoreEvictionPolicy="LFU" />
 
 	<cache name="ProductRepositoryCache" maxElementsInMemory="10000"
 		eternal="false" />
 
 
 	<cache name="CustomerRepositoryCache" maxElementsInMemory="10000"
 		eternal="false">
 		<cacheWriter writeMode="write-through"
 			notifyListenersOnException="false">
 			<cacheWriterFactory
 				class="com.company.customer.cache.CustomerQueueWriterFactory" />
 		</cacheWriter>
 	</cache>
 </ehcache>
 


I am getting this error when i try to deploy the application:

Code:
Caused by: net.sf.ehcache.CacheException: Error configuring from input stream. Initial cause was null:21: Element <cache> does not allow nested <cacheWriter> elements.
 	at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:157)
 	at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:101)
 	... 86 more
 Caused by: org.xml.sax.SAXException: null:21: Element <cache> does not allow nested <cacheWriter> elements.
 	at net.sf.ehcache.config.BeanHandler.createChild(BeanHandler.java:121)
 	at net.sf.ehcache.config.BeanHandler.startElement(BeanHandler.java:73)
 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
 	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
 	at javax.xml.parsers.SAXParser.parse(Unknown Source)
 	at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:155)
 	... 87 more


Thanks in advance !
just to provide some explanation, i am instrumenting the spring security classes since i am usng spr-security-3.0.5 and even after giving the tim-spring-security module, i was getting NonPortable exception.
Hi,

I have a sample application where i was trying to have a webflow configured for clustering. I have 2 tomcat clients to a tc server array whose configuration is provided below:

Code:
 <tc:tc-config xmlns:tc="http://www.terracotta.org/config"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-5.xsd">
 
 	
 	
 
 	<servers>
 		<!-- Shows where the Terracotta server can be found. -->
 		<server host="localhost">
 			<data>%(user.home)/terracotta/server-data</data>
 			<logs>%(user.home)/terracotta/server-logs</logs>
 		
 		<dso>
                 <client-reconnect-window>100</client-reconnect-window>
                 <persistence>
                     <mode>permanent-store</mode>
                 </persistence>
 				
                 <garbage-collection>
                     <enabled>true</enabled>
                     <verbose>true</verbose>
                     <interval>1800</interval>
                 </garbage-collection>
             </dso>
 		</server>
 		
 	</servers>
 	<!-- Shows where to put the generated client logs -->
 	<clients>
 		<logs>%(user.home)/terracotta/client-logs</logs>
 
 		<!--
 			Names the Terracotta Integration Modules (TIM) needed for clustering
 			specific technologies.
 		-->
 		<modules>
 			<module name="tim-tomcat-6.0" version="2.2.0" />
 			 <module name="tim-spring-security-2.0" version="1.4.0"/>
 			<module name="tim-spring-webflow-2.0" version="1.4.0"/>
 		</modules>
 	</clients>
 
 	<application>
 		<dso>
 			<additional-boot-jar-classes>
 				<include>java.util.Locale</include>
 				<include>java.lang.String$CaseInsensitiveComparator</include>
 			</additional-boot-jar-classes>
 
 			<instrumented-classes>
 				<!-- spr-security -->
 				<include>
 					<class-expression>org.springframework.security.core.context.SecurityContextImpl
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.web.savedrequest.DefaultSavedRequest
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.web.savedrequest.SavedCookie
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.authentication.UsernamePasswordAuthenticationToken
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.authentication.AbstractAuthenticationToken
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.core.userdetails.User
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.web.authentication.WebAuthenticationDetails
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.core.authority.GrantedAuthorityImpl
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.authentication.AuthenticationServiceException
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.core.AuthenticationException
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.core.userdetails.User$AuthorityComparator
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>org.springframework.security.authentication.BadCredentialsException
 					</class-expression>
 				</include>
 
 				<!--for web-flow-->
 				<include>
 					<class-expression>com.company.terracotta.poc.domain.Response
 					</class-expression>
 				</include>
 				<include>
 					<class-expression>com.company.terracotta.poc.flows.SurveyAction
 					</class-expression>
 				</include>
 
 			</instrumented-classes>
 			<web-applications>
 				<web-application>jvm-clustering-1.0.0</web-application>
 			</web-applications>
 		</dso>
 	</application>
 
 
 </tc:tc-config>


When i run this in the two clients running at port 7075 and 7075, the sessions hop as expected. However, as the screenshot shows,a separate conversation gets created in the webfloe conversationContainer.

On the other hand, in the examinator reference application, the conversation is not duplicatd. Even the object map given in the devloper console differs.

Please let me know if and where I am going wrong.
Hi,

I have a spring webflow application for an exam (similar to the examinator application). now, i need to have the responses shared across the server array.

Terracotta troubleshoot is asking me to instument a lot of classes. My question is, is manually inserting <include><class-expression/></include> one by one the only way of doing this?

Code:
 <include>
            <class-expression>org.springframework.webflow.conversation.impl.ConversationContainer</class-expression>
          </include>
 		 <include>
            <class-expression>org.springframework.webflow.conversation.impl.ContainedConversation</class-expression>
          </include>
 		  <include>
            <class-expression>org.springframework.webflow.conversation.impl.SimpleConversationId</class-expression>
          </include>
          <include>
            <class-expression>org.springframework.webflow.conversation.ConversationId</class-expression>
          </include>
 		  <include>
            <class-expression>org.springframework.webflow.conversation.impl.JdkConcurrentConversationLock</class-expression>
          </include>
 		  <include>
            <class-expression>org.springframework.webflow.execution.repository.impl.SimpleFlowExecutionSnapshotGroup</class-expression>
          </include>
 		  <include>
            <class-expression>org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot</class-expression>
          </include>
          <include>
            <class-expression>org.springframework.webflow.execution.repository.snapshot.FlowExecutionSnapshot</class-expression>
          </include>
 		 <include>
            <class-expression>org.springframework.webflow.core.collection.LocalAttributeMap</class-expression>
          </include>
 		  <include>
            <class-expression>org.springframework.binding.collection.MapAccessor</class-expression>
          </include>

As per http://svn.terracotta.org/svn/forge terracotta-forge, i went ahead and checked out the sessions-configurator project , however a mvn package throws an exception as it is unable to find the parent forge-parent.

On looking into the pom, the version of forge-parent pom is 1.0.18-SNAPSHOT while there are no such tags in the repository.

Similarly, dependencies for tim-apache-struts-1.5.1-SNAPSHOT and configurator-1.0.0-SNAPSHOT are not being resolved.

Please provide me necessary steps to get the sessions-configurator
yes, examinator is the only clustered application in each of my 5 tomcat clients. I thought to raise this as this behavior is not consistent and was not able to reproduce it consistently. Is this fixed in the next GA?

Also, i see that tomcat_5_5.SessionValve55... is wired (stack trace) when i have put TerracottaTomcat60xSessionValve in the context.xml. Is this expected?


I am using tomcat 6.0.20 and terracotta 3.3 and am trying to have the reference application (examinator) deployed in 5 tomcat clients.

The issue is that i am facing an inconsistent behavior when i am trying to access the application home page / tomcat manager. It gives the following assertion error:

Code:
 SEVERE: An exception or error occurred in the container during the request proce
 ssing
 com.tc.util.TCAssertionError: Assertion failed: The SRA com.terracotta.session.s
 ra.SRAHttpSessions@19a8cd8a is registering a non-unique name 'http sessions'.
         at com.tc.util.Assert.failure(Assert.java:60)
         at com.tc.util.Assert.eval(Assert.java:80)
         at com.tc.util.Assert.assertFalse(Assert.java:120)
         at com.tc.statistics.retrieval.impl.StatisticsRetrievalRegistryImpl.regi
 sterActionInstance(StatisticsRetrievalRegistryImpl.java:46)
         at com.tc.object.bytecode.ManagerImpl.registerStatisticRetrievalAction(M
 anagerImpl.java:680)
         at com.tc.object.bytecode.ManagerUtil.registerStatisticRetrievalAction(M
 anagerUtil.java:140)
         at com.terracotta.session.TerracottaSessionManager.registerSessionMonito
 rAndSRA(TerracottaSessionManager.java:270)
         at com.terracotta.session.TerracottaSessionManager.<init>(TerracottaSess
 ionManager.java:111)
         at com.terracotta.session.TerracottaSessionManager.<init>(TerracottaSess
 ionManager.java:70)
         at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.createManager
 (SessionValve55.java:139)
         at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.findOrCreateM
 anager(SessionValve55.java:110)
         at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.tcInvoke(Sess
 ionValve55.java:86)
         at org.terracotta.modules.tomcat.tomcat_5_5.SessionValve55.invoke(Sessio
 nValve55.java:79)
         at org.terracotta.session.ModernTomcatSessionValve.invoke(ModernTomcatSe
 ssionValve.java:65)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
 ava:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
 ava:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
 ve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
 a:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
 :844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
 ss(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
 7)
         at java.lang.Thread.run(Thread.java:619)
 


This is a bug, as per the forum response at http://forums.terracotta.org/forums/posts/list/4113.page but wanted to know if there is any workaround to solve this. Also, if any information about the timeline when the next GA release is expected, as using a nightly snapshot may not be an option.
 
Profile for tanmoy -> Messages posted by tanmoy [8]
Go to:   
Powered by JForum 2.1.7 © JForum Team