Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. driver not loaded error even after compiling sql plugin for oracle oci.
Servers for Qt installer are currently down

driver not loaded error even after compiling sql plugin for oracle oci.

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rahulvishwakarma
    wrote on 8 Apr 2019, 09:27 last edited by rahulvishwakarma 4 Aug 2019, 09:28
    #1

    hi to all,
    I have centos6.4 in client and server both, in client installed Qt 5.3.2. After compiling and installing for QOCI plugin as follows:

    #  /opt/Qt5.3.2/5.3/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/oracle/11.2/client64" "LIBS+=-L/usr/lib/oracle/11.2/client64/lib -lclntsh -lnnz11" oci.pro
    # make
    # make install
    
    

    it works correctly without any error.
    but when i ran this code , it displays "diver not loaded driver not loaded" at run time.
    code is

    #include <QtWidgets>
    #include <QtSql>
    int main(int argc,char* argv[])
    {
        QApplication app(argc,argv);
        QTableView table;
        table.setWindowTitle("QT-Connect to Oracle Database");
        QSqlDatabase db = QSqlDatabase::addDatabase("QOCI");
        db.setHostName("serverora11gr2.db.net");
        db.setDatabaseName("orcl");
        db.setUserName("scott");
        db.setPassword("tiger");
    
        if (!db.open())
        {
            QMessageBox::critical(0, QObject::tr("Database Error"),
            db.lastError().text());
        }
    
        QSqlQuery query;
        query.exec("select * from v$version");
        QSqlQueryModel model;
        model.setQuery(query);
        table.setModel(&model);
        table.resizeColumnsToContents();
        table.resize(450,250);
        table.show();
    
        return app.exec();
    }
    

    and .pro file is :-

    QT       += core gui sql
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    TARGET = oraconnection
    TEMPLATE = app
    SOURCES += main.cpp
    

    please suggest how to recover "driver not loaded" error

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Apr 2019, 21:15 last edited by
      #2

      Hi,

      Add the QT_DEBUG_PLUGINS environment variable to the Run part of the Project panel and set it to one.

      It should give you some clue about what is happening.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      3
      • R Offline
        R Offline
        rahulvishwakarma
        wrote on 9 Apr 2019, 04:49 last edited by
        #3

        thanks for reply:
        i didn't get your point
        "Add the QT_DEBUG_PLUGINS environment variable to the Run part of the Project panel and set it to one."
        where and how please tell me.

        J 1 Reply Last reply 9 Apr 2019, 05:12
        1
        • R rahulvishwakarma
          9 Apr 2019, 04:49

          thanks for reply:
          i didn't get your point
          "Add the QT_DEBUG_PLUGINS environment variable to the Run part of the Project panel and set it to one."
          where and how please tell me.

          J Online
          J Online
          jsulm
          Lifetime Qt Champion
          wrote on 9 Apr 2019, 05:12 last edited by
          #4

          @rahulvishwakarma In QtCreator you go to Projects on the left side, then select the Kit you're using and go to Run, expand the "Run Environment" - here you will see many environment variables, add QT_DEBUG_PLUGINS there...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • R Offline
            R Offline
            rahulvishwakarma
            wrote on 9 Apr 2019, 08:36 last edited by rahulvishwakarma 4 Sept 2019, 08:37
            #5

            i did as you said but after restarting the system it gives me followong error :-

            This application failed to start because it could not find or load the Qt platform plugin "xcb"
            in "".
            
            Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
            
            Reinstalling the application may fix this problem.
            Aborted (core dumped)
            

            how to solve this

            J 1 Reply Last reply 9 Apr 2019, 10:53
            0
            • R rahulvishwakarma
              9 Apr 2019, 08:36

              i did as you said but after restarting the system it gives me followong error :-

              This application failed to start because it could not find or load the Qt platform plugin "xcb"
              in "".
              
              Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, xcb.
              
              Reinstalling the application may fix this problem.
              Aborted (core dumped)
              

              how to solve this

              J Online
              J Online
              jsulm
              Lifetime Qt Champion
              wrote on 9 Apr 2019, 10:53 last edited by
              #6

              @rahulvishwakarma Does it happen if you start the app from QtCreator?

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rahulvishwakarma
                wrote on 10 Apr 2019, 05:27 last edited by
                #7

                it happens when i start QtCreator

                J 1 Reply Last reply 10 Apr 2019, 07:11
                0
                • R rahulvishwakarma
                  10 Apr 2019, 05:27

                  it happens when i start QtCreator

                  J Online
                  J Online
                  jsulm
                  Lifetime Qt Champion
                  wrote on 10 Apr 2019, 07:11 last edited by
                  #8

                  @rahulvishwakarma Search for plugins/platforms/libqxcb.so and do

                  ldd PATH_TO/libqxcb.so
                  

                  and post the output here.

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1

                  1/8

                  8 Apr 2019, 09:27

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved