Deployment to Oracle problem

0
Hi Guys,    I am having the following problem while deploying an application using a local Oracle server. I am getting the following error message:   -------- An error occurred while initializing the Runtime: Could not retrieve version information from system tables -------- com.mendix.m2ee.api.AdminException: An error occurred while initializing the Runtime: Could not retrieve version information from system tables     at com.mendix.basis.impl.MxRuntimeImpl.start(MxRuntimeImpl.java:352) Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: Could not retrieve version information from system tables     at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseInformationGetter.getVersionsAndLastSyncDate(DatabaseInformationGetter.java:101)     at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseInformationGetter.getDatabaseinformation(DatabaseInformationGetter.java:58)     at com.mendix.connectionbus.modelsynchronization.analysis.DatabaseAnalyzer.analyzeAndFillMigrationCommands(DatabaseAnalyzer.java:91)     at com.mendix.connectionbus.modelsynchronization.ModelSynchronizationUpdater.analyzeAndFillMigrationCommands(ModelSynchronizationUpdater.java:137)     at com.mendix.connectionbus.modelsynchronization.ModelSynchronizationUpdater.analyzeAndRender(ModelSynchronizationUpdater.java:96)     at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeModel(SynchronizationManager.scala:192)     at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyzeCurrentDatabase(SynchronizationManager.scala:113)     at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.analyze(SynchronizationManager.scala:102)     at com.mendix.connectionbus.ConnectionBusImpl.collectDatabaseSynchronizationInformation(ConnectionBusImpl.java:307)     at com.mendix.basis.impl.MxRuntimeImpl.initializeConnectionBusAnyway(MxRuntimeImpl.java:429)     at com.mendix.basis.impl.MxRuntimeImpl.start(MxRuntimeImpl.java:334)     at com.mendix.basis.impl.MxRuntimeImpl.start(MxRuntimeImpl.java:279)     at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime(StartAction.java:49)     at com.mendix.m2ee.appcontainer.actions.StartAction.execute(StartAction.java:30)     at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:119)     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)     at org.eclipse.jetty.server.Server.handle(Server.java:561)     at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)     at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)     at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)     at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)     at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)     at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)     at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)     at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)     at java.lang.Thread.run(Thread.java:748)   I believe this is due to some missing grants for the Oracle user I am using. Would you have a list of all the necessary grants?    Thanks in advance for any advice.    Cheers,     Bart 
asked
1 answers
0

Following request of Laith Al-Quadah, I am sharing the script which did work in my case (the cleanup and creation of DB user in Oracle for Mendix installation).

 

DB Cleanup (this will drop ALL objects created by the user):
BEGIN
   FOR cur_rec IN (SELECT object_name, object_type
                     FROM user_objects
                    WHERE object_type IN
                             ('TABLE',
                              'VIEW',
                              'PACKAGE',
                              'PROCEDURE',
                              'FUNCTION',
                              'SEQUENCE',
                              'SYNONYM',
                              'PACKAGE BODY'
                             ))
   LOOP
      BEGIN
         IF cur_rec.object_type = 'TABLE'
         THEN
            EXECUTE IMMEDIATE    'DROP '
                              || cur_rec.object_type
                              || ' "'
                              || cur_rec.object_name
                              || '" CASCADE CONSTRAINTS';
         ELSE
            EXECUTE IMMEDIATE    'DROP '
                              || cur_rec.object_type
                              || ' "'
                              || cur_rec.object_name
                              || '"';
         END IF;
      EXCEPTION
         WHEN OTHERS
         THEN
            DBMS_OUTPUT.put_line (   'FAILED: DROP '
                                  || cur_rec.object_type
                                  || ' "'
                                  || cur_rec.object_name
                                  || '"'
                                 );
      END;
   END LOOP;
END;
/

Create user:

CREATE USER MENDIX IDENTIFIED BY mendix;
GRANT CREATE SESSION TO MENDIX;

Grant permissions:

GRANT CREATE TABLE TO mendix;
GRANT CREATE SEQUENCE TO mendix;
GRANT UNLIMITED TABLESPACE TO mendix;
GRANT RESOURCE TO mendix;
GRANT SELECT ANY TABLE TO mendix;
GRANT SELECT ON DBA_TABLES TO mendix;

I hope this works for you. 

 

Cheers, 

   Bart 

answered