Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-2151

Servlet cannot access target OSGi service in time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Beta1
    • None
    • OSGi
    • None

    Description

      13:28:23,604 INFO  [org.jboss.as.server.deployment] (pool-2-thread-1) Content added at location /home/ondra/work/AS-7/ozizka-as7/testsuite/integration/target/jbossas/standalone/data/content/8f/75358fcd7666b07552c8fb993a9091d850114b/content
      13:28:23,606 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-15) Starting deployment of "web-osgi-target"
      13:28:23,609 INFO  [org.jboss.as.arquillian] (MSC service thread 1-15) Arquillian deployment detected: ArquillianConfig[service=jboss.arquillian.config.web-osgi-target,unit=web-osgi-target,tests=[org.jboss.as.test.integration.osgi.webapp.ServletIntegrationTestCase]]
      13:28:23,611 INFO  [org.jboss.osgi.framework.internal.BundleManager] (MSC service thread 1-15) Install bundle: web-osgi-target:0.0.0
      13:28:23,614 INFO  [org.jboss.as.server.controller] (pool-2-thread-1) Deployed "web-osgi-target"
      13:28:23,645 INFO  [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (RMI TCP Connection(8)-127.0.0.1) BeanManager not found.
      13:28:23,654 INFO  [org.jboss.as.server.deployment] (pool-2-thread-1) Content added at location /home/ondra/work/AS-7/ozizka-as7/testsuite/integration/target/jbossas/standalone/data/content/f1/1b0fd3112db01182792c174a5dd9122c73d377/content
      13:28:23,656 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting deployment of "web-osgi-client.war"
      13:28:23,673 INFO  [org.jboss.web] (MSC service thread 1-12) registering web context: /web-osgi-client
      13:28:23,677 INFO  [org.jboss.as.server.controller] (pool-2-thread-1) Deployed "web-osgi-client.war"
      13:28:23,751 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/web-osgi-client].[SimpleRestEndpoint]] (http-localhost-127.0.0.1-8080-2) Servlet.service() for servlet SimpleRestEndpoint threw exception: java.lang.IllegalArgumentException: Null sref
      	at org.jboss.osgi.framework.internal.ServiceState.assertServiceState(ServiceState.java:125)
      	at org.jboss.osgi.framework.internal.AbstractBundleContext.getService(AbstractBundleContext.java:350)
      	at org.jboss.as.test.integration.osgi.webapp.SimpleClientServlet.echo(SimpleClientServlet.java:68) [classes:]
      	at org.jboss.as.test.integration.osgi.webapp.SimpleClientServlet.doGet(SimpleClientServlet.java:55) [classes:]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:144) [jboss-as-web-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:670) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
      	at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      
      13:28:25,579 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment web-osgi-client.war in 2ms
      13:28:25,582 INFO  [org.jboss.as.server.controller] (pool-2-thread-1) Undeployed "web-osgi-client.war"
      13:28:25,673 ERROR [org.jboss.arquillian.protocol.jmx.JMXTestRunner] (RMI TCP Connection(8)-127.0.0.1) Failed: org.jboss.as.test.integration.osgi.webapp.ServletIntegrationTestCase.testServiceAccess: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/web-osgi-client/servlet?msg=foo
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) [:1.6.0_24]
      	at java.net.URL.openStream(URL.java:1010) [:1.6.0_24]
      	at org.jboss.as.test.integration.osgi.OSGiTestSupport.getHttpResponse(OSGiTestSupport.java:98)
      	at org.jboss.as.test.integration.osgi.webapp.ServletIntegrationTestCase.getHttpResponse(ServletIntegrationTestCase.java:126)
      	at org.jboss.as.test.integration.osgi.webapp.ServletIntegrationTestCase.testServiceAccess(ServletIntegrationTestCase.java:103)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_24]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) [arquillian-service:]
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:246) [arquillian-service:]
      	at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]
      	at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor16.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]
      	at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:82) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
      	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:68) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
      	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]
      	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134) [arquillian-service:]
      	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:239) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:202) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:216) [arquillian-service:]
      	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-service:]
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-service:]
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-service:]
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-service:]
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-service:]
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-service:]
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-service:]
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:161) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175) [arquillian-service:]
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-service:]
      	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123) [arquillian-service:]
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]
      	at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]
      	at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]
      	at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]
      	at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226) [arquillian-service:]
      	at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262) [:1.6.0_24]
      	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) [:1.6.0_24]
      	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) [:1.6.0_24]
      	at org.jboss.as.jmx.tcl.TcclMBeanServer.invoke(TcclMBeanServer.java:218) [jboss-as-jmx-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
      	at org.jboss.as.jmx.model.ModelControllerMBeanServer.invoke(ModelControllerMBeanServer.java:202) [jboss-as-jmx-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
      	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1427) [:1.6.0_24]
      	at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:72) [:1.6.0_24]
      	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1265) [:1.6.0_24]
      	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1360) [:1.6.0_24]
      	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788) [:1.6.0_24]
      	at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) [:1.6.0_24]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_24]
      	at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_24]
      	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:305) [:1.6.0_24]
      	at sun.rmi.transport.Transport$1.run(Transport.java:159) [:1.6.0_24]
      	at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_24]
      	at sun.rmi.transport.Transport.serviceCall(Transport.java:155) [:1.6.0_24]
      	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535) [:1.6.0_24]
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790) [:1.6.0_24]
      	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649) [:1.6.0_24]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
      	at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      
      13:28:25,697 INFO  [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (RMI TCP Connection(8)-127.0.0.1) BeanManager not found.
      13:28:25,703 INFO  [org.jboss.as.test.integration.osgi.xservice.bundle.TargetBundleActivator] (RMI TCP Connection(8)-127.0.0.1) ModuleIdentifier: deployment.web-osgi-target:0.0.0
      13:28:25,704 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (RMI TCP Connection(8)-127.0.0.1) Bundle started: web-osgi-target:0.0.0
      13:28:25,704 INFO  [org.jboss.as.test.integration.osgi.xservice.bundle.TargetBundleActivator] (RMI TCP Connection(8)-127.0.0.1) Echo: foo
      13:28:25,712 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-11) Bundle stopped: web-osgi-target:0.0.0
      13:28:25,714 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment web-osgi-target in 3ms
      13:28:25,714 INFO  [org.jboss.as.server.controller] (pool-2-thread-1) Undeployed "web-osgi-target"
      

      Attachments

        Activity

          People

            tdiesler@redhat.com Thomas Diesler
            tdiesler@redhat.com Thomas Diesler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: