glassfish
  1. glassfish
  2. GLASSFISH-20650

NullPointerException in StringManagerBase, ActiveJmsResourceAdapter calls getString(...) with null as argument

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: i18n, jms
    • Labels:
      None
    • Environment:

      Java 1.7.0_21, 64bit
      Windows 7, 64bit
      GlassFish Server Open Source Edition 4.0 (build 89)

      Description

      ActiveJmsResourceAdapter calls StringManagerBase.getString("ajra.cannot_find_phy_dest", null) which raises a NullPointerException in the for-loop of StringManagerBase.getStringWithDefault(). See code snippets and stack trace below.

      com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter
      private String getPhysicalDestinationFromConfiguration(String logicalDest, String appName, String moduleName)
                  throws ConnectorRuntimeException {
              
              ...
      
              if (ep == null) {
                  String msg = sm.getString("ajra.cannot_find_phy_dest", null);
                  throw new ConnectorRuntimeException(msg);
              }
      
              return ep.getValue();
          }
      
      om.sun.enterprise.util.i18n.StringManagerBase
      public String getStringWithDefault(String key, String defaultFormat, 
                  Object arguments[]) {
      
              MessageFormat f =
                  new MessageFormat( getStringWithDefault(key, defaultFormat) );
      
              for (int i=0; i<arguments.length; i++) {
      
                  if ( arguments[i] == null ) {
      
      java.lang.NullPointerException
      	at com.sun.enterprise.util.i18n.StringManagerBase.getStringWithDefault(StringManagerBase.java:208)
      	at com.sun.enterprise.util.i18n.StringManagerBase.getString(StringManagerBase.java:311)
      	at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:2163)
      	at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:1991)
      	at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:168)
      	at org.glassfish.ejb.mdb.MessageBeanContainer.<init>(MessageBeanContainer.java:252)
      	at org.glassfish.ejb.mdb.MessageBeanContainerFactory.createContainer(MessageBeanContainerFactory.java:63)
      	at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
      	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
      	at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
      	at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
      	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)
      	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:356)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)
      	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
      	at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
      	at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297)
      	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)
      	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
      	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
      	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
      	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
      	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
      	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
      	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
      	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
      	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
      	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
      	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
      	at java.lang.Thread.run(Thread.java:722)
      

        Activity

        keil created issue -

          People

          • Assignee:
            michael.fang
            Reporter:
            keil
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: