Skip to content

Instantly share code, notes, and snippets.

@dustinschultz
Created May 15, 2013 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinschultz/5585343 to your computer and use it in GitHub Desktop.
Save dustinschultz/5585343 to your computer and use it in GitHub Desktop.
Happens on a fresh startup (empty data dir) with local bundles installed that depend on Spring AOP and are a part of features include in the featuresBoot. If I restart, everything works fine.
Happens more often than not but does not happen on every startup.
ghost:~ dustin$ java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Apache ServiceMix (4.4.2)
java.lang.NoClassDefFoundError: org/springframework/aop/support/AopUtils
at org.springframework.context.event.GenericApplicationListenerAdapter.supportsEventType(GenericApplicationListenerAdapter.java:57)[79:org.springframework.context:3.0.7.RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.supportsEvent(AbstractApplicationEventMulticaster.java:179)[79:org.springframework.context:3.0.7.RELEASE]
at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:140)[79:org.springframework.context:3.0.7.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)[79:org.springframework.context:3.0.7.RELEASE]
at org.springframework.osgi.context.event.OsgiBundleApplicationContextEventMulticasterAdapter.multicastEvent(OsgiBundleApplicationContextEventMulticasterAdapter.java:63)[103:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.publishEvent(DependencyServiceManager.java:374)[106:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.sendInitialDependencyEvents(DependencyServiceManager.java:353)[106:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyServiceManager.register(DependencyServiceManager.java:312)[106:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:257)[106:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:169)[106:org.springframework.osgi.extender:1.2.1]
at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[103:org.springframework.osgi.core:1.2.1]
at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)[106:org.springframework.osgi.extender:1.2.1]
at java.lang.Thread.run(Thread.java:722)[:1.7.0_21]
@gertv
Copy link

gertv commented May 16, 2013

Hi Dustin,

We don't really support Java 7 on ServiceMix 4.4.x - in fact, on my local machine with this combination of versions, ServiceMix does not even start up correctly. Could you give it a go with Java 6 or using Java 7 and ServiceMi 4.5.x instead?

I understand you have defined your own features and added them to featuresBoot? If that's the case, could you try adding the start-level="xx" attribute to the bundles you're starting that need access to Spring AOP and set the value to something higher than 60 to ensure these bundles' installation only gets started after the default ServiceMix bundles?

Another suggestion could be to ensure that the bundle has a non-optional import to these AOP packages, as that would also require the the AOP packages to be available before an attempt is made to start the bundle.

Hth,

Gert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment