activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Cons <lionel.c...@cern.ch>
Subject Error with Apollo REST API
Date Wed, 08 Jun 2011 12:20:02 GMT
Hiram,

Using apollo-1.0-20110607.125153-128, I got an error with the REST API.

I can run:

$ curl -u "guest:guest" 'http://localhost:8080/broker/connections.json'

and the resulting objects contain both an id and a subscription_count
fields:

{"id":"1557","state":"STARTED",[...],"subscription_count":1}

I can filter the fields and get only the id:

$ curl -u "guest:guest" 'http://localhost:8080/broker/connections.json?f=id'

However, If I want only the subscription_count, I get an error:

$ curl -u "guest:guest" 'http://localhost:8080/broker/connections.json?f=subscription_count'
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /WEB-INF/scalate/errors/500.scaml. Reason:
<pre>    Not Found</pre></p><h3>Caused by:</h3><pre>org.josql.QueryParseException:
Unable to create getter: subscription_count
	at org.josql.expressions.Accessor.init(Accessor.java:64)
	at org.josql.expressions.SelectItemExpression.init(SelectItemExpression.java:71)
	at org.josql.Query.init(Query.java:2127)
	at org.josql.Query.parse(Query.java:2048)
[...]

Also, I'm surprised to get an HTML result when I asked for
JSON. Shouldn't the error be returned as a JSON object?

Cheers,

Lionel

Mime
View raw message