When running servlet in tomcat 7 throws FileNotFoundException (permission denied) - apache

When running the servlet application, certain files are written to the application folder, during that time the server throws
Caused by: java.io.FileNotFoundException: config.dbf.0 (Permission denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:216)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:101)
at jdbm.recman.RecordFile.getRaf(RecordFile.java:125)
at jdbm.recman.RecordFile.<init>(RecordFile.java:104)
i am trying to run it on mac os x, and also permission have been provided to write in the catalina.policy file. and also tried to give the system access permission for the file with 755,777 using chmod. Is it the problem related to the os or is it related to file permission scheme in the catalina.policy file?, i am not getting any security exception
whenever i try it on the windows platform its running fine, but when i run it on mac or unix based systems its throwing this exception, the problem is a small db called pcdb is created once the war file is deployed, so problems exisiting while creating the db files itself, these db files are small chunks of about 8 files

Related

Can't create virtual machine in ESXI 6.5 web gui

I'm trying to create a virtual machine in the ESXI 6.5 web gui, but it always fails with the following error:
Failed - File [datastore1] pfSense/pfSense_0.vmdk was not found
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of LookupAndOpen[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
File system specific implementation of Lookup[file] failed
pfSense is the name I gave the VM. If I try to create the virtual machine in the deprecated 5.5 vSphere client it works, so it seems something specific to the web gui.
I hope someone can help me.
Best regards,
Markus
Installing the newest embedded host client fling fixed the problem for me.

Glass fish app server node agent not starting

When i try to start node agent in my glassfish app server via putty i got the following warning
Apr 25, 2014 5:03:03 AM com.sun.enterprise.admin.server.core.channel.RMIClient warn
WARNING: channel.client_init_error
Apr 25, 2014 5:03:03 AM com.sun.enterprise.admin.server.core.channel.RMIClient warn
WARNING: channel.client_init_error
and finally "CLI137 Command start-node-agent failed." a timeout.
The log file details are
2014-04-25T05:03:04.388-0500|WARNING|sun-appserver2.1|javax.enterprise.system.tools.admin|_ThreadID=10;_ThreadName=main;|ADM5801:Admin server channel crea
tion failed.|#]
[#|2014-04-25T05:03:04.396-0500|SEVERE|sun-appserver2.1|javax.ee.enterprise.system.nodeagent|_ThreadID=10;_ThreadName=main;|NAGT0014:Unexpected Node Agent ex
ception.
com.sun.appserv.server.ServerLifecycleException: java.lang.RuntimeException: Unable to save stub to /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config
/admch
at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:111)
at com.sun.enterprise.ee.nodeagent.NodeAgentMain.startup(NodeAgentMain.java:204)
at com.sun.enterprise.ee.nodeagent.NodeAgentMain.main(NodeAgentMain.java:396)
Caused by: java.lang.RuntimeException: Unable to save stub to /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch
at com.sun.enterprise.admin.server.core.channel.AdminChannel.saveStubToFile(AdminChannel.java:354)
at com.sun.enterprise.admin.server.core.channel.AdminChannel.createRMIChannel(AdminChannel.java:107)
... 2 more
Caused by: java.io.FileNotFoundException: /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
at com.sun.enterprise.admin.server.core.channel.AdminChannel.saveStubToFile(AdminChannel.java:348)
... 3 more
I am unable to figure out what excatly the issue is. I have got my permissions right. Please provide some inputs on this issue.
There IS obviously a permission problem. Make sure that the user your GF runs with has the permission to create a file in this path. Try to touch a file in this path in a shell.
Check that every directory in the path /opt/vendor/sunone/SDK/nodeagents/ACSNA-TEST/agent/config/admch has the execute right set for the GF user or its group (chmod +x).

why i am getting these errors in cloud programming?

java.io.FileNotFoundException: simulation.properties (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at org.cloudbus.cloudsim.ex.mapreduce.Configuration.loadPropertiesFromFile(Configuration.java:35)
In Configuration.java file you must have a code to retrieve Properties From a File. There can be two problems
Either configuration file is missing
If you have configured a path any where in the project that path is invalid after you deploy from local host to cloud

HSQLDB: .data file access denied

I have HSQLDB database which i was unable to open.
SQL client throws following exception:
java.sql.SQLException: error in script file line: 32 file input/output errorerror c:\db\mydb.data (Access is denied) opening file - file c:\db\mydb.data
at org.hsqldb.jdbc.Util.sqlException(Util.java:380)
at org.hsqldb.jdbc.Util.sqlException(Util.java:103)
at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3303)
at org.hsqldb.jdbc.JDBCDriver.getConnection(JDBCDriver.java:321)
at org.hsqldb.jdbc.JDBCDriver.connect(JDBCDriver.java:259)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.createConnection(JDBCConnection.java:214)
at org.eclipse.datatools.connectivity.DriverConnectionBase.internalCreateConnection(DriverConnectionBase.java:105)
at org.eclipse.datatools.connectivity.DriverConnectionBase.open(DriverConnectionBase.java:54)
at org.eclipse.datatools.connectivity.drivers.jdbc.JDBCConnection.open(JDBCConnection.java:73)
at org.eclipse.datatools.enablement.hsqldb.connection.HSQLDBJDBCConnectionFactory.createConnection(HSQLDBJDBCConnectionFactory.java:35)
at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)
at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)
at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)
at org.eclipse.datatools.connectivity.ui.PingJob.run(PingJob.java:59)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.hsqldb.HsqlException: error in script file line: 32 file input/output errorerror c:\db\mydb.data (Access is denied) opening file - file c:\db\mydb.data
at org.hsqldb.error.Error.error(Error.java:131)
at org.hsqldb.scriptio.ScriptReaderText.readDDL(ScriptReaderText.java:151)
at org.hsqldb.scriptio.ScriptReaderBase.readAll(ScriptReaderBase.java:65)
at org.hsqldb.persist.Log.processScript(Log.java:759)
at org.hsqldb.persist.Log.open(Log.java:159)
at org.hsqldb.persist.Logger.openPersistence(Logger.java:288)
at org.hsqldb.Database.reopen(Database.java:218)
at org.hsqldb.Database.open(Database.java:185)
at org.hsqldb.DatabaseManager.getDatabase(DatabaseManager.java:240)
at org.hsqldb.DatabaseManager.newSession(DatabaseManager.java:157)
at org.hsqldb.jdbc.JDBCConnection.<init>(JDBCConnection.java:3281)
... 12 more
Line 32 is the first line where data model is being created, it contains create cached table statement. What could possibly cause that? Is it curable? Need to recover data.
"Access is denied" generally means you file is readonly, or has already been opened by a different process (for example virus checker). Occasionally windows itself locks the file, which can be unlocked only by restarting the machine.

