You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Ian Christian <po...@pookey.co.uk> on 2008/10/29 18:10:40 UTC

404 on admin page

Hi all,

I'm having issues getting the jetty admin interface working when running
activemq from maven with 'mvn activemq:run'.  I get "2008-10-29
16:32:27.474::INFO:  WebApp@737188401 at http://0.0.0.0:8161/admin" in the
output, however hitting that URL gives me a 404.  My activemq.xml and
pom.xml are below - I'd really appreciate if anyone could point me in the
right direction.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>...</groupId>
  <artifactId>summary</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>summary</name>
  <url>http://maven.apache.org</url>
  <repositories>
    <!-- For up-to-date Hibernate releases -->
    <repository>
      <id>java.net</id>
      <url>http://download.java.net/maven/2</url>
   </repository>
    <repository>
      <id>jboss</id>
      <url>http://repository.jboss.com/maven2</url>
   </repository>
  </repositories>

  <build>
    <plugins>
       <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>2.0.2</version>
          <configuration>
              <source>1.5</source>
              <target>1.5</target>
          </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.activemq.tooling</groupId>
        <artifactId>maven-activemq-plugin</artifactId>
        <version>5.1.0</version>
        <configuration>

<configUri>xbean:file:./src/main/resources/activemq.xml</configUri>
          <fork>false</fork>
          <systemProperties>
            <property>
              <name>javax.net.ssl.keyStorePassword</name>
              <value>password</value>
            </property>
            <property>
              <name>org.apache.activemq.default.directory.prefix</name>
              <value>./target/</value>
            </property>
          </systemProperties>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
            <version>2.5.5</version>
          </dependency>
          <dependency>
              <groupId>org.apache.xbean</groupId>
              <artifactId>xbean-spring</artifactId>
              <version>3.4</version>
          </dependency>
          <dependency>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty-xbean</artifactId>
              <version>6.1.11</version>
          </dependency>
          <dependency>
              <groupId>javax.servlet</groupId>
              <artifactId>jsp-api</artifactId>
              <version>2.0</version>
              <scope>compile</scope>
          </dependency>

          <dependency>
              <groupId>tomcat</groupId>
              <artifactId>jasper-compiler</artifactId>
              <version>5.5.9</version>
              <scope>compile</scope>
          </dependency>
          <dependency>
              <groupId>tomcat</groupId>
              <artifactId>jasper-runtime</artifactId>
              <version>5.5.9</version>
              <scope>compile</scope>
          </dependency>
          <dependency>
              <groupId>tomcat</groupId>
              <artifactId>jasper-compiler-jdt</artifactId>
              <version>5.5.9 </version>
              <scope>compile</scope>
          </dependency>
          <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.12</version>
          </dependency>

        </dependencies>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.6</version>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20080701</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <version>2.5.5</version>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-annotations</artifactId>
      <version>3.3.1.GA</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
    </dependency>
  </dependencies>
</project>

$ cat src/main/resources/activemq.xml
<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">


  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
/>

  <broker xmlns="http://activemq.apache.org/schema/core"
brokerName="localhost" dataDirectory="${activemq.base}/data">

    <!-- Destination specific policies using destination names or wildcards
-->
    <destinationPolicy>
        <policyMap>
            <policyEntries>
                <policyEntry queue=">" memoryLimit="5mb"/>
                <policyEntry topic=">" memoryLimit="5mb">
                    <dispatchPolicy>
                        <strictOrderDispatchPolicy/>
                    </dispatchPolicy>
                    <subscriptionRecoveryPolicy>
                        <lastImageSubscriptionRecoveryPolicy/>
                    </subscriptionRecoveryPolicy>
                </policyEntry>
            </policyEntries>
        </policyMap>
    </destinationPolicy>

    <persistenceAdapter>
      <amqPersistenceAdapter syncOnWrite="false"
directory="${activemq.base}/data" maxFileLength="20 mb"/>
    </persistenceAdapter>

    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
        <transportConnector name="openwire" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
        <transportConnector name="stomp" uri="stomp://localhost:61613"/>
    </transportConnectors>

  </broker>

  <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
      <connectors>
          <nioConnector port="8161"/>
      </connectors>

      <handlers>
          <webAppContext contextPath="/admin" resourceBase="webapps/admin"
logUrlOnStart="true"/>
          <webAppContext contextPath="/demo"
resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
          <webAppContext contextPath="/fileserver"
resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
          <!--
          -->
      </handlers>
  </jetty>

</beans>



Thanks,

Ian

Re: 404 on admin page

Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi,

you set your Jetty to load application from webapps/admin, so you need
to have it your project.

If you need more details on how to integrate the web console in your
project using maven, take a look at the following article

http://www.nighttale.net/onjava/integrating-activemq-web-console.html

Cheers

-- 
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



Ian Christian wrote:
> No, my project isn't a webapp at all - I'm just trying to get the integrated
> admin pages working.
>
> Are there additional steps I need to take to get them to function?
>
> Thanks,
>
> Ian
>
> 2008/10/30 Dejan Bosanac <de...@ttmsolutions.com>
>
>   
>> Hi Ian,
>>
>> are you sure you have webapps/admin folder in your project?
>>
>>
>> Cheers
>>
>> --
>> 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
>>
>>
>>
>> Ian Christian wrote:
>>     
>>> Hi all,
>>>
>>> I'm having issues getting the jetty admin interface working when running
>>> activemq from maven with 'mvn activemq:run'.  I get "2008-10-29
>>> 16:32:27.474::INFO:  WebApp@737188401 at http://0.0.0.0:8161/admin" in
>>>       
>> the
>>     
>>> output, however hitting that URL gives me a 404.  My activemq.xml and
>>> pom.xml are below - I'd really appreciate if anyone could point me in the
>>> right direction.
>>>
>>> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance"
>>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>> http://maven.apache.org/maven-v4_0_0.xsd">
>>>   <modelVersion>4.0.0</modelVersion>
>>>   <groupId>...</groupId>
>>>   <artifactId>summary</artifactId>
>>>   <packaging>jar</packaging>
>>>   <version>1.0-SNAPSHOT</version>
>>>   <name>summary</name>
>>>   <url>http://maven.apache.org</url>
>>>   <repositories>
>>>     <!-- For up-to-date Hibernate releases -->
>>>     <repository>
>>>       <id>java.net</id>
>>>       <url>http://download.java.net/maven/2</url>
>>>    </repository>
>>>     <repository>
>>>       <id>jboss</id>
>>>       <url>http://repository.jboss.com/maven2</url>
>>>    </repository>
>>>   </repositories>
>>>
>>>   <build>
>>>     <plugins>
>>>        <plugin>
>>>           <artifactId>maven-compiler-plugin</artifactId>
>>>           <version>2.0.2</version>
>>>           <configuration>
>>>               <source>1.5</source>
>>>               <target>1.5</target>
>>>           </configuration>
>>>       </plugin>
>>>       <plugin>
>>>         <groupId>org.apache.activemq.tooling</groupId>
>>>         <artifactId>maven-activemq-plugin</artifactId>
>>>         <version>5.1.0</version>
>>>         <configuration>
>>>
>>> <configUri>xbean:file:./src/main/resources/activemq.xml</configUri>
>>>           <fork>false</fork>
>>>           <systemProperties>
>>>             <property>
>>>               <name>javax.net.ssl.keyStorePassword</name>
>>>               <value>password</value>
>>>             </property>
>>>             <property>
>>>               <name>org.apache.activemq.default.directory.prefix</name>
>>>               <value>./target/</value>
>>>             </property>
>>>           </systemProperties>
>>>         </configuration>
>>>         <dependencies>
>>>           <dependency>
>>>             <groupId>org.springframework</groupId>
>>>             <artifactId>spring</artifactId>
>>>             <version>2.5.5</version>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>org.apache.xbean</groupId>
>>>               <artifactId>xbean-spring</artifactId>
>>>               <version>3.4</version>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>org.mortbay.jetty</groupId>
>>>               <artifactId>jetty-xbean</artifactId>
>>>               <version>6.1.11</version>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>javax.servlet</groupId>
>>>               <artifactId>jsp-api</artifactId>
>>>               <version>2.0</version>
>>>               <scope>compile</scope>
>>>           </dependency>
>>>
>>>           <dependency>
>>>               <groupId>tomcat</groupId>
>>>               <artifactId>jasper-compiler</artifactId>
>>>               <version>5.5.9</version>
>>>               <scope>compile</scope>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>tomcat</groupId>
>>>               <artifactId>jasper-runtime</artifactId>
>>>               <version>5.5.9</version>
>>>               <scope>compile</scope>
>>>           </dependency>
>>>           <dependency>
>>>               <groupId>tomcat</groupId>
>>>               <artifactId>jasper-compiler-jdt</artifactId>
>>>               <version>5.5.9 </version>
>>>               <scope>compile</scope>
>>>           </dependency>
>>>           <dependency>
>>>             <groupId>log4j</groupId>
>>>             <artifactId>log4j</artifactId>
>>>             <version>1.2.12</version>
>>>           </dependency>
>>>
>>>         </dependencies>
>>>       </plugin>
>>>     </plugins>
>>>   </build>
>>>   <dependencies>
>>>     <dependency>
>>>       <groupId>junit</groupId>
>>>       <artifactId>junit</artifactId>
>>>       <version>3.8.1</version>
>>>       <scope>test</scope>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>mysql</groupId>
>>>       <artifactId>mysql-connector-java</artifactId>
>>>       <version>5.1.6</version>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>org.json</groupId>
>>>       <artifactId>json</artifactId>
>>>       <version>20080701</version>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>org.springframework</groupId>
>>>       <artifactId>spring</artifactId>
>>>       <version>2.5.5</version>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>org.hibernate</groupId>
>>>       <artifactId>hibernate-annotations</artifactId>
>>>       <version>3.3.1.GA</version>
>>>     </dependency>
>>>     <dependency>
>>>       <groupId>log4j</groupId>
>>>       <artifactId>log4j</artifactId>
>>>       <version>1.2.12</version>
>>>     </dependency>
>>>   </dependencies>
>>> </project>
>>>
>>> $ cat src/main/resources/activemq.xml
>>> <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">
>>>
>>>
>>>   <bean
>>>
>>>       
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
>>     
>>> />
>>>
>>>   <broker xmlns="http://activemq.apache.org/schema/core"
>>> brokerName="localhost" dataDirectory="${activemq.base}/data">
>>>
>>>     <!-- Destination specific policies using destination names or
>>>       
>> wildcards
>>     
>>> -->
>>>     <destinationPolicy>
>>>         <policyMap>
>>>             <policyEntries>
>>>                 <policyEntry queue=">" memoryLimit="5mb"/>
>>>                 <policyEntry topic=">" memoryLimit="5mb">
>>>                     <dispatchPolicy>
>>>                         <strictOrderDispatchPolicy/>
>>>                     </dispatchPolicy>
>>>                     <subscriptionRecoveryPolicy>
>>>                         <lastImageSubscriptionRecoveryPolicy/>
>>>                     </subscriptionRecoveryPolicy>
>>>                 </policyEntry>
>>>             </policyEntries>
>>>         </policyMap>
>>>     </destinationPolicy>
>>>
>>>     <persistenceAdapter>
>>>       <amqPersistenceAdapter syncOnWrite="false"
>>> directory="${activemq.base}/data" maxFileLength="20 mb"/>
>>>     </persistenceAdapter>
>>>
>>>     <!-- The transport connectors ActiveMQ will listen to -->
>>>     <transportConnectors>
>>>         <transportConnector name="openwire" uri="tcp://localhost:61616"
>>> discoveryUri="multicast://default"/>
>>>         <transportConnector name="stomp" uri="stomp://localhost:61613"/>
>>>     </transportConnectors>
>>>
>>>   </broker>
>>>
>>>   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>>>       <connectors>
>>>           <nioConnector port="8161"/>
>>>       </connectors>
>>>
>>>       <handlers>
>>>           <webAppContext contextPath="/admin"
>>>       
>> resourceBase="webapps/admin"
>>     
>>> logUrlOnStart="true"/>
>>>           <webAppContext contextPath="/demo"
>>> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
>>>           <webAppContext contextPath="/fileserver"
>>> resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
>>>           <!--
>>>           -->
>>>       </handlers>
>>>   </jetty>
>>>
>>> </beans>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Ian
>>>
>>>
>>>       
>>     
>
>   


