Atlassian JIRA   History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: DSY-461
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Reporter: Vitaly Sazanovich
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Daisy

daisy-repository-server.bat unrecognized options

Created: 04/May/07 06:16 AM   Updated: 05/May/07 12:36 PM
Component/s: Repository
Affects Version/s: 2.0.1
Fix Version/s: 2.1

File Attachments: 1. File end_backslash.diff (3 kb)

Environment: WindowsXP


 Description   
When trying to start daisy-repository-server.bat I received Unrecognized options error messages from JVM.
Then I echoed:
D:\dist\daisy-2.0.1\repository-server\bin>daisy-repository-server D:\dist\daisy-2.0.1\daisydata\
D:\dist\daisy-2.0.1\repository-server\merlin
*************
"C:\jdk6\bin\java" "-Djava.security.policy=D:\dist\daisy-2.0.1\repository-server\merlin\bin\security.policy" -Xmx128m -Dmerlin.deployment.timeout=0 "-Dmerlin.logging.config=D:\dist\daisy-2.0.1\daisydata\
\logkit.xml" "-Ddaisy.datadir=D:\dist\daisy-2.0.1\daisydata\" "-Ddaisy.home=D:\dist\daisy-2.0.1" -Dfile.encoding=UTF-8 -Dorg.apache.commons.logging.Log=org.outerj.daisy.logging.DaisyLog "-Djava.security.
login.config=D:\dist\daisy-2.0.1\daisydata\\conf\login.config" -Duser.language=en -Duser.country=US -Duser.variant= -jar "D:\dist\daisy-2.0.1\repository-server\merlin\system\merlin\jars\merlin-cli-3.3.0.
offline -home D:\dist\daisy-2.0.1\daisydata\ -repository D:\dist\daisy-2.0.1\lib -config "D:\dist\daisy-2.0.1\daisydata\\conf\myconfig.xml D:\dist\daisy-2.0.1\repository-server\conf\block.xml"
*************
Unrecognized option: -offline
Could not create the Java virtual machine.

I had to remove quotes (which were introduced to fix space problem I guess) and hard-code my java call. So finally the part of merlin.bat that works is:

echo "%JAVA%" "%MERLIN_SECURITY_POLICY%" %MERLIN_JVM_OPTS% %MERLIN_CMD_LINE_ARGS% -jar %MERLIN_BOOTSTRAP_JAR%
rem "%JAVA%" "%MERLIN_SECURITY_POLICY%" %MERLIN_JVM_OPTS% %MERLIN_CMD_LINE_ARGS% -jar %MERLIN_BOOTSTRAP_JAR%
C:\jdk6\bin\java -Djava.security.policy=D:\dist\daisy-2.0.1\repository-server\merlin\bin\security.policy -Xmx128m -Dmerlin.deployment.timeout=0 -Dmerlin.logging.config=D:\dist\daisy-2.0.1\daisydata\\conf\logkit.xml -Ddaisy.datadir=D:\dist\daisy-2.0.1\daisydata\ -Ddaisy.home=D:\dist\daisy-2.0.1 -Dfile.encoding=UTF-8 -Dorg.apache.commons.logging.Log=org.outerj.daisy.logging.DaisyLog -Djava.security.auth.login.config=D:\dist\daisy-2.0.1\daisydata\\conf\login.config -Duser.language=en -Duser.country=US -Duser.variant= -jar D:\dist\daisy-2.0.1\repository-server\merlin\system\merlin\jars\merlin-cli-3.3.0.jar -offline -home D:\dist\daisy-2.0.1\daisydata\ -repository D:\dist\daisy-2.0.1\lib -config D:\dist\daisy-2.0.1\daisydata\\conf\myconfig.xml D:\dist\daisy-2.0.1\repository-server\conf\block.xml


 All   Comments   Change History      Sort Order:
Comment by Andreas Deininger [04/May/07 06:30 AM]
I think the error is (more or less) on your side:
Inside your call you have the following:

"-Ddaisy.datadir=D:\dist\daisy-2.0.1\daisydata\"

However the daisy datadir should *not* end on a backslash, because the backslash on the escapes the double quote, thus resulting in the problem you are experiencing.

Maybe we should mention that "no ending backslash"-requirement on the documentation not only for the DAISY_HOME variable, but explicitely also for the paths to the data directories.

Comment by Bruno Dumon [04/May/07 08:36 AM]
yep, seems like the only thing we can do is improve the docs, I would appreciate any help in that.

Comment by Andreas Deininger [05/May/07 10:08 AM]
I gave that a second thought and eventually found a really easy solution for that. With the attached fix applied, all batch scripts will work no matter whether the path given for DAISY_HOME does or does not end with a backslash. The same is true for the arguments given to all the batch files used during the daisy installation.

Comment by Bruno Dumon [05/May/07 12:36 PM]
nice fix!

applied in SVN rev 4025, removed the comment from the installation doc too.