[prev in list] [next in list] [prev in thread] [next in thread]
List: esb-java-dev
Subject: [Carbon-dev] Governance Registry Custom Query issue.
From: David Carver <dcarver () intalio ! com>
Date: 2011-09-26 21:42:09
Message-ID: 4E80F1B1.6020102 () intalio ! com
[Download RAW message or body]
Following the article on doing Custom Queries
(http://wso2.org/project/registry/4.0.0/docs/developer_guide/custom_query.html#custom-query) \
with the Registry, I'm running into the following stack trace:
java.lang.ClassCastException:
org.apache.abdera.parser.stax.FOMExtensibleElement cannot be cast to
org.apache.abdera.model.Feed
at
org.wso2.carbon.registry.app.RemoteRegistry.executeQuery(RemoteRegistry.java:1332)
at
org.wso2.carbon.registry.core.session.UserRegistry.executeQuery(UserRegistry.java:1251)
at
org.ebayopensource.turmeric.repository.wso2.RepositoryServiceProviderImpl.searchAssets(RepositoryServiceProviderImpl.java:197)
I'm using the RemoteRegistry implementation, with Governance Registry 4.0.0.
String searchByID = "SELECT REG_PATH_ID, REG_NAME FROM
REG_RESOURCE WHERE REG_PATH_ID = ?";
try {
Resource queryResource = registry.newResource();
queryResource.setContent(searchByID);
queryResource.setMediaType(RegistryConstants.SQL_QUERY_MEDIA_TYPE);
queryResource.addProperty(RegistryConstants.RESULT_TYPE_PROPERTY_NAME,
RegistryConstants.RESOURCES_RESULT_TYPE);
registry.put(RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
RegistryConstants.QUERIES_COLLECTION_PATH +
"/turmeric-queries-findbyid", queryResource);
Map<String, String> parameters = new
ConcurrentHashMap<String, String>();
for(Artifact art : artifacts ) {
parameters.put(art.getArtifactIdentifier(), "%services%");
}
Collection paths =
registry.executeQuery(RegistryConstants.CONFIG_REGISTRY_BASE_PATH +
RegistryConstants.QUERIES_COLLECTION_PATH +
"/turmeric-queries-findbyid", parameters);
return RSProviderUtil.setSuccessResponse(response);
} catch (Exception ex) {
I'm trying to search by the generated artifact id. However when it
executes the query, we get the exception.
Dave
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic