cancel
Showing results for 
Search instead for 
Did you mean: 

SDK 1.4 Preview: Errors trying to run Samples

osu
Champ in-the-making
Champ in-the-making
Hi,

has anyone tried out the samples with the SDK 1.4 Preview?

I had to correct a couple of the dependency jars in the eclipse projects provided (mostly due to naming/version issues in the jars).

Now, the the projects finally build without errors, but I am getting the following exception when trying to run any of the samples:



Exception in thread "main" org.alfresco.webservice.util.WebServiceException: Error starting session.
   at org.alfresco.webservice.util.AuthenticationUtils.startSession(AuthenticationUtils.java:85)
   at org.alfresco.sample.webservice.GetStores.main(GetStores.java:42)
Caused by: (404)/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)
   … 1 more

The sample is run from my local workstation with the SDK 1.4 preview workspace against a windows box with a 1.4 preview community edition (fresh install). The web client on that box is running fine, by the way.

I have a similar setup with all 1.3 where the problem does not occur and the samples are running fine.

Any idea what is going on there?

Thanks for the good work so far. Looking forward to your hints.

Regards,
Oliver.
3 REPLIES 3

blackadder
Champ in-the-making
Champ in-the-making
I had a problem with the v1.4 too,
I checked the WebServiceFactory class and saw this:
private static final String DEFAULT_ENDPOINT_ADDRESS = "http://localhost:8080/alfresco/api";
instead of just "http://localhost:8080" in the previous versions.

so I changed the repository.location in webserviceclient.properties and add /alfresco/api at the end of the repository address and now it's working fine.
It seems the Alfresco team forgot to update this file in the SDK.
Cheers,
Matthieu

rwetherall
Confirmed Champ
Confirmed Champ
Thanks Matthieu,

Looks like you are correct, we'll try and make sure this is updated.

Cheers Roy

osu
Champ in-the-making
Champ in-the-making
so I changed the repository.location in webserviceclient.properties and add /alfresco/api at the end of the repository address and now it's working fine.
It seems the Alfresco team forgot to update this file in the SDK.
Cheers,
Matthieu

Hi Matthieu, thanks for the hint. Worked for me!

Regards,
Oliver.