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 PeterKerk <ve...@hotmail.com> on 2010/08/02 11:22:50 UTC
Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
I'm running MSSQL Server 2008
I did this: set CLASSPATH= C:\Program Files\Microsoft SQL Server JDBC Driver
3.0\sqljdbc_3.0\enu\sqljdbc4.jar (I dont know where I can check if this has
been executed correctly)
Then when approaching this URL:
http://localhost:8983/solr/db/dataimport?command=full-import
Using this data-config.xml:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="r00kw0rst" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from
location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features
where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select CATEGORYID from
location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where
id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
I get this in my cygwin error log:
SEVERE: JdbcDataSource was not closed prior to finalize(), indicates a bug
-- PO
SSIBLE RESOURCE LEAK!!!
Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrCore execute
INFO: [db] webapp=/solr path=/dataimport params={command=full-import}
status=0 Q
Time=0
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
INFO: Starting Full Import
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.SolrWriter
readIndexe
rProperties
INFO: Read dataimport.properties
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2
deleteAll
INFO: [db] REMOVING ALL DOCUMENTS FROM INDEX
Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
commit{dir=C:\apache-solr-1.4.1\example\example-DIH\solr\db\data\index,s
egFN=segments_n,version=1279027246872,generation=23,filenames=[_l.nrm,
_l.tis, _
l.fnm, _l.prx, _l.fdx, segments_n, _l.fdt, _l.frq, _l.tii]
Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrDeletionPolicy
updateCommits
INFO: newest commit = 1279027246872
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not
load dr
iver: com.microsoft.sqlserver.jdbc.SQLServerDriver Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFac
tory(JdbcDataSource.java:114)
at
org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource
.java:62)
at
org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance
(DataImporter.java:304)
at
org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextI
mpl.java:94)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityP
rocessor.java:52)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(Entity
ProcessorWrapper.java:71)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:319)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: java.lang.ClassNotFoundException: Unable to load
com.microsoft.sqlser
ver.jdbc.SQLServerDriver or
org.apache.solr.handler.dataimport.com.microsoft.sql
server.jdbc.SQLServerDriver
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.ja
va:738)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFac
tory(JdbcDataSource.java:112)
... 11 more
Caused by: org.apache.solr.common.SolrException: Error loading class
'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
java:375)
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.ja
va:728)
... 12 more
Caused by: java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLSer
verDriver
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.ClassLoader.loadClassInternal(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:359)
... 13 more
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.JdbcDataSource
finali
ze
SEVERE: JdbcDataSource was not closed prior to finalize(), indicates a bug
-- PO
SSIBLE RESOURCE LEAK!!!
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
What am I doing wrong?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1015137.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by alokdayal <da...@gmail.com>.
Hi Peter,
I've also faced the same problem which you did. I also changed my
data-config.xml file same as yours and checked that my MS Sql Server is
running on default port i.e, 3306 given the same to connection string but
still its not working.
Could you pls. share your solrconfig.xml and schema.xml file so that I can
change it accordingly and my problem would be solved
Thanks
ALOK
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1444820.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
We'd need to see your schema.xml file for that; it's probably something in your field types.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 7:49 AM
To: solr-user@lucene.apache.org
Subject: Re: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Hooray, im a bit further now...
Turned out that both SQL2005 and 2008 were running, where 2005 was listening on port 1433. I disabled that services, enabled the 2008 service and now I can connect and the command http://localhost:8983/solr/db/dataimport?command=full-import is successfull.
But now I want to SEARCH in those indexed documents via http://localhost:8983/solr/db/admin/
See here the result of the query *:*
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
−
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">*:*</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
−
<result name="response" numFound="3" start="0"> − <doc> <str name="id">1</str> <date name="timestamp">2010-08-03T11:43:38.905Z</date>
<str name="title">Gemeentehuis Nijmegen</str> </doc> − <doc> <str name="id">2</str> <date name="timestamp">2010-08-03T11:43:38.936Z</date>
<str name="title">Gemeentehuis Utrecht</str> </doc> − <doc> <str name="id">3</str> <date name="timestamp">2010-08-03T11:43:38.936Z</date>
<str name="title">Beachclub Vroeger</str> </doc> </result> </response>
This is my data-config:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select THEMEID from location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
Why dont I see any data with regard to themes or features?
Regards,
Pete
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1018845.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Hooray, im a bit further now...
Turned out that both SQL2005 and 2008 were running, where 2005 was listening
on port 1433. I disabled that services, enabled the 2008 service and now I
can connect and the command
http://localhost:8983/solr/db/dataimport?command=full-import is successfull.
But now I want to SEARCH in those indexed documents via
http://localhost:8983/solr/db/admin/
See here the result of the query *:*
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
−
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">*:*</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
−
<result name="response" numFound="3" start="0">
−
<doc>
<str name="id">1</str>
<date name="timestamp">2010-08-03T11:43:38.905Z</date>
<str name="title">Gemeentehuis Nijmegen</str>
</doc>
−
<doc>
<str name="id">2</str>
<date name="timestamp">2010-08-03T11:43:38.936Z</date>
<str name="title">Gemeentehuis Utrecht</str>
</doc>
−
<doc>
<str name="id">3</str>
<date name="timestamp">2010-08-03T11:43:38.936Z</date>
<str name="title">Beachclub Vroeger</str>
</doc>
</result>
</response>
This is my data-config:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from
location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features
where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select THEMEID from
location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where
id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
Why dont I see any data with regard to themes or features?
Regards,
Pete
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1018845.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException:
Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Posted by Lance Norskog <go...@gmail.com>.
> (PS. is there a way where I can test the current connectionstring?)
There are many jdbc-explorer apps around that take a jdbc url. You
should be able to test your jdbc url and driver with one of those.
On Mon, Aug 2, 2010 at 2:33 PM, PeterKerk <ve...@hotmail.com> wrote:
>
> Hi Michael,
>
> Thanks, I now use that. But the same error.
>
> (PS. is there a way where I can test the current connectionstring?)
>
> Therefore I have attached 1 image with 2 screenshots of my situation.
> http://lucene.472066.n3.nabble.com/file/n1017327/Untitled.png Untitled.png
>
> Here's my current data-config:
>
> <dataConfig>
> <dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
> url="jdbc:sqlserver://localhost\SQLEXPRESS\Databases\wedding:1433" user="sa"
> password="123456" />
> <document name="weddinglocations">
> <entity name="location" dataSource="ds1" query="select * from
> locations">
> <field column="ID" name="id" />
> <field column="TITLE" name="title" />
> <field column="CITY" name="city" />
>
> <entity name="location_feature" query="select FEATUREID from
> location_features where locationid='${location.ID}'">
> <entity name="feature" query="select title from features
> where id = '${location_feature.FEATUREID}'">
> <field name="features" column="title" />
> </entity>
> </entity>
>
> <entity name="location_theme" query="select CATEGORYID from
> location_themes where locationid='${location.ID}'">
> <entity name="theme" query="select title from features where
> id = '${location_theme.FEATUREID}'">
> <field name="cat" column="title" />
> </entity>
> </entity>
>
> </entity>
> </document>
> </dataConfig>
>
>
>
> And here's the current output in cygwin:
>
>
> INFO: Creating a connection for entity location with URL:
> jdbc:sqlserver://local
> host\SQLEXPRESS\Databases\wedding:1433
> Aug 2, 2010 11:29:25 PM org.apache.solr.handler.dataimport.DocBuilder
> buildDocum
> ent
> SEVERE: Exception while processing: location document :
> SolrInputDocument[{}]
> org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
> execute
> query: select * from locations Processing Document # 1
> at
> org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
> Throw(DataImportHandlerException.java:72)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
> init>(JdbcDataSource.java:253)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
> rce.java:210)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
> rce.java:39)
> at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
> tityProcessor.java:58)
> at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
> tyProcessor.java:71)
> at
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
> ityProcessorWrapper.java:237)
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
> r.java:357)
> at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
> ava:242)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
> :180)
> at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
> rter.java:331)
> at
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
> ava:389)
> at
> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
> va:370)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
> use
> r 'sa'.
> at
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
> (SQLServerException.java:197)
> at
> com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
> )
> at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
> onnection.java:2529)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
> ction.java:1905)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
> Connection.java:41)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
> te(SQLServerConnection.java:1893)
> at
> com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
> rverConnection.java:1400)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
> verConnection.java:1045)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
> ction.java:817)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
> nection.java:700)
> at
> com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
> java:842)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
> ce.java:162)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
> ce.java:128)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
> ataSource.java:363)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
> Source.java:39)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
> init>(JdbcDataSource.java:240)
> ... 11 more
> Aug 2, 2010 11:29:25 PM org.apache.solr.handler.dataimport.DataImporter
> doFullIm
> port
> SEVERE: Full Import failed
> org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
> execute
> query: select * from locations Processing Document # 1
> at
> org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
> Throw(DataImportHandlerException.java:72)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
> init>(JdbcDataSource.java:253)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
> rce.java:210)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
> rce.java:39)
> at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
> tityProcessor.java:58)
> at
> org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
> tyProcessor.java:71)
> at
> org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
> ityProcessorWrapper.java:237)
> at
> org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
> r.java:357)
> at
> org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
> ava:242)
> at
> org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
> :180)
> at
> org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
> rter.java:331)
> at
> org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
> ava:389)
> at
> org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
> va:370)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
> use
> r 'sa'.
> at
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
> (SQLServerException.java:197)
> at
> com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
> )
> at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
> onnection.java:2529)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
> ction.java:1905)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
> Connection.java:41)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
> te(SQLServerConnection.java:1893)
> at
> com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
> rverConnection.java:1400)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
> verConnection.java:1045)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
> ction.java:817)
> at
> com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
> nection.java:700)
> at
> com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
> java:842)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
> ce.java:162)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
> ce.java:128)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
> ataSource.java:363)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
> Source.java:39)
> at
> org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
> init>(JdbcDataSource.java:240)
> ... 11 more
> Aug 2, 2010 11:29:25 PM org.apache.solr.update.DirectUpdateHandler2 rollback
> INFO: start rollback
> Aug 2, 2010 11:29:25 PM org.apache.solr.update.DirectUpdateHandler2 rollback
> INFO: end_rollback
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017327.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Lance Norskog
goksron@gmail.com
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Hi Michael,
Thanks, I now use that. But the same error.
(PS. is there a way where I can test the current connectionstring?)
Therefore I have attached 1 image with 2 screenshots of my situation.
http://lucene.472066.n3.nabble.com/file/n1017327/Untitled.png Untitled.png
Here's my current data-config:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost\SQLEXPRESS\Databases\wedding:1433" user="sa"
password="123456" />
<document name="weddinglocations">
<entity name="location" dataSource="ds1" query="select * from
locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from
location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features
where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select CATEGORYID from
location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where
id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
And here's the current output in cygwin:
INFO: Creating a connection for entity location with URL:
jdbc:sqlserver://local
host\SQLEXPRESS\Databases\wedding:1433
Aug 2, 2010 11:29:25 PM org.apache.solr.handler.dataimport.DocBuilder
buildDocum
ent
SEVERE: Exception while processing: location document :
SolrInputDocument[{}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 11:29:25 PM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 11:29:25 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 2, 2010 11:29:25 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017327.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Well, first of all I'd suggest installing Velocity, and using that as your test querying interface...
But try ?fq=feature:Cafe
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 1:38 PM
To: solr-user@lucene.apache.org
Subject: RE: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Awesome! You did it!
Turned out, I had to change the casing of this line:
<entity name="location_feature" query="select featureid from location_features where locationid='${location.ID}'">
to:
<entity name="location_feature" query="select featureid from location_features where locationid='${location.id}'">
Now the resultset is like this:
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">16</int>
−
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">*:*</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
−
<result name="response" numFound="3" start="0"> − <doc> − <arr name="cat"> <str>Gemeentehuis</str> </arr> − <arr name="features"> <str>Tuin</str> <str>Cafe</str> </arr> <str name="id">1</str> <date name="timestamp">2010-08-03T17:31:21.562Z</date>
<str name="title">Gemeentehuis Nijmegen</str> </doc> − <doc> − <arr name="cat"> <str>Gemeentehuis</str> </arr> − <arr name="features"> <str>Tuin</str> <str>Cafe</str> <str>Danszaal</str> </arr> <str name="id">2</str> <date name="timestamp">2010-08-03T17:31:21.593Z</date>
<str name="title">Gemeentehuis Utrecht</str> </doc> − <doc> − <arr name="cat"> <str>Strand & Zee</str> </arr> − <arr name="features"> <str>Strand</str> <str>Cafe</str> <str>Danszaal</str> </arr> <str name="id">3</str> <date name="timestamp">2010-08-03T17:31:21.609Z</date>
<str name="title">Beachclub Vroeger</str> </doc> </result> </response>
And now the FINAL question I have:
as you can see above "features" is a facet.
What should I type in the solr admin page on http://localhost:8983/solr/db/admin/
to filter all records on the "features" facet?
e.g. to show all records that have a feature "Cafe"?
Thanks!
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1020051.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Awesome! You did it!
Turned out, I had to change the casing of this line:
<entity name="location_feature" query="select featureid from
location_features where locationid='${location.ID}'">
to:
<entity name="location_feature" query="select featureid from
location_features where locationid='${location.id}'">
Now the resultset is like this:
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">16</int>
−
<lst name="params">
<str name="indent">on</str>
<str name="start">0</str>
<str name="q">*:*</str>
<str name="version">2.2</str>
<str name="rows">10</str>
</lst>
</lst>
−
<result name="response" numFound="3" start="0">
−
<doc>
−
<arr name="cat">
<str>Gemeentehuis</str>
</arr>
−
<arr name="features">
<str>Tuin</str>
<str>Cafe</str>
</arr>
<str name="id">1</str>
<date name="timestamp">2010-08-03T17:31:21.562Z</date>
<str name="title">Gemeentehuis Nijmegen</str>
</doc>
−
<doc>
−
<arr name="cat">
<str>Gemeentehuis</str>
</arr>
−
<arr name="features">
<str>Tuin</str>
<str>Cafe</str>
<str>Danszaal</str>
</arr>
<str name="id">2</str>
<date name="timestamp">2010-08-03T17:31:21.593Z</date>
<str name="title">Gemeentehuis Utrecht</str>
</doc>
−
<doc>
−
<arr name="cat">
<str>Strand & Zee</str>
</arr>
−
<arr name="features">
<str>Strand</str>
<str>Cafe</str>
<str>Danszaal</str>
</arr>
<str name="id">3</str>
<date name="timestamp">2010-08-03T17:31:21.609Z</date>
<str name="title">Beachclub Vroeger</str>
</doc>
</result>
</response>
And now the FINAL question I have:
as you can see above "features" is a facet.
What should I type in the solr admin page on
http://localhost:8983/solr/db/admin/
to filter all records on the "features" facet?
e.g. to show all records that have a feature "Cafe"?
Thanks!
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1020051.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Looks like {$location.ID} isn't being pull out correctly. I'd suggest playing around (e.g. with capitalization). Still, I can't say I know why it's failing.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 12:48 PM
To: solr-user@lucene.apache.org
Subject: RE: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Hi,
You are correct that locationid is an integer.
I have changed it to:
<entity name="location_theme" query="select themeid from location_themes where locationid=${location.ID}">
But then I get the error:
Incorrect syntax near '='
Even though that statement does work in mgmt studio
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute
query: select themeid from location_themes where locationid= Processing Documen t # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:383)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax nea r '='.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServ
erStatement.java:1493)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQ
LServerStatement.java:775)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute
(SQLServerStatement.java:676)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLSer
verStatement.java:179)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLS
erverStatement.java:154)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStat
ement.java:649)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:246)
... 12 more
Aug 3, 2010 6:44:16 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 3, 2010 6:44:16 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019753.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Hi,
You are correct that locationid is an integer.
I have changed it to:
<entity name="location_theme" query="select themeid from location_themes
where locationid=${location.ID}">
But then I get the error:
Incorrect syntax near '='
Even though that statement does work in mgmt studio
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select themeid from location_themes where locationid= Processing
Documen
t # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:383)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax
nea
r '='.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServ
erStatement.java:1493)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQ
LServerStatement.java:775)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute
(SQLServerStatement.java:676)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLSer
verStatement.java:179)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLS
erverStatement.java:154)
at
com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(SQLServerStat
ement.java:649)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:246)
... 12 more
Aug 3, 2010 6:44:16 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 3, 2010 6:44:16 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019753.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Hmm. I bet your location query is all wrong.
Take this:
query="select themeid from location_themes where locationid='${location.ID}'"
I'm pretty sure that locationid is not a string (since it's extracted as an int below), which means your SQL query will be trying to match an int against a string.
Take the single quotes out, thus:
query="select themeid from location_themes where locationid=${location.ID}"
...and it should work.
Either way, you should test it in SQL Server Management Studio.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 12:16 PM
To: solr-user@lucene.apache.org
Subject: RE: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
I had a look at this URL:
http://localhost:8983/solr/db/admin/dataimport.jsp?handler=/dataimport
There I see the data-config.xml on the left side and the full data import result on the right.
The response is:
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">234</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
<str name="config">wedding-data-config.xml</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="mode">debug</str>
−
<arr name="documents">
−
<lst>
−
<arr name="id">
<int>1</int>
</arr>
−
<arr name="title">
<str>Gemeentehuis Nijmegen</str>
</arr>
</lst>
−
<lst>
−
<arr name="id">
<int>2</int>
</arr>
−
<arr name="title">
<str>Gemeentehuis Utrecht</str>
</arr>
</lst>
−
<lst>
−
<arr name="id">
<int>3</int>
</arr>
−
<arr name="title">
<str>Beachclub Vroeger</str>
</arr>
</lst>
</arr>
<lst name="verbose-output"/>
<str name="status">idle</str>
<str name="importResponse">Configuration Re-loaded sucessfully</str> − <lst name="statusMessages"> <str name="Total Requests made to DataSource">7</str> <str name="Total Rows Fetched">3</str> <str name="Total Documents Skipped">0</str> <str name="Full Dump Started">2010-08-03 18:13:15</str> − <str name=""> Indexing completed. Added/Updated: 3 documents. Deleted 0 documents.
</str>
<str name="Total Documents Processed">3</str> <str name="Time taken ">0:0:0.219</str> </lst> − <str name="WARNING"> This response format is experimental. It is likely to change in the future.
</str>
</response>
So there again, I dont see the themes or features back.
Anything I can check here for you?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019666.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
I had a look at this URL:
http://localhost:8983/solr/db/admin/dataimport.jsp?handler=/dataimport
There I see the data-config.xml on the left side and the full data import
result on the right.
The response is:
<response>
−
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">234</int>
</lst>
−
<lst name="initArgs">
−
<lst name="defaults">
<str name="config">wedding-data-config.xml</str>
</lst>
</lst>
<str name="command">full-import</str>
<str name="mode">debug</str>
−
<arr name="documents">
−
<lst>
−
<arr name="id">
<int>1</int>
</arr>
−
<arr name="title">
<str>Gemeentehuis Nijmegen</str>
</arr>
</lst>
−
<lst>
−
<arr name="id">
<int>2</int>
</arr>
−
<arr name="title">
<str>Gemeentehuis Utrecht</str>
</arr>
</lst>
−
<lst>
−
<arr name="id">
<int>3</int>
</arr>
−
<arr name="title">
<str>Beachclub Vroeger</str>
</arr>
</lst>
</arr>
<lst name="verbose-output"/>
<str name="status">idle</str>
<str name="importResponse">Configuration Re-loaded sucessfully</str>
−
<lst name="statusMessages">
<str name="Total Requests made to DataSource">7</str>
<str name="Total Rows Fetched">3</str>
<str name="Total Documents Skipped">0</str>
<str name="Full Dump Started">2010-08-03 18:13:15</str>
−
<str name="">
Indexing completed. Added/Updated: 3 documents. Deleted 0 documents.
</str>
<str name="Total Documents Processed">3</str>
<str name="Time taken ">0:0:0.219</str>
</lst>
−
<str name="WARNING">
This response format is experimental. It is likely to change in the future.
</str>
</response>
So there again, I dont see the themes or features back.
Anything I can check here for you?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019666.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Just checking -
Did you verify the data was being extracted with the DIH UI?
http://localhost:8983/solr/admin/dataimport.jsp
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 11:28 AM
To: solr-user@lucene.apache.org
Subject: RE: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Ok, that works...
But it only confirms that the extra data to be indexed I have defined in my data-config does not seem to be indexed.
What can I do to debug this? Because nothing special is logged in my cygwin window!
I have even simplified the data-config further to this:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_theme" query="select themeid from location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from themes where id = '${location_theme.themeid}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
I have attached a screenshot of my datamodel for this part.
http://lucene.472066.n3.nabble.com/file/n1019514/DBmodel.png DBmodel.png
More help is greatly appreciated! :)
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019514.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Ok, that works...
But it only confirms that the extra data to be indexed I have defined in my
data-config does not seem to be indexed.
What can I do to debug this? Because nothing special is logged in my cygwin
window!
I have even simplified the data-config further to this:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_theme" query="select themeid from
location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from themes where
id = '${location_theme.themeid}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
I have attached a screenshot of my datamodel for this part.
http://lucene.472066.n3.nabble.com/file/n1019514/DBmodel.png DBmodel.png
More help is greatly appreciated! :)
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019514.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Sorry; I should have linked you to the self-executable .jar with no dependencies (so double-clicking runs):
http://code.google.com/p/luke/downloads/detail?name=lukeall-1.0.1.jar&can=2&q=
Once you open it, you can "open" the index folder in your solr/data hierarchy.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 10:50 AM
To: solr-user@lucene.apache.org
Subject: Re: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Ok, downloaded luke, but how do I run it? Tried googling it, but no luck...do I need to put in in some folder?
And is there anything with regard to the casing of the columns?
For example, I now have
"select FEATUREID "
and
<field column="TITLE" name="title" />
in my data-config
However, my DB columns are all in lower casing...is solr sensitive to that in any way?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019387.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Ok, downloaded luke, but how do I run it? Tried googling it, but no luck...do
I need to put in in some folder?
And is there anything with regard to the casing of the columns?
For example, I now have
"select FEATUREID "
and
<field column="TITLE" name="title" />
in my data-config
However, my DB columns are all in lower casing...is solr sensitive to that
in any way?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1019387.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
I can't see an obvious error, I'm afraid.
Check the index with Luke:
http://code.google.com/p/luke/
... take particular note of the terms that are actually indexed, and what values each document has. You can also perform searches/etc; it's a useful tool.
If the data isn't there, there's some problem... probably in dataconfig/schema relationship. Hard to say without knowing more.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Tuesday, August 03, 2010 8:12 AM
To: solr-user@lucene.apache.org
Subject: Re: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
Thanks for the quick reply :)
Here it is:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
-->
<!--
This is the Solr schema file. This file should be named "schema.xml" and should be in the conf directory under the solr home (i.e. ./solr/conf/schema.xml by default) or located where the classloader for the Solr webapp can find it.
This example schema is the recommended starting point for users.
It should be kept correct and concise, usable out-of-the-box.
For more information, on how to customize this file, please see http://wiki.apache.org/solr/SchemaXml
-->
<schema name="db" version="1.1">
<!-- attribute "name" is the name of this schema and is only used for display purposes.
Applications should change this to reflect the nature of the search collection.
version="1.1" is Solr's version number for the schema syntax and semantics. It should
not normally be changed by applications.
1.0: multiValued attribute did not exist, all fields are multiValued by nature
1.1: multiValued attribute introduced, false by default -->
<types>
<!-- field type definitions. The "name" attribute is
just a label to be used by field definitions. The "class"
attribute and any other attributes determine the real
behavior of the fieldType.
Class names starting with "solr" refer to java classes in the
org.apache.solr.analysis package.
-->
<!-- The StrField type is not analyzed, but indexed/stored verbatim.
- StrField and TextField support an optional compressThreshold which
limits compression (if enabled in the derived fields) to values which
exceed a certain size (in characters).
-->
<fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
<!-- boolean type: "true" or "false" -->
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"
omitNorms="true"/>
<!-- The optional sortMissingLast and sortMissingFirst attributes are
currently supported on types that are sorted internally as strings.
- If sortMissingLast="true", then a sort on this field will cause documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
- If sortMissingFirst="true", then a sort on this field will cause documents
without the field to come before documents with the field,
regardless of the requested sort order.
- If sortMissingLast="false" and sortMissingFirst="false" (the default),
then default lucene sorting will be used which places docs without the
field first in an ascending sort and last in a descending sort.
-->
<!-- numeric field types that store and index the text
value verbatim (and hence don't support range queries, since the
lexicographic ordering isn't equal to the numeric ordering) -->
<fieldType name="integer" class="solr.IntField" omitNorms="true"/>
<fieldType name="long" class="solr.LongField" omitNorms="true"/>
<fieldType name="float" class="solr.FloatField" omitNorms="true"/>
<fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
<!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
<fieldType name="sint" class="solr.SortableIntField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="slong" class="solr.SortableLongField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sfloat" class="solr.SortableFloatField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField"
sortMissingLast="true" omitNorms="true"/>
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z, and
is a more restricted form of the canonical representation of dateTime
http://www.w3.org/TR/xmlschema-2/#dateTime
The trailing "Z" designates UTC time and is mandatory.
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
All other components are mandatory.
Expressions can also be used to denote calculations that should be
performed relative to "NOW" to determine the value, ie...
NOW/HOUR
... Round to the start of the current hour
NOW-1DAY
... Exactly 1 day prior to now
NOW/DAY+6MONTHS+3DAYS
... 6 months and 3 days in the future from the start of
the current day
Consult the DateField javadocs for more information.
-->
<fieldType name="date" class="solr.DateField" sortMissingLast="true"
omitNorms="true"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
to generate psuedo-random orderings of your docs for sorting
purposes. The ordering is generated based on the field name
and the version of the index, As long as the index version
remains unchanged, and the same field name is reused,
the ordering of the docs will be consistent.
If you want differend psuedo-random orderings of documents,
for the same version of the index, use a dynamicField and
change the name
-->
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
<!-- solr.TextField allows the specification of custom text analyzers
specified as a tokenizer and a list of token filters. Different
analyzers may be specified for indexing and querying.
The optional positionIncrementGap puts space between multiple fields of
this type on the same document, with the purpose of preventing false phrase
matching across fields.
For more info on customizing your analyzer chain, please see
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
-->
<!-- One can also specify an existing Analyzer class that has a
default constructor via the class attribute on the analyzer element
<fieldType name="text_greek" class="solr.TextField">
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
</fieldType>
-->
<!-- A text field that only splits on whitespace for exact matching of words -->
<fieldType name="text_ws" class="solr.TextField"
positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<!-- A text field that uses WordDelimiterFilter to enable splitting and matching of
words on case-change, alpha numeric boundaries, and non-alphanumeric chars,
so that a query of "wifi" or "wi fi" could match a document containing "Wi-Fi".
Synonyms and stopwords are customized by external files, and stemming is enabled.
Duplicate tokens at the same position (which may result from Stemmed Synonyms or
WordDelim parts) are removed.
-->
<fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- Less flexible matching, but less false matches. Probably not ideal for product names,
but may be good for SKUs. Can insert dashes in the wrong place and still match. -->
<fieldType name="textTight" class="solr.TextField"
positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="0" generateNumberParts="0" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- This is an example of using the KeywordTokenizer along
With various TokenFilterFactories to produce a sortable field
that does not include some properties of the source text
-->
<fieldType name="alphaOnlySort" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
<analyzer>
<!-- KeywordTokenizer does no actual tokenizing, so the entire
input string is preserved as a single token
-->
<tokenizer class="solr.KeywordTokenizerFactory"/>
<!-- The LowerCase TokenFilter does what you expect, which can be
when you want your sorting to be case insensitive
-->
<filter class="solr.LowerCaseFilterFactory" />
<!-- The TrimFilter removes any leading or trailing whitespace -->
<filter class="solr.TrimFilterFactory" />
<!-- The PatternReplaceFilter gives you the flexibility to use
Java Regular expression to replace any sequence of characters
matching a pattern with an arbitrary replacement string,
which may include back refrences to portions of the orriginal
string matched by the pattern.
See the Java Regular Expression documentation for more
infomation on pattern and replacement string syntax.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
-->
<filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z])" replacement="" replace="all"
/>
</analyzer>
</fieldType>
<!-- since fields of this type are by default not stored or indexed, any data added to
them will be ignored outright
-->
<fieldtype name="ignored" stored="false" indexed="false"
class="solr.StrField" />
</types>
<fields>
<!-- Valid attributes for fields:
name: mandatory - the name for the field
type: mandatory - the name of a previously defined type from the <types> section
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
compressed: [false] if this field should be stored using gzip compression
(this will only apply if the field type is compressable; among
the standard field types, only TextField and StrField are)
multiValued: true if this field may contain multiple values per document
omitNorms: (expert) set to true to omit the norms associated with
this field (this disables length normalization and index-time
boosting for the field, and saves some memory). Only full-text
fields or fields that need an index-time boost need norms.
termVectors: [false] set to true to store the term vector for a given field.
When using MoreLikeThis, fields used for similarity should be stored for
best performance.
-->
<field name="id" type="string" indexed="true" stored="true"
required="true" />
<!--<field name="sku" type="textTight" indexed="true" stored="true"
omitNorms="true"/>-->
<field name="title" type="text" indexed="true" stored="true"/>
<field name="cat" type="text_ws" indexed="true" stored="true"
multiValued="true" omitNorms="true" termVectors="true" />
<field name="features" type="text" indexed="true" stored="true"
multiValued="true"/>
<!--
<field name="nameSort" type="string" indexed="true" stored="false"/>
<field name="alphaNameSort" type="alphaOnlySort" indexed="true"
stored="false"/>
<field name="manu" type="text" indexed="true" stored="true"
omitNorms="true"/>
<field name="cat" type="text_ws" indexed="true" stored="true"
multiValued="true" omitNorms="true" termVectors="true" />
<field name="features" type="text" indexed="true" stored="true"
multiValued="true"/>
<field name="includes" type="text" indexed="true" stored="true"/>
<field name="weight" type="sfloat" indexed="true" stored="true"/>
<field name="price" type="sfloat" indexed="true" stored="true"/>
-->
<!-- "default" values can be specified for fields, indicating which
value should be used if no value is specified when adding a document.
-->
<!-- <field name="popularity" type="sint" indexed="true" stored="true"
default="0"/>-->
<!-- Some sample docs exists solely to demonstrate the spellchecker
functionality, this is the only field they container.
Typically you might build the spellchecker of "catchall" type field
containing all of the text in each document
-->
<field name="word" type="string" indexed="true" stored="true"/>
<!-- catchall field, containing all other searchable text fields (implemented
via copyField further on in this schema -->
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
<!-- non-tokenized version of manufacturer to make it easier to sort or group
results by manufacturer. copied from "manu" via copyField -->
<!-- <field name="manu_exact" type="string" indexed="true"
stored="false"/>-->
<!-- Here, default is used to create a "timestamp" field indicating
When each document was indexed.
-->
<field name="timestamp" type="date" indexed="true" stored="true"
default="NOW" multiValued="false"/>
<!-- Dynamic field definitions. If a field name is not found, dynamicFields
will be used if the name matches any of the patterns.
RESTRICTION: the glob-like pattern in the name attribute must have
a "*" only at the start or the end.
EXAMPLE: name="*_i" will match any field ending in _i (like myid_i,
z_i)
Longer patterns will be matched first. if equal size patterns
both match, the first appearing in the schema will be used. -->
<dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
<dynamicField name="*_t" type="text" indexed="true" stored="true"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
<dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
<dynamicField name="random*" type="random" />
<!-- uncomment the following to ignore any fields that don't already match an existing
field name or dynamic field, rather than reporting them as an error.
alternately, change the type="ignored" to some other type e.g.
"text" if you want
unknown fields indexed and/or stored by default -->
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
</fields>
<!-- Field to use to determine and enforce document uniqueness.
Unless this field is marked with required="false", it will be a required field
-->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is absent
-->
<defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" --> <solrQueryParser defaultOperator="OR"/>
<!-- copyField commands copy one field to another at the time a document
is added to the index. It's used either to index the same field differently,
or to add multiple fields to the same field for easier/faster searching. -->
<!--<copyField source="id" dest="sku"/>-->
<copyField source="cat" dest="text"/>
<copyField source="title" dest="text"/>
<!--<copyField source="name" dest="nameSort"/>
<copyField source="name" dest="alphaNameSort"/>
<copyField source="manu" dest="text"/>-->
<copyField source="features" dest="text"/>
<!--<copyField source="includes" dest="text"/>
<copyField source="manu" dest="manu_exact"/>-->
<!-- Similarity is the scoring routine for each document vs. a query.
A custom similarity may be specified here, but the default is fine
for most applications. -->
<!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
</schema>
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1018911.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Thanks for the quick reply :)
Here it is:
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
This is the Solr schema file. This file should be named "schema.xml" and
should be in the conf directory under the solr home
(i.e. ./solr/conf/schema.xml by default)
or located where the classloader for the Solr webapp can find it.
This example schema is the recommended starting point for users.
It should be kept correct and concise, usable out-of-the-box.
For more information, on how to customize this file, please see
http://wiki.apache.org/solr/SchemaXml
-->
<schema name="db" version="1.1">
<!-- attribute "name" is the name of this schema and is only used for
display purposes.
Applications should change this to reflect the nature of the search
collection.
version="1.1" is Solr's version number for the schema syntax and
semantics. It should
not normally be changed by applications.
1.0: multiValued attribute did not exist, all fields are multiValued
by nature
1.1: multiValued attribute introduced, false by default -->
<types>
<!-- field type definitions. The "name" attribute is
just a label to be used by field definitions. The "class"
attribute and any other attributes determine the real
behavior of the fieldType.
Class names starting with "solr" refer to java classes in the
org.apache.solr.analysis package.
-->
<!-- The StrField type is not analyzed, but indexed/stored verbatim.
- StrField and TextField support an optional compressThreshold which
limits compression (if enabled in the derived fields) to values which
exceed a certain size (in characters).
-->
<fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
<!-- boolean type: "true" or "false" -->
<fieldType name="boolean" class="solr.BoolField" sortMissingLast="true"
omitNorms="true"/>
<!-- The optional sortMissingLast and sortMissingFirst attributes are
currently supported on types that are sorted internally as strings.
- If sortMissingLast="true", then a sort on this field will cause
documents
without the field to come after documents with the field,
regardless of the requested sort order (asc or desc).
- If sortMissingFirst="true", then a sort on this field will cause
documents
without the field to come before documents with the field,
regardless of the requested sort order.
- If sortMissingLast="false" and sortMissingFirst="false" (the
default),
then default lucene sorting will be used which places docs without
the
field first in an ascending sort and last in a descending sort.
-->
<!-- numeric field types that store and index the text
value verbatim (and hence don't support range queries, since the
lexicographic ordering isn't equal to the numeric ordering) -->
<fieldType name="integer" class="solr.IntField" omitNorms="true"/>
<fieldType name="long" class="solr.LongField" omitNorms="true"/>
<fieldType name="float" class="solr.FloatField" omitNorms="true"/>
<fieldType name="double" class="solr.DoubleField" omitNorms="true"/>
<!-- Numeric field types that manipulate the value into
a string value that isn't human-readable in its internal form,
but with a lexicographic ordering the same as the numeric ordering,
so that range queries work correctly. -->
<fieldType name="sint" class="solr.SortableIntField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="slong" class="solr.SortableLongField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sfloat" class="solr.SortableFloatField"
sortMissingLast="true" omitNorms="true"/>
<fieldType name="sdouble" class="solr.SortableDoubleField"
sortMissingLast="true" omitNorms="true"/>
<!-- The format for this date field is of the form 1995-12-31T23:59:59Z,
and
is a more restricted form of the canonical representation of
dateTime
http://www.w3.org/TR/xmlschema-2/#dateTime
The trailing "Z" designates UTC time and is mandatory.
Optional fractional seconds are allowed: 1995-12-31T23:59:59.999Z
All other components are mandatory.
Expressions can also be used to denote calculations that should be
performed relative to "NOW" to determine the value, ie...
NOW/HOUR
... Round to the start of the current hour
NOW-1DAY
... Exactly 1 day prior to now
NOW/DAY+6MONTHS+3DAYS
... 6 months and 3 days in the future from the start of
the current day
Consult the DateField javadocs for more information.
-->
<fieldType name="date" class="solr.DateField" sortMissingLast="true"
omitNorms="true"/>
<!-- The "RandomSortField" is not used to store or search any
data. You can declare fields of this type it in your schema
to generate psuedo-random orderings of your docs for sorting
purposes. The ordering is generated based on the field name
and the version of the index, As long as the index version
remains unchanged, and the same field name is reused,
the ordering of the docs will be consistent.
If you want differend psuedo-random orderings of documents,
for the same version of the index, use a dynamicField and
change the name
-->
<fieldType name="random" class="solr.RandomSortField" indexed="true" />
<!-- solr.TextField allows the specification of custom text analyzers
specified as a tokenizer and a list of token filters. Different
analyzers may be specified for indexing and querying.
The optional positionIncrementGap puts space between multiple
fields of
this type on the same document, with the purpose of preventing
false phrase
matching across fields.
For more info on customizing your analyzer chain, please see
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters
-->
<!-- One can also specify an existing Analyzer class that has a
default constructor via the class attribute on the analyzer element
<fieldType name="text_greek" class="solr.TextField">
<analyzer class="org.apache.lucene.analysis.el.GreekAnalyzer"/>
</fieldType>
-->
<!-- A text field that only splits on whitespace for exact matching of
words -->
<fieldType name="text_ws" class="solr.TextField"
positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
</analyzer>
</fieldType>
<!-- A text field that uses WordDelimiterFilter to enable splitting and
matching of
words on case-change, alpha numeric boundaries, and non-alphanumeric
chars,
so that a query of "wifi" or "wi fi" could match a document
containing "Wi-Fi".
Synonyms and stopwords are customized by external files, and
stemming is enabled.
Duplicate tokens at the same position (which may result from Stemmed
Synonyms or
WordDelim parts) are removed.
-->
<fieldType name="text" class="solr.TextField"
positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!-- in this example, we will only use synonyms at query time
<filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
-->
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0" splitOnCaseChange="1"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- Less flexible matching, but less false matches. Probably not ideal
for product names,
but may be good for SKUs. Can insert dashes in the wrong place and
still match. -->
<fieldType name="textTight" class="solr.TextField"
positionIncrementGap="100" >
<analyzer>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt"
ignoreCase="true" expand="false"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="0" generateNumberParts="0" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
<!-- This is an example of using the KeywordTokenizer along
With various TokenFilterFactories to produce a sortable field
that does not include some properties of the source text
-->
<fieldType name="alphaOnlySort" class="solr.TextField"
sortMissingLast="true" omitNorms="true">
<analyzer>
<!-- KeywordTokenizer does no actual tokenizing, so the entire
input string is preserved as a single token
-->
<tokenizer class="solr.KeywordTokenizerFactory"/>
<!-- The LowerCase TokenFilter does what you expect, which can be
when you want your sorting to be case insensitive
-->
<filter class="solr.LowerCaseFilterFactory" />
<!-- The TrimFilter removes any leading or trailing whitespace -->
<filter class="solr.TrimFilterFactory" />
<!-- The PatternReplaceFilter gives you the flexibility to use
Java Regular expression to replace any sequence of characters
matching a pattern with an arbitrary replacement string,
which may include back refrences to portions of the orriginal
string matched by the pattern.
See the Java Regular Expression documentation for more
infomation on pattern and replacement string syntax.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.html
-->
<filter class="solr.PatternReplaceFilterFactory"
pattern="([^a-z])" replacement="" replace="all"
/>
</analyzer>
</fieldType>
<!-- since fields of this type are by default not stored or indexed, any
data added to
them will be ignored outright
-->
<fieldtype name="ignored" stored="false" indexed="false"
class="solr.StrField" />
</types>
<fields>
<!-- Valid attributes for fields:
name: mandatory - the name for the field
type: mandatory - the name of a previously defined type from the
<types> section
indexed: true if this field should be indexed (searchable or sortable)
stored: true if this field should be retrievable
compressed: [false] if this field should be stored using gzip
compression
(this will only apply if the field type is compressable; among
the standard field types, only TextField and StrField are)
multiValued: true if this field may contain multiple values per
document
omitNorms: (expert) set to true to omit the norms associated with
this field (this disables length normalization and index-time
boosting for the field, and saves some memory). Only full-text
fields or fields that need an index-time boost need norms.
termVectors: [false] set to true to store the term vector for a given
field.
When using MoreLikeThis, fields used for similarity should be stored
for
best performance.
-->
<field name="id" type="string" indexed="true" stored="true"
required="true" />
<!--<field name="sku" type="textTight" indexed="true" stored="true"
omitNorms="true"/>-->
<field name="title" type="text" indexed="true" stored="true"/>
<field name="cat" type="text_ws" indexed="true" stored="true"
multiValued="true" omitNorms="true" termVectors="true" />
<field name="features" type="text" indexed="true" stored="true"
multiValued="true"/>
<!--
<field name="nameSort" type="string" indexed="true" stored="false"/>
<field name="alphaNameSort" type="alphaOnlySort" indexed="true"
stored="false"/>
<field name="manu" type="text" indexed="true" stored="true"
omitNorms="true"/>
<field name="cat" type="text_ws" indexed="true" stored="true"
multiValued="true" omitNorms="true" termVectors="true" />
<field name="features" type="text" indexed="true" stored="true"
multiValued="true"/>
<field name="includes" type="text" indexed="true" stored="true"/>
<field name="weight" type="sfloat" indexed="true" stored="true"/>
<field name="price" type="sfloat" indexed="true" stored="true"/>
-->
<!-- "default" values can be specified for fields, indicating which
value should be used if no value is specified when adding a
document.
-->
<!-- <field name="popularity" type="sint" indexed="true" stored="true"
default="0"/>-->
<!-- Some sample docs exists solely to demonstrate the spellchecker
functionality, this is the only field they container.
Typically you might build the spellchecker of "catchall" type field
containing all of the text in each document
-->
<field name="word" type="string" indexed="true" stored="true"/>
<!-- catchall field, containing all other searchable text fields
(implemented
via copyField further on in this schema -->
<field name="text" type="text" indexed="true" stored="false"
multiValued="true"/>
<!-- non-tokenized version of manufacturer to make it easier to sort or
group
results by manufacturer. copied from "manu" via copyField -->
<!-- <field name="manu_exact" type="string" indexed="true"
stored="false"/>-->
<!-- Here, default is used to create a "timestamp" field indicating
When each document was indexed.
-->
<field name="timestamp" type="date" indexed="true" stored="true"
default="NOW" multiValued="false"/>
<!-- Dynamic field definitions. If a field name is not found,
dynamicFields
will be used if the name matches any of the patterns.
RESTRICTION: the glob-like pattern in the name attribute must have
a "*" only at the start or the end.
EXAMPLE: name="*_i" will match any field ending in _i (like myid_i,
z_i)
Longer patterns will be matched first. if equal size patterns
both match, the first appearing in the schema will be used. -->
<dynamicField name="*_i" type="sint" indexed="true" stored="true"/>
<dynamicField name="*_s" type="string" indexed="true" stored="true"/>
<dynamicField name="*_l" type="slong" indexed="true" stored="true"/>
<dynamicField name="*_t" type="text" indexed="true" stored="true"/>
<dynamicField name="*_b" type="boolean" indexed="true" stored="true"/>
<dynamicField name="*_f" type="sfloat" indexed="true" stored="true"/>
<dynamicField name="*_d" type="sdouble" indexed="true" stored="true"/>
<dynamicField name="*_dt" type="date" indexed="true" stored="true"/>
<dynamicField name="random*" type="random" />
<!-- uncomment the following to ignore any fields that don't already
match an existing
field name or dynamic field, rather than reporting them as an error.
alternately, change the type="ignored" to some other type e.g.
"text" if you want
unknown fields indexed and/or stored by default -->
<!--dynamicField name="*" type="ignored" multiValued="true" /-->
</fields>
<!-- Field to use to determine and enforce document uniqueness.
Unless this field is marked with required="false", it will be a
required field
-->
<uniqueKey>id</uniqueKey>
<!-- field for the QueryParser to use when an explicit fieldname is absent
-->
<defaultSearchField>text</defaultSearchField>
<!-- SolrQueryParser configuration: defaultOperator="AND|OR" -->
<solrQueryParser defaultOperator="OR"/>
<!-- copyField commands copy one field to another at the time a document
is added to the index. It's used either to index the same field
differently,
or to add multiple fields to the same field for easier/faster
searching. -->
<!--<copyField source="id" dest="sku"/>-->
<copyField source="cat" dest="text"/>
<copyField source="title" dest="text"/>
<!--<copyField source="name" dest="nameSort"/>
<copyField source="name" dest="alphaNameSort"/>
<copyField source="manu" dest="text"/>-->
<copyField source="features" dest="text"/>
<!--<copyField source="includes" dest="text"/>
<copyField source="manu" dest="manu_exact"/>-->
<!-- Similarity is the scoring routine for each document vs. a query.
A custom similarity may be specified here, but the default is fine
for most applications. -->
<!-- <similarity class="org.apache.lucene.search.DefaultSimilarity"/> -->
</schema>
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1018911.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
And found another thing, even when I have this in my data-config.xml (a
totally deformed XML file), I still get the same login failed error...where
I would expect something like a non-well formed XML document error...
Im using cygwin...dont know if that caches anything, but its still weird I
thought :)
<dataConfig>
<dataSource type="JdbcDataSource" name="ds1"
driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlser
<document name="weddinglocations">
<entity name="location" dataSource="ds1" query="select * from
locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from
location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features
where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select CATEGORYID from
location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where
id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017302.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
Peter:
My datasource looks like this:
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost\DEVELOPMENT/Databases/database:1433" user="user" password="password" />
________________________________________
From: PeterKerk [vetteparty@hotmail.com]
Sent: Monday, August 02, 2010 4:10 PM
To: solr-user@lucene.apache.org
Subject: RE: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
@Michael: your suggestion to place the jar file in that folder has brought me
1 step further. Now I get a new error.
It seems as if the user cannot log in. Strange because it IS the correct
pwd.
In my MSSQL mgmt studio I provide:
server name: (local)
login: sa
password:123456
Now if you look at my dataconfig:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
I also tried:
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://(local):1433;databaseName=wedding" user="sa"
password="123456" />
But with the same result.
Is the driver name also still correct the way I use it now?
See below my error log:
INFO: Starting Full Import
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.SolrWriter
readIndexe
rProperties
INFO: Read dataimport.properties
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2
deleteAll
INFO: [db] REMOVING ALL DOCUMENTS FROM INDEX
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
commit{dir=C:\apache-solr-1.4.1\example\example-DIH\solr\db\data\index,s
egFN=segments_n,version=1279027246872,generation=23,filenames=[_l.nrm,
_l.tis, _
l.fnm, _l.prx, _l.fdx, segments_n, _l.fdt, _l.frq, _l.tii]
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrDeletionPolicy
updateCommits
INFO: newest commit = 1279027246872
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrCore execute
INFO: [db] webapp=/solr path=/dataimport params={command=full-import}
status=0 Q
Time=0
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.JdbcDataSource$1
call
INFO: Creating a connection for entity location with URL:
jdbc:sqlserver://local
host:1433;databaseName=wedding
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.DocBuilder
buildDocum
ent
SEVERE: Exception while processing: location document :
SolrInputDocument[{}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017119.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
@Michael: your suggestion to place the jar file in that folder has brought me
1 step further. Now I get a new error.
It seems as if the user cannot log in. Strange because it IS the correct
pwd.
In my MSSQL mgmt studio I provide:
server name: (local)
login: sa
password:123456
Now if you look at my dataconfig:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
I also tried:
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://(local):1433;databaseName=wedding" user="sa"
password="123456" />
But with the same result.
Is the driver name also still correct the way I use it now?
See below my error log:
INFO: Starting Full Import
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.SolrWriter
readIndexe
rProperties
INFO: Read dataimport.properties
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2
deleteAll
INFO: [db] REMOVING ALL DOCUMENTS FROM INDEX
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
commit{dir=C:\apache-solr-1.4.1\example\example-DIH\solr\db\data\index,s
egFN=segments_n,version=1279027246872,generation=23,filenames=[_l.nrm,
_l.tis, _
l.fnm, _l.prx, _l.fdx, segments_n, _l.fdt, _l.frq, _l.tii]
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrDeletionPolicy
updateCommits
INFO: newest commit = 1279027246872
Aug 2, 2010 10:06:42 PM org.apache.solr.core.SolrCore execute
INFO: [db] webapp=/solr path=/dataimport params={command=full-import}
status=0 Q
Time=0
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.JdbcDataSource$1
call
INFO: Creating a connection for entity location with URL:
jdbc:sqlserver://local
host:1433;databaseName=wedding
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.DocBuilder
buildDocum
ent
SEVERE: Exception while processing: location document :
SolrInputDocument[{}]
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 10:06:42 PM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to
execute
query: select * from locations Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:253)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:210)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSou
rce.java:39)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEn
tityProcessor.java:58)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEnti
tyProcessor.java:71)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(Ent
ityProcessorWrapper.java:237)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:357)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for
use
r 'sa'.
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError
(SQLServerException.java:197)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246
)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:83)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerC
onnection.java:2529)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConne
ction.java:1905)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServer
Connection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecu
te(SQLServerConnection.java:1893)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4575)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLSe
rverConnection.java:1400)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLSer
verConnection.java:1045)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConne
ction.java:817)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerCon
nection.java:700)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.
java:842)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:162)
at
org.apache.solr.handler.dataimport.JdbcDataSource$1.call(JdbcDataSour
ce.java:128)
at
org.apache.solr.handler.dataimport.JdbcDataSource.getConnection(JdbcD
ataSource.java:363)
at
org.apache.solr.handler.dataimport.JdbcDataSource.access$300(JdbcData
Source.java:39)
at
org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<
init>(JdbcDataSource.java:240)
... 11 more
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 2, 2010 10:06:42 PM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017119.html
Sent from the Solr - User mailing list archive at Nabble.com.
RE: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Michael Griffiths <mg...@am-ind.com>.
I successfully used MSSQL JDBC by placing sqljdbc4.jar file in the lib directory, so e.g. example\lib\sqldbc4.jar.
Apart from that, my dataconfig looks very similar - I also set the CLASSPATH, which didn't work.
-----Original Message-----
From: PeterKerk [mailto:vetteparty@hotmail.com]
Sent: Monday, August 02, 2010 5:23 AM
To: solr-user@lucene.apache.org
Subject: Indexing data on MSSQL failed: Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
I'm running MSSQL Server 2008
I did this: set CLASSPATH= C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar (I dont know where I can check if this has been executed correctly)
Then when approaching this URL:
http://localhost:8983/solr/db/dataimport?command=full-import
Using this data-config.xml:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="r00kw0rst" />
<document name="weddinglocations">
<entity name="location" query="select * from locations">
<field column="ID" name="id" />
<field column="TITLE" name="title" />
<field column="CITY" name="city" />
<entity name="location_feature" query="select FEATUREID from location_features where locationid='${location.ID}'">
<entity name="feature" query="select title from features where id = '${location_feature.FEATUREID}'">
<field name="features" column="title" />
</entity>
</entity>
<entity name="location_theme" query="select CATEGORYID from location_themes where locationid='${location.ID}'">
<entity name="theme" query="select title from features where id = '${location_theme.FEATUREID}'">
<field name="cat" column="title" />
</entity>
</entity>
</entity>
</document>
</dataConfig>
I get this in my cygwin error log:
SEVERE: JdbcDataSource was not closed prior to finalize(), indicates a bug
-- PO
SSIBLE RESOURCE LEAK!!!
Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrCore execute
INFO: [db] webapp=/solr path=/dataimport params={command=full-import}
status=0 Q
Time=0
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
INFO: Starting Full Import
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.SolrWriter
readIndexe
rProperties
INFO: Read dataimport.properties
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2
deleteAll
INFO: [db] REMOVING ALL DOCUMENTS FROM INDEX Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrDeletionPolicy onInit
INFO: SolrDeletionPolicy.onInit: commits:num=1
commit{dir=C:\apache-solr-1.4.1\example\example-DIH\solr\db\data\index,s
egFN=segments_n,version=1279027246872,generation=23,filenames=[_l.nrm,
_l.tis, _
l.fnm, _l.prx, _l.fdx, segments_n, _l.fdt, _l.frq, _l.tii] Aug 2, 2010 10:51:28 AM org.apache.solr.core.SolrDeletionPolicy
updateCommits
INFO: newest commit = 1279027246872
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.DataImporter
doFullIm
port
SEVERE: Full Import failed
org.apache.solr.handler.dataimport.DataImportHandlerException: Could not load dr
iver: com.microsoft.sqlserver.jdbc.SQLServerDriver Processing Document # 1
at
org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAnd
Throw(DataImportHandlerException.java:72)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFac
tory(JdbcDataSource.java:114)
at
org.apache.solr.handler.dataimport.JdbcDataSource.init(JdbcDataSource
.java:62)
at
org.apache.solr.handler.dataimport.DataImporter.getDataSourceInstance
(DataImporter.java:304)
at
org.apache.solr.handler.dataimport.ContextImpl.getDataSource(ContextI
mpl.java:94)
at
org.apache.solr.handler.dataimport.SqlEntityProcessor.init(SqlEntityP
rocessor.java:52)
at
org.apache.solr.handler.dataimport.EntityProcessorWrapper.init(Entity
ProcessorWrapper.java:71)
at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilde
r.java:319)
at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.j
ava:242)
at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java
:180)
at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImpo
rter.java:331)
at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.j
ava:389)
at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.ja
va:370)
Caused by: java.lang.ClassNotFoundException: Unable to load com.microsoft.sqlser ver.jdbc.SQLServerDriver or org.apache.solr.handler.dataimport.com.microsoft.sql
server.jdbc.SQLServerDriver
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.ja
va:738)
at
org.apache.solr.handler.dataimport.JdbcDataSource.createConnectionFac
tory(JdbcDataSource.java:112)
... 11 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'com.micros oft.sqlserver.jdbc.SQLServerDriver'
at
org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.
java:375)
at
org.apache.solr.handler.dataimport.DocBuilder.loadClass(DocBuilder.ja
va:728)
... 12 more
Caused by: java.lang.ClassNotFoundException:
com.microsoft.sqlserver.jdbc.SQLSer
verDriver
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.ClassLoader.loadClassInternal(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:359)
... 13 more
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: start rollback
Aug 2, 2010 10:51:28 AM org.apache.solr.handler.dataimport.JdbcDataSource
finali
ze
SEVERE: JdbcDataSource was not closed prior to finalize(), indicates a bug
-- PO
SSIBLE RESOURCE LEAK!!!
Aug 2, 2010 10:51:28 AM org.apache.solr.update.DirectUpdateHandler2 rollback
INFO: end_rollback
What am I doing wrong?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1015137.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Ok thanks again :)
I'm right here now:
http://velocity.apache.org/tools/devel/index.html#Download
What should I download?
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1020109.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
Hi Gora,
I just ran the classpath command in a DOS command prompt, that normally
works for regular PATH variable as well.
Your suggestion for the open source JTDS driver sounds good.
So if you look at my data-config.xml:
<dataConfig>
<dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa"
password="123456" />
What would I have to place there under driver property?
Also Im still trying to set up my initial solr configuration, folder
structure like so:
C:\apache-solr-1.4.1\example\example-DIH\solr\db\lib
So where would I need to place the jar file? Is that in the \lib folder I
indicated above?
Thanks!
Pete
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017061.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by Gora Mohanty <go...@srijan.in>.
On Mon, 2 Aug 2010 02:22:50 -0700 (PDT)
PeterKerk <ve...@hotmail.com> wrote:
>
>
> I'm running MSSQL Server 2008
>
> I did this: set CLASSPATH= C:\Program Files\Microsoft SQL Server
> JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar (I dont know where I
> can check if this has been executed correctly)
Not familiar with Microsoft Windows, but where did you set the
CLASSPATH? I would suspect that Solr/(Tomcat|Jetty) is probably not
aware of this.
Also, the MS-SQL driver might need other DLLs. I have only checked
out installation instructions for the MS-SQL driver on Unix, and
they were not entirely clear.
You could also consider using the more robust, and efficient
open-source JTDS driver ( http://jtds.sourceforge.net/ )
Regards,
Gora
Re: Indexing data on MSSQL failed: Caused by:
org.apache.solr.common.SolrException: Error loading class 'com.micros
oft.sqlserver.jdbc.SQLServerDriver'
Posted by PeterKerk <ve...@hotmail.com>.
I just cant seem to get past this error!
So perhaps if any of you are running on Windows with SQL Server 2008, maybe
you could post your data-config?
I could have a look at it so I at least know my data-config is configured
correctly :)
Thanks a bunch!
--
View this message in context: http://lucene.472066.n3.nabble.com/Indexing-data-on-MSSQL-failed-Caused-by-org-apache-solr-common-SolrException-Error-loading-class-com-tp1015137p1017295.html
Sent from the Solr - User mailing list archive at Nabble.com.