groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Heintze <sieg_hein...@yahoo.com>
Subject Re: com.microsoft.sqlserver.jdbc.SQLServerDriver with grapes/Maven?
Date Thu, 19 Nov 2015 00:22:15 GMT
Wow! What a surprise! You are right! JTDS will do integrated security too!  However, JTDS
has the same constraint as the Microsoft JDBC driver! It also needs a JNI DLL that (in the
case of GROOVY) must be pointed to by JAVA_OPTS.So I repeat my earlier questions:(1) Is there
a standard directory location for storing the native code required by net.sourceforge.jtds.jdbc.Driver
and com.microsoft.sqlserver.jdbc.SQLServerDriver?(2) Why do groovy grapes, maven and gradle
burden me with configuring JAVA_OPTS to point to the native code? Cannot this be automated? They
already configure the CLASSPATH to point to the jars.  (3) OK, well, I guess they don't.
So who do I submit feature requests to? groovy? maven? Anyone else? I just discovered that
grapes keeps a separate and redundant copy of my downloaded jars from maven! I guess someone
could not agree on the format of the directory for the local repository. So I guess groovy
grapes and maven need to independently decide if the native code is going to live in the same
directory as the jar files in the local repository? Thankssiegfried  


    On Sunday, November 15, 2015 9:02 PM, Derek Visch <derek.visch@gmail.com> wrote:
 

 Jtds is pretty well establish, I'm not going to look into the other drive you chose. I've
got it to work with Windows Security on windows machines just fine? Could you paste your code
example, and URL and output?
Here's a url I've used and had success with for a windows based machine that was on a domain
that we had credentials to. 
jdbc:jtds:sqlserver://DNS-NAME:1433/instanseName;integratedSecurity=true;domain=DomainNAME

On Sun, Nov 15, 2015 at 6:40 PM, Richard Heintze <sieg_heintze@yahoo.com> wrote:

After several hours I finally got my groovy sql demo working with the native Microsoft JDBC
driver instead of the jtds driver. What a pain this Microsoft driver is! Unfortunately, the
jtds driver is missing the integrated security feature.
(Actually, configuring the MS SQL Server ports to accommodate jtds is very painful too because
it takes a lot of google searching to discover the directions for opening up the correct ports
on MS SQL Server to accommodate the jtds driver but this is a digression).
Here is my version of groovy:
groovy -v
Groovy Version: 2.3.0-beta-2 JVM: 1.8.0_05 Vendor: Oracle Corporation OS: Windows 8.1
I just discovered http://www.groovy-lang.org/mailing-lists.html#nabble-td342217 which explains
that I have to define JAVA_OPTS with groovy instead of using -Djava.library.path=c:\sqljdbc_4.0\enu\auth\x64
directly on the command line like I can with java and now my groovy demo of jdbc/sql.newInstance
works.

(1) Is there a reason I have to define JAVA_OPTS instead of using the command line like I
do with java? (2) Is there a standard in maven for specifying where to store the JNI DLL
associate jar file? Is it supported with mvn install:intall-file?(3) Is there a feature in
grapes (or groovy in general) that will relieve me of having to specify the path of the DLL
in JAVA_OPTS? It seems logical that mvn install:install-file would copy the JNI DLL into
the repository so grapes would go to maven and discover JNI DLL and take the appropriate
action of defining JAVA_OPTS for me.(4) If the answer is no, can I make a request for such
a feature? Could the groovy developers just decide on a convention for putting the DLLs in
with the same directory with jar files in the maven repository? Or would this require a
feature request with maven too?

ThanksSiegfried




















-- 
Derek Visch / Software Developer / Network Technician 
dvisch@leveldata.com / Direct: 269-488-2037Level Data Inc. 
Office: 866.511.3282 
4787 Campus Dr. | Kalamazoo, MI 49008 
http://www.leveldata.com

  
Mime
View raw message