This tutorial will help you set up iTrust in the lab.
Start Eclipse. The shortcut to Eclipse should be in the Start menu. When Eclipse loads, you will be in the default workspace, similar to the workspace shown below.
After Eclipse has started and you are in the default workspace, you should see a project called “Servers” already in the package explorer. This means already has Tomcat set up for this workspace. If, for some reason, you need to set up Tomcat again, see the troubleshooting section at the bottom.
Check that Tomcat can start up by doing the following:
Window > Show View > Other… Select Server > Servers…Servers view, Click on the “Play” button to start the serverServer startup in xxxxx ms in the Console view, and the Servers view shows that your status is “Synchronized”, then your server is properly configured. Also, check the Console view for exception stacktraces - there should not be any.The source files will need to be imported as an Eclipse project, and deployed as a Tomcat application. To do this, follow these steps:
Existing Projects Into Workspace. Click Next. Be sure to select “existing projects”!Select Archive File and select Browse.Finish.NOTE: The first time you use your repository, you will need to upload your project. (See: http://agile.csc.ncsu.edu/SEMaterials/tutorials/subclipse/)
To import a project from a Subversion repository:
For more information on using Subclipse, checkout the Subclipse tutorial: http://agile.csc.ncsu.edu/SEMaterials/tutorials/subclipse/
Servers view along the bottom of the screen (if you don't see the Servers view, use Window > Show View… > Server > Servers), right-click on your Tomcat installation and select Add and Remove Projects…Add button. Once iTrust is listed under the Configured column, click FinishiTrust > WebRoot > META-INF > context.xmlusername="root" password="root" url="jdbc:mysql://localhost:3306/iTrust?createDatabaseIfNotExist=true"
context.xml should look. Do NOT edit or remove the ?createDatabaseIfNotExist=true parameter:iTrust > unittests > edu.ncsu.csc.itrust. Right-click on DBBuilder.java, select Run as… > Java Application(to view your packages easier, click on the triangle in the package explorer view, Package Presentation > “Hierarchical”)
Executing: , then end with Operation Completedunittests, and in the datagenerators package, run the TestDataGenerator.java program. You should also get a lot of Executing: , followed by an Operation CompletedTomcat is already unzipped into the c:\tomcat directory on the lab machines, so you will need to set up Eclipse to deploy projects to Tomcat. To do this, complete the following steps:
Window > Show View > Other… Select Server > Servers…Servers view, right click and select “New”Apache > Tomcat 5.5. Hit next.c:\tomcat\apache-tomcat-5.5.26 as the installation directory (if your version number might not match the screenshot - that's okay as long as it's 5.5)FinishServer startup in xxxxx ms in the Console view, and the Servers view shows that your status is “Synchronized”, then your server is properly configured. Also, check the Console view for exception stacktraces - there should not be any.Window > Show View… > ConsoleIf iTrust cannot connect to the local database, you may need to create the database manually using MySQL.
MySQL Command Line Client in the MySQL > MySQL Server 5.1 folder, as shown below:root). Hit enter to authenticate.mysql> prompt: create database XYZ;
where XYZ is the name of the database you wish to create. Don't forget the semicolon!
context.xml file within your project folder to update the information you may have changed.DBBuilder.java and TestDataGenerator.java within iTrust.TAs - need instructions and screenshots on “Project > Clean”, “Use F5 to refresh your workspace. (fixes 'resource out of sync' errors)”, and “Clean Tomcat Work Directory” by right-clicking on the servers view.
We'll post common issues people have had or might have in this section.