On 20 August 2014 17:18, Fraser Adams <[email protected]> wrote:

> Robbie/All,
> Sorry I've been a bit quiet, I've just got back from holiday and my in box
> is a car-crash, did somebody deliberately wait 'til I was away to make Jira
> explode :-D
>
>
> I was going to take a look at this but I ran into a bigger problem - see
> below........
>
>
> On 15/08/14 14:35, Robbie Gemmell wrote:
>
>>   though I encountered a small issue when running the QpidConfig tool
>> against the Java
>> broker where the tool would throw an exception. This works against the C++
>> broker,
>>
>
>  qpid-qmf2-tools-0.30-beta-bin.tar.gz:
>> - For QpidConfig, if i try to list the queues or exchanges I would get an
>> exception:
>>
>> [gemmellr@localhost bin]$ ./QpidConfig.sh -a guest/guest@localhost:5672
>> queues
>> Queue Name                                    Attributes
>> ======================================================================
>> TempQueue359495ce-d501-46b0-863a-9ab46ad36ce2 auto-del excl Exception in
>> thread "main" java.lang.NullPointerException
>>      at org.apache.qpid.qmf2.tools.QpidConfig.queueList(
>> QpidConfig.java:679)
>>      at org.apache.qpid.qmf2.tools.QpidConfig.<init>(QpidConfig.
>> java:1467)
>>      at org.apache.qpid.qmf2.tools.QpidConfig.main(QpidConfig.java:1540)
>>
>
>
> So I just did a svn update to revision 1619106 and went about recompiling
> everything to give me a baseline before I started tinkering, but I can't
> get the QMF plugin to compile, Maven is reporting:
>
> [ERROR] Failed to execute goal org.apache.maven.plugins:
> maven-compiler-plugin:3.1:compile (default-compile) on project
> qpid-broker-plugins-management-qmf2: Compilation failure
> [ERROR] /home/fadams/qpid/qpid-trunk/qpid/tools/src/java/qpid-
> broker-plugins-management-qmf2/src/main/java/org/apache/
> qpid/server/qmf2/agentdata/Broker.java:[367,42] cannot find symbol
> [ERROR] symbol:   method getAvailableProtocols()
> [ERROR] location: variable port of type org.apache.qpid.server.model.
> Port<?>
> [ERROR] -> [Help 1]
> [ERROR]
>
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/
> MojoFailureException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
> [ERROR]   mvn <goals> -rf :qpid-broker-plugins-management-qmf2
>
>
> I'm assuming that I'm not the only person this is broken for? Clearly
> someone has been messing with the Java Broker Model stuff again ;->
>
>
No, you arent the only person, wasnt working here either prior to your
change, and Rob has now fessed up I see ;)

I assume it was recent as I have used it myself recently when finishing off
the new packaging.

There is a CI job to build it to ensure it at least compiles (it could do
more if there were automated tests), however it looks like it is only being
run when the QMF bits are changed, whereas it should also (and mainly,
given the respective change frequency) be run whenever the broker is
changed.


> Look like it was just a change of the Port class on the Model that changed
> getAvailableProtocols to getProtocols, I've fixed this on trunk under
> QPID-6024.
>
>
In future I'd suggest not creating a new JIRA for this kind of compilation
fix, but rather change it on the original JIRA it was broken via if its
known which one caused it and there isnt some aspect to it that makes it
seem like an 'unrelated' fix (other things like the original JIRAs being in
a previously released version obviously also being a reason to create a new
JIRA).


>
>
> I'll take a look at the QpidConfig thing when I get a moment, the likely
> culprit is
> // TODO altExchange and arguments properties.
>
> My bad, I tend to use qpid-config with the recurse option to list queues
> and bindings so I don't think I've ever tried
>
>
> ./QpidConfig.sh -a guest/guest@localhost:5672 queues
>
> with the Java Broker (*blush*) I've definitely tried it with the C++
> broker and that returns an empty Map when there are no arguments.
>

Not having really used it, that seemed like the simplest type of thing to
try as a smoke test...typical of me to pick one thing that doesnt work :P

>
> I really need to do proper mappings from the Java Broker arguments to QMF2
> equivalents, but for now I'll populate Queue and Exchange arguments with an
> empty Map and I'll also add some defensive code to QpidConfig
>

Great

Reply via email to