jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Jetty
  • JETTY-87

NPE when switching from beta 15 to beta 17

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 6.0.0beta17
  • Fix Version/s: 6.0.0rc1
  • Component/s: None
  • Labels:
    None
  • Environment:
    Linux Mandriva 2007
    JDK 1.5.0_06
    Maven 2.0.4

Description

This code was running fine with beta15:
jettyServer = new Server();
SocketConnector connector = new SocketConnector();
connector.setPort(JWebUnitAPITestCase.JETTY_PORT);
jettyServer.setConnectors (new Connector[]{connector});
WebAppContext wah = new WebAppContext();
wah.setServer(jettyServer);
wah.setContextPath(JWebUnitAPITestCase.JETTY_URL);
URL url = this.getClass().getResource("/testcases/");
wah.setWar(url.toString());
jettyServer.addHandler(wah);
jettyServer.start();

But when switching to beta17, I get:
Running net.sourceforge.jwebunit.htmlunit.JWebUnitTest
:INFO: Logging to STDERR via org.mortbay.log.StdErrLog
java.lang.NullPointerException
at org.mortbay.jetty.handler.HandlerCollection.setHandlers(HandlerCollection.java:76)
at org.mortbay.jetty.Server.addHandler(Server.java:460)
at net.sourceforge.jwebunit.tests.util.JettySetup.setUp(JettySetup.java:66)
...

The problem is in Server.java, in method addHandler(Handler handler):
When you call:
HandlerCollection collection=new HandlerCollection();
collection.setHandlers(new Handler[]{getHandler(),handler});

getHandler() return null

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Julien HENRY added a comment - 07/Jul/06 10:53 AM

Works fine with beta16, so regression is between beta16 and beta17.

Show
Julien HENRY added a comment - 07/Jul/06 10:53 AM Works fine with beta16, so regression is between beta16 and beta17.
Hide
Permalink
Tim Vernum added a comment - 10/Jul/06 6:44 AM

Fixed in svn rev 671

Show
Tim Vernum added a comment - 10/Jul/06 6:44 AM Fixed in svn rev 671
Hide
Permalink
Tim Vernum added a comment - 09/Sep/06 5:15 AM

Closing issue.
Appears to have been satisfactorily fixed in 6.0.0rc1

Show
Tim Vernum added a comment - 09/Sep/06 5:15 AM Closing issue. Appears to have been satisfactorily fixed in 6.0.0rc1
Hide
Permalink
Julien HENRY added a comment - 11/Sep/06 3:58 AM

Thanks !

Show
Julien HENRY added a comment - 11/Sep/06 3:58 AM Thanks !

People

  • Assignee:
    Unassigned
    Reporter:
    Julien HENRY
Vote (0)
Watch (0)

Dates

  • Created:
    07/Jul/06 10:35 AM
    Updated:
    11/Sep/06 3:58 AM
    Resolved:
    10/Jul/06 6:44 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.