[ https://issues.apache.org/jira/browse/OFBIZ-6715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15044227#comment-15044227 ] Jacques Le Roux edited comment on OFBIZ-6715 at 12/8/15 1:15 PM: ----------------------------------------------------------------- Hi Ingo, I confirmed the errors you described. 1. I agree to remove the line "<classpath type="dir" location="conf"/>" in ofbiz-compnent.xml. 2. On the exception "threw an unexpected exception (org/apache/http/entity/mime/content/ContentBody)": I moved httpmime-4.4.1.jar from specialpurpose/solr/webapp/solr/WEB-INF/lib to specialpurpose/solr/lib/runtime/ to resolve it. 3. On the login required message "http://localhost:8080/solr: Expected mime type application/octet-stream but got application/json. {"responseHeader":{"message":"To update a Solr index in OFBiz, you have to login first and have the permission to do so.","status":401}}": I added a login request before the update request and made them use same HttpContext to remove this problem. 4. Now I met a problem as following: {code} 2015-12-06 20:25:35,041 |http-bio-8443-exec-1 |SolrProductSearch |E| Error from server at https://localhost:8443/solr/#/solrdefault/update: Expected mime type application/octet-stream but got text/html. <html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - HTTP method POST is not supported by this URL</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>HTTP method POST is not supported by this URL</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.65</h3></body></html> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://localhost:8443/solr/#/solrdefault/update: Expected mime type application/octet-stream but got text/html. <html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - HTTP method POST is not supported by this URL</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>HTTP method POST is not supported by this URL</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.65</h3></body></html> at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:528) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:234) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:226) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:896) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:859) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:874) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.ofbiz.solr.SolrProductSearch.rebuildSolrIndex(SolrProductSearch.java:692) [ofbiz-solr.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz-service.jar:?] at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz-service.jar:?] at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz-service.jar:?] at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz-service.jar:?] at org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz-service.jar:?] at org.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) [ofbiz-webapp.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:92) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:78) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:759) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:476) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:88) [ofbiz-webapp.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) [servlet-api-3.0.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api-3.0.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.65-catalina.jar:7.0.65] at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:323) [ofbiz-webapp.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_60] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] {code} 5. I'll try to work on this issue in the weekend. Regards, was (Author: shi.jinghai): Hi Ingo, I confirmed the errors you described. 1. I agree to remove the line "<classpath type="dir" location="conf"/>" in ofbiz-compnent.xml. 2. On the exception "threw an unexpected exception (org/apache/http/entity/mime/content/ContentBody)": I moved httpmime-4.4.1.jar from specialpurpose/solr/webapp/solr/WEB-INF/lib to specialpurpose/solr/lib/runtime/ to resolve it. 3. On the login required message "http://localhost:8080/solr: Expected mime type application/octet-stream but got application/json. {"responseHeader":{"message":"To update a Solr index in OFBiz, you have to login first and have the permission to do so.","status":401}}": I added a login request before the update request and made them use same HttpContext to remove this problem. 4. Now I met a problem as following: 2015-12-06 20:25:35,041 |http-bio-8443-exec-1 |SolrProductSearch |E| Error from server at https://localhost:8443/solr/#/solrdefault/update: Expected mime type application/octet-stream but got text/html. <html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - HTTP method POST is not supported by this URL</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>HTTP method POST is not supported by this URL</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.65</h3></body></html> org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at https://localhost:8443/solr/#/solrdefault/update: Expected mime type application/octet-stream but got text/html. <html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--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;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 405 - HTTP method POST is not supported by this URL</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>HTTP method POST is not supported by this URL</u></p><p><b>description</b> <u>The specified HTTP method is not allowed for the requested resource.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.65</h3></body></html> at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:528) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:234) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:226) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:896) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:859) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.apache.solr.client.solrj.SolrClient.deleteByQuery(SolrClient.java:874) ~[solr-solrj-5.3.1.jar:5.3.1 1703449 - noble - 2015-09-17 01:48:17] at org.ofbiz.solr.SolrProductSearch.rebuildSolrIndex(SolrProductSearch.java:692) [ofbiz-solr.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100) [ofbiz-service.jar:?] at org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57) [ofbiz-service.jar:?] at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:395) [ofbiz-service.jar:?] at org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:227) [ofbiz-service.jar:?] at org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88) [ofbiz-service.jar:?] at org.ofbiz.webapp.event.CoreEvents.scheduleService(CoreEvents.java:316) [ofbiz-webapp.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_60] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_60] at org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:92) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:78) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:759) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:476) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:213) [ofbiz-webapp.jar:?] at org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:88) [ofbiz-webapp.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:646) [servlet-api-3.0.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [servlet-api-3.0.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.65-catalina.jar:7.0.65] at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:323) [ofbiz-webapp.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) [tomcat-7.0.65-catalina.jar:7.0.65] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_60] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-7.0.65-tomcat-coyote.jar:7.0.65] at java.lang.Thread.run(Unknown Source) [?:1.8.0_60] 5. I'll try to work on this issue in the weekend. Regards, > Solr rebuild problem > -------------------- > > Key: OFBIZ-6715 > URL: https://issues.apache.org/jira/browse/OFBIZ-6715 > Project: OFBiz > Issue Type: Bug > Components: specialpurpose/solr > Affects Versions: Trunk > Reporter: Ingo Wolfmayr > Assignee: Shi Jinghai > Attachments: erromessage.txt, solr_path.patch > > > When I run service "rebuildSolrIndex" I get the following exception: > |E| Request scheduleServiceSync caused an error with the following message: Der Service Dispatcher hat eine Exception geworfen:Service [rebuildSolrIndex] target threw an unexpected exception (org/apache/http/entity/mime/content/ContentBody) > On startup: > |W| Location 'OFBIZHOME/specialpurpose/solr/conf' does not exist > |W| Can't find (or read) directory to add to classloader: lib (resolved as: /OFBIZHOME/specialpurpose/solr/home/lib). -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |