dspace-cris solr error org.apache.solr.common.SolrException: undefined field id

523 views
Skip to first unread message

alexia.k...@gmail.com

unread,
Jun 16, 2016, 3:46:04 AM6/16/16
to DSpace Technical Support
Hello dear all.

I have installed the latest version of dspace-cris and now I am getting the following error in solr.log which gives me an internal system error on the dspace home page.

2016-06-16 09:43:14,239 ERROR org.apache.solr.core.SolrCore @ org.apache.solr.common.SolrException: undefined field id
at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1269)
at org.apache.solr.schema.IndexSchema$SolrQueryAnalyzer.getWrappedAnalyzer(IndexSchema.java:434)
at org.apache.lucene.analysis.DelegatingAnalyzerWrapper$DelegatingReuseStrategy.getReusableComponents(DelegatingAnalyzerWrapper.java:74)
at org.apache.lucene.analysis.Analyzer.tokenStream(Analyzer.java:175)
at org.apache.lucene.util.QueryBuilder.createFieldQuery(QueryBuilder.java:207)
at org.apache.solr.parser.SolrQueryParserBase.newFieldQuery(SolrQueryParserBase.java:374)
at org.apache.solr.parser.SolrQueryParserBase.getFieldQuery(SolrQueryParserBase.java:742)
at org.apache.solr.parser.SolrQueryParserBase.handleBareTokenQuery(SolrQueryParserBase.java:541)
at org.apache.solr.parser.QueryParser.Term(QueryParser.java:299)
at org.apache.solr.parser.QueryParser.Clause(QueryParser.java:185)
at org.apache.solr.parser.QueryParser.Query(QueryParser.java:107)
at org.apache.solr.parser.QueryParser.TopLevelQuery(QueryParser.java:96)
at org.apache.solr.parser.SolrQueryParserBase.parse(SolrQueryParserBase.java:151)
at org.apache.solr.search.LuceneQParser.parse(LuceneQParser.java:50)
at org.apache.solr.search.QParser.getQuery(QParser.java:141)
at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:148)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:197)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:64)
at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1739)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

any ideas as to what could be causing this problem as I have searched through the forums and i have found nothing helpful so far.

Kind regards,
Alexia


alexia.k...@gmail.com

unread,
Jun 16, 2016, 4:17:11 AM6/16/16
to DSpace Technical Support
I am also getting the following error in the tomcat8 localhost log file

SEVERE [http-nio-8080-exec-6] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [springmvc-rp] in context with path [/jspui] threw exception

[org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.dspace.discovery.SearchServiceException: Expected mime type application/octet-stream but got text/html.<!DOCTYPE html><html><head><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 403 - </h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.32 (Ubuntu)</h3></body></html>] with root cause

 org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream

Andrea Bollini

unread,
Jun 16, 2016, 11:38:55 AM6/16/16
to alexia.k...@gmail.com, DSpace Technical Support
it looks like your dspace instance is not able to connect to SOLR.

<h1>HTTP Status 403 - </h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u>
Which is your configuration of solr? [dspace-install]/config/modules/discovery.cfg (look for the search.server property)

Maybe solr recognize the dspace webapp as a client accessing from a public ip or using ip6 instead that from localhost. If this is the case you can fix that in a context file inside your tomcat, the general one or the one specific for the solr webeapp.

[tomcat]/conf/context.xml

<Context>
    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <Parameter name="LocalhostRestrictionFilter.localhost" value="false" override="false"/>
    <Valve className="org.apache.catalina.valves.RemoteAddrValve"
           allow="xxx\.yyy\.zzz\.kkk|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/>
</Context>

replace xxx\.yyy\.zzz\.kkk with your public ip address.

Hope this help,
Andrea
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


-- 
Andrea Bollini
International Business Development, Deputy Leader
Open Source & Open Standards Strategy, Head
Cineca

Via dei Tizii, 6
00185 Roma, Italy
tel. +39 06 44 486 087 - mob. +39 348 82 77 525
http://www.cineca.it 

alexia.k...@gmail.com

unread,
Jun 17, 2016, 3:01:24 AM6/17/16
to DSpace Technical Support, alexia.k...@gmail.com, a.bo...@cineca.it
Dear Andrea

Thank you for your reply.

My discovery.xml file looks correct - we are still on development mode and the server is accessible only within the local network therefore I am using the internal ip address of the server.. Have a look below.

#---------------------------------------------------------------#
#-----------------DISCOVERY CONFIGURATIONS----------------------#
#---------------------------------------------------------------#
# Configuration properties used solely by the Discovery         #
# faceted-search system.                                        #
#---------------------------------------------------------------#
##### Search Indexing #####

indexer.items.threads = 9

#Enable the url validation of the search.server setting above.
#Defaults to true: validation is enabled
#solr.url.validation.enabled = true

#Char used to ensure that the sidebar facets are case insensitive
#solr.facets.split.char=\n|||\n

# index.ignore-variants = false
# index.ignore-authority = false
index.projection=dc.title,dc.contributor.*,dc.date.issued

# ONLY-FOR-JSPUI: 
# 1) you need to set the DiscoverySearchRequestProcessor in the dspace.cfg 
# 2) to show facet on Site/Community/etc. you need to add a Site/Community/Collection
# Processors plugin in the dspace.cfg

browse.authority.ignore-prefered = true
browse.authority.ignore-variants = true
index.authority.ignore-prefered = true
index.authority.ignore-variants = true
index.authority.skip-invalid = true

Now regarding the [tomcat]/conf/context.xml file I have added the highligted line as you can see below. Please note that this line did not exist in the file previously . 

 <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" 
    allow="172.16.21.12|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"/>

I still get the following solr error

2016-06-17 07:51:40,339 ERROR org.apache.solr.core.SolrCore @ org.apache.solr.common.SolrException: undefined field id
and the followng error in tomcat's localhost.log

17-Jun-2016 07:54:56.864 SEVERE [http-nio-8080-exec-1] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [jsp] in context with path [/jspui] threw exception [org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 59

56:             SiteHomeProcessor[] chp = (SiteHomeProcessor[]) PluginManager.getPluginSequence(SiteHomeProcessor.class);
57:             for (int i = 0; i < chp.length; i++)
58:             {
59:                 chp[i].process(context, request, response);
60:             }
61:         }
62:         catch (Exception e)


Stacktrace:] with root cause
 org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <!DOCTYPE html><html><head><title>Apache Tomcat/8.0.32 (Ubuntu) - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 403 - </h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>Access to the specified resource has been forbidden.</u></p><hr class="line"><h3>Apache Tomcat/8.0.32 (Ubuntu)</h3></body></html>
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:512)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:91)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301)
at org.dspace.discovery.SolrServiceImpl.getSolr(SolrServiceImpl.java:172)
at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1736)
at org.dspace.browse.SolrBrowseDAO.getSolrResponse(SolrBrowseDAO.java:193)
at org.dspace.browse.SolrBrowseDAO.doQuery(SolrBrowseDAO.java:301)
at org.dspace.browse.BrowseEngine.browseMini(BrowseEngine.java:164)
at org.dspace.app.webui.components.RecentSubmissionsManager.getRecentSubmissions(RecentSubmissionsManager.java:96)
at org.dspace.app.webui.components.RecentSiteSubmissions.process(RecentSiteSubmissions.java:53)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:180)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)


Reply all
Reply to author
Forward
0 new messages