fcrepo4-labs / fcrepo-api-x

Fedora API Extension Framework
Apache License 2.0
10 stars 11 forks source link

Deploying API-X causes fcrepo-service-activemq Failed state #106

Closed dannylamb closed 7 years ago

dannylamb commented 7 years ago

Apologies in advance for the wall of text on this one.

I'm working on adding API-X to CLAW's vagrant environment and am running into an issue. Before installing the fcrepo-api-x feature, my bundle:list is all active.

karaf@root()> bundle:list
START LEVEL 100 , List Threshold: 50
 ID | State  | Lvl | Version            | Name
--------------------------------------------------------------------------------------------
 10 | Active |  80 | 6.0.4              | Oracle Corporation's JDBC Driver for MySQL
 53 | Active |  50 | 5.14.1             | activemq-camel
 55 | Active |  50 | 5.14.1             | activemq-osgi
 56 | Active |  50 | 2.18.1             | camel-blueprint
 57 | Active |  50 | 2.18.1             | camel-catalog
 58 | Active |  50 | 2.18.1             | camel-commands-core
 59 | Active |  50 | 2.18.1             | camel-core
 60 | Active |  50 | 2.18.1             | camel-jms
 61 | Active |  80 | 2.18.1             | camel-karaf-commands
 62 | Active |  50 | 3.5.0              | Apache Commons Net
 63 | Active |  50 | 1.6.0              | Commons Pool
 64 | Active |  50 | 2.4.2              | Apache Commons Pool
 65 | Active |  50 | 1.0.1              | geronimo-j2ee-management_1.1_spec
 68 | Active |  50 | 3.4.6              | ZooKeeper Bundle
 86 | Active |  50 | 3.18.0             | Apache XBean :: Spring
 87 | Active |  80 | 4.7.0              | fcrepo-service-activemq
 88 | Active |  50 | 0.6.4              | JAXB2 Basics - Runtime
 91 | Active |  50 | 2.8.3              | Jackson-annotations
 92 | Active |  50 | 2.8.3              | Jackson-core
 93 | Active |  50 | 2.8.3              | jackson-databind
 94 | Active |  50 | 2.8.3              | Jackson module: JAXB-annotations
 95 | Active |  50 | 0.6                | Dexx Collections
 96 | Active |  50 | 0.8.3              | JSONLD Java :: Core
 97 | Active |  80 | 3.0.0              | Expression Language 3.0 API
 98 | Active |  80 | 1.2.0              | CDI APIs
 99 | Active |  80 | 1.2                | javax.interceptor API
