I am trying to use android screen cast. http://code.google.com/p/androidscreencast/ All the requirements that is said for installing is there..This is the error I get,
$ javaws androidscreencast.jnlp
$ java.lang.UnsatisfiedLinkError: /usr/lib/jvm/jdk1.6.0/jre/lib/i386/libdeploy.so: libstdc++.so.5: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1647)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1005)
at com.sun.deploy.config.UnixConfig.loadLibDeploy(UnixConfig.java:38)
at com.sun.deploy.config.UnixConfig.<clinit>(UnixConfig.java:26)
at com.sun.deploy.config.ConfigFactory.newInstance(ConfigFactory.java:11)
at com.sun.deploy.config.Config.getInstance(Config.java:662)
at com.sun.deploy.config.Config.<clinit>(Config.java:678)
at com.sun.javaws.Main.continueInSecureThread(Main.java:119)
at com.sun.javaws.Main$1.run(Main.java:106)
at java.lang.Thread.run(Thread.java:619)
What is the missing file/ path here? what can be done to fix this?
Reason : the Server is not shut Down Properly. Hence this error came.
Solution : Start Task manager look for Javaw.exe with higher value of PID(Process ID) and kill that process and then start the server.
Explanation : If you start task manager and look for javaw.exe you will find 2 processes with this name. One of these process is for Eclipse and other is for Server that is not closed properly. so you need to kill the Servers Javaw.exe process.
To identify this kill the process with high PID value as you can start server only after starting eclipse(unless you are using external tomcat).
Hope this helps..
Related
When I try to run 2 gradle projects simultaneously, it throws me the following error:
Could not create service of type FileHasher using GradleUserHomeServices.createCachingFileHasher().
Timeout waiting to lock file hash cache(/Users/username/.gradle/caches/6.4/fileHashes). It is currently in use by another Gradle instance.
Owner PID: 40300
Our PID: 44136
Owner Operation:
Our operation:
Lock file: /Users/epereda/.gradle/caches/6.4/fileHashes/fileHashes.lock
I have read that the best solution is to kill practically all the java processes with the command "killall -9 java" or some derivative that kills the process that prevents the new application from starting, and yes, when I finish an application I can start any of the others , but the thing is that I actually need to run 3 applications that communicate with each other on my local machine, but when I run the first one, the other 2 give me that error.
I'll answer my own question in case someone finds it useful:
The solution is to specify a different gradle-user-home for each job. Specifically, setting it to the current working directory. (i.e. project directory) and you can do it whit the following command:
./gradlew -g $PWD <build (or bootRun or etc the command you need)>
Exception:
Could not create service of type FileHasher using GradleUserHomeServices.createCachingFileHasher().
Timeout waiting to lock file hash cache(/Users/username/.gradle/caches/6.4/fileHashes). It is currently in use by another Gradle instance.
Owner PID: 40300
Our PID: 44136
Owner Operation:
Our operation:
Lock file: /Users/epereda/.gradle/caches/6.4/fileHashes/fileHashes.lock
Removing lock file worked for me
rm /Users/epereda/.gradle/caches/6.4/fileHashes/fileHashes.lock
I consulted here and here but could not get my problem solved.
When I type this on terminal /opt/glassfish4/glassfish/bin/asadmin start, I get the following result:
Remote server does not listen for requests on [localhost:4848]. Is the server up?
Unable to get remote commands.
Closest matching local command(s):
restart-domain
restart-local-instance
start-database
start-domain
start-local-instance
Command start failed.
Similarly, when I type this /opt/glassfish4/glassfish/bin/asadmin --port 5656 start-domain, I get
java.io.IOException: Couldn't get lock for /opt/glassfish4/glassfish/domains/domain1/logs/server.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:98)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:191)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:220)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:117)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:321)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:360)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:298)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:
Launching GlassFish on Felix platform
Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
at com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:244)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:347)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Command start-domain failed.
I sense there is something problem in path /opt/glassfish4/glassfish/bin/asadmin. I am working on my first JSF web application and cannot run glassfish server. I am using Netbeans and ubuntu 13.10.
Can anyone show me the way?
Thank you!
The error messages
java.io.IOException: Couldn't get lock for
/opt/glassfish4/glassfish/domains/domain1/logs/server.log
and
Exception in thread "main" java.lang.RuntimeException: the domain
directory is not writable.
indicate that the user account you use to start the server doesn't have write permissions in your Glassfish domain folder.
To solve the problem either change the permissions or start the asadmin command with a user who has sufficient permissions.
If this doesn't solve the problem, there may be another process which has a lock on your server.log file, but I guess you would have noticed that. To make sure you can run
lsof /opt/glassfish4/glassfish/domains/domain1/logs/server.log
to see if any process is using the file.
See also:
Failed to start glassfish server because Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log
I have a program that uses Sqlite database. It works fine on Windows (exported jar or directly in Eclipse) but when I move it to linux server (plan is to use run it at certain intervals, cron job). I'm exporting it to jar from Eclipse and packing the sqlite-jdbc4-3.8.2-SNAPSHOT.jar with it. Error is this:
/$ /usr/bin/java -jar /home/username/Software.jar /home/username/
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: /tmp/sqlite-3.8.2-amd64-libsqlitejdbc.so: failed to map segment from shared object: Operation not permitted
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open(Ljava/lang/String;I)V
at org.sqlite.core.NativeDB._open(Native Method)
at org.sqlite.core.DB.open(DB.java:161)
at org.sqlite.core.CoreConnection.open(CoreConnection.java:145)
at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66)
at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21)
at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23)
at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:44)
at org.sqlite.JDBC.createConnection(JDBC.java:113)
at org.sqlite.JDBC.connect(JDBC.java:87)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:207)
....
So before you ask, I've made sure that sqlite-3.8.2-amd64-libsqlitejdbc.so in /tmp/ has all permissions (rwxrwxrwx). Still that native library is causing problems. It does get copied in /tmp/ folder though. That being said I totally suck in Linux... and for that reason I'm pretty much clueless what to try next.
What should I do? Switch connector?
EDIT:
Solved the problem by using System.setProperty("java.io.tmpdir", "/home/username/"); Apparently it for some reason couldn't execute the native library from tmp folder... Probably because it was created by root. Also I had to revert back to sqlite-jdbc-3.7.2.jar because the new one crashes on linux.
I had same problem, and I found the solution in this GitHub issue:
JAVA_OPTS=-Djava.io.tmpdir=/path/to/some/other/tmpdir bin/cerebro
Also look at this other SO answer.
On a particular server (Windows 2012 server R2) I am having trouble creating a temp file. I get the following error everytime I try.
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(Unknown Source)
etc..
The error happens everytime the following code is ran:
InputStream inputStream = portalBean.createPDF( sessionID, foCode );
Things I have tried
Changed the java.io.tmpdir variable on the fly. System.setProperty("java.io.tmpdir", "C:\\");
Added -Djava.io.tmpdir=c:\\temp to the webnetwork lax file to an unrestricted location.
I tried setting the webNetwork service to run as a specified user with rights to temp files e.g. the Administrator.
Made sure I have free disk space and I cleaned out the c:\windows\temp folder.
Made sure the tmp environment variables were set to their default values.
I also tried running the service from a command prompt which was opened with the Run As Administrator option.
And the IOException lingers still. I have another server running the same code without issue (Windows Server 2012).
Does anyone else have any Ideas of what else I can try to resolve this issue? And or any tips on how I can debug the issue more thoroughly to get a grasp of what is going on?
One tool you can use to debug this is process monitor from system internal tool kit. The step is: add a filter to only monitor your process (I think it is javaw.exe in your case), after the error happens, go through the file activities in the process monitor log, you can find how the process is finding files and which directories the process searched. If the process is searching in the wrong directory, you can find it from the log.
I just used this tool to figure out a JVM crash problem today.
Based on the description of your problem, I guess the path variable of the process is changed in the middle of your code, with another tool process explore you can view the path variable of the process, it might help.
Try and create instead a directory somewhere under your home directory:
final Path tmpdir = Paths.get(System.getProperty("user.home"), "tmp");
Files.createDirectories(tmpdir);
System.setProperty("java.io.tmpdir", tmpdir.toAbsolutePath().toString());
Then try and Files.createTempFile() in there.
Note that if Files.createDirectories() refers to an existing file which is not a directory, you'll get a FileAlreadyExistsException.
I want to study btrace.
java process user is yubaofu
yubaofu#btrace sudo sh /home/yubaofu/study/btrace/bin/btrace 24234 JInfo.class
well-known file is not secure
yubaofu#btrace sh /home/yubaofu/study/btrace/bin/btrace 24234 JInfo.class
Connection refused
I find a similar issue
how to solve it ?
os:ubuntu12
jdk:jdk7
You should check the file /tmp/hsperfdata_$USER/$PID. what's the $USER exactly ? Make sure it's the same user that you initialize btrace with.
I've encountered this issue when attaching btrace to a process that has already been attached to. The workaround I found was
killall -KILL java
which simply kills all the java processes.