JNDI中的/ solr / home在Catalina / localhost / solr.xml中设置了它(No /solr/home in JNDI althought it's set in Catalina/localhost/solr.xml)
我有solr-4.5.0配置为使用tomcat7和zookeeper 3.3.5(来自debian包)根据我在
Catalina/localhost/solr.xml
文件之后创建的许多教程<Context allowlinking="true" crosscontext="true" debug="1" docBase="/var/lib/tomcat7/webapps/solr.war" priviledged="true"> <Environment name="solr/home" override="true" type="java.lang.String" value="/opt/solr/webapps/solr1" /> </Context>
我已经在2台机器上配置solr以在云中工作(使用zookeeper来保持配置)。 在两台机器上,当启动tomcat7时,我在
catalina.out
看到以下错误:11693 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – No /solr/home in JNDI .... 12529 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /var/lib/tomcat7/solr/collection1/solrconfig.xml 12532 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: collection1 org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml
有趣的是,在该文件的开头,我看到:
64 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – Using JNDI solr.home: /opt/solr/webapps/solr1 71 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – new SolrResourceLoader for directory: '/opt/solr/webapps/solr1/'
当然我想在JNDI中配置solr / home,而不是在solr.war中。 知道什么可能是错的吗?
PS:这个问题不是这样的问题的重复: 如何在linux OS中设置solr / home? 并且: 在Tomcat中部署战争不同之处在于我正在定义solr / home但它似乎无法工作。
I have solr-4.5.0 configured to work with tomcat7 and zookeeper 3.3.5 (from debian package) According to many tutorials I have created following
Catalina/localhost/solr.xml
file<Context allowlinking="true" crosscontext="true" debug="1" docBase="/var/lib/tomcat7/webapps/solr.war" priviledged="true"> <Environment name="solr/home" override="true" type="java.lang.String" value="/opt/solr/webapps/solr1" /> </Context>
I have configured solr on 2 machines to work in cloud (using zookeeper to keep configuration). On both machines, when starting tomcat7, I see following error in
catalina.out
:11693 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – No /solr/home in JNDI .... 12529 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Failed to load file /var/lib/tomcat7/solr/collection1/solrconfig.xml 12532 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer – Unable to create core: collection1 org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/collection1/solrconfig.xml
The interesting thing is that in the beggining of that file I see:
64 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – Using JNDI solr.home: /opt/solr/webapps/solr1 71 [localhost-startStop-1] INFO org.apache.solr.core.SolrResourceLoader – new SolrResourceLoader for directory: '/opt/solr/webapps/solr1/'
Of course I would like to configure solr/home in JNDI, not in solr.war. Any idea what might be wrong?
P.S.: This question is not a duplicate of questions like this: How to set solr/home in linux OS? and this: deploy war in Tomcat The difference is that I am defining solr/home but it seems not to work.
原文:https://stackoverflow.com/questions/19718127
最满意答案
Cursor sName = ourDatabase.rawQuery("SELECT * FROM " + TABLE_NAME + " WHERE " + Pro_Name + "= '"+ Pname +"'", null);
Cursor sName = ourDatabase.rawQuery("SELECT * FROM " + TABLE_NAME + " WHERE " + Pro_Name + "= '"+ Pname +"'", null);
相关问答
更多-
TCP/IP模型是一个________。[2023-10-02]
a -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
没有这样的列错误(No such a Column error)[2024-02-01]
Cursor sName = ourDatabase.rawQuery("SELECT * FROM " + TABLE_NAME + " WHERE " + Pro_Name + "= '"+ Pname +"'", null); Cursor sName = ourDatabase.rawQuery("SELECT * FROM " + TABLE_NAME + " WHERE " + Pro_Name + "= '"+ Pname +"'", null); -
这里的问题是,在模型仍在加载且应用程序未完全初始化时,您正在查询数据库: File "/Users/hugokitano/Documents/Summer_Code/statread/stats/models.py", line 40, in CompareForm select = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,required=False,choices=( (x.id, x.con_name) for x i ...
-
您无法在生成它的同一select语句中引用列别名,这为您提供了两个选择: SELECT ((interest_step / 12) * 365 + (MOD(interest_step, 12) * 30)) AS "days" FROM "negotiations"."addon" WHERE (((interest_step / 12) * 365 + (MOD(interest_step, 12) * 30)) <= 72) 要么 SELECT * FROM ( SELECT ((intere ...
-
您似乎一次从Web前端获取一个数据库记录的内容。 既然如此,您可以按照以下方式将记录构建为列表并将其插入到数据库中。 import sqlite3 conn = sqlite3 . connect ( 'db.sqlite' ) c = conn . cursor ( ) c.execute("""CREATE TABLE IF NOT EXISTS keys(name TEXT, po TEXT, options TEXT, identifier TEXT, currtime TEXT)""") o ...
-
SQLite错误:没有这样的列:(SQLite Error: no such column:)[2023-04-22]
您正在使用字符串从数据库中进行选择。 该字符串不在引号中,因此应该是一列。 这就是错误说该列不存在的原因,并不是说_id不存在。 用单引号包装值,它将起作用。 并确保它不是用户指定的值或您将有SQL注入的可能性。 使用参数。 You are using a string to select from the database. The string is not in quotes so it is expected to be a column. That is why the error says th ... -
这是你的查询: SELECT DISTINCT Q1.IntegrationItemCategoryLevelID, A1.ShortDesc FROM ((_Item I INNER JOIN (_ItemToItemCategory Q0 INNER JOIN _ItemCategory A0 ON A0.IntegrationItemCategoryID = Q0.IntegrationItemCategoryID ) ON ...
-
我想你错过了一个等号: Cursor c = ourDatabase.query(DATABASE_TABLE, column, KEY_ROWID + "" + l, null, null, null, null); 改成: Cursor c = ourDatabase.query(DATABASE_TABLE, column, KEY_ROWID + " = " + l, null, null, null, null); I think you missed a equal sign at: Cu ...
-
SQLite Select ... Where语句“没有这样的列”错误(SQLite Select…Where statement “no such column” error)[2022-11-15]
你需要围绕值的单引号。 "SELECT * FROM HISTORICALPICKS WHERE BETTYPE = '" + betType.ToString().ToUpper() + "' ORDER BY DATETIME ASC" You need single quotes around the value. "SELECT * FROM HISTORICALPICKS WHERE BETTYPE = '" + betType.ToString().ToUpper() + "' ORDER B ...