Greg Wilkins | 1 Dec 2010 18:57
Gravatar

Re: [jetty-user] EOF exception after upgrade to Jetty 7?

Different browser do things differently as well.  For example IE used
to never use HEAD, but just do a GET and close the connection after
reading the header.

It is always hard to know what IOExceptions are ignorable, but in this
case EoF normally is.

Can you wrap the OutputStream and catch below the level of Xalan?

cheers

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

    http://xircles.codehaus.org/manage_email

Eugene Batogov | 3 Dec 2010 11:14
Picon
Gravatar

[jetty-user] java.lang.IllegalStateException: No SessionHandler or SessionManager

Hello all.

My Environment:

-----------

OS: Linux RHEL 5 (CentOS 5): 2.6.18 i386

JVM: Oracle JRockIt R28 i386

AS: JBoss AS 4.2.2.GA with Jetty 6.1.26 inside.

Frameworks: Spring 2.5.6, JSF:1.2.11, JBoss SEAM: 1.2

----------

I have got a problem with Jetty SessionManager :

2010-12-03 09:25:18,242 ERROR [ExceptionFilter] handling uncaught exception

javax.servlet.ServletException: No SessionHandler or SessionManager

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:512)

at org.mortbay.jetty.servlet.jsr77.Jsr77ServletHolder.handle(Jsr77ServletHolder.java:74)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:69)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)

at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:159)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1213)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:231)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.handler.StatisticsHandler.handle(StatisticsHandler.java:53)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:326)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Caused by: java.lang.IllegalStateException: No SessionHandler or SessionManager

at org.mortbay.jetty.Request.getSession(Request.java:1225)

at com.sun.faces.context.SessionMap.getSession(ExternalContextImpl.java:1002)

at com.sun.faces.context.SessionMap.get(ExternalContextImpl.java:962)

at org.jboss.seam.contexts.ServerConversationContext.get(ServerConversationContext.java:102)

at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:189)

at org.jboss.seam.Component.getInstance(Component.java:1842)

at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)

at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)

at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:166)

at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)

at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)

at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)

at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)

at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)

at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

at com.sun.facelets.tag.jstl.core.ForEachHandler.apply(ForEachHandler.java:121)

at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:295)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:274)

at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:145)

at com.sun.facelets.tag.ui.IncludeHandler.apply(IncludeHandler.java:60)

at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:315)

at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:169)

at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)

at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:295)

at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:274)

at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:145)

at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)

at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)

at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)

at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:96)

at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:525)

at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)

at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:252)

at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)

at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)

Does anybody know this problem ?

--

Best Regards, Eugene Batogov

--

Best Regards, Eugene Batogov

Eugene Batogov | 3 Dec 2010 11:19
Picon
Gravatar

[jetty-user] Re: java.lang.IllegalStateException: No SessionHandler or SessionManager

In source code:
org.mortbay.jetty.Request:
...........
  /* ------------------------------------------------------------ */
    /* 
     *  <at> see javax.servlet.http.HttpServletRequest#getSession(boolean)
     */
    public HttpSession getSession(boolean create)
    {
        if (_sessionManager==null && create)
            throw new IllegalStateException("No SessionHandler or SessionManager");

        if (_session != null && _sessionManager!=null && _sessionManager.isValid(_session))
            return _session;

        _session=null;

        String id=getRequestedSessionId();

        if (id != null && _sessionManager!=null)
        {
            _session=_sessionManager.getHttpSession(id);
            if (_session == null && !create)
                return null;
        }

        if (_session == null && _sessionManager!=null && create )
        {
            _session=_sessionManager.newHttpSession(this);
            Cookie cookie=_sessionManager.getSessionCookie(_session,getContextPath(),isSecure());
            if (cookie!=null)
                _connection.getResponse().addCookie(cookie);
        }

        return _session;
    }
..........

I suppose _sessionManager is null :(

--

-- 
Best Regards, Eugene Batogov

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

    http://xircles.codehaus.org/manage_email

Greg Wilkins | 3 Dec 2010 16:49
Gravatar

Re: [jetty-user] java.lang.IllegalStateException: No SessionHandler or SessionManager

Eugene

the stack shows that the request is within scope of

  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

at that is what sets the session manager on a request.

Now with the jboss integration, I think it is a special JBoss session
manager that should exist - so I'm not sure why that would be null.

Did you build the jboss integration for 6.1.26 yourself?  I don't
think we have released that ourselves?

regards

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

    http://xircles.codehaus.org/manage_email

Andrej Rippich | 4 Dec 2010 17:50
Picon

[jetty-user] stopping jetty 6 (-1.22) whith SSL connector configured fails

Hi all,
I have a problem stopping jetty (6.1.22 jdk 1.6.22) as usual when 
aditionally configering a SSL connector (using default jetty.xml + 
jetty-ssl.xml).

Im using the following command line to start jetty:

java --DSTOPPORT=9999 -DSTOPKEY=secret -jar ../start.jar 
../etc/jetty.xml ../etc/jetty-ssl.xml

And the following one to stop it - which works well when no SSL 
connector is configured but fails when the SSL configuration is used 
additionally.

java -DSTOP.PORT=9999 -DSTOP.KEY=secret -jar ..\start.jar --stop

Has anybody a suggestion whats going wrong?

Thanks Andrej

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

    http://xircles.codehaus.org/manage_email

Filipe Sousa | 5 Dec 2010 21:00
Picon

[jetty-user] Hot deploy

Hi,

I'm starting with embedded jetty and I wan't to use hot deployment to
avoid stopping starting the server after changing some code.

So far I have this code

public class JettyServer {
	private Server server;
	private final String PATH = System.getProperty("user.dir");
	private DeploymentManager deploymentManager;
	private final ContextHandlerCollection contexts
		= new ContextHandlerCollection();

	public JettyServer() {
		System.setProperty("jetty.home", PATH);
		initServer();
		initDeploymentManager();
		initConnectors();
		initWebApp();
	}

   	private void initConnectors() {
   	SelectChannelConnector p8080 = new SelectChannelConnector();
   	p8080.setPort(8080);
   	server.addConnector(p8080);
	}

	private void initDeploymentManager() {
   	deploymentManager = new DeploymentManager();
   	deploymentManager.setContexts(contexts);
   	server.addBean(deploymentManager);
	}

	private void initServer() {
   	server = new Server();
   	server.setHandler(contexts);
	}

	private void initWebApp() {
		String war = PATH + "/war";
   	WebAppContext app = new WebAppContext();
   	app.setContextPath("/");
   	app.setResourceBase(war);
   	app.setParentLoaderPriority(true);
   	contexts.addHandler(app);

   	WebAppProvider provider = new WebAppProvider();
   	provider.setMonitoredDirName(war);
   	provider.setDefaultsDescriptor(war + "/WEB-INF/web.xml");
   	provider.setScanInterval(1);
   	provider.setExtractWars(false);
   	deploymentManager.addAppProvider(provider);
	}

	private void start() throws Exception {
		server.start();
		server.join();
	}

	public static void main(String[] args) throws Exception {
   	JettyServer server = new JettyServer();
   	server.start();
   }
}

And the output after starting the server:

2010-12-05 19:53:09.432:INFO::jetty-7.2.2-SNAPSHOT
2010-12-05 19:53:09.455:INFO::Deployment monitor
/home/fsousa/workspace/Pera/war at interval 1
2010-12-05 19:53:09.459:INFO::Deployable added:
/home/fsousa/workspace/Pera/war/WEB-INF
2010-12-05 19:53:10.302:INFO::Deployable added:
/home/fsousa/workspace/Pera/war/pera

The problem is that changing files inside war directory is not redeploying.

I need help to get this right.
--

-- 
Filipe Sousa

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

    http://xircles.codehaus.org/manage_email

Eugene Batogov | 6 Dec 2010 08:49
Picon
Gravatar

Re: [jetty-user] java.lang.IllegalStateException: No SessionHandler or SessionManager

Hello.
I built Jetty myself with help maven from folder: jetty-6.1.26/contrib/jboss.
I thought that Jetty create SessionManager, not Jboss.

--

-- 
Best Regards, Eugene Batogov

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

    http://xircles.codehaus.org/manage_email

Picon
Favicon

[jetty-user] Embedded jetty: how to "override" context init parameter specified in web.xml

 Hello, everybody!

In my web.xml I have a context parameter named 'foo':

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

  <context-param>
    <description>My super parameter</description>
    <param-name>foo</param-name>
    <param-value>bar</param-value>
  </context-param>
 ....

And in java code I run jetty in embedded mode using WebAppContext to configure application with this web.xml:

      WebAppContext context = new WebAppContext();
      context.setDescriptor("D:\\Projects\\testapp\\build\\web\\WEB-INF\\web.xml");
      context.setResourceBase("D:\\Projects\\testapp\\build\\web");
      context.setContextPath("/test");

The question is how i can overwrite 'foo' parameter value from java code?
There is no context.setInitParameter() method.

//Konstantin

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

    http://xircles.codehaus.org/manage_email

Yee, Steve | 14 Dec 2010 19:46
Picon

RE: [jetty-user] Can Jetty 7.1.5 capture System.out and System.err messages to a log file with the datetime?

Hi Daniel,

Thanks for responding.  Sorry for the late reply.  My company's email
filters were creating some problems for me.

I did look at the etc/jetty-logging.xml.  It allows me to rollover the
log file with the date and time in the file name.  However, I couldn't
find a way to automatically add the current date and time to each log
entry.  What am I missing?  Where I can find the instructions to add the
date and time?  Do you have any links to examples?  Thanks.

Steve

-----Original Message-----
From: Daniel Peters [mailto:daniel.peters <at> idealo.de] 
Sent: Wednesday, November 17, 2010 10:39 AM
To: user <at> jetty.codehaus.org
Subject: Re: [jetty-user] Can Jetty 7.1.5 capture System.out and
System.err messages to a log file with the datetime?

On 17.11.2010 00:16, Yee, Steve wrote:

> In the Java web application I'm working on, I'm looking for a way to
have Jetty 7.1.5 capture System.out and System.err
> messages to a log file with the datetime automatically added similar
to the request log feature. Does this feature
> exists? If it doesn't, does anyone know whether there is any plan to
add this feature in any future releases? Thanks.
Check out etc/jetty-logging.xml, that should be what you are looking
for.

regards
Daniel

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

    http://xircles.codehaus.org/manage_email

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

    http://xircles.codehaus.org/manage_email

Walter.Heestermans | 16 Dec 2010 12:41

[jetty-user] Console for Jetty server administration


Hi,

Is there some console implementation where we can define the different Jetty servers installed, and view the status of each server.

Kind regards,
Walter
.

Gmane