100 | Active |  80 | 1.2                | javax.transaction API
101 | Active |  80 | 1.1.1              | Apache Aries Transaction Blueprint
102 | Active |  80 | 2.1.0              | Apache Aries Transaction Blueprint
103 | Active |  80 | 1.3.0              | Apache Aries Transaction Manager
104 | Active |  50 | 2.18.1             | camel-jackson
105 | Active |  50 | 2.18.1             | camel-spring
106 | Active |  50 | 1.10.0             | Apache Commons Codec
107 | Active |  50 | 1.3.0              | Apache Commons CSV
108 | Active |  50 | 3.4.0              | Apache Commons Lang
109 | Active |  80 | 1.0.2              | Apache Felix Coordinator Service
110 | Active |  50 | 4.5.2              | Apache Apache HttpClient OSGi bundle
111 | Active |  50 | 4.4.4              | Apache Apache HttpCore OSGi bundle
112 | Active |  50 | 3.1.1              | Apache Jena - OSGi bundle
113 | Active |  80 | 1.0.0.2            | Apache ServiceMix :: Bundles :: javax.inject
114 | Active |  50 | 0.9.2              | Apache Thrift
115 | Active |  50 | 4.5.0              | fcrepo-camel
116 | Active |  80 | 4.7.0              | fcrepo-service-camel
117 | Active |  50 | 0.2.1              | fcrepo-java-client
118 | Active |  80 | 0.1.1.SNAPSHOT     | islandora-connector-broadcast
119 | Active |  80 | 0.1.1.SNAPSHOT     | islandora-indexing-triplestore
120 | Active |  50 | 2.7.0              | Gson
121 | Active |  50 | 2.1.0              | json-path
123 | Active |  50 | 1.1                | accessors-smart
124 | Active |  50 | 2.2.1              | json-smart
125 | Active |  50 | 2.18.1             | camel-http-common
126 | Active |  50 | 2.18.1             | camel-http4
127 | Active |  50 | 2.18.1             | camel-jsonpath
128 | Active |  80 | 4.7.0              | fcrepo-indexing-triplestore
129 | Active |  80 | 4.7.0              | fcrepo-indexing-triplestore-blueprint
130 | Active |  80 | 1.0.8              | acrepo-services-mint
131 | Active |  80 | 1.0.8              | acrepo-connector-broadcast
132 | Active |  80 | 1.9.2.1            | Apache ServiceMix :: Bundles :: jasypt
133 | Active |  80 | 1.5.0              | OPS4J Base - Service Provider Access
134 | Active |  80 | 0.8.0              | OPS4J Pax JDBC Generic Driver Extender
135 | Active |  80 | 0.8.0              | OPS4J Pax JDBC Config
136 | Active |  80 | 1.0.0.201505202023 | org.osgi:org.osgi.service.jdbc
137 | Active |  80 | 5.1.34             | Oracle Corporation's JDBC Driver for MySQL
143 | Active |  80 | 2.1.0              | Apache Commons DBCP
144 | Active |  80 | 4.0.5              | Apache Karaf :: JDBC :: Core
146 | Active |  80 | 3.0.0.1            | Apache ServiceMix :: Bundles :: cglib
148 | Active |  80 | 0.8.0              | OPS4J Pax JDBC MySQL Driver Adapter
149 | Active |  80 | 0.8.0              | OPS4J Pax JDBC Pooling Support Base
150 | Active |  80 | 0.8.0              | OPS4J Pax JDBC Pooling Support using Commons-DBCP2
151 | Active |  80 | 1.0.8              | acrepo-connector-idiomatic
155 | Active |  50 | 2.18.1             | camel-jetty-common
156 | Active |  50 | 2.18.1             | camel-jetty9
157 | Active |  50 | 2.18.1             | camel-sql
218 | Active |  50 | 5.14.0             | activemq-osgi

After feature:install fcrepo-api-x, I have:

karaf@root()> bundle:list
START LEVEL 100 , List Threshold: 50
 ID | State       | Lvl | Version            | Name
-------------------------------------------------------------------------------------------------
 10 | Active      |  80 | 6.0.4              | Oracle Corporation's JDBC Driver for MySQL
 53 | Active      |  50 | 5.14.1             | activemq-camel
 55 | Active      |  50 | 5.14.1             | activemq-osgi
 56 | Active      |  50 | 2.18.1             | camel-blueprint
 57 | Active      |  50 | 2.18.1             | camel-catalog
 58 | Active      |  50 | 2.18.1             | camel-commands-core
 59 | Active      |  50 | 2.18.1             | camel-core
 60 | Active      |  50 | 2.18.1             | camel-jms
 61 | Active      |  80 | 2.18.1             | camel-karaf-commands
 62 | Active      |  50 | 3.5.0              | Apache Commons Net
 63 | Active      |  50 | 1.6.0              | Commons Pool
 64 | Active      |  50 | 2.4.2              | Apache Commons Pool
 65 | Active      |  50 | 1.0.1              | geronimo-j2ee-management_1.1_spec
 68 | Active      |  50 | 3.4.6              | ZooKeeper Bundle
 86 | Active      |  50 | 3.18.0             | Apache XBean :: Spring
 87 | Failure     |  80 | 4.7.0              | fcrepo-service-activemq
 88 | Active      |  50 | 0.6.4              | JAXB2 Basics - Runtime
 91 | Active      |  50 | 2.8.3              | Jackson-annotations
 92 | Active      |  50 | 2.8.3              | Jackson-core
 93 | Active      |  50 | 2.8.3              | jackson-databind
 94 | Active      |  50 | 2.8.3              | Jackson module: JAXB-annotations
 95 | Active      |  80 | 0.6                | Dexx Collections
 96 | Active      |  80 | 0.8.3              | JSONLD Java :: Core
 97 | Active      |  80 | 3.0.0              | Expression Language 3.0 API
 98 | Active      |  80 | 1.2.0              | CDI APIs
 99 | Active      |  80 | 1.2                | javax.interceptor API