Re: 404 on admin page

Posted by Ian Christian <po...@pookey.co.uk>.
No, my project isn't a webapp at all - I'm just trying to get the integrated
admin pages working.

Are there additional steps I need to take to get them to function?

Thanks,

Ian

2008/10/30 Dejan Bosanac <de...@ttmsolutions.com>

> Hi Ian,
>
> are you sure you have webapps/admin folder in your project?
>
>
> Cheers
>
> --
> 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
>
>
>
> Ian Christian wrote:
> > Hi all,
> >
> > I'm having issues getting the jetty admin interface working when running
> > activemq from maven with 'mvn activemq:run'.  I get "2008-10-29
> > 16:32:27.474::INFO:  WebApp@737188401 at http://0.0.0.0:8161/admin" in
> the
> > output, however hitting that URL gives me a 404.  My activemq.xml and
> > pom.xml are below - I'd really appreciate if anyone could point me in the
> > right direction.
> >
> > <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"
> >   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >   <modelVersion>4.0.0</modelVersion>
> >   <groupId>...</groupId>
> >   <artifactId>summary</artifactId>
> >   <packaging>jar</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >   <name>summary</name>
> >   <url>http://maven.apache.org</url>
> >   <repositories>
> >     <!-- For up-to-date Hibernate releases -->
> >     <repository>
> >       <id>java.net</id>
> >       <url>http://download.java.net/maven/2</url>
> >    </repository>
> >     <repository>
> >       <id>jboss</id>
> >       <url>http://repository.jboss.com/maven2</url>
> >    </repository>
> >   </repositories>
> >
> >   <build>
> >     <plugins>
> >        <plugin>
> >           <artifactId>maven-compiler-plugin</artifactId>
> >           <version>2.0.2</version>
> >           <configuration>
> >               <source>1.5</source>
> >               <target>1.5</target>
> >           </configuration>
> >       </plugin>
> >       <plugin>
> >         <groupId>org.apache.activemq.tooling</groupId>
> >         <artifactId>maven-activemq-plugin</artifactId>
> >         <version>5.1.0</version>
> >         <configuration>
> >
> > <configUri>xbean:file:./src/main/resources/activemq.xml</configUri>
> >           <fork>false</fork>
> >           <systemProperties>
> >             <property>
> >               <name>javax.net.ssl.keyStorePassword</name>
> >               <value>password</value>
> >             </property>
> >             <property>
> >               <name>org.apache.activemq.default.directory.prefix</name>
> >               <value>./target/</value>
> >             </property>
> >           </systemProperties>
> >         </configuration>
> >         <dependencies>
> >           <dependency>
> >             <groupId>org.springframework</groupId>
> >             <artifactId>spring</artifactId>
> >             <version>2.5.5</version>
> >           </dependency>
> >           <dependency>
> >               <groupId>org.apache.xbean</groupId>
> >               <artifactId>xbean-spring</artifactId>
> >               <version>3.4</version>
> >           </dependency>
> >           <dependency>
> >               <groupId>org.mortbay.jetty</groupId>
> >               <artifactId>jetty-xbean</artifactId>
> >               <version>6.1.11</version>
> >           </dependency>
> >           <dependency>
> >               <groupId>javax.servlet</groupId>
> >               <artifactId>jsp-api</artifactId>
> >               <version>2.0</version>
> >               <scope>compile</scope>
> >           </dependency>
> >
> >           <dependency>
> >               <groupId>tomcat</groupId>
> >               <artifactId>jasper-compiler</artifactId>
> >               <version>5.5.9</version>
> >               <scope>compile</scope>
> >           </dependency>
> >           <dependency>
> >               <groupId>tomcat</groupId>
> >               <artifactId>jasper-runtime</artifactId>
> >               <version>5.5.9</version>
> >               <scope>compile</scope>
> >           </dependency>
> >           <dependency>
> >               <groupId>tomcat</groupId>
> >               <artifactId>jasper-compiler-jdt</artifactId>
> >               <version>5.5.9 </version>
> >               <scope>compile</scope>
> >           </dependency>
> >           <dependency>
> >             <groupId>log4j</groupId>
> >             <artifactId>log4j</artifactId>
> >             <version>1.2.12</version>
> >           </dependency>
> >
> >         </dependencies>
> >       </plugin>
> >     </plugins>
> >   </build>
> >   <dependencies>
> >     <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <scope>test</scope>
> >     </dependency>
> >     <dependency>
> >       <groupId>mysql</groupId>
> >       <artifactId>mysql-connector-java</artifactId>
> >       <version>5.1.6</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>org.json</groupId>
> >       <artifactId>json</artifactId>
> >       <version>20080701</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>org.springframework</groupId>
> >       <artifactId>spring</artifactId>
> >       <version>2.5.5</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>org.hibernate</groupId>
> >       <artifactId>hibernate-annotations</artifactId>
> >       <version>3.3.1.GA</version>
> >     </dependency>
> >     <dependency>
> >       <groupId>log4j</groupId>
> >       <artifactId>log4j</artifactId>
> >       <version>1.2.12</version>
> >     </dependency>
> >   </dependencies>
> > </project>
> >
> > $ cat src/main/resources/activemq.xml
> > <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">
> >
> >
> >   <bean
> >
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
> > />
> >
> >   <broker xmlns="http://activemq.apache.org/schema/core"
> > brokerName="localhost" dataDirectory="${activemq.base}/data">
> >
> >     <!-- Destination specific policies using destination names or
> wildcards
> > -->
> >     <destinationPolicy>
> >         <policyMap>
> >             <policyEntries>
> >                 <policyEntry queue=">" memoryLimit="5mb"/>
> >                 <policyEntry topic=">" memoryLimit="5mb">
> >                     <dispatchPolicy>
> >                         <strictOrderDispatchPolicy/>
> >                     </dispatchPolicy>
> >                     <subscriptionRecoveryPolicy>
> >                         <lastImageSubscriptionRecoveryPolicy/>
> >                     </subscriptionRecoveryPolicy>
> >                 </policyEntry>
> >             </policyEntries>
> >         </policyMap>
> >     </destinationPolicy>
> >
> >     <persistenceAdapter>
> >       <amqPersistenceAdapter syncOnWrite="false"
> > directory="${activemq.base}/data" maxFileLength="20 mb"/>
> >     </persistenceAdapter>
> >
> >     <!-- The transport connectors ActiveMQ will listen to -->
> >     <transportConnectors>
> >         <transportConnector name="openwire" uri="tcp://localhost:61616"
> > discoveryUri="multicast://default"/>
> >         <transportConnector name="stomp" uri="stomp://localhost:61613"/>
> >     </transportConnectors>
> >
> >   </broker>
> >
> >   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
> >       <connectors>
> >           <nioConnector port="8161"/>
> >       </connectors>
> >
> >       <handlers>
> >           <webAppContext contextPath="/admin"
> resourceBase="webapps/admin"
> > logUrlOnStart="true"/>
> >           <webAppContext contextPath="/demo"
> > resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
> >           <webAppContext contextPath="/fileserver"
> > resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
> >           <!--
> >           -->
> >       </handlers>
> >   </jetty>
> >
> > </beans>
> >
> >
> >
> > Thanks,
> >
> > Ian
> >
> >
>
>

