glassfish
  1. glassfish
  2. GLASSFISH-16412

Unable to lookup JNDI from activator when bundle is deployed with asadmin deploy --type=osgi

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1.1_dev, 4.0
    • Component/s: OSGi-JavaEE
    • Labels:
      None

      Description

      The attached WAB does a JNDI lookup in its activator. When this WAB is deployed using deploy --type=osgi command, it failed to lookup JNDI with following exception:

      [#|2011-04-21T18:52:12.386+0530|SEVERE|glassfish3.2|com.sun.enterprise.naming|_ThreadID=18;_ThreadName=admin-thread-pool-4848(5);|enterprise_naming.excep_in_copymutableobj
      java.lang.IllegalArgumentException: Illegal null argument to ObjectInputStreamWithLoader
      at com.sun.enterprise.naming.util.ObjectInputStreamWithLoader.<init>(ObjectInputStreamWithLoader.java:69)
      at com.sun.enterprise.naming.util.OSGiObjectInputOutputStreamFactoryImpl$OSGiObjectInputStream.<init>(OSGiObjectInputOutputStreamFactoryImpl.java:152)
      at com.sun.enterprise.naming.util.OSGiObjectInputOutputStreamFactoryImpl.createObjectInputStream(OSGiObjectInputOutputStreamFactoryImpl.java:138)
      at com.sun.enterprise.naming.util.NamingUtilsImpl.makeCopyOfObject(NamingUtilsImpl.java:112)
      at com.sun.enterprise.naming.impl.LocalSerialContextProviderImpl.rebind(LocalSerialContextProviderImpl.java:113)
      at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:707)
      at com.sun.enterprise.naming.impl.SerialContext.rebind(SerialContext.java:724)
      at javax.naming.InitialContext.rebind(InitialContext.java:412)
      at javax.naming.InitialContext.rebind(InitialContext.java:412)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:206)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.publishObject(GlassfishNamingManagerImpl.java:189)
      at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:237)
      at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:348)
      at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:356)
      at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:183)
      at com.sun.enterprise.connectors.service.ConnectorService.loadResourcesAndItsRar(ConnectorService.java:147)
      at com.sun.enterprise.connectors.service.ConnectorService.checkAndLoadPool(ConnectorService.java:324)
      at com.sun.enterprise.connectors.service.ConnectorResourceAdminServiceImpl.createConnectorResource(ConnectorResourceAdminServiceImpl.java:100)
      at com.sun.enterprise.connectors.ConnectorRuntime.createConnectorResource(ConnectorRuntime.java:296)
      at com.sun.enterprise.resource.deployer.JdbcResourceDeployer.deployResource(JdbcResourceDeployer.java:106)
      at org.glassfish.javaee.services.ResourceProxy.create(ResourceProxy.java:90)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:507)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:455)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at org.glassfish.fighterfish.test.app1.TestApp1Activator.start(TestApp1Activator.java:69)
      at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:629)
      at org.apache.felix.framework.Felix.activateBundle(Felix.java:1835)
      at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
      at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
      at org.glassfish.extras.osgicontainer.OSGiDeployedBundle.resume(OSGiDeployedBundle.java:88)
      at org.glassfish.extras.osgicontainer.OSGiDeployedBundle.start(OSGiDeployedBundle.java:67)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:294)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:462)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:390)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:357)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:372)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1071)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:98)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1251)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1239)
      at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:455)
      at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
      at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:168)
      at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
      at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:238)
      at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
      at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
      at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
      at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
      at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
      at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
      at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
      at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
      at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
      at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
      at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
      at java.lang.Thread.run(Thread.java:619)

      #]

      This is because we return a null classloader during deployment of bundles and deployment backend sets that null classloader in TCL which our naming module can't handle.

        Activity

        Hide
        Sanjeeb Sahoo added a comment -

        Sending extras/osgi-container/src/main/java/org/glassfish/extras/osgicontainer/OSGiDeployedBundle.java
        Transmitting file data .
        Committed revision 46304.

        Show
        Sanjeeb Sahoo added a comment - Sending extras/osgi-container/src/main/java/org/glassfish/extras/osgicontainer/OSGiDeployedBundle.java Transmitting file data . Committed revision 46304.
        Hide
        Sanjeeb Sahoo added a comment -

        3.1.1: svn rev #46572.

        Show
        Sanjeeb Sahoo added a comment - 3.1.1: svn rev #46572.

          People

          • Assignee:
            Sanjeeb Sahoo
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: