tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Betteridge <n.betteri...@syntactics.com>
Subject Re: [CATALINA] Servlet problem
Date Fri, 13 Oct 2000 12:36:41 GMT
Hi Remy

Sorry for the delay in getting back to you. I've just spent the morning
looking around my setup for problems. I initially started off by
downloading one of the latest night-builds. I forgot to mention that I'm
using the embedded version.

When I started up the new build (using
org.apache.catalina.connector.test.HttpConnector and debug=0) I got the
following Exception. The un-jared war still remains the same as the
details I posted in the original message. I have enclosed after the
Exception the bulk of my 'main' in the embedded startup.

I can see from the trace that 'new URL(path)', where path is a straight
forward path, does not like it without any protocol prepended - this is
occuring during the set up of repositories (StandardLoader)

If you can shed any light on the problem I would be more than grateful

Regards and thanks

Nick

--------------------

Exception in thread "main" java.lang.IllegalArgumentException:
java.net.MalformedURLException: no protocol:
/export/home/nick/java/build/catalina/libwebapps/libweb/WEB-INF/classes
        at
org.apache.catalina.loader.StandardClassLoader.addRepository(StandardClassLoader.java:357)
        at
org.apache.catalina.loader.StandardLoader.addRepository(StandardLoader.java:442)
        at
com.syntactics.servers.war.ContextConfig.loaderConfig(ContextConfig.java:676)
        at
com.syntactics.servers.war.ContextConfig.start(ContextConfig.java:782)
        at
com.syntactics.servers.war.ContextConfig.lifecycleEvent(ContextConfig.java:130)
        at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1172)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:2395)
        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:816)
        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:334)
        at
com.syntactics.servers.war.SynWarServer.main(SynWarServer.java:905)

----------------------------------

    public static void main(String args[]) {

        SynWarServer embedded = new SynWarServer();
        embedded.setDebug(0);
        embedded.setLogger(new SystemOutLogger());
        String home = System.getProperty("catalina.home");
        int tmpValue = 0;
        
        // Start up this embedded server (to prove we can dynamically
        // add and remove containers and connectors later)
        try {
            embedded.start();
        } catch (LifecycleException e) {
            System.err.println("start: " + e.toString());
            e.printStackTrace();
        }

        // Assemble and install a very basic container hierarchy
        // that simulates a portion of the one configured in server.xml
        // by default
        Engine engine = embedded.createEngine();

        StandardHost host2 =
embedded.createHost("library.syntactics.com", home + "/libwebapps");
        engine.addChild(host2);
        host2.addChild(embedded.createContext("/", home +
"/libwebapps/libweb"));
        
        embedded.addEngine(engine);

        // Assemble and install a non-secure connector for port 8080
        Connector connector =
            embedded.createConnector(null, 8080, false);
        embedded.addConnector(connector);

        try {
            Thread.sleep(2 * 60 * 1000L);       // Two minutes
        } catch (InterruptedException e) {
            ;
        }

        embedded.removeEngine(engine);

        // Shut down this embedded server (should have nothing left to
do)
        try {
            embedded.stop();
        } catch (LifecycleException e) {
            System.err.println("stop: " + e.toString());
            e.printStackTrace();
        }

    }


-------------------------------------------------------------------

Remy Maucherat wrote:
> 
> > I hope that this is a problem and not incompetence:
> >
> > A simple servlet and client - the client sends an object, the servlet
> > reads the object and sends it back.
> >
> > What happens is that the client sends the object, catalina maps the
> > servlet class correctly and then waits for the the object (which has
> > already been sent). Tracing catalina shows that the server thread stops
> > at line : 'Object obj = ois.readObject();'
> 
> Could you try again with the test connector and send me the results ?
> 
> In your server.xml file, change :
>     <Connector className="org.apache.catalina.connector.http.HttpConnector"
>                port="8080" minProcessors="5" maxProcessors="75"
>                acceptCount="10" debug="0"/>
> into
>     <Connector className="org.apache.catalina.connector.test.HttpConnector"
>                port="8080" minProcessors="5" maxProcessors="75"
>                acceptCount="10" debug="0"/>
> 
> Thanks,
> Remy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

-- 
Nick Betteridge
Syntactics Limited, 2 Calais Street, London SE5 9LP, UK.
Tel:+44 (0)20 7564 5678 Fax:+44 (0)20 7564 5679 Mobile:+44 (0)
7710088462
http://www.syntactics.com :

Mime
View raw message