Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Hello and question about Connector

Hi Tom,

I ran my local test to see error messages (also with sessions.xml).
Also I ran core LRG and JPA LRG tests against Oracle 11. However I got 6 errors(below) which are all related with VPD(DBMS_RLS) support. I guess I should do something to pass these tests on my newly-installed database. I need to look into this more (hint?), but this doesn't appear to be related with my changes(it's same w/o changes).

If you don't have another concern, you could proceed to check it in. :-)

Cheers
-Wonseok

VPDSupportTest

Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist Error Code: 942 Call: CALL DBMS_RLS.ADD_POLICY ('TEST', 'isolated_employee', 'testing_policy', 'TEST', 'testing_security.Allowed_ids', 'select') Query: DataModifyQuery()
 
Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080330)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-00942: table or view does not exist

Error Code: 942
Call: CALL DBMS_RLS.ADD_POLICY ('TEST', 'isolated_employee', 'testing_policy', 'TEST', 'testing_security.Allowed_ids', 'select')
Query: DataModifyQuery()
 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:313)
 at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:756)
 at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:822)
 at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:556)
 at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:499)
 at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:738)
 at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:204)
 at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:190)
 at

On Fri, Mar 28, 2008 at 10:20 PM, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
Hi Wonseok,

  Your changes looks good to me.  What testing have you done?

-Tom

Wonseok Kim wrote:
> Hi Tom,
> I attached the second patch considering your comments.
>
> Also please see some comments inline:
>
> On Fri, Mar 28, 2008 at 2:21 AM, Tom Ware <tom.ware@xxxxxxxxxx
> <mailto:tom.ware@xxxxxxxxxx>> wrote:
>
>     Hi Wonseok,
>
>       A couple of comments inline:
>
>     Wonseok Kim wrote:
>      > Hi Tom,
>      >
>      > I attached a patch for this.
>      > https://bugs.eclipse.org/bugs/show_bug.cgi?id=224083
>      >
>      > Let me explain some code changes.
>      >
>      > Index:
>      >
>     /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
>      > ===================================================================
>      > ---
>      >
>     /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
>      > (revision 13857)
>      > +++
>      >
>     /home/wons/works/eclipselink/jpa/eclipselink.jpa/src/org/eclipse/persistence/internal/jpa/EntityManagerSetupImpl.java
>      > (working copy)
>      > @@ -765,9 +765,6 @@
>      >                  // Process the Object/relational metadata from
>     XML and
>      > annotations.
>      >
>      PersistenceUnitProcessor.processORMetadata(processor,
>      > throwExceptionOnFail);
>      >
>      > -                // The connector will be reconstructed when the
>     session
>      > is actually deployed
>      > -                session.getProject().getLogin().setConnector(new
>      > DefaultConnector());
>      > -
>      >                  if (session.getIntegrityChecker().hasErrors()){
>      >                      session.handleException(new
>      > IntegrityException(session.getIntegrityChecker()));
>      >                  }
>      >
>      > Above code(in predeploy phase) wasn't needed at all because the Login
>      > object has already dummy DefaultConnector at creation time.
>
>     There is actually a case where there might not be a dummy connector.
>      If the
>     session is setup using EclipseLink sessions XML, there may be some login
>     information in that file.  You may be able to isolate where we dummy
>     out the
>     connector to that case, but I don't think it can be removed entirely.
>
>
> I investigated your concern and confirmed that with sample sessions.xml.
> This should be reflected in the updateLoginDefaultConnector() method.
> Also session customizer could be invoked after that to set new
> Connector, I realized that checking eclipselink.jdbc.url at the method
> is not right time. Please see diff for code changes.
>
> However above lines have nothing to do with sessions.xml or customizer.
> It's actually called when there is no sessions.xml and this is just
> duplicate since DefaultConnector is already set when Login is
> initialized as I showed below.
>
>
>      >
>      > 674:            session = new ServerSession(new Project(new
>      > DatabaseLogin()));
>      > ->
>      >     public DatabaseLogin(DatabasePlatform databasePlatform) {
>      >         super(databasePlatform);
>      >         this.useDefaultDriverConnect();
>      >     }
>      > ->
>      >     public void useDefaultDriverConnect() {
>      >         setConnector(new DefaultConnector());
>      >     }
>      >
>
>
> Thanks for your review.
> -Wonseok
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> eclipselink-dev mailing list
> eclipselink-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev


Back to the top