Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Help with Java project please... tests not passing
New Posts  All Forums:Forum Nav:

Help with Java project please... tests not passing

post #1 of 2
Thread Starter 
I'm getting "Could not initialize this class"; java.langNoClassDefFoundError, so I'm guessing there is something wrong with the location/referencing to one of my classes.
But I can't see anything wrong with the class, being in the same folder of all my other classes, which are working fine. Below are 2 screenshots:

Untitled-1-2.jpg

Untitled2.jpg

Can someone help me out please? smile.gif My project is due tomorrow and if I don't get it in I fail the course automactically...

Below is a description of the project. It basically reads from a XML file that has information on different university campus locations, that's supposed to eventually be made into an Android app to be placed on a phone.
Quote:
The project will involve completing an Android application that helps guide a user along a walking tour of points of interest related to sustainability on the UBC Point Grey campus. We all know it can take awhile to walk around campus, so a user of this application might get hungry along the way! You will be helping to complete this application to allow a user to look up and find food service locations along a route being followed.

In the first phase of the project (February 27 - March 11, 2012), you will be building the data model portion of this application outside of the Android infrastructure.

In the first phase of the project, you will be completing the data model of the application outside of the Android infrastructure. Specifically, you will be completing the implementation of the data model to pass a given set of tests provided in ubc.cs.cpsc210.sustainabilityapp.model.test. The data model code must:

- read the points of interest defined for UBC Point Grey campus from a given XML file (UBC-Sustainability-MapInfo.xml) into a POIRegistry object. The points of interest include both Buildings and FoodService locations.
- support functionality to allow location information to be accessed in multiple ways.

The final implementation of the data model should have eleven to twelve classes (depending in part on how you parse the XML file). You can find a UML class diagram depicting these classes here (last updated on February 27, 2012). You can access the initial implementation of these classes from your lab repository as UBCSustainabilityApp-DataModel-PhaseOne - please check this folder out; it should create a Java project in Eclipse similar to any lab). This initial implementation provides full implementations of six of the classes in the class diagram. Specifications for the methods you need to complete the implementation for can be found in the code. Note that you may need to add fields into the classes and potentially other helper methods as well.

You are given a beginning implementation for POIRegistry. To help ensure there is only one POIRegistry object per application, this class uses a variant of the Singleton design pattern. To access the POIRegistry object, you use the static getDefault method (i.e., POIRegistry.getDefault()) which returns an instance created by calling createDefaultInstance. You need to add the code to initialize the POIRegistry from the UBC-Sustainability-MapInfo.xml XML file where the code says "Create the parser and read the data in here".

The data you must read is stored in an XML file. The XML format in the file you must read describes points of interest (POI). Each POI element has an identifier (Id) and a display name (DisplayName). Each POI element also has one address element, a lat and a long element, an address and a description. There are two different kinds of POI elements: Buildings and FoodService locations. A building has zero or more features defined for it. A FoodService locaiton has a rating and a number of reviews on which the rating is based. You must read in the XML file to initialize the POIRegistry using a SAXParser available in the standard Java libraries.
Aging Tower
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 ASUS P5Q Powercolor Radeon 5750 6GB of DDR2 
Hard DrivePower
2x Seagate 7200.12 500GB Corsair VX550 
  hide details  
Reply
Aging Tower
(13 items)
 
  
CPUMotherboardGraphicsRAM
Q6600 ASUS P5Q Powercolor Radeon 5750 6GB of DDR2 
Hard DrivePower
2x Seagate 7200.12 500GB Corsair VX550 
  hide details  
Reply
post #2 of 2
There aren't too many programmers on OCN, try stackoverflow.com or some newsgroup.

Also, upload your code, instead of posting screens.
Edited by Coma - 3/13/12 at 2:43pm
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
Akiyama Mio
(13 items)
 
  
CPUMotherboardGraphicsRAM
E6420 @ stock, 0.98v Asus P5N-E SLI Gainward GTX 460 1GB @ 800/1600/1900 2x2GB Kingston @ 800MHz 5-5-5-15 2T 
Hard DriveOptical DriveOSMonitor
WD 250GB, 320GB SATA/3, 16MB Cache, Seagate 1TB LG GSA-H62N 18x SATA Ubuntu 9.10 x86 & Win7 x86 Asus VW222U 
KeyboardPowerCase
Logitech Classic Corsair 650HX NZXT Apollo Black 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Application Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Application Programming › Help with Java project please... tests not passing