activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shahzad Bhatti <bha...@plexobject.com>
Subject Re: NPE for ${requestContext.brokerQuery.brokerAdmin.brokerName}
Date Mon, 05 Jan 2009 20:43:36 GMT

Sorry, for the late reply but I have both of those files in WEB-INF and as I
mentioned I copied all files from admin's WEB-INF except activemq.xml, which
I simplified with minimum configuration. Any other ideas? Thanks.




Dejan Bosanac wrote:
> 
> Hi,
> 
> as far as I can see from your configuration, you're missing
> dispatcher-servlet.xml and webconsole-embedded.xml for starters. Take a
> look
> at webapps/admin/WEB-INF/ folder of the ActiveMQ distribution for
> examples.
> 
> Cheers
> --
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> On Wed, Dec 24, 2008 at 7:14 PM, Shahzad Bhatti
> <bhatti@plexobject.com>wrote:
> 
>>
>> I am trying to setup embedded ActiveMQ inside Tomcat. It is largely based
>> on
>> admin webapp included in the distribution. However, when the server
>> starts
>> up, I see
>>
>> type Exception report
>>
>> message
>>
>> description The server encountered an internal error () that prevented it
>> from fulfilling this request.
>>
>> exception
>>
>> org.apache.jasper.JasperException: Exception in JSP: /index.jsp:39
>>
>> 36: <table>
>> 37:     <tr>
>> 38:         <td>Name</td>
>> 39:         <td>${requestContext.brokerQuery.brokerAdmin.brokerName}</td>
>> 40:     </tr>
>> 41:     <tr>
>> 42:         <td>ID</td>
>>
>>
>> Stacktrace:
>>
>>
>> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
>>
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>>
>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>>
>> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
>>
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>
>>  org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:43)
>>
>>
>> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
>>
>>
>> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
>>
>>
>> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
>>
>> root cause
>>
>> java.lang.NullPointerException
>>
>>
>> org.apache.activemq.web.filter.ApplicationContextFilter$2.get(ApplicationContextFilter.java:157)
>>        org.apache.commons.el.ArraySuffix.evaluate(ArraySuffix.java:218)
>>        org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
>>
>>
>> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:263)
>>
>>
>> org.apache.commons.el.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:190)
>>
>>
>> org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:924)
>>        org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
>>        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>>
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>>
>>  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>
>>
>> org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:83)
>>
>>
>> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>>
>>  org.apache.activemq.web.SessionFilter.doFilter(SessionFilter.java:43)
>>
>>
>> org.apache.activemq.web.filter.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:81)
>>
>>
>> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
>>
>>
>> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
>>
>>
>>
>>
>> My activemq.xml looks like
>> <beans
>>  xmlns="http://www.springframework.org/schema/beans"
>>  xmlns:amq="http://activemq.apache.org/schema/core"
>>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>  xsi:schemaLocation="http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>  http://activemq.apache.org/schema/core
>> http://activemq.apache.org/schema/core/activemq-core.xsd
>>  http://activemq.apache.org/camel/schema/spring
>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
>>
>>
>>  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false">
>>
>>    <persistenceAdapter>
>>      <journaledJDBC journalLogFiles="5" dataDirectory="../data"/>
>>    </persistenceAdapter>
>>
>>    <transportConnectors>
>>      <transportConnector uri="tcp://localhost:61616"/>
>>      <transportConnector uri="stomp://localhost:61613"/>
>>    </transportConnectors>
>>
>>  </broker>
>>
>> </beans>
>>
>>
>>
>> And web.xml looks like
>> <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>>         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
>>         version="2.4">
>>
>>  <description> Apache ActiveMQ Web Console </description>
>>  <display-name>ActiveMQ Console</display-name>
>>
>>    <!-- context config -->
>>    <context-param>
>>        <param-name>org.apache.activemq.brokerURL</param-name>
>>    <param-value>/WEB-INF/activemq.xml</param-value>
>>        <description>The URL of the Message Broker to connect
>> to</description>
>>    </context-param>
>>
>>
>>
>>    <context-param>
>>        <param-name>org.apache.activemq.embeddedBroker</param-name>
>>        <param-value>true</param-value>
>>        <description>Whether we should include an embedded broker or
>> not</description>
>>    </context-param>
>>
>>
>>  <listener>
>>
>>
>> <listener-class>org.apache.activemq.web.SpringBrokerContextListener</listener-class>
>>  </listener>
>>
>>  <filter>
>>    <filter-name>sitemesh</filter-name>
>>
>>
>> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
>>  </filter>
>>
>>  <filter-mapping>
>>    <filter-name>sitemesh</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>
>>  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> -->
>>  <!--              Expose Spring POJOs to JSP
>> -->
>>  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> -->
>>  <filter>
>>    <filter-name>spring</filter-name>
>>
>>
>> <filter-class>org.apache.activemq.web.filter.ApplicationContextFilter</filter-class>
>>  </filter>
>>
>>  <filter-mapping>
>>    <filter-name>spring</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>
>>
>>  <!-- the subscription REST servlet -->
>>  <servlet>
>>    <servlet-name>AjaxServlet</servlet-name>
>>    <servlet-class>org.apache.activemq.web.AjaxServlet</servlet-class>
>>    <load-on-startup>1</load-on-startup>
>>  </servlet>
>>  <servlet-mapping>
>>    <servlet-name>AjaxServlet</servlet-name>
>>    <url-pattern>/ajax/*</url-pattern>
>>  </servlet-mapping>
>>
>>  <servlet>
>>    <servlet-name>SendServlet</servlet-name>
>>    <servlet-class>org.apache.activemq.web.MessageServlet</servlet-class>
>>    <load-on-startup>1</load-on-startup>
>>  </servlet>
>>  <servlet-mapping>
>>    <servlet-name>SendServlet</servlet-name>
>>    <url-pattern>/send/*</url-pattern>
>>  </servlet-mapping>
>>
>>  <!-- the queue browse servlet -->
>>  <servlet>
>>    <servlet-name>QueueBrowseServlet</servlet-name>
>>
>> <servlet-class>org.apache.activemq.web.QueueBrowseServlet</servlet-class>
>>  </servlet>
>>  <servlet-mapping>
>>    <servlet-name>QueueBrowseServlet</servlet-name>
>>    <url-pattern>/queueBrowse/*</url-pattern>
>>  </servlet-mapping>
>>
>>  <!-- track the session usage for web JMS clients -->
>>  <filter>
>>    <filter-name>session</filter-name>
>>    <filter-class>org.apache.activemq.web.SessionFilter</filter-class>
>>  </filter>
>>
>>  <filter>
>>    <filter-name>spring-rq</filter-name>
>>
>>
>> <filter-class>org.springframework.web.filter.RequestContextFilter</filter-class>
>>  </filter>
>>
>>  <filter-mapping>
>>    <filter-name>session</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>  <filter-mapping>
>>    <filter-name>spring-rq</filter-name>
>>    <url-pattern>/*</url-pattern>
>>  </filter-mapping>
>>
>>  <servlet>
>>    <servlet-name>dispatcher</servlet-name>
>>
>>
>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>    <load-on-startup>2</load-on-startup>
>>  </servlet>
>>
>>  <servlet-mapping>
>>    <servlet-name>dispatcher</servlet-name>
>>    <url-pattern>*.action</url-pattern>
>>  </servlet-mapping>
>>
>>  <welcome-file-list>
>>    <welcome-file>index.html</welcome-file>
>>    <welcome-file>index.jsp</welcome-file>
>>  </welcome-file-list>
>>
>>  <jsp-config>
>>    <jsp-property-group>
>>      <url-pattern>*.jsp</url-pattern>
>>      <include-prelude>/WEB-INF/jspf/headertags.jspf</include-prelude>
>>    </jsp-property-group>
>>  </jsp-config>
>> </web-app>
>>
>>
>>
>> How do I specify admin URL. Any idea how to fix this error? Thanks.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/NPE-for-%24%7BrequestContext.brokerQuery.brokerAdmin.brokerName%7D-tp21156924p21156924.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> 
> 
> http://www.ttmsolutions.com - get a free ActiveMQ user guide
> 
> ActiveMQ in Action - http://www.manning.com/snyder/
> Scripting in Java - http://www.scriptinginjava.net
> 

-- 
View this message in context: http://www.nabble.com/NPE-for-%24%7BrequestContext.brokerQuery.brokerAdmin.brokerName%7D-tp21156924p21298924.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message