Home » Developer & Programmer » JDeveloper, Java & XML » VehicleRecord2:428: cannot find symbol (Oracle 11g Release 11.2.0.3.0)
VehicleRecord2:428: cannot find symbol [message #635474] Mon, 30 March 2015 15:23
wtolentino
Messages: 287
Registered: March 2005
Senior Member
i am new to java and i inherited this code. please bear with me. i am attempting to add these variables carrierType and busType. this will be referenced to the first post that i have for the java source AccidentReport2. when i add the carrierType and busType i was getting this errors:

SQL> @r:\vehicleRecord2.java;

Warning: Java created with compilation errors.

SQL> show errors;
Errors for JAVA SOURCE "VehicleRecord2":

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      VehicleRecord2:428: cannot find symbol
0/0      3 errors
0/0      location: class VehicleRecord2
0/0      carrierType = inCarrierType;
0/0      ^
0/0      VehicleRecord2:836: cannot find symbol
0/0      symbol  : variable carrierType
0/0      location: class VehicleRecord2
0/0      carrierType = "";
0/0      ^
0/0      VehicleRecord2:837: cannot find symbol

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      symbol  : variable busType
0/0      location: class VehicleRecord2
0/0      busType = "";
0/0      ^
0/0      symbol  : variable carrierType
SQL>


example of what i added.
public class VehicleRecord2
{
   ...
   String CarrierType;
   String BusType;

  // ********************************************************
  // Set Methods
  // ********************************************************
  public void setCarrierType(String inCarrierType)
  ....
  {
    carrierType = inCarrierType;
  }

  public void setBusType(String inBusType)
  {
    BusType = inBusType;
  }


  // ********************************************************
  // Get Methods
  // ********************************************************
  ...
   public String getCarrierType()
   {
      return(CarrierType);
   }

   public String getBusType()
   {
      return(BusType);
   }

//  ==================================================================
//     Set Non PK Fields
//  ==================================================================
   private void setNonPkFields()
   {
   ...
     carrierType = "";
     busType = "";
    
  }
}  // public Class Vehicle Record

;
/


please help. thank you.
Previous Topic: creating views from XML
Next Topic: ORA-29542: class AccidentReport already defined by source AccidentReport
Goto Forum:
  


Current Time: Mon Jan 27 09:27:15 CST 2020