cancel
Showing results for 
Search instead for 
Did you mean: 

Can not run 'TYPE'-query from Jeff Potts' article

itrub
Champ in-the-making
Champ in-the-making
Dear colleagues
I try to reproduce the simple example from well-known article of Jeff Potts "Alfresco Developer: Working with Custom Content Types". I want to run TYPE-query, so, to get all nodes of custom type. I form the query string with such code:
queryString = "+TYPE:\"" + Constants.createQNameString(RMSModel.NAMESPACE_RMS_CONTENT_MODEL, RMSModel.TYPE_RMS_INCOMINGDOCUMENT) + "\"";
so, it seems
+TYPE:"{armd.rms.model}rmsIncomingDocument"
Execution of program fall down on code:
QueryResult queryResult = getRepositoryService().query(getStoreRef(), query, false);

So, the result of
System.out.println(getStoreRef().getScheme()+" "+getStoreRef().getAddress());
is
workspace SpacesStore
The result of
System.out.println(getStoreRef());
is
org.alfresco.webservice.types.Store@6a3c812a

The error is something like this:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.reflect.Class.newInstance0(Unknown Source)
at java.lang.reflect.Class.newInstance(Unknown Source)
….
and at end
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.alfresco.webservice.repository.RepositoryServiceSoapBindingStub.query(RepositoryServiceSoapBindingStub.java:753)

I use ALfresco 3.3, Community Version for Windows.
Could anybody help me? Thanks in advance
Sincerely, Iliya
1 REPLY 1

jcustovic
Champ in-the-making
Champ in-the-making
Please post the full stack trace. The problem could be in the syntax of your query.