Salim ASAN | 1 Nov 2011 14:02
Picon
Favicon

[jetty-user] Active MQ Admin Page Shows "HTTP ERROR: 500 No realm" Error Message

Hi all,

We have configured basic authentication for ActiveMQ admin page  but Active MQ admin page shows  "HTTP ERROR: 500 No realm" Error Message. (Problem is resolved after a restart but reoccurs)
What could be the cause and solution of this error ?
You could find our configuration files below..
We are using ActiveMQ 5.3.2 with Jetty-6.1.9
Thanks for your help.

Salim Asan

-------------------------------------------------------------------------------------
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"
  xmlns:jetty="http://mortbay.com/schemas/jetty/1.0"
  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">

   
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </property>     
    </bean>

        <jetty:jetty>
                <connectors>
                        <jetty:nioConnector port="8161"/>
                </connectors>
                <handlers>
                        <jetty:webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
                </handlers>
                <userRealms>
                        <bean class="org.mortbay.jetty.security.HashUserRealm"> <property name="name" value="AMQRealm" />
                                <property name="config" value="${activemq.base}/conf/realm.properties" />
                        </bean>
                </userRealms>
        </jetty:jetty>

   
    <broker xmlns="http://activemq.apache.org/schema/core"
    brokerName="localhost" dataDirectory="${activemq.base}/data"
    destroyApplicationContextOnStop="true"
    useJmx="true">
 
 
 
       
             
        <destinationPolicy>
            <policyMap>
              <policyEntries>
                <policyEntry topic=">" producerFlowControl="true" memoryLimit="1mb">
                  <pendingSubscriberPolicy>
                    <vmCursor />
                  </pendingSubscriberPolicy>
                </policyEntry>
                <policyEntry queue=">" producerFlowControl="true" memoryLimit="1mb">
                 
                </policyEntry>
              </policyEntries>
            </policyMap>
        </destinationPolicy> 
 
       
       
     <managementContext>
<managementContext connectorPort="2011" jmxDomainName="pays.domain"/>
</managementContext>

       
        <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb"/>
        </persistenceAdapter>
       
       
         
                 
       
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
        </transportConnectors>

    </broker>

   

   
    <import resource="jetty.xml"/>
   
</beans>

-------------------------------------------------------------------------------------
jetty.xml:

 

<beans
    xmlns="http://www.springframework.org/schema/beans"
    xmlns:jetty="http://mortbay.com/schemas/jetty/1.0"
    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.xsd">
   
    <bean id="Server"
      class="org.mortbay.jetty.Server" init-method="start" destroy-method="stop">
    <property name="connectors">
      <list>
        <bean id="Connector" class="org.mortbay.jetty.nio.SelectChannelConnector">
          <property name="port" value="8161"/>
        </bean>
      </list>
    </property>

    <property name="handler">
      <bean id="handlers"
           class="org.mortbay.jetty.handler.HandlerCollection">
        <property name="handlers">
          <list>
             <bean id="contexts"
              class="org.mortbay.jetty.handler.ContextHandlerCollection">
               <property name="handlers">
                 <list>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/admin"/>
                     <property name="resourceBase" value="${activemq.base}/webapps/admin"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/camel"/>
                     <property name="resourceBase" value="${activemq.base}/webapps/camel"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/demo"/>
                     <property name="resourceBase" value="${activemq.base}/webapps/demo"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.webapp.WebAppContext">
                     <property name="contextPath" value="/fileserver"/>
                     <property name="resourceBase" value="${activemq.base}/webapps/fileserver"/>
                     <property name="logUrlOnStart" value="true"/>
                   </bean>
                   <bean class="org.mortbay.jetty.handler.ContextHandler">
                       <property name="contextPath" value="/"/>
                       <property name="handler">
                           <bean class="org.mortbay.jetty.handler.ResourceHandler">
                               <property name="welcomeFiles">
                                   <list>
                                       <value>index.html</value>
                                   </list>
                               </property>
                               <property name="resourceBase" value="${activemq.base}/webapps/static/"/>
                           </bean> 
                       </property>
                   </bean>
                 </list>
               </property>
             </bean>
          </list>
        </property>
      </bean>
    </property>
    </bean>
</beans>

-------------------------------------------------------------------------------------
Admin application's web.xml:

<?xml version="1.0" encoding="UTF-8"?>


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

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

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

 
 
 

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

 

Salim ASAN

 

 

John Smith | 2 Nov 2011 16:25
Picon

[jetty-user] Jetty, JMeter and Keep-Alive

I have a old school, pre SOAP/Web Service buz, "REST/POX" service that process requests in real time. I.e: It receives XML does something with it and responds back to the client. In general average response time is 200-300ms

So I have couple thousand clients who connect to this service. Not to many clients but each client is high volume, as in each client is capable of making 100 000+ request per day. Over the course of the day average requests per second are NOT so high, but there is peek times where it can reach 200 requests a second.

Each request is 1 connection, request, 1 response, close connection.

Now I converted this old service to real REST using Jersey and Jetty and I proceeded to performance test it. I setup JMeter...

10 threads - HTTP Request Sampler - Assertion Response - Summary report

And I got 2100 requests per second great!

Then I disabled Keep-Alive in Jmeter as clients don't really use it and as described above this isn't a Keep-Alive type of application.

So now JMeter seems to hang or pause or freeze or what ever. So I though ok maybe it's Jersey, but it's not it seems to happen even on just calling a simple index.jsp which just prints Hello World!

1- I want to make sure it's not Jetty
2- Is Keep-Alive something I want to consider as clients connecting aren't exactly capable of managing Keep-Alive connection provided their APIs do it for them and if even.
3- Is there a way for me to test the 2000 requests second and make sure Jetty truly does work correct without Keep-Alive
4- is it possible that JMeter without Keep-Alive is creating so many open client connections that neither client machine or server machine can handle so many open connection? (using Windows 2003 and JDKu27 on both client and server machine)

John Smith | 2 Nov 2011 21:42
Picon

[jetty-user] Re: Jetty, JMeter and Keep-Alive

So far it seems like Windows client issue. I tested off a Linux Desktop and i did not get any pauses with Keep-Alive off.

On Wed, Nov 2, 2011 at 11:25 AM, John Smith <java.dev.mtl <at> gmail.com> wrote:
I have a old school, pre SOAP/Web Service buz, "REST/POX" service that process requests in real time. I.e: It receives XML does something with it and responds back to the client. In general average response time is 200-300ms

So I have couple thousand clients who connect to this service. Not to many clients but each client is high volume, as in each client is capable of making 100 000+ request per day. Over the course of the day average requests per second are NOT so high, but there is peek times where it can reach 200 requests a second.

Each request is 1 connection, request, 1 response, close connection.

Now I converted this old service to real REST using Jersey and Jetty and I proceeded to performance test it. I setup JMeter...

10 threads - HTTP Request Sampler - Assertion Response - Summary report

And I got 2100 requests per second great!

Then I disabled Keep-Alive in Jmeter as clients don't really use it and as described above this isn't a Keep-Alive type of application.

So now JMeter seems to hang or pause or freeze or what ever. So I though ok maybe it's Jersey, but it's not it seems to happen even on just calling a simple index.jsp which just prints Hello World!

1- I want to make sure it's not Jetty
2- Is Keep-Alive something I want to consider as clients connecting aren't exactly capable of managing Keep-Alive connection provided their APIs do it for them and if even.
3- Is there a way for me to test the 2000 requests second and make sure Jetty truly does work correct without Keep-Alive
4- is it possible that JMeter without Keep-Alive is creating so many open client connections that neither client machine or server machine can handle so many open connection? (using Windows 2003 and JDKu27 on both client and server machine)

Justin Cranford | 3 Nov 2011 03:27
Picon
Favicon

[jetty-user] NullPointerException at XmlConfiguration$1.run(XmlConfiguration.java:1138) in jetty-8.0.4.v20111024

Hello,
 
Here is my environment:
1) Jetty Version: jetty-8.0.4.v20111024
2) IE 9.0.3 x32 (9.0.8112.16421)
3) OS Platform: Windows 7 Ultimate x64
4) JVM Version: Oracle JDK 6u27 x32
5) Command Line: ***See end of email***

I am running jetty-8.0.4.v20111024. I am getting this NullPointerException each time Jetty starts.
 
WARN [2011/11/02 21:35:02.989][main](XmlConfiguration.java:1152)
java.lang.NullPointerException
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1138)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1126)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
at org.eclipse.jetty.start.Main.start(Main.java:612)
at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
at org.eclipse.jetty.start.Main.main(Main.java:79)
INFO [2011/11/02 21:35:03.051][main](Server.java:253) jetty-8.0.4.v20111024
 
