cancel
Showing results for 
Search instead for 
Did you mean: 

Error obtaining a Alfresco session

tonygarnet
Champ in-the-making
Champ in-the-making
I am attempting to start an alfresco session on a remote machine but I am getting the error:
ervlet context initialized
org.alfresco.webservice.util.WebServiceException: Error starting session.
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:85)
   at org.iop.microsite.repository.content.dao.AlfrescoMicrositeContentRepositoryDao.doSecurityCheck(AlfrescoMicrositeContentRepositoryDao.java:210)
   at org.iop.microsite.repository.content.dao.AlfrescoMicrositeContentRepositoryDao.getFragments(AlfrescoMicrositeContentRepositoryDao.java:141)
   at org.iop.mags.companies.MicrositeDefaultAction.getMicrositeContents(MicrositeDefaultAction.java:218)
   at org.iop.mags.companies.MicrositeDefaultAction.executeAction(MicrositeDefaultAction.java:88)
   at org.iop.mags.ExtendedAction.execute(ExtendedAction.java:105)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350)
   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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Unknown Source)
Caused by: (404)/alfresco/api/AuthenticationService
   at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
   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.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:70)
   … 28 more

A search has indicated that the solution was to change repository.location to http://seebeck:8084/alfresco/api in my webservicesclient.properties.
However, this has not worked and the error remains.
I am however able to start the session when I run my test application.
Within my test application the repository.location is specified as http://seebeck:8084 and works okay.

The rest of the error message:
Caused by: (404)/alfresco/api/AuthenticationService
   at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)
   at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
   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.client.AxisClient.invoke(AxisClient.java:165)
   at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
   at org.apache.axis.client.Call.invoke(Call.java:2767)
   at org.apache.axis.client.Call.invoke(Call.java:2443)
   at org.apache.axis.client.Call.invoke(Call.java:2366)
   at org.apache.axis.client.Call.invoke(Call.java:1812)
   at org.alfresco.webservice.authentication.AuthenticationServiceSoapBindingStub.startSession(AuthenticationServiceSoapBindingStub.java:187)
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:70)

would seem to indicate (Return HTTP code 404) that it is unable to find /alfresco/api/AuthenticationService. If a stand alone application can find it why cannot a web application?
It would be appreciated if some one can direct me to a solution.

Tony
4 REPLIES 4

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

Are you sure your webserviceclient.properties is in the right location and is being picked up?

Is your test application running on a remote server as well?

Cheers,
-Aladdin

tonygarnet
Champ in-the-making
Champ in-the-making
Hi
I appreciate your response. Sorry about the time to respond, but I discovered that there was aproblem with my eclipse which could have caused the errors observed.
I have re-installed eclipse and I am attempting to set up my application again.
However, I cannot find the package which contains the StoreEnum class. I unfortunately deleted my eclipse workspace as there appeared to be some corruption occuring and it was safer to take this approach. It would be appreciated if you could direct me to where I can download the relevant jar as it is not contained within the 1.4 SDK or the web-service-client.jar.

Tony

rivetlogic
Champ on-the-rise
Champ on-the-rise
Hi,

I believe the StoreEnum class has been deprecated. The 1.4 SDK webservice samples project would be a good place to go and see what changed.

e.g.

Prior to 1.4 you would use StoreEnum to get the workspace like so:
protected static final Store STORE = new Store(StoreEnum.workspace, "SpacesStore");

In 1.4 you would do this instead:
protected static final Store STORE = new Store(Constants.WORKSPACE_STORE, "SpacesStore");

The class used is org.alfresco.webservice.util.Constants.

Hope this helps,

–Aladdin

tonygarnet
Champ in-the-making
Champ in-the-making
Hi
Thanks a lot. That has resolved the problems to do with compilation.
Tony