You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "ildella@gmail.com" <il...@gmail.com> on 2010/12/13 21:09:29 UTC

Can't start a broker on remote server, works locally

Hi.

on EC2 ubuntu 10.10, a Karaf 2.1.2 installation with activemq 5.4.0
installed as of
http://activemq.apache.org/osgi-integration.html

starting a broker with

 activemq:create-broker

gives me a :

 java.lang.IllegalStateException: BeanFactory not initialized or already
closed - call 'refresh' before accessing beans via the ApplicationContext

The exact same Karaf locally, ubuntu 10.10 as well, works perfectly, the
broker starts and my bundles can connect to him nicely. I started building
karaf on the server but I got that error.
So I step back building karaf locally, broker stared and everything worked.
I copied the Karaf folder on EC2, chowned everything and again the broker
fails to start.

Any tip on where to investigate?

Here is the complete exception and a list console output.

Thanks.

[ 113] [Resolved   ] [            ] [       ] [   60] localhost-broker.xml
(0.0.0)
karaf@root> start 113
karaf@root> Exception in thread "SpringOsgiExtenderThread-10"
java.lang.IllegalStateException: BeanFactory not initialized or already
closed - call 'refresh' before accessing beans via the ApplicationContext
    at
org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
    at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:368)
    at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
    at java.lang.Thread.run(Thread.java:636)

karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Spring    Level  Name
[  32] [Active     ] [            ] [       ] [   60] Apache ServiceMix ::
Bundles :: aopalliance (1.0.0.4)
[  33] [Active     ] [            ] [       ] [   60] Spring Core
(3.0.4.RELEASE)
[  34] [Active     ] [            ] [       ] [   60] Spring ASM
(3.0.4.RELEASE)
[  35] [Active     ] [            ] [       ] [   60] Spring Expression
Language (3.0.4.RELEASE)
[  36] [Active     ] [            ] [       ] [   60] Spring Beans
(3.0.4.RELEASE)
[  37] [Active     ] [            ] [       ] [   60] Spring AOP
(3.0.4.RELEASE)
[  38] [Active     ] [            ] [       ] [   60] Spring Context
(3.0.4.RELEASE)
[  39] [Active     ] [            ] [       ] [   60] Spring Context Support
(3.0.4.RELEASE)
[  40] [Active     ] [            ] [       ] [   60] Apache ServiceMix ::
Bundles :: cglib (2.1.0.3_6)
[  41] [Active     ] [            ] [       ] [   60] spring-osgi-io (1.2.0)
[  42] [Active     ] [            ] [       ] [   60] spring-osgi-core
(1.2.0)
[  43] [Active     ] [            ] [       ] [   60] spring-osgi-extender
(1.2.0)
[  44] [Active     ] [            ] [       ] [   60] spring-osgi-annotation
(1.2.0)
[  45] [Active     ] [            ] [       ] [   60]
geronimo-annotation_1.0_spec (1.1.1)
[  46] [Active     ] [            ] [       ] [   60] geronimo-jta_1.1_spec
(1.1.1)
[  47] [Active     ] [            ] [       ] [   60] geronimo-jms_1.1_spec
(1.1.1)
[  48] [Active     ] [            ] [       ] [   60]
geronimo-j2ee-management_1.1_spec (1.0.1)
[  49] [Active     ] [            ] [       ] [   60] Commons Pool (1.5.4)
[  50] [Active     ] [            ] [       ] [   60] Commons Collections
(3.2.1)
[  51] [Active     ] [            ] [       ] [   60] Apache ServiceMix
Bundles: commons-lang-2.4 (2.4.0.3)
[  52] [Active     ] [            ] [       ] [   60] Apache ServiceMix
Bundles: oro-2.0.8 (2.0.8.3)
[  53] [Active     ] [            ] [       ] [   60] Apache ServiceMix
Bundles: velocity-1.6.2 (1.6.2.3)
[  54] [Active     ] [            ] [       ] [   60] activemq-core (5.4.0)
[  55] [Active     ] [            ] [       ] [   60] kahadb (5.4.0)
[  56] [Active     ] [            ] [       ] [   60] activemq-console
(5.4.0)
[  57] [Active     ] [            ] [       ] [   60] activemq-ra (5.4.0)
[  58] [Active     ] [            ] [       ] [   60] activemq-pool (5.4.0)
[  59] [Active     ] [Created     ] [       ] [   60] activemq-karaf (5.4.0)
[  60] [Active     ] [            ] [       ] [   60] Apache Aries
Transaction Manager (0.1.0.incubating)
[  61] [Active     ] [            ] [       ] [   60] activemq-spring
(5.4.0)
[  62] [Active     ] [            ] [       ] [   60] Apache XBean :: Spring
(3.7)
[  65] [Active     ] [            ] [       ] [   60]
geronimo-servlet_2.5_spec (1.1.2)
[  66] [Active     ] [            ] [       ] [   60] Apache ServiceMix ::
Bundles :: jetty (6.1.25.1)
[  67] [Active     ] [            ] [       ] [   60] OPS4J Pax Web - API
(0.7.4)
[  68] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
Service SPI (0.7.4)
[  69] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
Runtime (0.7.4)
[  70] [Active     ] [            ] [       ] [   60] OPS4J Pax Web - Jetty
(0.7.4)
[  71] [Active     ] [            ] [       ] [   60] Apache Felix Metatype
Service (1.0.4)
[  72] [Resolved   ] [            ] [       ] [   60] Apache Karaf :: Web
Console :: Branding (2.1.2)
                                       Hosts: 73