I get this NPE even when I strip down my Jetty deployment to bare minimum with no contexts, no sample webapps, and just jetty-justin.xml listed in my start.ini. This is the data in jetty-justin.xml.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure id="Server" class="org.eclipse.jetty.server.Server">
</Configure>
 
I originally thought it was related to my webapp but it occurs even when I strip out my webapps/mywebap.war, etc/mycontext.xml and etc/jetty-justin.xml (<Configure> contents).

 
The exception happens immediately at startup time, but it does not seem to affect my webapp's functionality. What could be causing such an exception? Is it a known issue? How can I investigate?
 
Here is the command I use to invoke Jetty. Note my bootclasspath and classpath are virtually the same (SLF4J, LOG4J, Jetty Hightide 8.0.4), except my bootclasspath has my JRE + Jetty resources directory (log4j.properties needed during my webapp servlet initialization), and my classpath has the Jetty start.jar. The command is split below to illustrate the bootclasspath and classpath similarities.
 
C:\jdk6u27\bin\javaw.exe -Dfile.encoding=Cp1252
 
-Xbootclasspath:C:\jdk6u27\jre\lib\resources.jar;C:\jdk6u27\jre\lib\rt.jar;C:\jdk6u27\jre\lib\jsse.jar;C:\jdk6u27\jre\lib\jce.jar;C:\jdk6u27\jre\lib\charsets.jar;C:\jdk6u27\lib\tools.jar;C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\resources
 
-classpath C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\start.jar
 
org.eclipse.jetty.start.Main
 

Sincerely,
Justin
Jan Bartel | 3 Nov 2011 03:57
Favicon
Gravatar

Re: [jetty-user] NullPointerException at XmlConfiguration$1.run(XmlConfiguration.java:1138) in jetty-8.0.4.v20111024

Justin,

If you're not trying to start jetty in an embedded mode, use "java
-jar start.jar". jetty will take care of setting up classpaths and
classloaders for itself and for any webapps. To use jetty in this
fashion, do not set up anything on your classpath. Just have the jdk
on the system classpath.

If you are trying to start jetty in an embedded fashion, then the best
way to do that is to write yourself a main class, following the
tutorials here:

http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

cheers
Jan

On 3 November 2011 13:27, Justin Cranford <justincranford <at> hotmail.com> wrote:
> Hello,
>
> Here is my environment:
> 1) Jetty Version: jetty-8.0.4.v20111024
> 2) IE 9.0.3 x32 (9.0.8112.16421)
> 3) OS Platform: Windows 7 Ultimate x64
> 4) JVM Version: Oracle JDK 6u27 x32
> 5) Command Line: ***See end of email***
>
> I am running jetty-8.0.4.v20111024. I am getting this NullPointerException
> each time Jetty starts.
>
> WARN [2011/11/02 21:35:02.989][main](XmlConfiguration.java:1152)
> java.lang.NullPointerException
> at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1138)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1126)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:469)
> at org.eclipse.jetty.start.Main.start(Main.java:612)
> at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:265)
> at org.eclipse.jetty.start.Main.main(Main.java:79)
> INFO [2011/11/02 21:35:03.051][main](Server.java:253) jetty-8.0.4.v20111024
>
> I get this NPE even when I strip down my Jetty deployment to bare minimum
> with no contexts, no sample webapps, and just jetty-justin.xml listed in my
> start.ini. This is the data in jetty-justin.xml.
>
> <?xml version="1.0"?>
> <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN"
> "http://www.eclipse.org/jetty/configure.dtd">
> <Configure id="Server" class="org.eclipse.jetty.server.Server">
> </Configure>
>
> I originally thought it was related to my webapp but it occurs even when I
> strip out my webapps/mywebap.war, etc/mycontext.xml and etc/jetty-justin.xml
> (<Configure> contents).
>
>
> The exception happens immediately at startup time, but it does not seem to
> affect my webapp's functionality. What could be causing such an exception?
> Is it a known issue? How can I investigate?
>
> Here is the command I use to invoke Jetty. Note my bootclasspath and
> classpath are virtually the same (SLF4J, LOG4J, Jetty Hightide 8.0.4),
> except my bootclasspath has my JRE + Jetty resources directory
> (log4j.properties needed during my webapp servlet initialization), and my
> classpath has the Jetty start.jar. The command is split below to illustrate
> the bootclasspath and classpath similarities.
>
> C:\jdk6u27\bin\javaw.exe -Dfile.encoding=Cp1252
>
> -Xbootclasspath:C:\jdk6u27\jre\lib\resources.jar;C:\jdk6u27\jre\lib\rt.jar;C:\jdk6u27\jre\lib\jsse.jar;C:\jdk6u27\jre\lib\jce.jar;C:\jdk6u27\jre\lib\charsets.jar;C:\jdk6u27\lib\tools.jar;C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\resources
>
> -classpath
> C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\start.jar
>
> org.eclipse.jetty.start.Main
>
>
> Sincerely,
> Justin
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Justin Cranford | 3 Nov 2011 15:29
Picon
Favicon

