1. glassfish
  2. GLASSFISH-18907

Missing schema name in generated SQL using glassfish 3.1.2 (build 23)


    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.2_b23
    • Fix Version/s: None
    • Component/s: cmp
    • Labels:
    • Environment:

      local: Windows XP with GF 3.1.2 (build 23) + JDK 1.7
      server: Oracle Database 10.2.05


      I've got a big Problem with the usage of glassfish and don't know if it's a bug or a configuration mistake.
      For our business software we use actually the weblogic application server.
      We want to switch to glassfish V3.
      Now I check local for ToDos.

      My JNDI - DataSource Connection has been established and together with the correct *.dbschema-File I'am able to deploy.
      All SessionBeans with connection to the database are working fine.
      My Problem are the EntityBeans.

      From my point of view the problem ist, that my DBUser is different to the Schema-User.
      The result of performing a function ist this stack trace:

      [#|2012-07-16T09:36:47.117+0200|WARNING|glassfish3.1.2|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=79;_ThreadName=Thread-2;|JDO74004: Bean 'InfoUpdateBean' Methode ejbFindByPrimaryKey: JDO76400: JDBC-SQLException beim Ausführen der SQL-Anweisung:
      SQL-Anweisung<select t0."AUTO_KEY", t0."FIKT_LIEF_NR", t0."INFOTEXT_NR", t0."ANZEIGEN_KZ", t0."GELADEN_AM", t0."LETZTE_AKTUALISIERUNG", t0."BENUTZER_ID" from "LIS_ZUORDNUNG" t0 where t0."AUTO_KEY" = ?> mit Eingabewerten:java.lang.Long:1159049.
      Weitere Informationen finden Sie in der SQLException.
      NestedException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

      So the Problem is, that the table "LIS_ZUORDNUNG" doesn't exist at the point of view from the current User.
      The SQL has to include a pretended schema name like NDA."LIS_ZUORDNUNG".
      Then the SQL works fine inside the SQL Developer...


        No work has yet been logged on this issue.


          • Assignee:
            Mitesh Meswani
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: