Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classpath uses jetty-incompatible separator ':' on Linux #26

Closed
GoogleCodeExporter opened this issue Jul 7, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create an RJR debug configuration on system that has File.pathSeparator
== ':'
2. Jetty will start up but exit immediately upon processing the webapp
class path.

What is the expected output? What do you see instead?

Jetty should start, but it crashes:

Exception in thread "main" java.net.MalformedURLException: no protocol: ...
    at java.net.URL.<init>(URL.java:567)
    at java.net.URL.<init>(URL.java:464)
    at java.net.URL.<init>(URL.java:413)
    at org.mortbay.resource.Resource.newResource(Resource.java:136)
    at org.mortbay.resource.Resource.newResource(Resource.java:120)
    at
org.mortbay.jetty.webapp.WebAppClassLoader.addClassPath(WebAppClassLoader.java:1
24)
    at runjettyrun.ProjectClassLoader.<init>(ProjectClassLoader.java:39)
    at runjettyrun.Bootstrap.main(Bootstrap.java:109)



What version of the product are you using? On what operating system?

RJR 1.1.0 / Eclipse 3.4.2 M20090211-1700 / Ubuntu 9.04

Please provide any additional information below.

Problem is the following snippet from JettyLaunchConfiguration.java
(committed with rev 39).

      // Class paths
      String[] classpath = getClasspath(configuration);
      String[] webAppClasspathArray = getProjectClasspath(configuration);
      String webAppClasspath = null;
      {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < webAppClasspathArray.length; i++) {
          String path = webAppClasspathArray[i];
          if (sb.length() > 0)
            sb.append(File.pathSeparator);
          sb.append(path);
        }
        webAppClasspath = sb.toString();
      }

Note that the included jetty distribution does use hardcoded path
separators of ",;" (WebappClassLoader.java):

    public void addClassPath(String classPath)
        throws IOException
    {
        if (classPath == null)
            return;

        StringTokenizer tokenizer= new StringTokenizer(classPath, ",;");
        while (tokenizer.hasMoreTokens())
        {
            ...
        }

        ....
    }


Original issue reported on code.google.com by mattias....@gmail.com on 5 May 2009 at 11:17

@GoogleCodeExporter
Copy link
Author

This is a duplicate of #25.  Nonetheless, thanks for the extra details.

Original comment by James.Sy...@gmail.com on 5 May 2009 at 12:17

  • Changed state: Duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant