Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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


Labels (1)
1 Solution

Accepted Solutions
Not applicable
Author

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

session.setDocName("test.qvw");




View solution in original post

5 Replies
Not applicable
Author

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

session.setDocName("test.qvw");




Not applicable
Author

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.

Not applicable
Author

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

at

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

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

Below a piece of my code:

session = new QlikSession();
session.setQvsIP("192.168.76.70");
session.setUserName("username");
session.setPassword("password");
session.setDocName("FruitColor.qvw");
QixDoc qcDoc = session.openDocument();

qcDoc is null !!!

Can you help me?

Thanks in advance.

Best regards

Not applicable
Author

Hi Clément,

Could you send me the project you have attached a screenshot. I need a java program to connect. And I also don´t know what jar I should include.

manesh2000@hotmail.com

Thanks

Not applicable
Author

Hi Everyone,

Did someone successfully connects to QlikView using Java?

Kindly give me some ideas how to do it.

Thanks,

Arnold