- Install java SE development kit 8, JDK 8
- Install Netbeans 8.2 and install Glassfish server also during istallation. Encountered some bugs with the apache version. Netbeans 8.1 should also be fine.
- After opening netbeans, open both the WSApplication and E-Cab
- Go to services tab and create new database named "eCab". No need to specify username or password since this is just for testing
- After that, A database would have been created in the name of jdbc:derby://localhost:1527/eCab [ on APP]
- Right click that and connect, since no username or password was specified, you can just press ok
- Expand APP, then right click tables and execute these commands below
CREATE TABLE Customers( CustomerName varchar(255), Password varchar(255), PRIMARY KEY(CustomerName) );
CREATE TABLE Drivers( DriverName varchar(255), Password varchar(255), VehicleNo varchar(255), PRIMARY KEY(DriverName) );
CREATE TABLE AdminTable( AdminName varchar(255), Password varchar(255), PRIMARY KEY(AdminName) );
CREATE TABLE Bookings( BookingID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY(START WITH 1, INCREMENT BY 1), PickupAddress varchar(255), DateAndTime TIMESTAMP, DestinationAddress varchar(255), BookingCharge decimal(10,2), PRIMARY KEY(BookingID), CustomerName varchar(255), DriverName varchar(255), VehicleNo varchar(255), BookingStatus BOOLEAN, RejectStatus varchar(1000) );
ALTER TABLE Bookings ADD FOREIGN KEY (CustomerName) REFERENCES customers;
ALTER TABLE Bookings ADD FOREIGN KEY (DriverName) REFERENCES Drivers;
ALTER TABLE DRIVERS ADD ACTIVESTATUS BOOLEAN;
- Right-click WSApplication in Projects tab and click clean and build
- Right-click WSApplication and click deploy
- Right-click E-Cab then clean and build
- Right-click E-Can then run
Edit netbeans.conf file -On Windows: C:\Program Files\Netbeans\etc\netbeans.conf
-On MAC: Ctrl-click /Applications/NetBeans/NetBeans IDE 6.5.app
in the Finder and choose 'show package contents', then browse to
/Applications/NetBeans/NetBeans\ IDE\ 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf
-On Linux: /home/yourname/netbeans/etc/netbeans.conf OR
/opt/netbeans/etc/netbeans.conf OR
/usr/local/netbeans-x.0/etc/netbeans.conf
Find domain.xml file -GLASSFISH_INSTALL/glassfish/domains/domain1/config/domain.xml
Then add the following JVM option element inside java-config ... -Djavax.xml.accessExternalSchema=all