[  73] [Active     ] [Created     ] [       ] [   60] Apache Felix Web
Management Console (3.1.2)
                                       Fragments: 72
[  74] [Active     ] [Created     ] [       ] [   60] Apache Karaf :: Web
Console :: Admin Plugin (2.1.2)
[  75] [Active     ] [Created     ] [       ] [   60] Apache Karaf :: Web
Console :: Features Plugin (2.1.2)
[  76] [Active     ] [Created     ] [       ] [   60] Apache Karaf :: Web
Console :: Gogo Plugin (2.1.2)
[  78] [Active     ] [            ] [       ] [   60] Apache Felix Bundle
Repository (1.6.4)
[  79] [Active     ] [Created     ] [       ] [   60] Apache Karaf :: Shell
OBR Commands (2.1.2)
[  80] [Active     ] [Created     ] [       ] [   60] Apache Karaf ::
Features OBR Resolver (2.1.2)
[  82] [Resolved   ] [            ] [       ] [   60] SLF4J Log4J Binding
(1.6.1)
                                       Hosts: 83
[  83] [Active     ] [            ] [       ] [   60] SLF4J API (1.6.1)
                                       Fragments: 82
[  84] [Active     ] [            ] [       ] [   60] Java Activation API
(1.1.1)
[  85] [Active     ] [            ] [       ] [   60] Apache Log4J (1.2.16)
[  86] [Active     ] [            ] [       ] [   60] Java Resource API
(1.5.0)
[  87] [Active     ] [            ] [       ] [   60] Java Mail (1.4.1)
[  92] [Active     ] [            ] [       ] [   60] Apache Commons HTTP
Client (3.1.0)
[  93] [Active     ] [            ] [       ] [   60] Apache Commons Codec
(1.4.0)
[  94] [Active     ] [            ] [       ] [   60] OSGi Release 4.2.0
Services (3.3.0.v20101018)
[  95] [Active     ] [            ] [       ] [   60] JSON Library (1.0.0)
[ 106] [Active     ] [            ] [       ] [   60] OPS4J Pax Web - Jsp
Support (0.7.4)
[ 107] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
Extender - WAR (0.7.4)
[ 108] [Active     ] [            ] [       ] [   60] OPS4J Pax Web -
Extender - Whiteboard (0.7.4)
[ 109] [Active     ] [            ] [       ] [   60] OPS4J Pax Url - war:,
war-i: (1.2.1)
[ 110] [Active     ] [Created     ] [       ] [   60] Apache Karaf :: WAR
Deployer (2.1.2)
[ 111] [Active     ] [            ] [       ] [   60] activemq-web-console
(5.4.0)
[ 113] [Resolved   ] [            ] [       ] [   60] localhost-broker.xml
(0.0.0)

-- 
Daniele Dellafiore
http://danieledellafiore.net