2 Replies Latest reply on Apr 17, 2007 10:16 AM by kuruma45

    ORA-01031: insufficient privileges, grant requirements

    kuruma45

      Hi
      I have some problems to deploy EJB3 on JBOSS 4..0.5, abd a Oracle8i databse. "DATABASE"


      I have one instance of my database, and two schema " SCH1" and "SCH2",
      I'm log on SH1 and each Schema has any table.
      but I have to create a ejb entity SCH2_TABLE1, TABLE1 is a table of SH2,
      in the TABLE1 script :

      GRANT SELECT ON TABLE1 TO SCH1;

      ..

      When I try to deploy, I have an Oracle exception : ORA-01031: insufficient privileges

      My question is, what are the privileges required to deploy an EJB3 entity on an Oracle database or Schema?

      An other question, if I don't declare my entity in the persistence.xml, jboss find my entity and try to deploy it...is it normal??

      What is the use of the persistence file?
      I know it use to declare the oracle-DS file and the name of the database, and also the mode of persistence (update, create-drop)... but how it can find my entity without any declaration?

      Thanks for your answer.


        • 1. Re: ORA-01031: insufficient privileges, grant requirements
          kuruma45

          I have ask to DB admin to put the sys privileges to SCH1 schema...

          I have a problem to bind my entity and table, i'm newbie on Oracle database,

          in my entity :

          @Entity
          @Table(name="SCH2_TABLE1")
          public class SCH2_TABLE1 implements java.io.Serializable
          {

          ...it works in some case, but there are not 2 schema, but a lot and for some table, Jboss don't bind the correct table...

          i tried :

          @Table(name="SCH2.SCH2_TABLE1")
          also
          @Table(name="SCH2@SCH2.SCH2_TABLE1")
          but jboss don't find any table...

          what is the correct syntax to link the correct table??

          Thanks

          • 2. Re: ORA-01031: insufficient privileges, grant requirements
            kuruma45

            it was simple, but hard to find the soluce :


            @Entity
            @Table(name="SCH2_TABLE1", schema="SCH2")
            public class SCH2_TABLE1 implements java.io.Serializable
            {


            I hope it will help somebody..