DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

DMShell Up and Running


The dmshell is a web server accepting a shell command string, and run it on web server host.

Setup DataBase

Fix Derby Server Startup Failed

When start Derby server with /home/chad/apps/jdk1.6.0_45/db/bin/startNetworkServer, the following error raised:

access denied ("java.net.SocketPermission" "localhost:1527" "listen,resolve")

Solution:

Find out system's JRE. On my laptop, it's /usr/lib/jvm/java-7-openjdk-amd64/jre Add the following codes into file lib/security/java.policy in this folder:

grant {
    permission java.net.SocketPermission "localhost:1527", "listen";
};

Ref: http://stackoverflow.com/questions/21154400/unable-to-start-derby-database-from-netbeans-7-4

Create Database and Table

Run ~/apps/jdk1.6.0_45/db/bin/ij and run following commands:

connect 'jdbc:derby://localhost:1527/dmdb;create=true';
create table shellstatus (id int not null generated by default as identity (start with 1, increment by 1), shellname varchar(40), starttime timestamp, endtime timestamp,status int);

Then you can use select * from shellstatus; to list all data in this table.



Published

Oct 28, 2014

Last Updated

Oct 28, 2014

Category

Tech

Tags

  • ajax 1
  • derby 1
  • javascript 11
  • jsp 1

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor