Git Product home page Git Product logo

solr-velocity's People

Contributors

erikhatcher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

solr-velocity's Issues

Solr 8.11.1 standalone, unable to install solritas

I am getting this issue when I try to install win standalone mode. Installing with solr-cloud, it just works fine.
The exception is raised for zookeeper which is not running but the same does not happen with solr-cloud, zookeeper is not running for that mode too.

org.apache.solr.common.SolrException: java.lang.NullPointerException
	at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:182)
	at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:119)
	at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:114)
	at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:101)
	at org.apache.solr.packagemanager.PackageManager.<init>(PackageManager.java:85)
	at org.apache.solr.util.PackageTool.runImpl(PackageTool.java:85)
	at org.apache.solr.util.SolrCLI$ToolBase.runTool(SolrCLI.java:196)
	at org.apache.solr.util.SolrCLI.main(SolrCLI.java:310)
Caused by: java.lang.NullPointerException
	at org.apache.zookeeper.client.ConnectStringParser.<init>(ConnectStringParser.java:54)
	at org.apache.zookeeper.ZooKeeper.createDefaultHostProvider(ZooKeeper.java:1515)
	at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:1108)
	at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:818)
	at org.apache.solr.common.cloud.SolrZooKeeper.<init>(SolrZooKeeper.java:44)
	at org.apache.solr.common.cloud.ZkClientConnectionStrategy.createSolrZooKeeper(ZkClientConnectionStrategy.java:109)
	at org.apache.solr.common.cloud.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:37)
	at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:160)
	... 7 more

ERROR: java.lang.NullPointerException

Am I doing something wrong ?

Please suggest,
Thanks

How to run this in 2023 using Solr 9.3.0

Not really an issue, I just spent some time getting this to work on a modern installation (JDK 11, Solr 9.3.0, python3) and thought this might be helpful for other people:

add-repo Issue

bin/solr package add-repo solritas https://raw.githubusercontent.com/erikhatcher/solritas/master/repo will fail for me with ERROR: Error from server at https://raw.githubusercontent.com/erikhatcher/solritas/master/repo/repository.json?wt=json&version=2.2: Expected mime type in [application/json] but got text/plain.

Seems to be github bitrot, also happens with other repos like the chatman-qa mentioned in README. The solution is to clone the repository as described, then use the localhost URL. The python server will send the correct Content-type header.

In case of python -m SimpleHTTPServer failing with No module named SimpleHTTPServer, use the Python 3 variant:

 $ python3 -m http.server
Serving HTTP on :: port 8000 (http://[::]:8000/) ...

HTTP 500 Error

http://localhost:8983/solr/my_data/browse then failed with:

HTTP ERROR 500 {msg=access denied 
("java.lang.RuntimePermission" "getClassLoader"), trace=java.security.AccessControlException: 
access denied ("java.lang.RuntimePermission" "getClassLoader")

This can be circumvented with SOLR_SECURITY_MANAGER_ENABLED=false in solr.in.sh. This is probably a bad idea and not recommended.

Running Standalone

To use this without the package manager, Solr Cloud, ZK in a plain old single server, it seems to be sufficient to put the Jars somewhere and load them via <lib />:

<!-- solrconfig.xml -->
<config>
  <luceneMatchVersion>9.7.0</luceneMatchVersion>
  <schemaFactory class="ClassicIndexSchemaFactory"/>

<!-- directory contains solritas-0.9.5.jar, velocity-engine-core-2.1.jar, velocity-tools-generic-3.0.jar -->
  <lib dir="/opt/solr/server/solr/filestore/package/solritas/0.9.5/" regex=".*\.jar" />

<!-- now this seems to work like it did in my old Solr 7.7 -->
        <requestHandler name="/velosearch" class="solr.SearchHandler">
            <lst name="defaults">
                <str name="echoParams">explicit</str>
                <str name="wt">velocity</str>
                <str name="v.template">mytemplate</str>
                <str name="v.layout">layout</str>
                <str name="v.properties">velocity.properties</str>
       ....

Thanks for keeping this functionality alive @erikhatcher. I'm totally ok with it not being in modern Solr anymore, but we have a considerable amount of legacy Velocity requestHandlers somebody made roughly ten years ago I needed to get going again :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.