headwirecom / aem-solr-search

AEM Solr Search
Apache License 2.0
51 stars 42 forks source link

Errors running Indexing Scripts #8

Closed jonjack closed 8 years ago

jonjack commented 8 years ago

I'm using AEM 6.0.0.SP2 so maybe this is not tested/supported.

Following your setup instructions everything ran fine until I tried the indexing scripts.

AEM6 running with default admin/admin. Jetty running fine via maven as instructed (no port issues). I can browse Solr admin successfully at http://localhost:8888/solr/#/

./index-geometrixx-media-articles.sh 
{"responseHeader":{"status":0,"QTime":22}}
{"responseHeader":{"status":500,"QTime":19},"error":
{"msg":"JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='html><head><title>
 No resource found </'","trace":"org.noggit.JSONParser$ParseException: 
JSON Parse Error: char=<,position=0 BEFORE='<' AFTER='html><head>
<title> No resource found </'\n\tat 
org.noggit.JSONParser.err(JSONParser.java:223)\n\tat 
org.noggit.JSONParser.next(JSONParser.java:622)\n\tat 
org.noggit.JSONParser.nextEvent(JSONParser.java:663)\n\tat 
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:126)\n\tat 
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:106)\n\tat 
org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:68)\n\tat 
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:99)\n\tat 
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)\r\n
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\n\tat 
org.apache.solr.core.SolrCore.execute(SolrCore.java:1976)\n\tat 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)\n\tat 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)\n\tat 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)\n\tat 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)\n\tat 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)\n\tat 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)\n\tat 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)\n\tat 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat 
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\n\tat 
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\n\tat 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat 
org.eclipse.jetty.server.Server.handle(Server.java:485)\n\tat 
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:290)\n\tat 
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)\n\tat 
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:606)\n\tat 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:535)\n\tat 
java.lang.Thread.run(Thread.java:745)\n","code":500}}

Requesting the Sample Geomatrix Search Page at http://localhost:4502/content/aemsolrsearch/aem-solr-search-geo.html produces:

ERROR DURING INCLUDE OF COMPONENT '/APPS/AEMSOLRSEARCH/COMPONENTS/
AJAX-SOLR/BOOTSTRAPSEARCHCONTROLLER'
org.apache.sling.api.scripting.ScriptEvaluationException: 
org.apache.sling.scripting.jsp.jasper.JasperException: The absolute uri: 
http://aemsolrsearch.headwire.com/taglibs/aemsolrsearch-taglib cannot be 
resolved in either web.xml or the jar files deployed with this application
GastonGonzalez commented 8 years ago

Thank you for the reporting this issue. I was able to confirm the issue using the steps below.

Prepare a directory for a clean AEM 6.0 SP2 instance.

$ mkdir ~/opt/aem-6.0-SP2
$ cd ~/opt/aem-6.0-SP2
$ cp ~/dist/cq/aem-6.0/AEM_6.0_Quickstart.jar cq-author-p4502.jar
$ cp ~/dist/cq/aem-6.0/license.properties .

Perform an advanced install so that we can use Java 8.

$ java -jar cq-author-p4502.jar -unpack
$ mkdir crx-quickstart/install
$ cp ~/dist/cq/aem-6.0/AEM\ 6.0\ Service\ Pack\ 2-1.0.zip crx-quickstart/install
$ java -Xmx2048m -XX:MaxPermSize=512M -jar cq-author-p4502.jar

Clone the AEM Solr Search repository.

$ git clone https://github.com/headwirecom/aem-solr-search.git
$ cd aem-solr-search

Deploy AEM Solr Search.

$ mvn clean install -Pauto-deploy-all
$ mvn install -Pauto-deploy-sample
$ mvn install -Pauto-deploy-geo

You are correct, we have not tested AEM Solr Search AEM 6.0 SP2. We have been primarily focused on AEM 6.1 and 5.6.1.

The errors that you are seeing are due to unresolved org.apache.http.* dependencies. As such, the AEM Solr Search OSGi bundles are staying in an Installed state.

We'll investigate further.

GastonGonzalez commented 8 years ago

I believe I have fix for this, please try the following:

  1. Checkout the hot fix branch.
$ cd aem-solr-search
$ git fetch
$ git checkout bug/issue-8
  1. Redeploy the application and Geometrixx Media Sample. After these deployments, check http://localhost:4502/system/console/bundles and ensure that all the AEM Solr Search bundles are Active.
$ mvn clean install -Pauto-deploy-all
$ mvn install -Pauto-deploy-sample
$ mvn install -Pauto-deploy-geo
  1. Restart AEM.
  2. Re-indexing the Geometrixx Media site.
$ cd ../aemsolrsearch-geometrixx-media-sample
$ ./index-geometrixx-media-articles.sh
  1. Visit http://localhost:4502/content/aemsolrsearch/aem-solr-search.html
jonjack commented 8 years ago

Gaston, thanks for looking into this so promptly. I will run your fix this week and feed back.

jonjack commented 8 years ago

Hi Gaston,

Apologies I took so long to get back to this. I re-ran everything from scratch and all went well with the exception of requesting http://localhost:4502/content/aemsolrsearch/aem-solr-search.html which threw an error relating to resolution of taglibs.

ERROR DURING INCLUDE OF COMPONENT '/APPS/AEMSOLRSEARCH/COMPONENTS/AJAX-SOLR/BOOTSTRAPSEARCHCONTROLLER'
ERROR MESSAGE:
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: The absolute uri: http://aemsolrsearch.headwire.com/taglibs/aemsolrsearch-taglib cannot be resolved in either web.xml or the jar files deployed with this application

Update: Seems a bundle had not started up properly.

jonjack commented 8 years ago

I am happy to close this issue however since it seems you have indeed addressed the problem that this issue was originally raised for.