Details

    • Type: Question Question
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Windows

      Description

      I have weblogic system libraries having javax.persistence_1.0.0.0_1-0.jar and org.apache.openjpa_2.2.0.0_1-1-0.jar.

      EntityManager em = eClepRoleFactory.createEntityManager();

      1. Connection c = (Connection)OpenJPAPersistence.cast(em).getConnection();
      String s = "SET ROLE "role" IDENTIFIED BY "+pass;
      Statement stmt = c.createStatement();
      stmt.execute(s);
      stmt.close();

      2. em.getTransaction().begin();
      Query q = em.createNativeQuery("SET ROLE eclep_hpn_role IDENTIFIED BY role55");
      em.getTransaction().commit();

      Note: I am able to set the role using the steps in 1, but not with the steps in 2.
      Question: What is missing in steps 2, because of which I am not able to set the role. Doesn't createNatvieQuery support this feature. Please help me urgently.

        Activity

        Hide
        Jeremy Bauer added a comment -

        no problem. Glad to hear it was only that minor bug. Resolving issue.

        Show
        Jeremy Bauer added a comment - no problem. Glad to hear it was only that minor bug. Resolving issue.
        Hide
        Rajeev Chaudhary added a comment -

        Thanks Jeremy, for pointing out the mistake . My bad. Please close this issue

        Show
        Rajeev Chaudhary added a comment - Thanks Jeremy, for pointing out the mistake . My bad. Please close this issue
        Hide
        Jeremy Bauer added a comment -

        In the code you've posted for 2), there is no query execution. If it wasn't mistakenly omitted in the JIRA, try:

        q.executeUpdate();

        -Jeremy

        Show
        Jeremy Bauer added a comment - In the code you've posted for 2), there is no query execution. If it wasn't mistakenly omitted in the JIRA, try: q.executeUpdate(); -Jeremy

          People

          • Assignee:
            Jeremy Bauer
            Reporter:
            Rajeev Chaudhary
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development