cancel
Showing results for 
Search instead for 
Did you mean: 

[Resolved]: Missing ticket error

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi All

I am able to upload and download files in Alfresco.
I open two browser window and I upload two diffrent different file in different different folder in Alfresco at the same time.
I am using "admin" username & password combination for both browser.
Then upload operation works for one browser only.
This problem I am facing for download also.
Question 1 : Does it mean , Alfresco creates one session per user.

Question 2 : If i create two user in Alfresco and repeat the same upload operation for two browsers at the same time.
                        Will it work?


Thanks in advance. Kindly help me.

Regards
Nishant
14 REPLIES 14

mrogers
Star Contributor
Star Contributor
The rule of thumb would be one session per user but a user could have more than one session, for example if running two completly separate browsers on different machines.

Browsers will typically share the same session between all their windows.   You need to be careful to distinguish beween different instances of your browser and different windows within the same browser.  

When I'm investigating concurrency issues I use a trick of using firefox for one user and ie for the other user which makes session based issues crystal clear.

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi mrogers

Thanks for the response.
I have checked on different machines also. But problem is still there.

Regards
Nishant

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi

We can create n number of session for the same user (for eg., user "admin", password "admin").I am using webservices 2.1 .

As per the requirement of my application, we don't want to maintain alfresco session.
We just open the session using admin username & password combination and upload/download the files and close the session.
Any suggestion for my application is highly appriciated.

I am starting and ending new session for each upload and download functionality.


As I read one of interesting post (http://forums.alfresco.com/en/viewtopic.php?f=27&t=10524&p=34741&hilit=ticket+missing#p34741) in forum, in that post stevewickii tells "Keep in mind that AuthenticationUtils.startSession() caches the ticket number in a threadLocal, and doesn't check for existing sessions, so calling startSession() twice in the same thread will overwrite the ticket, and the second call to endSession() will result in an error because the first ticket is lost." Is it correct? If it is correct then how to resolve this?

Actualy I am also using AuthenticationUtils.startSession(). there is another way to create a session
like the following–
AuthenticationServiceSoapBindingStub authenticateService =WebServiceFactory.getAuthenticationService();
AuthenticationResult authenticate =authenticateService.startSession("admin", "admin");
Could anybuddy tell what is the difference b/w these two type of session. Is authenticateService.startSession() method works like AuthenticationUtils.startSession() method.



When i upload files in different folders from different machines simultaneously, I am getting the following Missing ticket error—


2009-01-31 09:39:44,254 ERROR [STDERR] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
faultSubcode:
faultString:
faultActor:
faultNode:
faultDetail:
   {http://www.alfresco.org/ws/service/authentication/1.0}AuthenticationFault:<ns1:errorCode>0</ns1:errorCode><ns1:message>Missing ticket for TICKET_4fd3050df3afd2ddfa790a0caf157d322660e230</ns1:message>
   {http://xml.apache.org/axis/}exceptionNameSmiley Surprisedrg.alfresco.repo.webservice.authentication.AuthenticationFa...
   {http://xml.apache.org/axis/}stackTrace:
   at org.alfresco.repo.webservice.authentication.AuthenticationWebService.endSession(AuthenticationWebService.java:111)
   at sun.reflect.GeneratedMethodAccessor728.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
   at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
   at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
   at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
   at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
   at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
   at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
   at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
   at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
   at java.lang.Thread.run(Thread.java:595)

   {http://xml.apache.org/axis/}hostnameSmiley Very Happy-184217
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
2009-01-31 09:39:44,254 ERROR [STDERR]    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
2009-01-31 09:39:44,254 ERROR [STDERR]    at java.lang.Class.newInstance0(Class.java:350)
2009-01-31 09:39:44,254 ERROR [STDERR]    at java.lang.Class.newInstance(Class.java:303)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.alfresco.webservice.authentication.AuthenticationFault.getDeserializer(AuthenticationFault.java:146)
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2009-01-31 09:39:44,254 ERROR [STDERR]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2009-01-31 09:39:44,254 ERROR [STDERR]    at java.lang.reflect.Method.invoke(Method.java:585)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.xml.parsers.SAXParser.parse(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.Call.invoke(Call.java:2767)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.Call.invoke(Call.java:2443)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.Call.invoke(Call.java:2366)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.axis.client.Call.invoke(Call.java:1812)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.endSession(AuthenticationServiceSoapBindingStub.java:229)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.alfresco.webservice.util.AuthenticationUtils.endSession(AuthenticationUtils.java:109)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.alfresco.sample.webservice.NEBUpload.upload(Unknown Source)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.webapp.upload.UploadAction.execute(UploadAction.java:267)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2009-01-31 09:39:44,254 ERROR [STDERR]    at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
2009-01-31 09:39:44,254 ERROR [STDERR]    at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
2009-01-31 09:39:44,254 ERROR [STDERR]    at java.lang.Thread.run(Thread.java:595)
2009-01-31 09:39:44,254 INFO  [STDOUT] Exception = org.alfresco.webservice.util.WebServiceException: Error ending session.


Kindly help me.

Regards
Nishant

mrogers
Star Contributor
Star Contributor
Sorry, I overlooked that you were using such an old version.

Yes according to that thread and JIRA there was a known issue.  

As a work-around how about using different accounts rather than using "admin"?

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi mrogers

Through admin web console I am able to successfully upload 2 different documents using 2 instances of IE browser from the same machine same time (i.e. 2 concurrent upload request). Same 2 concurrent upload request works fine when I tried from 2 different machines using IE Browser. From this I think the alfresco-community-war-2.1.0–>alfresco.war is running fine but not sure whether alfresco-community-sdk-2.1.0–>samples–>WebServiceSamples is right or not.

But when try above scenario through client java program using web services I am facing problem - the first upload request works successfully but 2nd upload request fails. Please guide me on how to manage multiple sessions & tickets for multiple concurent upload request using single admin login user i.e. admin, admin.

I am using the following version of softwares. Please guide me in using the right version of alfresco s/w combination (server & sdk) to overcome the above problem.

a) jdk1.5.0_05
b) alfresco-community-war-2.1.0–>alfresco.war
c) alfresco-community-sdk-2.1.0–>samples–>WebServiceSamples
d) jboss-4.0.5.GA
e) PostgreSQL 8.3.0 database
f) eclispe 3.1

