#84 patches-welcome
Scott Simon

"sunspot-solr run" doesn't start on windows

Reported by Scott Simon | March 6th, 2010 @ 02:42 PM | in Wishlist

From a fresh install of sunspot 1.0.1 on Windows XP:


sunspot-solr run

Running : java -Dsolr.data.dir=C:/DOCUME~1/Scottley/LOCALS~1/temp -Dsolr.solr.home=c:/ruby/lib/ruby/gems/1.8/gems/sunspot-1.0.1/solr/solr -jar start.jar
Exception in thread "main" java.lang.NoClassDefFoundError: '-Dsolr/data/dir=C:/DOCUME~1/Scottley/LOCALS~1/temp'
Caused by: java.lang.ClassNotFoundException: '-Dsolr.data.dir=C:.DOCUME~1.Scottley.LOCALS~1.temp'

    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Could not find the main class: '-Dsolr.data.dir=C:/DOCUME~1/Scottley/LOCALS~1/temp'. Program will exit.


Problem stems from Escape gem putting single quotes around entire arguments that contain paths with backslashes (Windows style) -- thus java thinks '-Dsolr.data.dir....' is the file to run, not an argument.

Replacing Escape.shell_commands(command) with command.join(" ") fixed the issue on my system and solr started up fine.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Awesome Solr interaction for Ruby

People watching this ticket

Attachments

Tags

Pages