[jetty-user] Bind with EnvEntry works, bind with Resource does not work?

Hello,

Here is my environment:

1) jetty-8.0.4.v20111024
2) Oracle JDK 6u27 x32
3) Windows 7 Ultimate x64
4) IE 9.0.3 x32 (9.0.8112.16421)
5) Command Line: ***See end of email***

I am trying to bind atomikosDS to java:comp/env/jdbc/mydatasource using context/test-jndi.xml and access it in my webapp via JDNI lookup. The example uses org.eclipse.jetty.plus.jndi.Resource to do the bind.

In DEBUG mode, I see an AtomikosDataSourceBean object bound to a context, but InitialContext lookup in my webapp always fails. I tried adding <resource-ref> to my web.xml but that fails too complaining about "Nothing to bind for name javax.sql.DataSource/default".

Here is the odd thing. If I use org.eclipse.jetty.plus.jndi.EnvEntry instead to bind the exact sameatomikosDS then my webapp context lookup works. This seems to imply my classpath and jndi settings are ok, so perhaps I am not using org.eclipse.jetty.plus.jndi.Resource properly or maybe there is a bug?
 
 
So here is my question: Why does org.eclipse.jetty.plus.jndi.EnvEntry work when org.eclipse.jetty.plus.jndi.Resource does not work?
 

<!-- BINDING THIS WAY IN context/test-jndi.xml ALLOWS ME TO LOOKUP jdbc/mydatasource SUCCESSFULLY IN MY WEBAPP -->
 <New id="mydatasource" class="org.eclipse.jetty.plus.jndi.EnvEntry">
  <Arg><Ref id='wac'/></Arg>
  <Arg>jdbc/mydatasource</Arg>
  <Arg>
   <New id="atomikosDS" class="com.atomikos.jdbc.AtomikosDataSourceBean">
    <Set name="xaDataSourceClassName">org.apache.derby.jdbc.EmbeddedXADataSource</Set>
    <Set name="xaProperties">
     <New class="java.util.Properties">
      <Call name="setProperty">
       <Arg>databaseName</Arg>
       <Arg>testdb</Arg>
      </Call>
      <Call name="setProperty">
       <Arg>createDatabase</Arg>
       <Arg>create</Arg>
      </Call>
     </New>
    </Set>
    <Set name="UniqueResourceName">mydatasource2</Set>
   </New>
  </Arg>
  <Arg type="boolean">true</Arg>
 </New>

<!-- BINDING THIS WAY IN context/test-jndi.xml DOES NOT ALLOW ME TO LOOKUP jdbc/mydatasource IN MY WEBAPP -->
 <New id="mydatasource" class="org.eclipse.jetty.plus.jndi.Resource">
  <Arg><Ref id='wac'/></Arg>
  <Arg>jdbc/mydatasource</Arg>
  <Arg>
   <New id="atomikosDS" class="com.atomikos.jdbc.AtomikosDataSourceBean">
    <Set name="xaDataSourceClassName">org.apache.derby.jdbc.EmbeddedXADataSource</Set>
    <Set name="xaProperties">
     <New class="java.util.Properties">
      <Call name="setProperty">
       <Arg>databaseName</Arg>
       <Arg>testdb</Arg>
      </Call>
      <Call name="setProperty">
       <Arg>createDatabase</Arg>
       <Arg>create</Arg>
      </Call>
     </New>
    </Set>
    <Set name="UniqueResourceName">mydatasource</Set>
   </New>
  </Arg>
 </New>
 
 
 
Command Line: C:\jdk6u27\bin\javaw.exe -Dfile.encoding=Cp1252 
 
-Xbootclasspath:C:\jdk6u27\jre\lib\resources.jar;C:\jdk6u27\jre\lib\rt.jar;C:\jdk6u27\jre\lib\jsse.jar;C:\jdk6u27\jre\lib\jce.jar;C:\jdk6u27\jre\lib\charsets.jar;C:\jdk6u27\lib\tools.jar;C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\resources
 
-classpath C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\start.jar
 
org.eclipse.jetty.start.Main

Jan Bartel | 3 Nov 2011 22:11
Favicon
Gravatar

Re: [jetty-user] Bind with EnvEntry works, bind with Resource does not work?

Justin,

Please take a look at my answer to your other question this list re
how you are starting
jetty.

cheers
Jan

On 4 November 2011 01:29, Justin Cranford <justincranford <at> hotmail.com> wrote:
> Hello,
>
> Here is my environment:
>
> 1) jetty-8.0.4.v20111024
> 2) Oracle JDK 6u27 x32
> 3) Windows 7 Ultimate x64
> 4) IE 9.0.3 x32 (9.0.8112.16421)
> 5) Command Line: ***See end of email***
>
> I am trying to bind atomikosDS to java:comp/env/jdbc/mydatasource using
> context/test-jndi.xml and access it in my webapp via JDNI lookup. The
> example uses org.eclipse.jetty.plus.jndi.Resource to do the bind.
>
> In DEBUG mode, I see an AtomikosDataSourceBean object bound to a context,
> but InitialContext lookup in my webapp always fails. I tried adding
> <resource-ref> to my web.xml but that fails too complaining about "Nothing
> to bind for name javax.sql.DataSource/default".
>
> Here is the odd thing. If I use org.eclipse.jetty.plus.jndi.EnvEntry instead
> to bind the exact sameatomikosDS then my webapp context lookup works. This
> seems to imply my classpath and jndi settings are ok, so perhaps I am not
> using org.eclipse.jetty.plus.jndi.Resource properly or maybe there is a bug?
>
>
> So here is my question: Why does org.eclipse.jetty.plus.jndi.EnvEntry
> work when org.eclipse.jetty.plus.jndi.Resource does not work?
>
>
> <!-- BINDING THIS WAY IN context/test-jndi.xml ALLOWS ME TO LOOKUP
> jdbc/mydatasource SUCCESSFULLY IN MY WEBAPP -->
>  <New id="mydatasource" class="org.eclipse.jetty.plus.jndi.EnvEntry">
>   <Arg><Ref id='wac'/></Arg>
>   <Arg>jdbc/mydatasource</Arg>
>   <Arg>
>    <New id="atomikosDS" class="com.atomikos.jdbc.AtomikosDataSourceBean">
>     <Set
> name="xaDataSourceClassName">org.apache.derby.jdbc.EmbeddedXADataSource</Set>
>     <Set name="xaProperties">
>      <New class="java.util.Properties">
>       <Call name="setProperty">
>        <Arg>databaseName</Arg>
>        <Arg>testdb</Arg>
>       </Call>
>       <Call name="setProperty">
>        <Arg>createDatabase</Arg>
>        <Arg>create</Arg>
>       </Call>
>      </New>
>     </Set>
>     <Set name="UniqueResourceName">mydatasource2</Set>
>    </New>
>   </Arg>
>   <Arg type="boolean">true</Arg>
>  </New>
>
> <!-- BINDING THIS WAY IN context/test-jndi.xml DOES NOT ALLOW ME TO LOOKUP
> jdbc/mydatasource IN MY WEBAPP -->
>  <New id="mydatasource" class="org.eclipse.jetty.plus.jndi.Resource">
>   <Arg><Ref id='wac'/></Arg>
>   <Arg>jdbc/mydatasource</Arg>
>   <Arg>
>    <New id="atomikosDS" class="com.atomikos.jdbc.AtomikosDataSourceBean">
>     <Set
> name="xaDataSourceClassName">org.apache.derby.jdbc.EmbeddedXADataSource</Set>
>     <Set name="xaProperties">
>      <New class="java.util.Properties">
>       <Call name="setProperty">
>        <Arg>databaseName</Arg>
>        <Arg>testdb</Arg>
>       </Call>
>       <Call name="setProperty">
>        <Arg>createDatabase</Arg>
>        <Arg>create</Arg>
>       </Call>
>      </New>
>     </Set>
>     <Set name="UniqueResourceName">mydatasource</Set>
>    </New>
>   </Arg>
>  </New>
>
>
>
> Command Line: C:\jdk6u27\bin\javaw.exe -Dfile.encoding=Cp1252
>
> -Xbootclasspath:C:\jdk6u27\jre\lib\resources.jar;C:\jdk6u27\jre\lib\rt.jar;C:\jdk6u27\jre\lib\jsse.jar;C:\jdk6u27\jre\lib\jce.jar;C:\jdk6u27\jre\lib\charsets.jar;C:\jdk6u27\lib\tools.jar;C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\resources
>
> -classpath
> C:\lib\slf4j16\slf4j-api-1.6.3.jar;C:\lib\slf4j16\slf4j-log4j12-1.6.3.jar;C:\lib\apache\log4j\log4j-1.2.16.jar;C:\lib\jetty-ajp-8.0.4.v20111024.jar;C:\lib\jetty-all-8.0.4.v20111024-javadoc.jar;C:\lib\jetty-annotations-8.0.4.v20111024.jar;C:\lib\jetty-client-8.0.4.v20111024.jar;C:\lib\jetty-continuation-8.0.4.v20111024.jar;C:\lib\jetty-deploy-8.0.4.v20111024.jar;C:\lib\jetty-http-8.0.4.v20111024.jar;C:\lib\jetty-io-8.0.4.v20111024.jar;C:\lib\jetty-jmx-8.0.4.v20111024.jar;C:\lib\jetty-jndi-8.0.4.v20111024.jar;C:\lib\jetty-overlay-deployer-8.0.4.v20111024.jar;C:\lib\jetty-plus-8.0.4.v20111024.jar;C:\lib\jetty-policy-8.0.4.v20111024.jar;C:\lib\jetty-rewrite-8.0.4.v20111024.jar;C:\lib\jetty-security-8.0.4.v20111024.jar;C:\lib\jetty-server-8.0.4.v20111024.jar;C:\lib\jetty-servlet-8.0.4.v20111024.jar;C:\lib\jetty-servlets-8.0.4.v20111024.jar;C:\lib\jetty-util-8.0.4.v20111024.jar;C:\lib\jetty-webapp-8.0.4.v20111024.jar;C:\lib\jetty-websocket-8.0.4.v20111024.jar;C:\lib\jetty-xml-8.0.4.v20111024.jar;C:\lib\servlet-api-3.0.jar;C:\lib\annotations\asm-3.1.jar;C:\lib\annotations\asm-commons-3.1.jar;C:\lib\annotations\asm-tree-3.1.jar;C:\lib\annotations\geronimo-annotation_1.0_spec-1.1.1.jar;C:\lib\annotations\javax.annotation_1.1.0.v201105051105.jar;C:\lib\annotations\org.objectweb.asm_3.3.1.v201101071600.jar;C:\lib\jdbc\derby\derby-10.6.1.0.jar;C:\lib\jdbc\derby\derbytools-10.6.1.0.jar;C:\lib\jndi\javax.activation_1.1.0.v201105071233.jar;C:\lib\jndi\javax.mail.glassfish_1.4.1.v201005082020.jar;C:\lib\jta\javax.transaction_1.1.1.v201004190952.jar;C:\lib\jta\atomikos\atomikos-util-3.7.0.jar;C:\lib\jta\atomikos\transactions-3.7.0.jar;C:\lib\jta\atomikos\transactions-api-3.7.0.jar;C:\lib\jta\atomikos\transactions-jdbc-3.7.0.jar;C:\lib\jta\atomikos\transactions-jta-3.7.0.jar;C:\lib\monitor\jetty-monitor-8.0.4.v20111024.jar;C:\lib\jsp\com.sun.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.el_2.2.0.v201105051105.jar;C:\lib\jsp\javax.servlet.jsp.jstl_1.2.0.v201004190952.jar;C:\lib\jsp\javax.servlet.jsp_2.2.0.v201103241009.jar;C:\lib\jsp\org.apache.jasper.glassfish_2.2.2.v201108011116.jar;C:\lib\jsp\org.apache.taglibs.standard.glassfish_1.2.0.v201004190952.jar;C:\lib\setuid\jetty-setuid-java-8.0.4.v20111024.jar;C:\lib\setuid\jna-3.2.2.jar;C:\lib\spring\jetty-spring-8.0.4.v20111024.jar;C:\start.jar
>
> org.eclipse.jetty.start.Main
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