Regards
Nishanth

mrogers
Star Contributor
Star Contributor
According to the thread you posted and the JIRA issue referenced there was a bug that was was fixed August 2007 so try any Alfresco release past that date.   

I'd reccomend you run your test against the latest version of Alfresco which is 3 Stable.   If that does not work I'll study your code and get you a working example.

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi mrogers


According to this post (viewtopic.php?f=27&t=10524&p=34741&hilit=ticket+missing#p34741), if we call startSession method two times within a thread, then it override the first ticket by second ticket. But when i try to upload from two machine (that means two seperate thread) simultaneously then also i am not able to upload the files. Sometimes I am able to upload from one machine and sometimes not able to upload from both the machine.

If i comment AuthenticationUtils.endSession(); then also the behaviour of the application is same. But that time, I am not getting any error.


Regards
Nishant

mrogers
Star Contributor
Star Contributor
Yes you can only have a single session per thread, the authentication details are stored in a thread local slot.

Are you running your tests against 3 stable?

unknown-user
Champ on-the-rise
Champ on-the-rise
Hi mrogers

I am using single user name "admin" to upload 2 files sending 2 simultaneous requests by opening 2 instances of IE web browser from the same machine say C. Also I tried to upload 2 files sending 2 simultaneous requests by opening one instance each of IE web browser from two different machines say A and B. In both cases only the first upload works successfully and the second upload request fails. Some times both upload request fails.

Alfresco version used is alfresco-community-war-2.1.0–>alfresco.war and alfresco-community-sdk-2.1.0

Please help in resolving this issue.

Regards
Nishanth