Interestingly, I have run in to this same (or very similar) issue when
attempting to run embedded solr. All of the solr.* classes that were
recently moved to lucene would not work with the solr.* shorthand - I had
to replace them with the full classpath. As you found, these shorthands in
the same schema worked fine from within solr "proper" (webapp).

Is there a workaround for this? (It would be great to have a unified schema
between embedded and webapp solr instances)

Thanks,
     Aaron


On Tue, Dec 4, 2012 at 7:37 AM, Artyom <ice...@mail.ru> wrote:

> After 2 days I have figured out how to open Solr 4 in IntelliJ IDEA 11.1.4
> on
> Tomcat 7. IntelliJ IDEA finds webapp/web/WEB-INF/web.xml and offers to make
> a facet from it and adds this facet to the "parent" module, from which an
> artifact can be created.
>
> The problem is that Solr cannot run properly. I get this message:
>
> SEVERE: Unable to create core: mycore
> org.apache.solr.common.SolrException: Plugin init failure for [schema.xml]
> fieldType "text": Plugin init failure for [schema.xml] analyzer/tokenizer:
> Error loading class 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
>         at
> org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:369)
>         at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:113)
>         at
> org.apache.solr.core.CoreContainer.create(CoreContainer.java:846)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:534)
>         at org.apache.solr.core.CoreContainer.load(CoreContainer.java:356)
>         at
>
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:308)
>         at
>
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:107)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
>         at
>
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
>         at
>
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
>         at
>
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
>         at
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>         at
>
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
>         at
>
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:650)
>         at
>
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1582)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.solr.common.SolrException: Plugin init failure for
> [schema.xml] analyzer/tokenizer: Error loading class
> 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:177)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:344)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)
>         at
>
> org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:43)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
>         ... 25 more
> Caused by: org.apache.solr.common.SolrException: Error loading class
> 'solr.StandardTokenizerFactory'
>         at
>
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:436)
>         at
>
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:457)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.create(AbstractPluginLoader.java:89)
>         at
>
> org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:151)
>         ... 29 more
> Caused by: java.lang.ClassNotFoundException: solr.StandardTokenizerFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at
> java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at
>
> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:420)
>         ... 32 more
>
> I tried to debug it and found it cannot resolve
> 'solr.StandardTokenizerFactory' because it searches this class inside solr,
> when it is inside lucene. I can update my schema.xml and replace all solr
> shorname with full class names, but I don't think it is correct, because
> Solr runs properly with this schema on Tomcat 7 if run not from Intellij
> Idea.
>
> Does anybody know how to solve this problem without expanding "solr."
> shortname into full lucene class names? Or can anybody advise me on proper
> configuring Intellij Idea with Solr 4 on Tomcat 7?
> http://wiki.apache.org/lucene-java/HowtoConfigureIntelliJ didn't help.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Cannot-run-Solr4-from-Intellij-Idea-tp4024233.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Reply via email to