[jetty-user] problem with 'missing' class files in jetty

Garey Mills <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Hello -

     I have installed jetty-hightide-7.1.6.v20100715 on Ubuntu. I want to
use JNDI to name and access a Postgresql database. Accordingly, I copied
most of jetty-plus.xml into jetty.xml and I have attached it Since the app
that I am developing will use cometd, I want that to work.

     When I start jetty using 'jetty -DOPTIONS=plus -jar start.jar' I get
the following error:

                 2010-09-06 08:21:04.357:WARN::FAILED cometd:
java.lang.NoClassDefFoundError:
org/eclipse/jetty/util/component/AbstractLifeCycle

I haven't touched the lib directory except to add some commons jars to
lib/ext, and I can see org.eclipse.jetty.util.component.AbstractLifeCycle in
the jetty-util.jar
in lib.


Any help appreciated;

Garey Mills

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

    http://xircles.codehaus.org/manage_email
jetty.xml (text/xml, 8.2 KB)
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">

<!-- =============================================================== -->
<!-- Configure the Jetty Server                                      -->
<!--                                                                 -->
<!-- Documentation of this file format can be found at:              -->
<!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax        -->
<!--                                                                 -->
<!-- Additional configuration files are available in $JETTY_HOME/etc -->
<!-- and can be mixed in.  For example:                              -->
<!--   java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml           -->
<!--                                                                 -->
<!-- See start.ini file for the default configuraton files           -->
<!-- =============================================================== -->


<Configure id="Server" class="org.eclipse.jetty.server.Server">

    <!-- =========================================================== -->
    <!-- Server Thread Pool                                          -->
    <!-- =========================================================== -->
    <Set name="ThreadPool">
      <!-- Default queued blocking threadpool -->
      <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
        <Set name="minThreads">10</Set>
        <Set name="maxThreads">200</Set>
      </New>
    </Set>

    <!-- =========================================================== -->
    <!-- Set connectors                                              -->
    <!-- =========================================================== -->

    <Call name="addConnector">
      <Arg>
          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
            <Set name="host"><Property name="jetty.host" /></Set>
            <Set name="port"><Property name="jetty.port" default="8080"/></Set>
            <Set name="maxIdleTime">300000</Set>
            <Set name="Acceptors">2</Set>
            <Set name="statsOn">false</Set>
            <Set name="confidentialPort">8443</Set>
	    <Set name="lowResourcesConnections">20000</Set>
	    <Set name="lowResourcesMaxIdleTime">5000</Set>
          </New>
      </Arg>
    </Call>

    <!-- =========================================================== -->
    <!-- Set handler Collection Structure                            --> 
    <!-- =========================================================== -->
    <Set name="handler">
      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
        <Set name="handlers">
         <Array type="org.eclipse.jetty.server.Handler">
           <Item>
             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
           </Item>
           <Item>
             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
           </Item>
         </Array>
        </Set>
      </New>
    </Set>

    <!-- =========================================================== -->
    <!-- extra options                                               -->
    <!-- =========================================================== -->
    <Set name="stopAtShutdown">true</Set>
    <Set name="sendServerVersion">true</Set>
    <Set name="sendDateHeader">true</Set>
    <Set name="gracefulShutdown">1000</Set>



<!-- =============================================================== -->
<!-- Configure Jetty Plus features                                   -->
<!--                                                                 -->
<!-- This file sets up a WebAppDeployer to automatically deploy all  -->
<!-- webapps in $jetty.home/webapps-plus at startup time, and to     -->
<!-- enable all of them with Plus features (jndi etc).               -->
<!--                                                                 -->
<!-- You can instead configure individual webapps with Jetty Plus    -->
<!-- features by using the ContextDeployer (configured in            -->
<!-- $jetty.home/etc/jetty.xml), and ensuring that you set the       -->
<!-- same set of classes listed below in the "plusConfig" as the     -->
<!-- webapp's configurationClasses.                                  -->
<!--                                                                 -->
<!-- For more information about Jetty Plus, see the Jetty wiki at    -->
<!-- http://docs.codehaus.org/display/JETTY/Jetty+Wiki               -->
<!-- =============================================================== -->


  <!-- =========================================================== -->
  <!-- Configurations for WebAppContexts                           -->
  <!-- Sequence of configurations to enable Plus features.         -->
  <!-- =========================================================== -->
  <Array id="plusConfig" type="java.lang.String">
    <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
    <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
    <Item>org.eclipse.jetty.plus.webapp.Configuration</Item>
    <Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
    <Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
  </Array>

  <!-- =========================================================== -->
  <!-- Deploy all webapps in webapps-plus                          -->
  <!-- =========================================================== -->
  <!-- Uncomment the following to set up a deployer that will      -->
  <!-- deploy webapps from a directory called webapps-plus. Note   -->
  <!-- that you will need to create this directory first!          -->
  <!--
  <Ref id="DeploymentManager">
      <Call name="addAppProvider">
        <Arg>
          <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
            <Set name="monitoredDir"><Property name="jetty.home" default="." />/webapps-plus</Set>
            <Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
            <Set name="scanInterval">5</Set>
            <Set name="contextXmlDir"><Property name="jetty.home" default="." />/contexts</Set>
            <Set name="parentLoaderPriority">false</Set>
            <Set name="extractWars">true</Set>
            <Set name="configurationClasses"><Ref id="plusConfig"/></Set>
          </New>
        </Arg>
      </Call>
  </Ref>
  -->

 <!-- =========================================================== -->
  <!-- Deploy all webapps in webapps-plus                          -->
  <!-- =========================================================== -->
  <!-- Uncomment the following to set up a WebAppDeployer that will -->
  <!-- deploy webapps from a directory called webapps-plus. Note    -->
  <!-- that you will need to create this directory first!           -->

    <Call name="addLifeCycle">
      <Arg>
        <New class="org.eclipse.jetty.deploy.WebAppDeployer">
          <Set name="contexts"><Ref id="Contexts"/></Set>
          <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps-plus</Set>
          <Set name="parentLoaderPriority">false</Set>
          <Set name="extract">true</Set>
          <Set name="allowDuplicates">false</Set>
          <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
          <Set name="configurationClasses"><Ref id="plusConfig"/></Set>
          <Call name="setAttribute">
            <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
            <Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
          </Call>
        </New>
      </Arg>
    </Call>


    <New id="GoNoteDB" class="org.eclipse.jetty.plus.jndi.Resource">
      <Arg></Arg>
      <Arg>jdbc/GoNoteDB</Arg>
      <Arg>
	<New class="org.apache.commons.dbcp.BasicDataSource">
	  <Set name="driverClassName"></Set>
	  <Set name="url">jdbc:postgresql:gonote</Set>
	  <Set name="username">ngndev</Set>
	  <Set name="password">yclept7</Set>
	</New>
      </Arg>
    </New>


</Configure>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.