سؤال

I am trying to access an OSGI bundle from my ejb bean class. I have configured both the targetted bundle and the ejb module in my Jboss AS 7.1 and I get the following exception when I start the server:

11:40:00,050 INFO  [org.jboss.as] (MSC service thread 1-10) JBAS015951: Admin console listening on http://127.0.0.1:9990
11:40:00,051 INFO  [org.jboss.as] (MSC service thread 1-10) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 1787ms - Started 192 of 271 services (76 services are passive or on-demand)
11:40:00,051 ERROR [org.jboss.as.osgi] (MSC service thread 1-12) JBAS011900: Cannot start bundle: com.javaworld.sample.HelloService:1.0.0.201401231139: org.osgi.framework.BundleException: Unsupported execution environment [JavaSE-1.7] we have [OSGi/Minimum-1.1, J2SE-1.1, OSGi/Minimum-1.2, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6]
at org.jboss.osgi.framework.internal.HostBundleState.assertStartConditions(HostBundleState.java:247) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at org.jboss.osgi.framework.internal.HostBundleState.startInternal(HostBundleState.java:181) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at org.jboss.osgi.framework.internal.AbstractBundleState.start(AbstractBundleState.java:494) [jbosgi-framework-core-1.1.8.Final.jar:1.1.8.Final]
at org.jboss.as.osgi.deployment.BundleStartTracker$1.processService(BundleStartTracker.java:144) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.osgi.deployment.BundleStartTracker$1.transition(BundleStartTracker.java:119) [jboss-as-osgi-service-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl.invokeListener(ServiceControllerImpl.java:1416) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl.access$2700(ServiceControllerImpl.java:49) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

    at org.jboss.msc.service.ServiceControllerImpl$ListenerTask.run(ServiceControllerImpl.java:1954) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_40]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_40]
    at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_40]

11:40:00,089 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "HelloWorldSessionBean.jar"
11:40:00,089 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "com.javaworld.sample.HelloService.jar"

Any help will be appreciated!

هل كانت مفيدة؟

المحلول

Unsupported execution environment [JavaSE-1.7] we have [OSGi/Minimum-1.1, J2SE-1.1, OSGi/Minimum-1.2, J2SE-1.2, J2SE-1.3, J2SE-1.4, J2SE-1.5, JavaSE-1.6]

I believe You have built your classes with 1.7 java when you actually have 1.6 at max in jboss.

Does your jboss run on 1.6 java while builds are made on 1.7?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top