qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7647) [Java Broker] fix handling of broker type in configuration
Date Fri, 03 Mar 2017 09:23:45 GMT

    [ https://issues.apache.org/jira/browse/QPID-7647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893973#comment-15893973
] 

Keith Wall commented on QPID-7647:
----------------------------------

I don't think this change is right.  I think you conflate two concepts: category (record.getType())
with the discriminator (brokerAttributes.put("type").  I think the problem is with the discriminator
- not the category. So..

* I think the equalIgnoreCase on line 317 is redundant.
* I think that the discriminator at the Broker level is redundant.  In the phase 3.0 detects
it - it should remove it.

 

> [Java Broker] fix handling of broker type in configuration
> ----------------------------------------------------------
>
>                 Key: QPID-7647
>                 URL: https://issues.apache.org/jira/browse/QPID-7647
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: qpid-java-6.0, qpid-java-6.1, qpid-java-6.0.6, qpid-java-6.1.1,
qpid-java-7.0
>            Reporter: Lorenz Quack
>            Priority: Minor
>             Fix For: qpid-java-7.0, qpid-java-6.1.2, qpid-java-6.0.7
>
>
> In the default configuration the broker does store its own type explicitly. In this case
there is not problem.
> If an explicit "type" is set in the config there might be one of a number of issues.
The root of the problem is that the default type pre v6 was "broker" but in QPID-6911 this
was changed to "Broker" for trunk (6.1.x at the time) and backported to 6.0. There was no
upgrader added.
> If the "type" is set to "broker" in the 0.32 config and an upgrade to 6.0 is attempted
it will fail with the following error:
> {noformat}
> 13:33:26.203 [main] ERROR org.apache.qpid.server.Broker - Exception during startup
> org.apache.qpid.server.configuration.IllegalConfigurationException: Provided type is
broker but calculated type is Broker
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.<init>(AbstractConfiguredObject.java:264)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.<init>(AbstractConfiguredObject.java:205)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.<init>(AbstractConfiguredObject.java:197)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.adapter.BrokerAdapter.<init>(BrokerAdapter.java:138)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.adapter.BrokerAdapterFactory.createInstance(BrokerAdapterFactory.java:39)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.adapter.BrokerAdapterFactory.createInstance(BrokerAdapterFactory.java:28)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory$GenericUnresolvedConfiguredObject.resolve(AbstractConfiguredObjectTypeFactory.java:145)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory$GenericUnresolvedConfiguredObject.resolve(AbstractConfiguredObjectTypeFactory.java:125)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer.resolveObjects(GenericRecoverer.java:186)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer.performRecover(GenericRecoverer.java:91)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer.access$000(GenericRecoverer.java:41)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer$1.execute(GenericRecoverer.java:59)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer$1.execute(GenericRecoverer.java:55)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:270)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:154)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.run(TaskExecutorImpl.java:182)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.GenericRecoverer.recover(GenericRecoverer.java:54) ~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.store.BrokerStoreUpgraderAndRecoverer.perform(BrokerStoreUpgraderAndRecoverer.java:791)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:231)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_111]
> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:1254)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:1233)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$8.onSuccess(AbstractConfiguredObject.java:868)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$8.onSuccess(AbstractConfiguredObject.java:862)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319) ~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101) ~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1322) ~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1258) ~[guava-18.0.jar:na]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:861)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.access$300(AbstractConfiguredObject.java:78)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(AbstractConfiguredObject.java:473)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(AbstractConfiguredObject.java:460)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:521)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:514)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:270)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:342)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_111]
> 	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_111]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:335)
~[qpid-broker-core-6.0.2.jar:6.0.2]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_111]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_111]
> 	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]
> {noformat}
> If attempting the upgrade to trunk or 6.1 the following error occurs:
> {noformat}
> 13:44:21.468 [main] ERROR org.apache.qpid.server.Broker - Exception during startup
> java.lang.NullPointerException: null
> 	at org.apache.qpid.server.store.ConfiguredObjectRecordConverter.loadChild(ConfiguredObjectRecordConverter.java:130)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.store.ConfiguredObjectRecordConverter.readFromJson(ConfiguredObjectRecordConverter.java:97)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.store.JsonFileConfigStore.load(JsonFileConfigStore.java:163)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.store.JsonFileConfigStore.openConfigurationStore(JsonFileConfigStore.java:127)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractSystemConfig.initateStoreAndRecovery(AbstractSystemConfig.java:280)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractSystemConfig.activate(AbstractSystemConfig.java:233)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_111]
> 	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:1482)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:1461)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$8.onSuccess(AbstractConfiguredObject.java:1035)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$8.onSuccess(AbstractConfiguredObject.java:1029)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$22$1.run(AbstractConfiguredObject.java:2609)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$22$1.run(AbstractConfiguredObject.java:2605)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_111]
> 	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_111]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$22.onSuccess(AbstractConfiguredObject.java:2604)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319) ~[guava-18.0.jar:na]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$ImmediateIfSameThreadExecutor.execute(TaskExecutorImpl.java:392)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.execute(TaskExecutorImpl.java:175)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.ExecutionList.add(ExecutionList.java:101) ~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:170)
~[guava-18.0.jar:na]
> 	at com.google.common.util.concurrent.Futures.addCallback(Futures.java:1322) ~[guava-18.0.jar:na]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.addFutureCallback(AbstractConfiguredObject.java:2599)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.doAttainState(AbstractConfiguredObject.java:1028)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.access$300(AbstractConfiguredObject.java:91)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(AbstractConfiguredObject.java:584)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(AbstractConfiguredObject.java:571)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:625)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:240)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:312)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_111]
> 	at javax.security.auth.Subject.doAs(Subject.java:360) ~[na:1.8.0_111]
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:305)
~[qpid-broker-core-6.1.1.jar:6.1.1]
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_111]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_111]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_111]
> 	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_111]
> {noformat}
> So there seems to be two issues:
> * An upgrader from 0.32 to 6.0 is missing converting an explicit "broker" to "Broker"
(or deleting the unnecessary entry)
> * trunk and 6.1.x should not throw a NPE but give the same error message as previous
version.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message