If cause of error:
CommPortIdentifier.java:354:in `open': gnu.io.PortInUseException: Unknown Application
just create and chmod /var/lock folder :)
mkdir /var/lock
chmod go+rwx /var/lock
题
I'm trying to run jruby application, but it fails with error:
LoadError: no such file to load -- net/http/server
require at org/jruby/RubyKernel.java:1054
require at ../jruby-1.7.4/lib/ruby/shared/rubygems/custom_require.rb:36
(root) at lib/main.rb:4
What does it means? o_O
Some times, I see another error:
bmalets:trunk bmalets$ sh bin/qatcher.sh
Experimental: JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
Connecting to serial port /dev/tty.usbmodemfa131
CommPortIdentifier.java:354:in `open': gnu.io.PortInUseException: Unknown Application
from NativeMethodAccessorImpl.java:-2:in `invoke0'
from NativeMethodAccessorImpl.java:39:in `invoke'
from DelegatingMethodAccessorImpl.java:25:in `invoke'
from Method.java:597:in `invoke'
from JavaMethod.java:470:in `invokeDirectWithExceptionHandling'
from JavaMethod.java:328:in `invokeDirect'
from InstanceMethodInvoker.java:71:in `call'
from CachingCallSite.java:346:in `cacheAndCall'
from CachingCallSite.java:204:in `call'
from CallTwoArgNode.java:59:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:139:in `call'
from DefaultMethod.java:170:in `call'
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from VCallNode.java:88:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:204:in `call'
from DefaultMethod.java:194:in `call'
from CachingCallSite.java:336:in `cacheAndCall'
from CachingCallSite.java:179:in `callBlock'
from CachingCallSite.java:183:in `call'
from RubyClass.java:855:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:294:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from CallOneArgNode.java:57:in `interpret'
from InstAsgnNode.java:95:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:74:in `INTERPRET_METHOD'
from InterpretedMethod.java:204:in `call'
from DefaultMethod.java:194:in `call'
from CachingCallSite.java:336:in `cacheAndCall'
from CachingCallSite.java:179:in `callBlock'
from CachingCallSite.java:183:in `call'
from RubyClass.java:855:in `newInstance'
from RubyClass$INVOKER$i$newInstance.gen:-1:in `call'
from JavaMethod.java:294:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from lib/main.rb:37:in `chained_0_rescue_1$RUBY$SYNTHETIC__file__'
from lib/main.rb:34:in `__file__'
from lib/main.rb:-1:in `load'
from Ruby.java:807:in `runScript'
from Ruby.java:800:in `runScript'
from Ruby.java:669:in `runNormally'
from Ruby.java:518:in `runFromMain'
from Main.java:390:in `doRunFromMain'
from Main.java:279:in `internalRun'
from Main.java:221:in `run'
from Main.java:201:in `main'
P.S.:
ruby version:
java version:
解决方案
If cause of error:
CommPortIdentifier.java:354:in `open': gnu.io.PortInUseException: Unknown Application
just create and chmod /var/lock folder :)
mkdir /var/lock
chmod go+rwx /var/lock