Adding dev group. Hope someone can help. I may help but I am unable where to start. I am not sure where or how the statement is being created. Can someone please guide me how to investigate the issue?
On Sun, Jul 26, 2015 at 7:35 PM, Yash Sharma <[email protected]> wrote: > Hey, > I hit the ClassNotFound with prepared statement as well. Would explore it > and revert back. > Meanwhile other contributors can suggest a workaround. > > Best > > On Sun, Jul 26, 2015 at 10:06 PM, Anas Mesrah <[email protected]> > wrote: > > > Thanks Yash for your swift response. Appreciate it. > > > > We want to connect using JDBC not in the embedded mode. Your code worked > > fine and you are using createStatement. However, we are trying to use > > prepareStatement. > > Once we changed that, our code worked fine as well. > > > > Is there a way to make prepareStatement work with 1.1.0? > > > > > > > > On Sun, Jul 26, 2015 at 6:18 PM, Yash Sharma <[email protected]> wrote: > > > > > Just to add on, Here is a quick code I use to connect to Drill. Hope it > > > helps- > > > > > > https://gist.github.com/yssharma/8b72557ad23f080e7c1f > > > > > > Best > > > > > > On Sun, Jul 26, 2015 at 9:44 PM, Yash Sharma <[email protected]> > wrote: > > > > > > > Hi Ahmed, > > > > Could you paste the code here or in pastebin/gist. > > > > Mail attachments do not work. > > > > > > > > Best > > > > > > > > On Sun, Jul 26, 2015 at 9:22 PM, Anas Mesrah <[email protected]> > > > > wrote: > > > > > > > >> Hi All, > > > >> > > > >> We have been able to connect peacefully to drill 0.8.0 using JDBC. > > When > > > >> we tried to upgrade and use the latest jsdbc driver, we got the > > > following > > > >> eception: > > > >> > > > >>> Exception in thread "main" java.lang.ClassCastException: > > > >>> > > > > > > org.apache.drill.jdbc.impl.DrillJdbc41Factory$DrillJdbc41PreparedStatement > > > >>> cannot be cast to org.apache.drill.jdbc.impl.DrillStatementImpl > > > >>> at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newResultSet( > > > >>> DrillJdbc41Factory.java:106) > > > >>> at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newResultSet( > > > >>> DrillJdbc41Factory.java:1) > > > >>> at net.hydromatic.avatica.AvaticaConnection.executeQueryInternal( > > > >>> AvaticaConnection.java:397) > > > >>> at net.hydromatic.avatica.AvaticaPreparedStatement.executeQuery( > > > >>> AvaticaPreparedStatement.java:77) > > > >>> at com.incorta.trails.DrillTest.query(DrillTest.java:33) > > > >>> at com.incorta.trails.DrillTest.main(DrillTest.java:12) > > > >> > > > >> The original code still connects to 0.8.0 without errors. Attached > the > > > >> java test file that I used to replicate the problem. > > > >> > > > >> Appreciate anyone's help to resolve this issue. > > > >> > > > >> Thanks > > > >> -- > > > >> > > > >> *Best Regards,* > > > >> > > > >> *Anas Mosaad ** <https://eg.linkedin.com/pub/anas-mesrah/1b/93/60a > >* > > > >> *Senior Software Engineer, * > > > >> *Incorta Inc* > > > >> *Mob. +201007434510* > > > >> > > > >> > > > >> > > > > > > > > > > > > > > > -- > > > > *Best Regards,* > > > > *Anas Mosaad ** <https://eg.linkedin.com/pub/anas-mesrah/1b/93/60a>* > > *Senior Software Engineer, * > > *Incorta Inc* > > *Mob. +201007434510* > > > -- *Best Regards,* *Anas Mosaad ** <https://eg.linkedin.com/pub/anas-mesrah/1b/93/60a>* *Senior Software Engineer, * *Incorta Inc* *Mob. +201007434510 <%2B201007434510>*