Java 1.5 crash on AIX 5

I have a problem with Java 1.5.0 for AIX. The error happens just when I log on with specific user on AIX (myuser). When I log on with other user java works ok.
The error come up even when I executed just "java -version" or simply "java" (of course, without quoting). I've tried executing it with the full path: /usr/java5/jre/bin/java but still fails.
There was installed the version 1.4 of java on system too. So the $PATH variable for the user contained /usr/java14/jre/bin, but I removed that value, I even uninstalled that version of java (1.4) so that just java 5 exists on the system, but the error continues.
If I execute "java -fullversion" it doesn't crash.
This is part of the error (the full output is very long):
JVMJ9VM011W Unable to load j9dmp23: No such file or directory
JVMJ9VM011W Unable to load j9jit23: No such file or directory
JVMJ9VM011W Unable to load j9gc23: No such file or directory
JVMJ9VM011W Unable to load j9vrb23: No such file or directory
Unhandled exception
Type=Illegal instruction vmState=0x00000000
J9Generic_Signal_Number=00000010 Signal_Number=00000004 Error_Value=00000000
Signal_Code=0000001e
Handler1=F0719CC8 Handler2=F0714F5C
.....
Target=2_30_20091103_45935_bHdSMr (AIX 5.3)
CPU=ppc (4 logical CPUs) (0x7d0000000 RAM)
JavaVMInitArgs.nOptions=14:
-Xjcl:jclscar_23
-Dcom.ibm.oti.vm.bootstrap.library.path=/usr/java5/jre/bin
-Dsun.boot.library.path=/usr/java5/jre/bin
-Djava.library.path=/usr/java5/jre/bin:/usr/java5/jre/bin:/usr/java5/jre/bin/classic:/usr/java5/jre/bin:/sqllib/lib:/home/myuser/comm:/home/myuser/sys:/home/myuser/bin:/db2util/db2adm/sqllib/lib64:/usr/java5/jre/bin/j9vm:/usr/lib
-Djava.home=/usr/java5/jre
-Djava.ext.dirs=/usr/java5/jre/lib/ext
-Duser.dir=/home/myuser
_j2se_j9=70912 (extra info: F070EA2C)
-Xdump
vfprintf (extra info: 300017A4)
-Dinvokedviajava
-Djava.class.path=/db2util/db2adm/sqllib/java/db2java.zip:/db2util/db2adm/sqllib/java/db2jcc.jar:/db2util/db2adm/sqllib/java/sqlj.zip:/db2util/db2adm/sqllib/function:/db2util/db2adm/sqllib/java/db2jcc_license_cu.jar:.
vfprintf
_port_library (extra info: F070EE30)
Note: "Enable full CORE dump" in smit is set to FALSE and as a result there will be limited threading information in core file.
Note: dump may be truncated if "ulimit -c" is set too low
Generated system dump: {default OS core name}
(no Thread object associated with thread)
(no Thread object associated with thread)
Unhandled exception in signal handler
ksh: 2179192 IOT/Abort trap(coredump)
I found the error. The problem is a line on the .profile which sets the environment variable LIBPATH:
export LIBPATH=/home/myuser/sys
I deleted that line in the .profile and java worked.