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
[email protected]
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to