Re: Errors using the Embedded Solar Server
On 1/21/2015 7:02 PM, Carl Roberts wrote: > Got it all working...:) > > I just replaced the solrconfig.xml and schema.xml files that I was using > with the ones from collection1 in one of the examples. I had modified > those files to remove certain sections which I thought were not needed > and apparently I don't understand those files very well yet...:) Glad you got it working. Here's the problem. In that log you included, the error was: ERROR org.apache.solr.core.SolrCore - org.apache.solr.common.SolrException: undefined field text Your solrconfig.xml file referenced a field named "text" (probably in the df parameter of a request handler) ... but your schema.xml did not have that field defined. Thanks, Shawn
Re: Errors using the Embedded Solar Server
Got it all working...:) I just replaced the solrconfig.xml and schema.xml files that I was using with the ones from collection1 in one of the examples. I had modified those files to remove certain sections which I thought were not needed and apparently I don't understand those files very well yet...:) Many thanks, Joe On 1/21/15, 8:47 PM, Carl Roberts wrote: Hi Shawn, Many thanks for all your help. Moving the lucene JARs from solr.solr.home/lib to the same classpath directory as the solr JARs plus adding a bunch more dependency JAR files and most of the files from the collection1/conf directory - these ones to be exact, has me a lot closer to my goal: rw-r--r-- 1 carlroberts staff 38 Jan 21 20:41 _rest_managed.json -rw-r--r-- 1 carlroberts staff 56 Jan 21 20:41 _schema_analysis_stopwords_english.json -rw-r--r-- 1 carlroberts staff 4041 Dec 10 00:37 currency.xml -rw-r--r-- 1 carlroberts staff 1386 Dec 10 00:37 elevate.xml drwxr-xr-x 41 carlroberts staff 1394 Dec 10 00:37 lang -rw-r--r-- 1 carlroberts staff894 Dec 10 00:37 protwords.txt -rw-r--r--@ 1 carlroberts staff 62063 Jan 21 13:02 schema.xml -rw-r--r--@ 1 carlroberts staff 76821 Jan 21 13:03 solrconfig.xml -rw-r--r-- 1 carlroberts staff 16 Dec 10 00:37 spellings.txt -rw-r--r-- 1 carlroberts staff795 Dec 10 00:37 stopwords.txt -rw-r--r-- 1 carlroberts staff 1148 Dec 10 00:37 synonyms.txt I am now getting this: [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 139145087 [main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoad
Re: Errors using the Embedded Solar Server
Hi Shawn, Many thanks for all your help. Moving the lucene JARs from solr.solr.home/lib to the same classpath directory as the solr JARs plus adding a bunch more dependency JAR files and most of the files from the collection1/conf directory - these ones to be exact, has me a lot closer to my goal: rw-r--r-- 1 carlroberts staff 38 Jan 21 20:41 _rest_managed.json -rw-r--r-- 1 carlroberts staff 56 Jan 21 20:41 _schema_analysis_stopwords_english.json -rw-r--r-- 1 carlroberts staff 4041 Dec 10 00:37 currency.xml -rw-r--r-- 1 carlroberts staff 1386 Dec 10 00:37 elevate.xml drwxr-xr-x 41 carlroberts staff 1394 Dec 10 00:37 lang -rw-r--r-- 1 carlroberts staff894 Dec 10 00:37 protwords.txt -rw-r--r--@ 1 carlroberts staff 62063 Jan 21 13:02 schema.xml -rw-r--r--@ 1 carlroberts staff 76821 Jan 21 13:03 solrconfig.xml -rw-r--r-- 1 carlroberts staff 16 Dec 10 00:37 spellings.txt -rw-r--r-- 1 carlroberts staff795 Dec 10 00:37 stopwords.txt -rw-r--r-- 1 carlroberts staff 1148 Dec 10 00:37 synonyms.txt I am now getting this: [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 139145087 [main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/boilerpipe-1.1.0.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/commons-compress-1.7.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrReso
Re: Errors using the Embedded Solar Server
Ah - OK - let me try that. BTW - I applied the fix from the bug link you gave me to log the errors and I am now at least getting the actual errors: *default core name=db solr home=/Users/carlroberts/dev/solr-4.10.3/ db is loaded=false core init failures={db=org.apache.solr.core.CoreContainer$CoreLoadFailure@4d351f9b} cores=[] Exception in thread "main" org.apache.solr.common.SolrException: SolrCore 'db' is not available due to init failure: JVM Error creating core [db]: org/apache/lucene/queries/function/ValueSource at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:749) at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:110) at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54) at solr.Test.main(Test.java:38) Caused by: org.apache.solr.common.SolrException: JVM Error creating core [db]: org/apache/lucene/queries/function/ValueSource at org.apache.solr.core.CoreContainer.create(CoreContainer.java:508) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:255) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:249) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NoClassDefFoundError: org/apache/lucene/queries/function/ValueSource at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:274) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:484) at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:521) at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:517) at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:81) at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43) at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151) at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:486) at org.apache.solr.schema.IndexSchema.(IndexSchema.java:166) at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55) at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69) at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:90) at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:62) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:489) ... 6 more Caused by: java.lang.ClassNotFoundException: org.apache.lucene.queries.function.ValueSource at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 21 more * On 1/21/15, 7:32 PM, Shawn Heisey wrote: On 1/21/2015 5:16 PM, Carl Roberts wrote: BTW - it seems that is very hard to get started with the Embedded server. The doc is out of date. The code seems to be untested and buggy. On 1/21/15, 7:15 PM, Carl Roberts wrote: HmmmIt looks like FutureTask is calling setException(Throwable t) with this exception which is not making it to the console. What I don't understand is why it is throwing that exception. I made sure that I added lucene-queries-4.10.3.jar file to the classpath by adding it to the solr home directory. See the new tracing: I'm pretty sure that all the lucene jars need to be available *before* Solr reaches the point in the log that you have quoted, where it adds jars from ${solr.solr.home}/lib. This would be the same location where the solrj and solr-core jars live. The only kind of jars that should be in the solr home lib directory are extra jars for extra features that you might specify in schema.xml (or some places in solrconfig.xml), like the ICU analysis jars, tika, mysql, etc. Thanks, Shawn
Re: Errors using the Embedded Solar Server
On 1/21/2015 5:16 PM, Carl Roberts wrote: > BTW - it seems that is very hard to get started with the Embedded > server. The doc is out of date. The code seems to be untested and buggy. > > On 1/21/15, 7:15 PM, Carl Roberts wrote: >> HmmmIt looks like FutureTask is calling setException(Throwable t) >> with this exception which is not making it to the console. >> >> What I don't understand is why it is throwing that exception. I made >> sure that I added lucene-queries-4.10.3.jar file to the classpath by >> adding it to the solr home directory. See the new tracing: I'm pretty sure that all the lucene jars need to be available *before* Solr reaches the point in the log that you have quoted, where it adds jars from ${solr.solr.home}/lib. This would be the same location where the solrj and solr-core jars live. The only kind of jars that should be in the solr home lib directory are extra jars for extra features that you might specify in schema.xml (or some places in solrconfig.xml), like the ICU analysis jars, tika, mysql, etc. Thanks, Shawn
Re: Errors using the Embedded Solar Server
Aha, I think you're being stung by https://issues.apache.org/jira/browse/SOLR-6643. Which will be fixed in the upcoming 5.0 release, or you can patch your system with the patch attached to that issue. Alan Woodward www.flax.co.uk On 21 Jan 2015, at 19:44, Carl Roberts wrote: > Already did. And the logging gets me no closer to fixing the issue. Here is > the logging. > > [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader > for directory: '/Users/carlroberts/dev/solr-4.10.3/' > [main] INFO org.apache.solr.core.SolrResourceLoader - Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to > classloader > [main] INFO org.apache.solr.core.SolrResourceLoader - Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader > [main] INFO org.apache.solr.core.SolrResourceLoader - Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to > classloader > [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration > from /Users/carlroberts/dev/solr-4.10.3/solr.xml > [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 1727098510 > [main] INFO org.apache.solr.core.CoreContainer - Loading cores into > CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting socketTimeout to: 0 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting urlScheme to: null > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting connTimeout to: 0 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting maxConnectionsPerHost to: 20 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting corePoolSize to: 0 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting maximumPoolSize to: 2147483647 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting maxThreadIdleTime to: 5 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting sizeOfQueue to: -1 > [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - > Setting fairnessPolicy to: false > [main] INFO org.apache.solr.update.UpdateShardHandler - Creating > UpdateShardHandler HTTP client with params: > socketTimeout=0&connTimeout=0&retry=false > [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is > org.slf4j.impl.SimpleLoggerFactory > [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured > [main] INFO org.apache.solr.core.CoreContainer - Host Name: null > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding > specified lib dirs to ClassLoader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/boilerpipe-1.1.0.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/commons-compress-1.7.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/dom4j-1.6.1.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/fontbox-1.8.4.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - > Adding > 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/icu4j-53.1.jar' > to classloader > [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrReso
Re: Errors using the Embedded Solar Server
Already did. And the logging gets me no closer to fixing the issue. Here is the logging. [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 1727098510 [main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/boilerpipe-1.1.0.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/commons-compress-1.7.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/dom4j-1.6.1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/fontbox-1.8.4.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/icu4j-53.1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/isoparser-1.0-RC-1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/jdom-1.0.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/
Re: Errors using the Embedded Solar Server
I had to hardcode the path in solrconfig.xml from this: ${solr.install.dir:} to this: /Users/carlroberts/dev/solr-4.10.3/ to avoid the classloader warnings, but I still get the same error. I am not sure where the ${solr.install.dir:} value gets pulled from but apparently that is not working. Here is the new output: [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 1023143764 [main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] db /Users/carlroberts/dev/solr-4.10.3/ [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/boilerpipe-1.1.0.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/commons-compress-1.7.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/dom4j-1.6.1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/fontbox-1.8.4.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/icu4j-53.1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/isoparser-1.0-RC-1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache
Re: Errors using the Embedded Solar Server
On 1/21/2015 9:56 AM, Carl Roberts wrote: > BTW - I don't know if this will help also, but here is a screen shot > of my classpath in eclipse. The URL in the slf4j error message does describe the problem with logging, but if you know nothing about slf4j, it probably won't help you much. Make sure you're including all the jars from example/lib/ext in the download in your project's lib directory, as well as the log4j.properties file from the resources directory. You will probably need to edit the log4j.properties file to change the location of the logfile. Thanks, Shawn
Re: Errors using the Embedded Solar Server
OK - I figured out the logging. Here is the logging output plus the console output and the stack trace: main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 2050551931 db /Users/carlroberts/dev/solr-4.10.3/[main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../contrib/extraction/lib (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../contrib/extraction/lib). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../dist). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../contrib/clustering/lib/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../contrib/clustering/lib). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../dist). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../contrib/langid/lib/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../contrib/langid/lib). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../dist). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../contrib/velocity/lib (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../contrib/velocity/lib). [coreLoadExecutor-5-thread-1] WARN org.apache.solr.core.SolrResourceLoader - Can't find (or read) directory to add to classloader: ../../../dist/ (resolved as: /Users/carlroberts/dev/solr-4.10.3/db/../../../dist). [coreLoadExecutor-5-thread-1] INFO org.apache.solr.update.SolrIndexConfig - IndexWriter infoStream solr logging is enabled [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Using Lucene MatchVersion: 4.10.3 [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.Config - Loaded SolrConfig: solrconfig.xml [coreLoadExecutor-5-thread-1] INFO org.apache.solr.schema.IndexSchema - Reading Solr Schema from /Users/carlroberts/dev/solr-4.10.3/db/conf/schema.xml [co
Re: Errors using the Embedded Solar Server
Hi, Could there be a bug in the EmbeddedSolrServer that is causing this? Is it still supported in version 4.10.3? If it is, can someone please provide me assistance with this? Regards, Joe On 1/21/15, 12:18 PM, Carl Roberts wrote: I had to hardcode the path in solrconfig.xml from this: ${solr.install.dir:} to this: /Users/carlroberts/dev/solr-4.10.3/ to avoid the classloader warnings, but I still get the same error. I am not sure where the ${solr.install.dir:} value gets pulled from but apparently that is not working. Here is the new output: [main] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/' [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/commons-logging-1.2.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/servlet-api.jar' to classloader [main] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/lib/slf4j-simple-1.7.5.jar' to classloader [main] INFO org.apache.solr.core.ConfigSolr - Loading container configuration from /Users/carlroberts/dev/solr-4.10.3/solr.xml [main] INFO org.apache.solr.core.CoreContainer - New CoreContainer 1023143764 [main] INFO org.apache.solr.core.CoreContainer - Loading cores into CoreContainer [instanceDir=/Users/carlroberts/dev/solr-4.10.3/] db /Users/carlroberts/dev/solr-4.10.3/ [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting socketTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting urlScheme to: null [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting connTimeout to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxConnectionsPerHost to: 20 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting corePoolSize to: 0 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maximumPoolSize to: 2147483647 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting maxThreadIdleTime to: 5 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting sizeOfQueue to: -1 [main] INFO org.apache.solr.handler.component.HttpShardHandlerFactory - Setting fairnessPolicy to: false [main] INFO org.apache.solr.update.UpdateShardHandler - Creating UpdateShardHandler HTTP client with params: socketTimeout=0&connTimeout=0&retry=false [main] INFO org.apache.solr.logging.LogWatcher - SLF4J impl is org.slf4j.impl.SimpleLoggerFactory [main] INFO org.apache.solr.logging.LogWatcher - No LogWatcher configured [main] INFO org.apache.solr.core.CoreContainer - Host Name: null [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - new SolrResourceLoader for directory: '/Users/carlroberts/dev/solr-4.10.3/db/' [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrConfig - Adding specified lib dirs to ClassLoader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/aspectjrt-1.6.11.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/boilerpipe-1.1.0.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/commons-compress-1.7.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/dom4j-1.6.1.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/fontbox-1.8.4.jar' to classloader [coreLoadExecutor-5-thread-1] INFO org.apache.solr.core.SolrResourceLoader - Adding 'file:/Users/carlroberts/dev/solr-4.10.3/contrib/extraction/lib/icu4j-53.1.jar' to classload
Re: Errors using the Embedded Solar Server
Ah, OK, you need to include a logging jar in your classpath - the log4j and slf4j-log4j jars in the solr distribution will help here. Once you've got some logging set up, then you should be able to work out what's going wrong! Alan Woodward www.flax.co.uk On 21 Jan 2015, at 16:53, Carl Roberts wrote: > So far I have not been able to get the logging to work - here is what I get > in the console prior to the exception: > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > db > /Users/carlroberts/dev/solr-4.10.3/ > false > {} > [] > /Users/carlroberts/dev/solr-4.10.3/ > > > On 1/21/15, 11:50 AM, Alan Woodward wrote: >> That certainly looks like it ought to work. Is there log output that you >> could show us as well? >> >> Alan Woodward >> www.flax.co.uk >> >> >> On 21 Jan 2015, at 16:09, Carl Roberts wrote: >> >>> Hi, >>> >>> I have downloaded the code and documentation for Solr version 4.10.3. >>> >>> I am trying to follow SolrJ Wiki guide and I am running into errors. The >>> latest error is this one: >>> >>> Exception in thread "main" org.apache.solr.common.SolrException: No such >>> core: db >>>at >>> org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:112) >>>at >>> org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124) >>>at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68) >>>at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54) >>>at solr.Test.main(Test.java:39) >>> >>> My code is this: >>> >>> package solr; >>> >>> import java.io.File; >>> import java.io.IOException; >>> import java.util.ArrayList; >>> import java.util.Collection; >>> >>> import org.apache.solr.client.solrj.SolrServerException; >>> import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; >>> import org.apache.solr.common.SolrInputDocument; >>> import org.apache.solr.core.CoreContainer; >>> import org.apache.solr.core.SolrCore; >>> >>> >>> public class Test { >>>public static void main(String [] args){ >>>CoreContainer container = new >>> CoreContainer("/Users/carlroberts/dev/solr-4.10.3"); >>>System.out.println(container.getDefaultCoreName()); >>>System.out.println(container.getSolrHome()); >>>container.load(); >>>System.out.println(container.isLoaded("db")); >>>System.out.println(container.getCoreInitFailures()); >>>Collection cores = container.getCores(); >>>System.out.println(cores); >>>EmbeddedSolrServer server = new EmbeddedSolrServer( container, "db" >>> ); >>>SolrInputDocument doc1 = new SolrInputDocument(); >>>doc1.addField( "id", "id1", 1.0f ); >>>doc1.addField( "name", "doc1", 1.0f ); >>>doc1.addField( "price", 10 ); >>>SolrInputDocument doc2 = new SolrInputDocument(); >>>doc2.addField( "id", "id2", 1.0f ); >>>doc2.addField( "name", "doc2", 1.0f ); >>>doc2.addField( "price", 20 ); >>>Collection docs = new >>>ArrayList(); >>>docs.add( doc1 ); >>>docs.add( doc2 ); >>>try{ >>>server.add( docs ); >>>server.commit(); >>>server.deleteByQuery( "*:*" ); >>>}catch(IOException e){ >>>e.printStackTrace(); >>>}catch(SolrServerException e){ >>>e.printStackTrace(); >>>} >>>} >>> } >>> >>> >>> My solr.xml file is this: >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> And my db/conf directory was copied from example/solr/collection/conf >>> directory and it contains the solrconfig.xml file and schema.xml file. >>> >>> I have noticed that the documentation that shows how to use the >>> EmbeddedSolarServer is outdated as it indicates I should use >>> CoreContainer.Initializer class which doesn't exist, and >>> container.load(path, file) which also doesn't exist. >>> >>> At this point I have no idea why I am getting the No such core error and I >>> have googled it and there seems to be tons of threads showing this error >>> but for different reasons, and I have tried all the suggested resolutions >>> and get nowhere with this. >>> >>> Can you please help? >>> >>> Regards, >>> >>> Joe >> >
Re: Errors using the Embedded Solar Server
So far I have not been able to get the logging to work - here is what I get in the console prior to the exception: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. db /Users/carlroberts/dev/solr-4.10.3/ false {} [] /Users/carlroberts/dev/solr-4.10.3/ On 1/21/15, 11:50 AM, Alan Woodward wrote: That certainly looks like it ought to work. Is there log output that you could show us as well? Alan Woodward www.flax.co.uk On 21 Jan 2015, at 16:09, Carl Roberts wrote: Hi, I have downloaded the code and documentation for Solr version 4.10.3. I am trying to follow SolrJ Wiki guide and I am running into errors. The latest error is this one: Exception in thread "main" org.apache.solr.common.SolrException: No such core: db at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:112) at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54) at solr.Test.main(Test.java:39) My code is this: package solr; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.SolrCore; public class Test { public static void main(String [] args){ CoreContainer container = new CoreContainer("/Users/carlroberts/dev/solr-4.10.3"); System.out.println(container.getDefaultCoreName()); System.out.println(container.getSolrHome()); container.load(); System.out.println(container.isLoaded("db")); System.out.println(container.getCoreInitFailures()); Collection cores = container.getCores(); System.out.println(cores); EmbeddedSolrServer server = new EmbeddedSolrServer( container, "db" ); SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField( "id", "id1", 1.0f ); doc1.addField( "name", "doc1", 1.0f ); doc1.addField( "price", 10 ); SolrInputDocument doc2 = new SolrInputDocument(); doc2.addField( "id", "id2", 1.0f ); doc2.addField( "name", "doc2", 1.0f ); doc2.addField( "price", 20 ); Collection docs = new ArrayList(); docs.add( doc1 ); docs.add( doc2 ); try{ server.add( docs ); server.commit(); server.deleteByQuery( "*:*" ); }catch(IOException e){ e.printStackTrace(); }catch(SolrServerException e){ e.printStackTrace(); } } } My solr.xml file is this: And my db/conf directory was copied from example/solr/collection/conf directory and it contains the solrconfig.xml file and schema.xml file. I have noticed that the documentation that shows how to use the EmbeddedSolarServer is outdated as it indicates I should use CoreContainer.Initializer class which doesn't exist, and container.load(path, file) which also doesn't exist. At this point I have no idea why I am getting the No such core error and I have googled it and there seems to be tons of threads showing this error but for different reasons, and I have tried all the suggested resolutions and get nowhere with this. Can you please help? Regards, Joe
Re: Errors using the Embedded Solar Server
That certainly looks like it ought to work. Is there log output that you could show us as well? Alan Woodward www.flax.co.uk On 21 Jan 2015, at 16:09, Carl Roberts wrote: > Hi, > > I have downloaded the code and documentation for Solr version 4.10.3. > > I am trying to follow SolrJ Wiki guide and I am running into errors. The > latest error is this one: > > Exception in thread "main" org.apache.solr.common.SolrException: No such > core: db >at > org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:112) >at > org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124) >at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68) >at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54) >at solr.Test.main(Test.java:39) > > My code is this: > > package solr; > > import java.io.File; > import java.io.IOException; > import java.util.ArrayList; > import java.util.Collection; > > import org.apache.solr.client.solrj.SolrServerException; > import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; > import org.apache.solr.common.SolrInputDocument; > import org.apache.solr.core.CoreContainer; > import org.apache.solr.core.SolrCore; > > > public class Test { >public static void main(String [] args){ >CoreContainer container = new > CoreContainer("/Users/carlroberts/dev/solr-4.10.3"); >System.out.println(container.getDefaultCoreName()); >System.out.println(container.getSolrHome()); >container.load(); >System.out.println(container.isLoaded("db")); >System.out.println(container.getCoreInitFailures()); >Collection cores = container.getCores(); >System.out.println(cores); >EmbeddedSolrServer server = new EmbeddedSolrServer( container, "db" ); >SolrInputDocument doc1 = new SolrInputDocument(); >doc1.addField( "id", "id1", 1.0f ); >doc1.addField( "name", "doc1", 1.0f ); >doc1.addField( "price", 10 ); >SolrInputDocument doc2 = new SolrInputDocument(); >doc2.addField( "id", "id2", 1.0f ); >doc2.addField( "name", "doc2", 1.0f ); >doc2.addField( "price", 20 ); >Collection docs = new >ArrayList(); >docs.add( doc1 ); >docs.add( doc2 ); >try{ >server.add( docs ); >server.commit(); >server.deleteByQuery( "*:*" ); >}catch(IOException e){ >e.printStackTrace(); >}catch(SolrServerException e){ >e.printStackTrace(); >} >} > } > > > My solr.xml file is this: > > > > > > > > > > > > > And my db/conf directory was copied from example/solr/collection/conf > directory and it contains the solrconfig.xml file and schema.xml file. > > I have noticed that the documentation that shows how to use the > EmbeddedSolarServer is outdated as it indicates I should use > CoreContainer.Initializer class which doesn't exist, and container.load(path, > file) which also doesn't exist. > > At this point I have no idea why I am getting the No such core error and I > have googled it and there seems to be tons of threads showing this error but > for different reasons, and I have tried all the suggested resolutions and get > nowhere with this. > > Can you please help? > > Regards, > > Joe
Errors using the Embedded Solar Server
Hi, I have downloaded the code and documentation for Solr version 4.10.3. I am trying to follow SolrJ Wiki guide and I am running into errors. The latest error is this one: Exception in thread "main" org.apache.solr.common.SolrException: No such core: db at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:112) at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:68) at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:54) at solr.Test.main(Test.java:39) My code is this: package solr; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.EmbeddedSolrServer; import org.apache.solr.common.SolrInputDocument; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.SolrCore; public class Test { public static void main(String [] args){ CoreContainer container = new CoreContainer("/Users/carlroberts/dev/solr-4.10.3"); System.out.println(container.getDefaultCoreName()); System.out.println(container.getSolrHome()); container.load(); System.out.println(container.isLoaded("db")); System.out.println(container.getCoreInitFailures()); Collection cores = container.getCores(); System.out.println(cores); EmbeddedSolrServer server = new EmbeddedSolrServer( container, "db" ); SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField( "id", "id1", 1.0f ); doc1.addField( "name", "doc1", 1.0f ); doc1.addField( "price", 10 ); SolrInputDocument doc2 = new SolrInputDocument(); doc2.addField( "id", "id2", 1.0f ); doc2.addField( "name", "doc2", 1.0f ); doc2.addField( "price", 20 ); Collection docs = new ArrayList(); docs.add( doc1 ); docs.add( doc2 ); try{ server.add( docs ); server.commit(); server.deleteByQuery( "*:*" ); }catch(IOException e){ e.printStackTrace(); }catch(SolrServerException e){ e.printStackTrace(); } } } My solr.xml file is this: And my db/conf directory was copied from example/solr/collection/conf directory and it contains the solrconfig.xml file and schema.xml file. I have noticed that the documentation that shows how to use the EmbeddedSolarServer is outdated as it indicates I should use CoreContainer.Initializer class which doesn't exist, and container.load(path, file) which also doesn't exist. At this point I have no idea why I am getting the No such core error and I have googled it and there seems to be tons of threads showing this error but for different reasons, and I have tried all the suggested resolutions and get nowhere with this. Can you please help? Regards, Joe