You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Adam Estrada <es...@gmail.com> on 2011/01/05 00:31:37 UTC

[sqljdbc4.jar] Errors

Can anyone help me with the following error. I upgraded my database to SQL
Server 2008 SP2 and now I get the following error. It was working with SQL
Server 2005.

<Solr Error Stack>
Caused by: java.lang.UnsupportedOperationException: Java Runtime Environment
(JR
E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class
libra
ry, which provides support for JDBC 4.0.

Any tips on this would be great!

Thanks,
Adam

Re: [sqljdbc4.jar] Errors

Posted by Adam Estrada <es...@gmail.com>.
I got the latest jar file from the MS website and then changed the
authentication to Mixed Mode on my DB. That seems to have fixed it. My 2005
Server was Windows Authentication only and that worked so there are
obviously quite a few differences between the versions of the DB. I learn
something new every day!!!!

Thanks for the feedback!
Adam

On Tue, Jan 4, 2011 at 10:20 PM, Lance Norskog <go...@gmail.com> wrote:

> Do you get a new JDBC driver jar with 2008? Look around the
> distribution or the MS web site.
>
> On Tue, Jan 4, 2011 at 7:06 PM, pankaj bhatt <pa...@gmail.com> wrote:
> > Hi Adam,
> >           Can you try by downgrading your Java version to java 5.
> >         However i am using Java 6u13 with sqljdbc4.jar , i however do not
> > get any error.
> >         If possible, can you pleease also try with some other version of
> > Java 6.
> >
> > / Pankaj Bhatt.
> >
> > On Wed, Jan 5, 2011 at 5:01 AM, Adam Estrada
> > <es...@gmail.com>wrote:
> >
> >> Can anyone help me with the following error. I upgraded my database to
> SQL
> >> Server 2008 SP2 and now I get the following error. It was working with
> SQL
> >> Server 2005.
> >>
> >> <Solr Error Stack>
> >> Caused by: java.lang.UnsupportedOperationException: Java Runtime
> >> Environment
> >> (JR
> >> E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar
> class
> >> libra
> >> ry, which provides support for JDBC 4.0.
> >>
> >> Any tips on this would be great!
> >>
> >> Thanks,
> >> Adam
> >>
> >
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
>

Re: [sqljdbc4.jar] Errors

Posted by Lance Norskog <go...@gmail.com>.
Do you get a new JDBC driver jar with 2008? Look around the
distribution or the MS web site.

On Tue, Jan 4, 2011 at 7:06 PM, pankaj bhatt <pa...@gmail.com> wrote:
> Hi Adam,
>           Can you try by downgrading your Java version to java 5.
>         However i am using Java 6u13 with sqljdbc4.jar , i however do not
> get any error.
>         If possible, can you pleease also try with some other version of
> Java 6.
>
> / Pankaj Bhatt.
>
> On Wed, Jan 5, 2011 at 5:01 AM, Adam Estrada
> <es...@gmail.com>wrote:
>
>> Can anyone help me with the following error. I upgraded my database to SQL
>> Server 2008 SP2 and now I get the following error. It was working with SQL
>> Server 2005.
>>
>> <Solr Error Stack>
>> Caused by: java.lang.UnsupportedOperationException: Java Runtime
>> Environment
>> (JR
>> E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class
>> libra
>> ry, which provides support for JDBC 4.0.
>>
>> Any tips on this would be great!
>>
>> Thanks,
>> Adam
>>
>



-- 
Lance Norskog
goksron@gmail.com

Re: [sqljdbc4.jar] Errors

Posted by pankaj bhatt <pa...@gmail.com>.
Hi Adam,
           Can you try by downgrading your Java version to java 5.
         However i am using Java 6u13 with sqljdbc4.jar , i however do not
get any error.
         If possible, can you pleease also try with some other version of
Java 6.

/ Pankaj Bhatt.

On Wed, Jan 5, 2011 at 5:01 AM, Adam Estrada
<es...@gmail.com>wrote:

> Can anyone help me with the following error. I upgraded my database to SQL
> Server 2008 SP2 and now I get the following error. It was working with SQL
> Server 2005.
>
> <Solr Error Stack>
> Caused by: java.lang.UnsupportedOperationException: Java Runtime
> Environment
> (JR
> E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class
> libra
> ry, which provides support for JDBC 4.0.
>
> Any tips on this would be great!
>
> Thanks,
> Adam
>

Re: [sqljdbc4.jar] Errors

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Jan 5, 2011 at 8:22 PM, Adam Estrada <es...@gmail.com> wrote:
> I can't tell any difference in performance but it does work like a charm. At
> least the messaging in the console is a lot more verbose.
[...]

Well, as far as the performance goes, we were also simultaneously
making other changes as we were switching drivers, so we did not
make an objective measurement of improved performance in terms
of requests/s.

What we definitely noticed was a marked improvement in maintaining
connections to the database. At that time, our data import handler used
to take some 6-7 hours, and we had all kinds of problems with dropped
connections while using the Microsoft JDBC driver. Things improved a
lot with jtds. Even though the problems did not entirely go away, they
were minimised enough that the glitches could equally well be attributed
to network issues, or issues with the database server.

Regards,
Gora

Re: [sqljdbc4.jar] Errors

Posted by Adam Estrada <es...@gmail.com>.
I can't tell any difference in performance but it does work like a charm. At
least the messaging in the console is a lot more verbose.

Thank you very much for the heads up on this one ;-)

Adam

On Wed, Jan 5, 2011 at 4:29 AM, Gora Mohanty <go...@mimirtech.com> wrote:

> On Wed, Jan 5, 2011 at 10:18 AM, Estrada Groups
> <es...@gmail.com> wrote:
> > I downloaded that driver today and will test it tomorrow. Thanks for the
> tip! Would you mind sending an XML code snippet if it's any different to
> load than the MS driver?
> [...]
>
> I presume that you are referring to the jTDS driver. The options are
> slightly
> different. Here is a snippet from the XML configuration of our
> DataImportHandler,
> with sensitive details obscured.
> <dataSource type="JdbcDataSource" name="jdbc"
> driver="net.sourceforge.jtds.jdbc.Driver"
>
> url="jdbc:jtds:sqlserver://<db_server>:<port>;databasename=<dbname>;responseBuffering=adaptive"
> user="<user>" password="<password>" onError="skip" />
>
> The jtds FAQ ( http://jtds.sourceforge.net/faq.html ) also has other
> configuration
> options, and more helpful information. For us, the transition was
> pretty painless.
>
> Regards,
> Gora
>

Re: [sqljdbc4.jar] Errors

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Jan 5, 2011 at 10:18 AM, Estrada Groups
<es...@gmail.com> wrote:
> I downloaded that driver today and will test it tomorrow. Thanks for the tip! Would you mind sending an XML code snippet if it's any different to load than the MS driver?
[...]

I presume that you are referring to the jTDS driver. The options are slightly
different. Here is a snippet from the XML configuration of our
DataImportHandler,
with sensitive details obscured.
<dataSource type="JdbcDataSource" name="jdbc"
driver="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://<db_server>:<port>;databasename=<dbname>;responseBuffering=adaptive"
user="<user>" password="<password>" onError="skip" />

The jtds FAQ ( http://jtds.sourceforge.net/faq.html ) also has other
configuration
options, and more helpful information. For us, the transition was
pretty painless.

Regards,
Gora

Re: [sqljdbc4.jar] Errors

Posted by Estrada Groups <es...@gmail.com>.
I downloaded that driver today and will test it tomorrow. Thanks for the tip! Would you mind sending an XML code snippet if it's any different to load than the MS driver?

Thanks,

Adam 

Sent from my iPhone

On Jan 4, 2011, at 11:34 PM, Gora Mohanty <go...@mimirtech.com> wrote:

> On Wed, Jan 5, 2011 at 5:01 AM, Adam Estrada
> <es...@gmail.com> wrote:
>> Can anyone help me with the following error. I upgraded my database to SQL
>> Server 2008 SP2 and now I get the following error. It was working with SQL
>> Server 2005.
>> 
>> <Solr Error Stack>
>> Caused by: java.lang.UnsupportedOperationException: Java Runtime Environment
>> (JR
>> E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class
>> libra
>> ry, which provides support for JDBC 4.0.
> [...]
> 
> You need to do pretty much what the error message says. The last
> time we looked at MS SQL Server, the Microsoft JDBC driver had
> both a sqljdbc.jar, and a sqljdbc4.jar. The former was for Java 1.5,
> and the latter for Java 1.6.
> 
> You might also consider moving to the open source jTDS driver
> ( http://jtds.sourceforge.net/ ). We moved to it in the advice of
> some people on this list, and it does seem to perform better, drop
> connections less often, etc.
> 
> Regards,
> Gora

Re: [sqljdbc4.jar] Errors

Posted by Gora Mohanty <go...@mimirtech.com>.
On Wed, Jan 5, 2011 at 5:01 AM, Adam Estrada
<es...@gmail.com> wrote:
> Can anyone help me with the following error. I upgraded my database to SQL
> Server 2008 SP2 and now I get the following error. It was working with SQL
> Server 2005.
>
> <Solr Error Stack>
> Caused by: java.lang.UnsupportedOperationException: Java Runtime Environment
> (JR
> E) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class
> libra
> ry, which provides support for JDBC 4.0.
[...]

You need to do pretty much what the error message says. The last
time we looked at MS SQL Server, the Microsoft JDBC driver had
both a sqljdbc.jar, and a sqljdbc4.jar. The former was for Java 1.5,
and the latter for Java 1.6.

You might also consider moving to the open source jTDS driver
( http://jtds.sourceforge.net/ ). We moved to it in the advice of
some people on this list, and it does seem to perform better, drop
connections less often, etc.

Regards,
Gora