Re: 404 on admin page

Posted by Dejan Bosanac <de...@ttmsolutions.com>.
Hi Ian,

are you sure you have webapps/admin folder in your project?


Cheers

-- 
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



Ian Christian wrote:
> Hi all,
>
> I'm having issues getting the jetty admin interface working when running
> activemq from maven with 'mvn activemq:run'.  I get "2008-10-29
> 16:32:27.474::INFO:  WebApp@737188401 at http://0.0.0.0:8161/admin" in the
> output, however hitting that URL gives me a 404.  My activemq.xml and
> pom.xml are below - I'd really appreciate if anyone could point me in the
> right direction.
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>   <modelVersion>4.0.0</modelVersion>
>   <groupId>...</groupId>
>   <artifactId>summary</artifactId>
>   <packaging>jar</packaging>
>   <version>1.0-SNAPSHOT</version>
>   <name>summary</name>
>   <url>http://maven.apache.org</url>
>   <repositories>
>     <!-- For up-to-date Hibernate releases -->
>     <repository>
>       <id>java.net</id>
>       <url>http://download.java.net/maven/2</url>
>    </repository>
>     <repository>
>       <id>jboss</id>
>       <url>http://repository.jboss.com/maven2</url>
>    </repository>
>   </repositories>
>
>   <build>
>     <plugins>
>        <plugin>
>           <artifactId>maven-compiler-plugin</artifactId>
>           <version>2.0.2</version>
>           <configuration>
>               <source>1.5</source>
>               <target>1.5</target>
>           </configuration>
>       </plugin>
>       <plugin>
>         <groupId>org.apache.activemq.tooling</groupId>
>         <artifactId>maven-activemq-plugin</artifactId>
>         <version>5.1.0</version>
>         <configuration>
>
> <configUri>xbean:file:./src/main/resources/activemq.xml</configUri>
>           <fork>false</fork>
>           <systemProperties>
>             <property>
>               <name>javax.net.ssl.keyStorePassword</name>
>               <value>password</value>
>             </property>
>             <property>
>               <name>org.apache.activemq.default.directory.prefix</name>
>               <value>./target/</value>
>             </property>
>           </systemProperties>
>         </configuration>
>         <dependencies>
>           <dependency>
>             <groupId>org.springframework</groupId>
>             <artifactId>spring</artifactId>
>             <version>2.5.5</version>
>           </dependency>
>           <dependency>
>               <groupId>org.apache.xbean</groupId>
>               <artifactId>xbean-spring</artifactId>
>               <version>3.4</version>
>           </dependency>
>           <dependency>
>               <groupId>org.mortbay.jetty</groupId>
>               <artifactId>jetty-xbean</artifactId>
>               <version>6.1.11</version>
>           </dependency>
>           <dependency>
>               <groupId>javax.servlet</groupId>
>               <artifactId>jsp-api</artifactId>
>               <version>2.0</version>
>               <scope>compile</scope>
>           </dependency>
>
>           <dependency>
>               <groupId>tomcat</groupId>
>               <artifactId>jasper-compiler</artifactId>
>               <version>5.5.9</version>
>               <scope>compile</scope>
>           </dependency>
>           <dependency>
>               <groupId>tomcat</groupId>
>               <artifactId>jasper-runtime</artifactId>
>               <version>5.5.9</version>
>               <scope>compile</scope>
>           </dependency>
>           <dependency>
>               <groupId>tomcat</groupId>
>               <artifactId>jasper-compiler-jdt</artifactId>
>               <version>5.5.9 </version>
>               <scope>compile</scope>
>           </dependency>
>           <dependency>
>             <groupId>log4j</groupId>
>             <artifactId>log4j</artifactId>
>             <version>1.2.12</version>
>           </dependency>
>
>         </dependencies>
>       </plugin>
>     </plugins>
>   </build>
>   <dependencies>
>     <dependency>
>       <groupId>junit</groupId>
>       <artifactId>junit</artifactId>
>       <version>3.8.1</version>
>       <scope>test</scope>
>     </dependency>
>     <dependency>
>       <groupId>mysql</groupId>
>       <artifactId>mysql-connector-java</artifactId>
>       <version>5.1.6</version>
>     </dependency>
>     <dependency>
>       <groupId>org.json</groupId>
>       <artifactId>json</artifactId>
>       <version>20080701</version>
>     </dependency>
>     <dependency>
>       <groupId>org.springframework</groupId>
>       <artifactId>spring</artifactId>
>       <version>2.5.5</version>
>     </dependency>
>     <dependency>
>       <groupId>org.hibernate</groupId>
>       <artifactId>hibernate-annotations</artifactId>
>       <version>3.3.1.GA</version>
>     </dependency>
>     <dependency>
>       <groupId>log4j</groupId>
>       <artifactId>log4j</artifactId>
>       <version>1.2.12</version>
>     </dependency>
>   </dependencies>
> </project>
>
> $ cat src/main/resources/activemq.xml
> <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">
>
>
>   <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
> />
>
>   <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="localhost" dataDirectory="${activemq.base}/data">
>
>     <!-- Destination specific policies using destination names or wildcards
> -->
>     <destinationPolicy>
>         <policyMap>
>             <policyEntries>
>                 <policyEntry queue=">" memoryLimit="5mb"/>
>                 <policyEntry topic=">" memoryLimit="5mb">
>                     <dispatchPolicy>
>                         <strictOrderDispatchPolicy/>
>                     </dispatchPolicy>
>                     <subscriptionRecoveryPolicy>
>                         <lastImageSubscriptionRecoveryPolicy/>
>                     </subscriptionRecoveryPolicy>
>                 </policyEntry>
>             </policyEntries>
>         </policyMap>
>     </destinationPolicy>
>
>     <persistenceAdapter>
>       <amqPersistenceAdapter syncOnWrite="false"
> directory="${activemq.base}/data" maxFileLength="20 mb"/>
>     </persistenceAdapter>
>
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
>         <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
>         <transportConnector name="stomp" uri="stomp://localhost:61613"/>
>     </transportConnectors>
>
>   </broker>
>
>   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>       <connectors>
>           <nioConnector port="8161"/>
>       </connectors>
>
>       <handlers>
>           <webAppContext contextPath="/admin" resourceBase="webapps/admin"
> logUrlOnStart="true"/>
>           <webAppContext contextPath="/demo"
> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
>           <webAppContext contextPath="/fileserver"
> resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
>           <!--
>           -->
>       </handlers>
>   </jetty>
>
> </beans>
>
>
>
> Thanks,
>
> Ian
>
>