100 | Active      |  80 | 1.2                | javax.transaction API
101 | Active      |  80 | 1.1.1              | Apache Aries Transaction Blueprint
102 | Active      |  80 | 2.1.0              | Apache Aries Transaction Blueprint
103 | Active      |  80 | 1.3.0              | Apache Aries Transaction Manager
104 | Active      |  50 | 2.18.1             | camel-jackson
105 | Active      |  50 | 2.18.1             | camel-spring
106 | Active      |  50 | 1.10.0             | Apache Commons Codec
107 | Active      |  80 | 1.3.0              | Apache Commons CSV
108 | Active      |  80 | 3.4.0              | Apache Commons Lang
109 | Active      |  80 | 1.0.2              | Apache Felix Coordinator Service
110 | Active      |  80 | 4.5.2              | Apache Apache HttpClient OSGi bundle
111 | Active      |  80 | 4.4.5              | Apache Apache HttpCore OSGi bundle
112 | Active      |  80 | 3.1.1              | Apache Jena - OSGi bundle
113 | Active      |  80 | 1.0.0.2            | Apache ServiceMix :: Bundles :: javax.inject
114 | Active      |  80 | 0.9.3              | Apache Thrift
115 | Active      |  50 | 4.5.0              | fcrepo-camel
116 | Active      |  80 | 4.7.0              | fcrepo-service-camel
117 | Active      |  80 | 0.2.1              | fcrepo-java-client
118 | GracePeriod |  80 | 0.1.1.SNAPSHOT     | islandora-connector-broadcast
119 | GracePeriod |  80 | 0.1.1.SNAPSHOT     | islandora-indexing-triplestore
120 | Active      |  50 | 2.7.0              | Gson
121 | Active      |  50 | 2.1.0              | json-path
123 | Active      |  50 | 1.1                | accessors-smart
124 | Active      |  50 | 2.2.1              | json-smart
125 | Active      |  50 | 2.18.1             | camel-http-common
126 | Active      |  50 | 2.18.1             | camel-http4
127 | Active      |  50 | 2.18.1             | camel-jsonpath
128 | Active      |  80 | 4.7.0              | fcrepo-indexing-triplestore
129 | GracePeriod |  80 | 4.7.0              | fcrepo-indexing-triplestore-blueprint
130 | Active      |  80 | 1.0.8              | acrepo-services-mint
131 | GracePeriod |  80 | 1.0.8              | acrepo-connector-broadcast
132 | Active      |  80 | 1.9.2.1            | Apache ServiceMix :: Bundles :: jasypt
133 | Active      |  80 | 1.5.0              | OPS4J Base - Service Provider Access
134 | Active      |  80 | 0.8.0              | OPS4J Pax JDBC Generic Driver Extender
135 | Active      |  80 | 0.8.0              | OPS4J Pax JDBC Config
136 | Active      |  80 | 1.0.0.201505202023 | org.osgi:org.osgi.service.jdbc
137 | Active      |  80 | 5.1.34             | Oracle Corporation's JDBC Driver for MySQL
143 | Active      |  80 | 2.1.0              | Apache Commons DBCP
144 | Active      |  80 | 4.0.5              | Apache Karaf :: JDBC :: Core
146 | Active      |  80 | 3.0.0.1            | Apache ServiceMix :: Bundles :: cglib
148 | Active      |  80 | 0.8.0              | OPS4J Pax JDBC MySQL Driver Adapter
149 | Active      |  80 | 0.8.0              | OPS4J Pax JDBC Pooling Support Base
150 | Active      |  80 | 0.8.0              | OPS4J Pax JDBC Pooling Support using Commons-DBCP2
151 | GracePeriod |  80 | 1.0.8              | acrepo-connector-idiomatic
155 | Active      |  50 | 2.18.1             | camel-jetty-common
156 | Active      |  50 | 2.18.1             | camel-jetty9
157 | Active      |  50 | 2.18.1             | camel-sql
185 | Active      |  80 | 2.7.0              | Jackson-annotations
186 | Active      |  80 | 2.7.4              | Jackson-core
187 | Active      |  80 | 2.7.4              | jackson-databind
188 | Active      |  80 | 0.1.0              | fcrepo-api-x-binding
189 | Active      |  80 | 0.1.0              | fcrepo-api-x-jena
190 | Failure     |  80 | 0.1.0              | fcrepo-api-x-listener
191 | Active      |  80 | 0.1.0              | fcrepo-api-x-loader
192 | Active      |  80 | 0.1.0              | fcrepo-api-x-model
193 | Active      |  80 | 0.1.0              | fcrepo-api-x-registry
194 | Active      |  80 | 0.1.0              | fcrepo-api-x-routing
195 | Active      |  80 | 1.7.13             | jcl-over-slf4j
196 | Active      |  50 | 2.17.3             | camel-blueprint
197 | Active      |  50 | 2.17.3             | camel-catalog
198 | Active      |  80 | 2.17.3             | camel-commands-core
199 | Active      |  50 | 2.17.3             | camel-core
200 | Active      |  50 | 2.17.3             | camel-http-common
201 | Active      |  50 | 2.17.3             | camel-http4
202 | Active      |  50 | 2.17.3             | camel-jms
203 | Active      |  80 | 2.17.3             | camel-karaf-commands
204 | Active      |  80 | 2.5.0              | Apache Commons IO
205 | Active      |  80 | 3.3.2              | Apache Commons Lang
216 | Active      |  80 | 2.11.0.1           | Apache ServiceMix :: Bundles :: xercesImpl
217 | Active      |  80 | 1.2.0.5            | Apache ServiceMix :: Bundles :: xmlresolver