David Hoffer | 14 Nov 2011 23:26
Picon

[jetty-user] Getting started with Jetty, BlazeDS, Flex & CometD?

It's been awhile since I have used Flex/BlazeDS, I have a new project where I need a very efficient & scalable comet like solution for a Flex application with backend Java server.  So I'm thinking Servlet 3.0 (Jetty Continuations is deprecated right?)  Since I understand BlazeDS doesn't support Servlet 3.0 yet I assume that means I need jetty-blazeds?  Is this a modified BlazeDS stack that supports Servlet 3.0?  One problem with this is that it isn't fully mavenized...which I need.  It complains that flex-messaging-core & flex-messaging-common aren't available, why publish a maven artifact that has references to two artifacts on the local file system?  What are these artifacts, who wrote the code?  (The guy managing our Nexus server is going to wonder why org.mortbay.jetty created two com.adobe.flex artifacts, etc.)

Also is CometD the right/best comet solution to go with the Jetty, BlazeDS, Flex stack?

Am I going in the right direction here?  Any help is greatly appreciated.  Are there some getting started docs for Jetty, Servlet 3.0, high performance comet solution?

Thanks,
-Dave

Greg Steffensen | 15 Nov 2011 03:53
Picon

[jetty-user] requests hanging, then behaving normally for 30 seconds, then hanging

I'm seeing some odd behavior in a custom app that embeds Jetty.  If a server hasn't received a request recently, it will often take a very long time to process the request- between 5 and 60 seconds- even for trivial hello world handlers.  Then, once that request has returned, the server will process requests at a normal, rapid rate, for precisely 30 seconds, and then the next request received will take a long time again.  I'm actually running two different custom webservers based on Jetty... they share a lot of code, including the "hello world" handler that I'm testing with.  But only one is experiencing this problem, and the most significant difference between the two that I can see is that the problematic one uses BlockingChannelConnector, while the ok one uses the default SelectChannelConnector.  Other than the non-default Connector, I'm not doing anything remotely interesting in the server setup- I'm not using any Jetty XML files for configuration, and am essentially just doing a stock


Server customServer = new CustomServer(PORT);
customServer.start();
customServer.join();

I'm using BlockingChannelConnector for some servers because these server variants should be receiving low numbers of persistent HTTP 1.1 connections.  The other SelectChannelConnector server (which functions as a load balancer for the BlockingChannelConnector servers) will function as a more normal webserver receiving requests from lots of clients, so SelectChannelConnector seemed more appropriate.

So- does anyone know if 30 seconds is the default value for any Jetty settings that might be related to behavior like this?  Or has anyone seen similar behavior?
Alexei Serov | 15 Nov 2011 04:51
Picon

Re: [jetty-user] requests hanging, then behaving normally for 30 seconds, then hanging

unsubscribe

On Mon, Nov 14, 2011 at 6:53 PM, Greg Steffensen <greg.steffensen <at> gmail.com> wrote:
I'm seeing some odd behavior in a custom app that embeds Jetty.  If a server hasn't received a request recently, it will often take a very long time to process the request- between 5 and 60 seconds- even for trivial hello world handlers.  Then, once that request has returned, the server will process requests at a normal, rapid rate, for precisely 30 seconds, and then the next request received will take a long time again.  I'm actually running two different custom webservers based on Jetty... they share a lot of code, including the "hello world" handler that I'm testing with.  But only one is experiencing this problem, and the most significant difference between the two that I can see is that the problematic one uses BlockingChannelConnector, while the ok one uses the default SelectChannelConnector.  Other than the non-default Connector, I'm not doing anything remotely interesting in the server setup- I'm not using any Jetty XML files for configuration, and am essentially just doing a stock

Server customServer = new CustomServer(PORT);
customServer.start();
customServer.join();

I'm using BlockingChannelConnector for some servers because these server variants should be receiving low numbers of persistent HTTP 1.1 connections.  The other SelectChannelConnector server (which functions as a load balancer for the BlockingChannelConnector servers) will function as a more normal webserver receiving requests from lots of clients, so SelectChannelConnector seemed more appropriate.

So- does anyone know if 30 seconds is the default value for any Jetty settings that might be related to behavior like this?  Or has anyone seen similar behavior?


Gmane