Re: Data Import Handler - Could not load driver - com.microsoft.sqlserver.jdbc.SQLServerDriver - SOLR 4 Beta

2012-08-28 Thread awb3667
Thanks for the suggestion. I went ahead and added that line to the
solrconfig.xml where the lib directives are. When I do a full import, i am
still seeing the sql driver error.

Has anyone been able to use DIH with SQL Server in 4.0 yet? If so, did you
run into this issue? Thanks.
-Adam



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Could-not-load-driver-com-microsoft-sqlserver-jdbc-SQLServerDriver-SOLR-4-Beta-tp4002902p4003725.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Data Import Handler - Could not load driver - com.microsoft.sqlserver.jdbc.SQLServerDriver - SOLR 4 Beta

2012-08-28 Thread awb3667
Correction. That DID work! Thanks everyone.
-Adam



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Could-not-load-driver-com-microsoft-sqlserver-jdbc-SQLServerDriver-SOLR-4-Beta-tp4002902p4003731.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Data Import Handler - Could not load driver - com.microsoft.sqlserver.jdbc.SQLServerDriver - SOLR 4 Beta

2012-08-27 Thread awb3667
Yes it does. 

I downloaded the file 'sqljdbc4.jar' from Microsoft. I have this same jar
working with 3.6.1.

Thanks.
-Adam



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Could-not-load-driver-com-microsoft-sqlserver-jdbc-SQLServerDriver-SOLR-4-Beta-tp4002902p4003479.html
Sent from the Solr - User mailing list archive at Nabble.com.


Data Import Handler - Could not load driver - com.microsoft.sqlserver.jdbc.SQLServerDriver - SOLR 4 Beta

2012-08-23 Thread awb3667
Hello,

I was able to get the DIH working in SOLR 3.6.1 (placed the sqljdbc4.jar
file in the lib directory, etc). Everything worked great. Tried to get
everything working in SOLR 4 beta (on the same dev machine connecting to
same db, etc) and was unable to due to the sql driver not loading.

What i've done:
1. SOLR 4 admin comes up fine(configured solrconfig.xml and schema.xml)
2. Dropped the sqljdbc4.jar in the lib directory
3. Added sqljdbc4.jar to classpath
4. Added dataimporthandler to solrconfig.xml:
lib dir=../../../dist/ regex=apache-solr-dataimporthandler-\d.*\.jar /
lib dir=../../../contrib/dataimporthandler/lib/ regex=.*\.jar /

5. Even tried jtds which also gave me errors that the driver could not be
loaded.

Here is my datasource in the data-config.xml (DIH config file):
dataSource name=db
type=JdbcDataSource 
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver 
url=jdbc:sqlserver://DBSERVERNAME;instanceName=INST1;user=solr;password=password;applicationName=solr-DIH;databaseName=scratch
user=solr password=password/


Here is the error i get when trying to use jdbc connector: 
SEVERE: Full Import failed:java.lang.RuntimeException:
java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver Processing
Document # 1
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:273)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:382)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:448)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:429)
Caused by: java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver Processing
Document # 1
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:413)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:326)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:234)
... 3 more
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException:
Could not load driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:71)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:114)
at
org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource.java:62)
at
org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance(DataImporter.java:354)
at
org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextImpl.java:99)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityProcessor.java:53)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(EntityProcessorWrapper.java:74)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:430)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:411)
... 5 more
Caused by: java.lang.ClassNotFoundException: Unable to load
com.microsoft.sqlserver.jdbc.SQLServerDriver or
org.apache.solr.handler.dataimport.com.microsoft.sqlserver.jdbc.SQLServerDriver
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:899)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFactory(JdbcDataSource.java:112)
... 12 more
Caused by: org.apache.solr.common.SolrException: Error loading class
'com.microsoft.sqlserver.jdbc.SQLServerDriver'
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:438)
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.java:889)
... 13 more
Caused by: java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLServerDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:422)
... 14 more



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Data-Import-Handler-Could-not-load-driver-com-microsoft-sqlserver-jdbc-SQLServerDriver-SOLR-4-Beta-tp4002902.html
Sent from the Solr - User mailing list archive at Nabble.com.