I have no experience using java, i am trying to use lingpipe on windows (on linux everything worked perfectly) with command shell commands. But keep getting an error message.
these are the commands:
cd lingpipe\lingpipe-4.1.2-website\demos\generic\bin
cmd_pos_en_general_brown.bat -inFile=C:\lingpipe\test.txt -outFile=C:\lingpipe\testout.xml
as shown in this tutorial:
http://alias-i.com/lingpipe/web/demo-pos.html on the section of Part-of-Speech Demo via Shell Command.
The error message is:
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CLASS=com.aliasi.demo.demos.PosDemo
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set ARGS="com.aliasi.tokenizer.IndoEuropeanTokenizerFactory,com.aliasi.sentences.IndoEuropeanSentenceModel,/models/pos-en-general-brown.HiddenMarkovModel,250000,250000,General English"
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CMD=com.aliasi.demo.framework.DemoCommand
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>set CP=../../;../lingpipe-demos.jar;../../../lingpipe-4.1.2.jar;../../lib/nekohtml-1.9.14.jar;../../lib/xercesImpl-2.9.1.jar;../../lib/xml-apis-2.9.1.jar
C:\lingpipe\lingpipe-4.1.2-website\demos\generic\bin>java -cp ../../;../lingpipe-demos.jar;../../../lingpipe-4.1.2.jar;../../lib/nekohtml-1.9.14.jar;../../lib/xercesImpl-2.9.1.jar;../../lib/xml-apis-2.9.1.jar com.aliasi.demo.framework.DemoCommand -demoConstructor=com.aliasi.demo.demos.PosDemo -demoConstructorArgs="com.aliasi.tokenizer.IndoEuropeanTokenizerFactory,com.aliasi.sentences.IndoEuropeanSentenceModel,/models/pos-en-general-brown.HiddenMarkovModel,250000,250000,General English" -inFile C:\lingpipe\test.txt -outFile C:\lingpipe\testout.xml
IOException processing inFile=*HAS_PROPERTY_VALUE* outFile=*HAS_PROPERTY_VALUE*
Exception msg=java.io.FileNotFoundException: *HAS_PROPERTY_VALUE* (The filename, directory name, or volume label syntax is incorrect)
java.io.FileNotFoundException: *HAS_PROPERTY_VALUE* (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.aliasi.demo.framework.DemoCommand.processFile(DemoCommand.java:107)
at com.aliasi.demo.framework.DemoCommand.run(DemoCommand.java:80)
at com.aliasi.demo.framework.DemoCommand.main(DemoCommand.java:139)
ps: The inputfile already exists, the output file is supposed to be created automatically by the command.
Related
When i run the install.bat file on a windows 7 machine. i receive the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Error: Could not find or
load main class Files\thingsboard\lib\thingsboard.jar ThingsBoard
installation failed!
I assumed it was reading the BASE file directory incorrectly. So I it to the absolute directory location as shown below:
SET BASE="C:\Program Files\thingsboard"
SET LOADER_PATH=%BASE%\conf,%BASE%\extensions
SET SQL_DATA_FOLDER=%BASE%\data\sql
SET jarfile=%BASE%\lib\thingsboard.jar
SET installDir=%BASE%\data
I get the following error:
Detecting Java version installed. Detecting if it is 64 bit machine
CurrentVersion Detecting if it is 32 bit machine CurrentVersion 1.8
Java 1.8 found! Installing thingsboard ... Logging system failed to
initialize using configuration from 'C:\Program
Files\thingsboard\install\logback.xml'
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:161
)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.jav
a:57)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:47)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:114)
at org.springframework.boot.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:
304)
at org.springframework.boot.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:272)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingAppl
icationListener.java:235)
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.jav
a:208)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMult
icaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:138)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMult
icaster.java:121)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListe
ner.java:68)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java
:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.thingsboard.server.ThingsboardInstallApplication.main(ThingsboardInstallApplication.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:521)
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
Failed to create parent directories for [C:\ Program
Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log] ERROR in
ch.qos.logback.core.rolling.RollingFileAppender[fileLogAppender] -
openFile("C:\Program Files\thingsboard"\logs /install.log,true) call
failed. java.io.FileNotFoundException: "C:\Program
Files\thingsboard"\logs\install.log (The file name, directory name, or
volume label syntax is incorrect) ThingsBoard installation failed!
What am I doing wrong?
The quotes seem to be a problem.
C:\ Program Files\thingsboard\conf\"C:\Program
Files\thingsboard"\logs\install.log java.io.FileNotFoundException:
"C:\Program Files\thingsboard"\logs\install.log
Have you tried to use SET BASE=%ProgramFiles%\thingsboard or escape the space in the path with a ^ SET BASE=C:\Program^ Files\thingsboard?
edit:
The problem is because of the space in the install dir.
I have tried to install it in "c:\test folder" and got the same problem.
There was no problem when installing in a folder without space like "c:\test"
I changed the following part in the install.bat file and was able to install it in the folder with a space.
SET "BASE=%~dp0"
SET "LOADER_PATH=%BASE%conf,%BASE%extensions"
SET "SQL_DATA_FOLDER=%BASE%data\sql"
SET "jarfile=%BASE%lib\thingsboard.jar"
SET "installDir=%BASE%data"
PUSHD %BASE%conf
java -cp "%jarfile%" -Dloader.main=org.thingsboard.server.ThingsboardInstallApplication "-Dinstall.data_dir=%installDir%" -Dinstall.load_demo=%loadDemo% -Dspring.jpa.hibernate.ddl-auto=none -Dinstall.upgrade=false "-Dlogging.config=%BASE%install\logback.xml" org.springframework.boot.loader.PropertiesLauncher
if errorlevel 1 (
#echo ThingsBoard installation failed!
POPD
exit /b %errorlevel%
)
POPD
"%BASE%thingsboard.exe" install
When I received this error, I ran the command with Run as Administrator and my problem was solved.
if you receive the same result:
Install JRE
Delete the space in the installation directory
Run command with Run as Administrator
I am attempting to use the LIUM Speaker Diarization tool, which works on Java, but on Windows 10, the execution of the line :
java -Xmx1024m -jar /mnt/c/Users/LIUM_SpkDiarization-8.4.1.jar \ --fInputMask= /mnt/c/Users/showName.wav --sOutputMask= /mnt/c/Users/showName.seg –doCEClustering showName
throws the following exception :
java.io.FileNotFoundException: showName.mfcc (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at com.sun.media.codec.audio.mp3.JS_MP3FileReader.getAudioFileFormat(JS_MP3FileReader.java:82)
at javax.sound.sampled.AudioSystem.getAudioFileFormat(AudioSystem.java:1070)
at fr.lium.spkDiarization.libFeature.AudioFeatureSetFactory.getAudio(AudioFeatureSetFactory.java:162)
at fr.lium.spkDiarization.libFeature.AudioFeatureSetFactory.MakeFeature(AudioFeatureSetFactory.java:207)
at fr.lium.spkDiarization.libFeature.AudioFeatureSetFactory.MakeMFCCFeature(AudioFeatureSetFactory.java:255)
at fr.lium.spkDiarization.libFeature.AudioFeatureSet.read(AudioFeatureSet.java:898)
at fr.lium.spkDiarization.libFeature.AudioFeatureSet.setCurrentShow(AudioFeatureSet.java:1322)
at fr.lium.spkDiarization.system.Diarization.ester2Diarization(Diarization.java:719)
at fr.lium.spkDiarization.system.Diarization.run(Diarization.java:634)
I have run it on Linux as well but the same exception is thrown.
I am quite at a loss as to why it does not work. From what I understood, the program takes a .wav as an input and outputs a .seg file. Therefore, why does it search for a .mfcc file which it supposedly has to compute itself ?
Many thanks in advance.
Trying to use the python TweetNLP wrapper CMUTagger, but its throwing the following error:
java.io.FileNotFoundException: \dev\stdin (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at cmu.arktweetnlp.util.BasicFileIO.openFileToReadUTF8(BasicFileIO.java:50)
at cmu.arktweetnlp.RunTagger.runTagger(RunTagger.java:93)
at cmu.arktweetnlp.RunTagger.main(RunTagger.java:364)
Sep 17, 2014 10:22:45 AM cmu.arktweetnlp.util.BasicFileIO openFileToReadUTF8
SEVERE: Could not open file:/dev/stdin
Reinstalled the JDK instead of the JRE only. Didn't fix a thing. Not sure what to do as i cant even locate the dev folder in the java directory... halp =(
Executes java program fine if the cmd line call without python is 'sh', 'runTagger.sh', '--output-format', 'conll', [File with tweets to tag], but i need it to tag incoming stream of tweets from python via stdin =)
EDIT found the dev/stdin in CygWin and tried adding the paths 'c:...\cygwin' and 'c:...\cygwin\dev' but again nothing happened
I was stuck on this forever as well. I found a workaround for it.
You could use the following code:
import subprocess
p = subprocess.check_output('java -XX:ParallelGCThreads=2 -Xmx500m -jar ark-tweet-nlp-0.3.2.jar examples/example_tweets.txt')
this will give you output for running the example_tweets file through the tagger.
Hi
I am trying to execute the command string with Runtime.getRuntime.exec(String cmd).What
i'm actually trying to extract the I frames from video using the MPlayer and it is
installed in the different directory than that of my eclipse workspace.
I'm using the java code like the below
C:\\\Program Files\\\MPlayer for Windows mplayer file.mp4 -benchmark -noframedrop -ao null -vo jpeg:outdir=iframes -vf framestep=I
the actual command to extract using DOS is
"mplayer file.mp4 -benchmark -noframedrop -ao null -vo jpeg:outdir=iframes -vf framestep=I".
The ECLIPSE WORKSPACE is in my d: drive.And the Mplayer is in c:\program files\Mplayer for windows.
Eclipse IDE shows the exception as:-
Exception in thread "main" java.io.IOException: Cannot run program "C:\Program Files\MPlayer for Windows": CreateProcess error=5, Access is denied
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at myvideo1.main(myvideo1.java:39)
Any help is greatly appreciated.
Try this:
exec("\"C:\\Program Files\\MPlayer for Windows\\mplayer\" file.mp4 -benchmark -noframedrop -ao null -vo jpeg:outdir=iframes -vf framestep=I");
I surrounded the command in \" since the path contains spaces and added a missing \ in front of mplayer.
I'm trying to convince Zucker Reports to display a Jasper report but am getting a Java error and I don't speak java-ese. I see that there is a file not found error, but I can't figure out which file is not found. I replaced the long classpath with <SNIP>.
error compiling report report2.jrxml - cmdline: javaw -classpath "<SNIP>"
at.go_mobile.zuckerreports.JasperCompileMain D:\Program Files\sugarcrm-5.2.0e\php\tmp\php83.tmp modules/ZuckerReports/resources/report2.jasper 2>&1
JasperBatchMain :: compiling jasper design D:\Program to Files\sugarcrm-5.2.0e\php\tmp\php83.tmp
JasperBatchMain :: java.io.FileNotFoundException: D:\Program (The system cannot find the file specified)
net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: D:\Program (The system cannot find the file specified)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:172)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
at at.go_mobile.zuckerreports.JasperCompileMain.main(JasperCompileMain.java:17)
Caused by: java.io.FileNotFoundException: D:\Program (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
You have a space in your file path. Enclose it in double quotes.
Possibly in the <SNIP> part. Try placing your files outside of Program Files.
Look at this bit of the error message:
compiling jasper design D:\Program to
Files\sugarcrm-5.2.0e\php\tmp\php83.tmp
It's taken the filename with a space in and interpreted it as two separate arguments.
Either quote the filename or (possibly simpler) move everything to a directory without a space in the name.
What program did you use to generate the JasperReports file report2.jrxml? iReport? My guess is that your iReport is too new, the JasperReports engine came with ZuckerReports is quite old. Try use an older version of iReport instead.