ICEfaces
  1. ICEfaces
  2. ICE-3309

Auto detection of JMS without AHS causes excessive logging

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7.1
    • Fix Version/s: None
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      liferay tomcat, tomcat 5.5

      Description

      As part of the changes that put some JMS code into the main servlet for auto-detecting JMS availability, the following is logged out into the console whenever you run the 1.7 branch of ICEfaces with Liferay on Tomcat (or perhaps other servers where JMS is available but we're not using AHS). I saw it when I tested the chat portlet for multi-view disposal:

      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter <init>
      INFO: Messaging Properties (web.xml): null
      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter <init>
      INFO: Server Info: Apache Tomcat/6.0.16
      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter <init>
      INFO: Messaging Properties: activemq.properties, jboss_ha.properties, jboss.properties
      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      INFO: Trying JMS Environment:
              java.naming.provider.url = tcp://localhost:61616?wireFormat.maxInactivityDuration=0
              java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory

      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      SEVERE: Failed JMS Environment: Cannot instantiate class: org.apache.activemq.jndi.ActiveMQInitialContextFactory
      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      INFO: Trying JMS Environment:
              java.naming.provider.url = localhost:1100
              java.naming.factory.initial = org.jnp.interfaces.NamingContextFactory
              java.naming.factory.url.pkgs = org.jboss.naming:org.jnp.interfaces

      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      SEVERE: Failed JMS Environment: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      INFO: Trying JMS Environment:
              java.naming.provider.url = localhost:1099
              java.naming.factory.initial = org.jnp.interfaces.NamingContextFactory
              java.naming.factory.url.pkgs = org.jboss.naming:org.jnp.interfaces

      Jul 17, 2008 6:48:04 PM com.icesoft.net.messaging.jms.JMSAdapter initialize
      SEVERE: Failed JMS Environment: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
      Jul 17, 2008 6:48:04 PM com.icesoft.faces.webapp.http.servlet.MainServlet setUpMessageServiceClient
      WARNING: Did not start Ajax Push JMS services:
      com.icesoft.net.messaging.MessageServiceException: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
      at com.icesoft.net.messaging.jms.JMSAdapter.subscribe(JMSAdapter.java:367)
      at com.icesoft.net.messaging.MessageServiceClient.subscribe(MessageServiceClient.java:791)
      at com.icesoft.net.messaging.MessageServiceClient.subscribe(MessageServiceClient.java:759)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.setUpMessageServiceClient(MainServlet.java:121)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.init(MainServlet.java:66)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:924)
      at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1215)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
      at java.lang.Thread.run(Thread.java:613)
      Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
      at javax.naming.InitialContext.init(InitialContext.java:223)
      at javax.naming.InitialContext.<init>(InitialContext.java:197)
      at com.icesoft.net.messaging.jms.JMSAdapter.initialize(JMSAdapter.java:506)
      at com.icesoft.net.messaging.jms.JMSAdapter.subscribe(JMSAdapter.java:365)
      ... 22 more
      Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
      ... 27 more

      The reason seems to be that our automatic detection code:

          private boolean isJMSAvailable() {
              try {
                  this.getClass().getClassLoader().loadClass("javax.jms.TopicConnectionFactory");
                  return true;
              } catch (ClassNotFoundException exception) {
                  return false;
              }
          }

      It always return true when JMS is available on the classpath. Liferay appears to include JMS libraries even when running on Tomcat. We need more sophisticated detection (JMS and AHS are present) and/or adjusted logging.

        Activity

        Hide
        Kevin Cammarata added a comment -

        I am experiencing this same issue after upgrading Websphere Application Server to patch 6.1.0.17

        Show
        Kevin Cammarata added a comment - I am experiencing this same issue after upgrading Websphere Application Server to patch 6.1.0.17
        Hide
        Jack Van Ooststroom added a comment -

        With the introduction of PS/EPS this became not applicable. Marking this one as INVALID.

        Show
        Jack Van Ooststroom added a comment - With the introduction of PS/EPS this became not applicable. Marking this one as INVALID.

          People

          • Assignee:
            Unassigned
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: