5 Replies Latest reply: Apr 18, 2012 5:40 AM by Arnold Ayaoan RSS

    Java Application : could'nt load document


      Hi all,

      I'm trying to load Qlikview Document in simply java class. I've an unexcepted error. (cf screenshot). The SDK Example [Selections.java] have the same error.

      Thanks for your help, Clément


      Here, my java code :


      import com.qt.qw.beans.QlikSession;
      public class myFirstQVProgram {
      private QlikSession session;
      public static void main(String[] args) { new myFirstQVProgram().Test(); }
      public void Test(){ session = new QlikSession(); session.setUserName("QLIKOPORTABLE\\qlikweb"); session.setPassword("qlikweb"); session.setDocName("Films.qvw"); session.openDocument(); }

      Here, the corresponding console :


      It's worksSet default for param <IP>: 'http://localhost'Set default for param <PORTS>: '[I@ca0b6'Set default for param <ISAPI>: '/scripts/QVSTunnel.dll'Set default for param <AUTHURL>: '/scripts/GetTicket.asp'Set default for param <LANGUAGE>: 'com.qt.qw.common.lang.English'Set default for param <WIDTH>: '1200'Set default for param <HEIGHT>: '800'Set default for param <DEBUG>: '2'Set default for param <DEBUG_WIN>: 'NONE'Set default for param <QV_LEVEL>: 'ANALYZER'Set default for param <HIDE_TOOLBAR>: 'false'Set default for param <OPENDOC_BUTTON>: 'false'Set default for param <DPI>: '72'Set param <DPI> to '96'Set param <QV_LEVEL> to 'PROFESSIONAL'Set param <DOCUMENT> to 'Films.qvw'Set param <USERNAME> to 'QLIKOPORTABLE\qlikweb'Set param <PASSWORD> to 'qlikweb'Invalid URL formatConnection succeeded Com openLogin is [UUxJS09QT1JUQUJMRVxxbGlrd2ViOnFsaWt3ZWI=]Attempting to open document...Login is [UUxJS09QT1JUQUJMRVxxbGlrd2ViOnFsaWt3ZWI=]You're running on WINDOWS VISTAServer VersionCRC : 1025942081Client VersionCRC : 1025942081Server build number: 7119Client build number: 7119Attempt to open the document failedjava.lang.NullPointerException at com.qt.qw.backend.RPC.TrueRPCHandler.getUtf8ByteSizeOfString(Unknown Source) at com.qt.qw.backend.RPC.TrueRPCHandler.put(Unknown Source) at com.qt.qw.backend.qix.QixGlobal.openDoc(Unknown Source) at com.qt.qw.backend.JavaClient.CommunicationInit.openDocument(Unknown Source) at com.qt.qw.backend.JavaClient.CommunicationInit.getDocument(Unknown Source) at com.qt.qw.logic.DataHub.getQixDoc(Unknown Source) at com.qt.qw.beans.QlikSession.openDocument(Unknown Source) at myFirstQVProgram.Test(myFirstQVProgram.java:17) at myFirstQVProgram.main(myFirstQVProgram.java:9)Error -2147483648 - nullReader : Exception socket closed


        • Java Application : could'nt load document

          It's OK, I fund the problem.

          I must have a ticket from the QV Sever. When I have the ticket, i put it in the userame.


          QlikSession session = new QlikSession();
          session.setUserName("3E8E8719A4E8F0A8E0CDDCFE65BB6BCCF02C9B0C");//my ticket


          • Java Application : could'nt load document

            Hi, Clément

            I´m trying to create a simple java class, just the same as you, to access the objects from a qlikview file and store in a java bean object. I even tried to use the same java class that you mentioned above but it didn´t work because I don´t have the class QlikSession that you imported. Would you happen to have an example of a project just like the one you did above? As a matter of fact, I´d appreciate if you could explain to me how do you connect to the qlikview from java. I appreciate your help.

              • Java Application : could'nt load document
                Mauro Cheloni

                Hi Eduard,

                Did you connect to qlikview from java ?

                I'm trying but I get the following error message:

                Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException


                fruits = session.openDocument().getField("X");


                I noted the session.openDocument() return null value.

                Below a piece of my code:

                session = new QlikSession();
                QixDoc qcDoc = session.openDocument();

                qcDoc is null !!!

                Can you help me?

                Thanks in advance.


                Best regards