erikhatcher / solr-velocity Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
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
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:
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://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.
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 :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.