[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

JBOSS as Win 2K8 service w/parameters

Posted on 2012-08-14
11
Medium Priority
?
1,054 Views
Last Modified: 2013-11-09
Hey all,

  I can install my JBOSS as a windows service okay, but I am trying to give it some parameters that it just won't accept.  Hopefully somebody can help me?

set JAVA_OPTS=%JAVA_OPTS% "-Dorg.dcm4cheri.image.ImageReaderFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageReaderFactory.properties"
"-Dorg.dcm4cheri.image.ImageWriterFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageWriterFactory.properties" 
"-Dcom.aware.j2k.lib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k.dll"
"-Dcom.aware.j2k.interfacelib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k_interface.dll"

set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\aware-j2k-3.19.4.jar

Open in new window


I have attached the .bat file I am using to 'install' the service.  Like I mentioned above, the service will 'install' okay, but the parameters I am passing to call both .properties files & the .dll files are not working for me.

any help is appreciated!

thank you
install-service.txt
0
Comment
Question by:doc_jay
  • 3
  • 2
  • 2
7 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 38292920
Personally, i would get the mods to add this question to whatever TA is the best fit for Windows batch files (a dark art)

I suspect it could be to do with the quoting/shell interpretation involving the value of %JAVA_OPTS% (which you could echo >somefile.log to check its value and preservation)
0
 

Author Comment

by:doc_jay
ID: 38296073
Mods,
 
   Can this be x-posted in the DOS section please?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 38298562
You're going to have to TALK to them much more directly than that ;)
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 71

Accepted Solution

by:
Qlemo earned 1500 total points
ID: 38310794
You need to add the "continuation escape character" ^ to each end of line of splitted command lines, else cmd.exe does not know the lines are a single command:
set JAVA_OPTS=%JAVA_OPTS% ^
"-Dorg.dcm4cheri.image.ImageReaderFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageReaderFactory.properties" ^
"-Dorg.dcm4cheri.image.ImageWriterFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageWriterFactory.properties" ^
"-Dcom.aware.j2k.lib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k.dll" ^
"-Dcom.aware.j2k.interfacelib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k_interface.dll"

set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\aware-j2k-3.19.4.jar

Open in new window

If you look at the service installation command, you will see something similar there.
0
 

Author Comment

by:doc_jay
ID: 38312666
thanks for the help!  I have added the '^' at the end of each line as you suggested, but when I go to run the .bat file which installs the service in Win2K8, it still does not seem to work as it should.   The service installs and all looks good, but the test is to have the java app 'compress' an image.  It appears to be looking for something that does not exist for Win2K8 R2.

{{log4j.remoteSourceInfo,radarch2:8888}{hostname,radarch2}{log4jid,181894}}
Throwable
org.dcm4cheri.image.ConfigurationException: No Image Writer of class com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageWriterCodecLib available for format:jpeg2000
	at org.dcm4cheri.image.ImageWriterFactory.getWriterForTransferSyntax(ImageWriterFactory.java:81)
	at org.dcm4chex.archive.codec.CompressCmd.compress(CompressCmd.java:480)
	at org.dcm4chex.archive.codec.CompressCmd.compressFile(CompressCmd.java:332)
	at org.dcm4chex.archive.mbean.CompressionService.doCompress(CompressionService.java:437)
	at org.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:365)
	at org.dcm4chex.archive.mbean.CompressionService$1$1.run(CompressionService.java:132)
	at java.lang.Thread.run(Thread.java:662)

Open in new window


There is no native compression codec in Win2K8, so I am using this third party codec.  The only way to use it is to make it aware of the .properties fles & .dll files.

I'll probably have to take this over to the dcm4che.org forums, but I'm not sure A LOT of people are going to be running this as thier config.  That is the one main reason I am asking here.

thanks again for your help!
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 38312904
The only advice I can give here is to try if works if you set all those Java vars in a command prompt, and then start there the code the service uses. At a first glance the class path aso. is good, but I really have no clue regarding the service you use ...
0
 

Author Closing Comment

by:doc_jay
ID: 38447480
good answer - thank you.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses
Course of the Month19 days, 22 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question