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 Wonseok,

We should definitely make it so a default install of Oracle can run the tests with only a small amount of configuration. Can you enter a bug?

  Derby is a more interesting question.

At the moment, we have chosen MySQL as the open source target for our testing. The reason is that MySQL provides some of the features that are not available in Derby (e.g SQL-based Stored Procedures) Is MySQL a possible target for you?

Having the LRG (Long Regression tests) run by default on Derby, could make it easy for people to miss important tests since all we could do is ignore tests that test features not available through Derby. With MySQL available as an option, is the lack of LRG support for Derby a big issue for you?

We are planning on setting of an SRG (Short Regression tests), but it is only partly setup at the moment. I believe it would be a good idea to ensure these tests pass on Derby.

What do you think,
Tom

Wonseok Kim wrote:
Hi Gordon,

I'm sorry that I'm not an expert on Oracle database. But this DBMS_RLS package seems avaliable only in Enterprise Edition(I ran core test against 11g Standard Edition)
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_rls.htm

Even with EE some other permissions seem to be configured as you said. I think that test should run against Standard edition and w/o other special database configuration to make people(like me :-)) run test easily. Anyway now I'm trying to run test against EE.

Also I found that numerous errors occured against Derby. Most of errors are related with non supported features in Derby such as procedure. TopLink Essentials test was run okay with Derby. Okay, I know more tests are added to EclipseLink tests. However I believe we need to make only required tests for each platform run w/o any failures or errors. I would like to resolve this in near future as I work on EclipseLink project.

Thanks!
-Wonseok

On Tue, Apr 1, 2008 at 12:02 AM, Gordon Yorke <gordon.yorke@xxxxxxxxxx <mailto:gordon.yorke@xxxxxxxxxx>> wrote:

    Hello Wonseok,
       I am not sure why the TEST table is not being created by the
    problem may be with the permissions on addPolicy.  For these tests
    you will need to make sure the user has the following permissions :
    "Creat any context", "Drop any context" and "execute Sys.DBMS_RLS
    package"

    Usually if these permissions are not set then the setup fails with a
    message stating what permissions must be set.
    --Gordon

    Wonseok Kim wrote:
    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
    <mailto: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>
        > <mailto: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 <mailto:eclipselink-dev@xxxxxxxxxxx>
        > https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
        _______________________________________________
        eclipselink-dev mailing list
        eclipselink-dev@xxxxxxxxxxx <mailto:eclipselink-dev@xxxxxxxxxxx>
        https://dev.eclipse.org/mailman/listinfo/eclipselink-dev



    _______________________________________________
    eclipselink-dev mailing list
    eclipselink-dev@xxxxxxxxxxx <mailto: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