You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by vkulichenko <va...@gmail.com> on 2016/08/02 21:07:34 UTC

Re: Stored Procedure

Hi kvipin,

Please properly subscribe to the mailing list so that the community can
receive email notifications. Here is the instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1


kvipin wrote
> I'm trying to connect to apache ignite through sqlline using following
> command and getting errors,
/
> $  java -jar sqlline-1.1.10-SNAPSHOT-jar-with-dependencies.jar -u
> jdbc:ignite://192.168.25.235/TestTable -d
> org.apache.ignite.IgniteJdbcDriver
> org.apache.ignite.IgniteJdbcDriver
> java.lang.NullPointerException
> sqlline version ???
> 0: jdbc:ignite://192.168.25.235/TestTable> !connect
> jdbc:ignite://192.168.25.235/TestTable
> scan complete in 9ms
> scan complete in 222ms
> No known driver to handle "jdbc:ignite://192.168.25.235/TestTable"
> 0: jdbc:ignite://192.168.25.235/TestTable>
/
Who throws the NullPointerException? Can you provide any logs or more
detailed information about what happened?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6679.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by kvipin <vi...@yahoo.com>.
Hi Val,

thanks for the answer. It seems that OFFSET and LIMIT duo is more general
and powerful than FIRST keyword alone.


thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6873.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by vkulichenko <va...@gmail.com>.
Hi,

Transactions are not supported in Ignite JDBC driver because updates are not
supported. It looks like sqline calls setTransactionIsolation on startup,
I'm not sure why. However, I don't think it's correct to throw an exception
either, so I created a ticket:
https://issues.apache.org/jira/browse/IGNITE-3656

As for the 'first' keyword, Ignite supports 'OFFSET .. LIMIT ..' instead, so
you query will look like this:

select tid,idint,idbigint,idchar,idts from testtable limit 10

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6863.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by kvipin <vi...@yahoo.com>.
Sorry folks, for incorrect statement "It seems sqlline can't be used until
transactions are not supported."

It does work with apache ignite for Select queries.

Another question I would like to ask is whether "first" keyword is supported
in apache ignite for sql select statements or not? e.g.  /select *first 10*
tid,idint,idbigint,idchar,idts from testtable;/


thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6847.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by kvipin <vi...@yahoo.com>.
Hi Val,

I added ignite-core.jar to classpath but it didn't work. So I combined both
sqlline jar and ignite-core jar into one
sqlline-1.1.10-SNAPSHOT-jar-with-ignitejdbcdriver.jar file. This time it did
seem to work but landed into another error: Transactions not supported.

# java -jar sqlline-1.1.10-SNAPSHOT-jar-with-ignitejdbcdriver.jar -u
jdbc:ignite://192.168.25.235/TestTable -d org.apache.ignite.IgniteJdbcDriver
Error: Transactions are not supported. (state=,code=0)
java.sql.SQLFeatureNotSupportedException: Transactions are not supported.
	at
org.apache.ignite.internal.jdbc.JdbcConnection.setTransactionIsolation(JdbcConnection.java:249)
	at sqlline.Commands.isolation(Commands.java:679)
	at sqlline.DatabaseConnection.connect(DatabaseConnection.java:186)
	at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:203)
	at sqlline.Commands.connect(Commands.java:1064)
	at sqlline.Commands.connect(Commands.java:996)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:38)
	at sqlline.SqlLine.dispatch(SqlLine.java:809)
	at sqlline.SqlLine.initArgs(SqlLine.java:588)
	at sqlline.SqlLine.begin(SqlLine.java:661)
	at sqlline.SqlLine.start(SqlLine.java:398)
	at sqlline.SqlLine.main(SqlLine.java:292)
sqlline version ???
0: jdbc:ignite://192.168.25.235/TestTable> 

looks like sqlline tool is questioning the capabilities of ignite. It seems
sqlline can't be used until transactions are not supported.

Another thing I would like to know whether Insert, Update, Delete sql
statements are supported or not? If not, when these statements will be
supported?


thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6836.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by vkulichenko <va...@gmail.com>.
Actually, I think you just need to add ignite-core.jar to the classpath. It
now doesn't have it, right?

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6721.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Stored Procedure

Posted by kvipin <vi...@yahoo.com>.
Hi,

does anyone knows about this issue?

I re-subscribed to the apache ignite users mailing list. Hope now the emails
are reaching to each recipient.

thanks & regards,



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Stored-Procedure-tp6548p6719.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.