In my logs, I get this first:

2017-02-07 14:53:25,354 | WARN  | pool-82-thread-1 | AnnotationTypeConverterLoader    | 59 - org.apache.camel.camel-core - 2.18.1 | Ignoring converter type: org.apache.activemq.camel.converter.ActiveMQMessageConverter as a dependent class could not be found: java.lang.NoClassDefFoundError: org/apache/camel/component/jms/JmsBinding
java.lang.NoClassDefFoundError: org/apache/camel/component/jms/JmsBinding

Followed eventually by this:

2017-02-07 14:53:28,139 | ERROR | pool-82-thread-1 | BlueprintContainerImpl           | 14 - org.apache.aries.blueprint.core - 1.6.1 | Unable to start blueprint container for bundle org.fcrepo.camel.fcrepo-service-activemq/4.7.0
org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components

And then eventually a cascade of other fails. Seems like the appropriate camel-jms feature is deployed for 2.17.3, which is the dependency the activemq component is trying to load. I'm stuck scratching my head on this one. Maybe this is a fcrepo-camel-toolbox compatability issue? Just seems strange that fcrepo-service-activemq fails when it's not referenced by api-x at all.

acoburn commented 7 years ago

@dannylamb I have seen this issue with fcrepo-camel-toolbox (so it's not really an API-X issue per se). The basic problem is that when the configuration for fcrepo-service-activemq is changed, the service doesn't restart properly -- you have to manually stop/start the service. I think this is part of a larger issue with ActiveMQ 5.14.x and Camel 2.18.x, and so I have basically been ignoring it until AMQ/5.15 is released. The easy workaround is to put the customized org.fcrepo.camel.service.activemq.cfg in place before starting the Karaf container.

dannylamb commented 7 years ago

@acoburn Thx. So helpful, as always. I'll see what I can do in claw_vagrant to make it work until the appropriate upstream fixes land.

Closing for now since it's not really an api-x issue.