Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting error - cannot find symbol for import and @

ora_1978Mar 19 2014 — edited Mar 21 2014

I am getting error like cannot find symbol for import and @ . How to resolve it ?

  1  create or replace and compile java source named "AddressTypeDbProcedure" as
  2  import javax.xml.bind.annotation.XmlAccessType;
  3  import javax.xml.bind.annotation.XmlAccessorType;
  4  import javax.xml.bind.annotation.XmlElement;
  5  import javax.xml.bind.annotation.XmlSeeAlso;
  6  import javax.xml.bind.annotation.XmlType;
  7  public class AddressType {
  8      @XmlElement(name = "StreetAddress")
  9      protected String streetAddress;
10      public String getStreetAddress() {
11          return streetAddress;
12      }
13      public void setStreetAddress(String value) {
14          this.streetAddress = value;
15      }
16* };
17  /

Warning: Java created with compilation errors.

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

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      AddressTypeDbProcedure:1: cannot find symbol
0/0      6 errors
0/0      location: package javax.xml.bind.annotation
0/0      import javax.xml.bind.annotation.XmlAccessType;
0/0      ^
0/0      AddressTypeDbProcedure:2: cannot find symbol
0/0      symbol  : class XmlAccessorType
0/0      location: package javax.xml.bind.annotation
0/0      import javax.xml.bind.annotation.XmlAccessorType;
0/0      ^
0/0      AddressTypeDbProcedure:3: cannot find symbol

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      symbol  : class XmlElement
0/0      location: package javax.xml.bind.annotation
0/0      import javax.xml.bind.annotation.XmlElement;
0/0      ^
0/0      AddressTypeDbProcedure:4: cannot find symbol
0/0      symbol  : class XmlSeeAlso
0/0      location: package javax.xml.bind.annotation
0/0      import javax.xml.bind.annotation.XmlSeeAlso;
0/0      ^
0/0      AddressTypeDbProcedure:5: cannot find symbol
0/0      symbol  : class XmlType

LINE/COL ERROR
-------- -----------------------------------------------------------------
0/0      location: package javax.xml.bind.annotation
0/0      import javax.xml.bind.annotation.XmlType;
0/0      ^
0/0      AddressTypeDbProcedure:7: cannot find symbol
0/0      symbol  : class XmlElement
0/0      location: class AddressType
0/0      @XmlElement(name = "StreetAddress")
0/0      ^
0/0      symbol  : class XmlAccessType
SQL>

Vinodh

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 18 2014
Added on Mar 19 2014
4 comments
3,136 views