Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in OrientJdbcStatement.mayCleanForSpark #8831

Closed
eirikur-as opened this issue Apr 1, 2019 · 2 comments
Closed

NullPointerException in OrientJdbcStatement.mayCleanForSpark #8831

eirikur-as opened this issue Apr 1, 2019 · 2 comments
Assignees
Labels
Milestone

Comments

@eirikur-as
Copy link

OrientDB Version: 3.0.18

Java Version: 8

OS: Ubuntu 18.04

Expected behavior

No exception

Actual behavior

java.lang.NullPointerException
	at com.orientechnologies.orient.jdbc.OrientJdbcStatement.mayCleanForSpark(OrientJdbcStatement.java:363)
	at com.orientechnologies.orient.jdbc.OrientJdbcStatement.execute(OrientJdbcStatement.java:94)
	at com.orientechnologies.orient.jdbc.OrientJdbcStatement.executeQuery(OrientJdbcStatement.java:121)

Steps to reproduce

package com.test;

import com.orientechnologies.orient.core.db.ODatabaseType;
import com.orientechnologies.orient.core.db.OrientDB;
import com.orientechnologies.orient.core.db.OrientDBConfig;
import com.orientechnologies.orient.jdbc.OrientDataSource;
import org.testng.annotations.Test;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

public class OrientMemDbTest {

    @Test
    public void testJdbcStatement() throws SQLException {
        final String serverUser = "admin";
        final String serverPassword = "admin";
        final String dbName = "test";

        OrientDB orientDB = new OrientDB("embedded:.", serverUser, serverPassword, OrientDBConfig.defaultConfig());
        orientDB.create(dbName, ODatabaseType.MEMORY);

        OrientDataSource ods = new OrientDataSource(orientDB, dbName);
        Connection connection = ods.getConnection(serverUser, serverPassword);
        Statement statement = connection.createStatement();
        statement.executeQuery("SELECT FROM V");
    }
}
@luigidellaquila luigidellaquila self-assigned this Apr 3, 2019
@luigidellaquila
Copy link
Member

Hi @eirikur-as

I'm checking it, I'll let you know ASAP

Thanks

Luigi

@luigidellaquila
Copy link
Member

Hi @eirikur-as

I just pushed a fix, the snapshot will be available in a few hours.
It will be released with v 3.0.19

Thanks

Luigi

@luigidellaquila luigidellaquila added this to the 3.0.19 milestone Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants