Is it possible to upgrade Solr 6 to use Log4j 2.x?
We have some external dependencies on Solr 6 but would like to upgrade Log4j to the latest.
From the Apache documentation
Apache Solr releases prior to 7.4 (i.e. Solr 5, Solr 6, and Solr 7
through 7.3) use Log4J 1.2.17 which may be vulnerable for installations
using non-default logging configurations that include the JMS Appender,
see
https://github.com/apache/logging-log4j2/pull/608#issuecomment-990494126
for discussion.
A good alternative would be to replace log4j 1.2.17 with reload4j, which is a direct plugin replacement for the log4j jar file. It was developed by one of the companies that developed the original log4j project in response to its recently reported vulnerabilities. You can find more information at the Github project
I am aware of at least one OpenSource project (Alfresco) that is using it successfully.
Related
Yes I know, there are numerous questions and answers since JAXB was removed from JDK 11. But this one is specific.
I've a Wildfly Server (tested with 18.0.1 and 16.0.0) running with the wildfly-camel subsystem 11.0.1 patch applied. The patch installs Camel 2.25.0
Deploying and Hot-Deploying (while the server is up) Camel routes works fine!
Until I deploy Liferay on the same server :-(
Then the Hot-Deploy of a camel route gives me the annoying
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory from [Module "org.apache.camel.spring" version 2.25.0...
exeption.
No matter if I run the server on JDK 11 or JDK 8! Liferay 7.3.2 claims to be runnable on both JDK versions so I guess it has something to with the way Liferay was build.
Reading this article
http://www.descher.at/descher-vu/2019/01/java-11-jaxb-and-osgi/
that the JAXB topic is very complex and far from being resolved.
Question:
How can a deployed application destroy otherwise working classpath resolutions?
And more important:
How to fix it?
I tried removing the 2 jars in question jaxb-api.jar and jaxb-impl.jar from Liferay. But that didn't help.
Turns out that the root cause of the error is a missing dependency to com.sun.xml.bind in the org.apache.camel.spring module of the wildfly-camel patch.
I filed the issue in detail.
Looks like Liferay has nothing to do with it. Because in theory jboss-modules should separate the deployments.
In our application we have encountered impotency issue which is fixed by https://issues.apache.org/jira/browse/CAMEL-9480. we are currently using service mix 5.5.0 with following dependencies.
Activiti 5.17.0
Apache ActiveMQ 5.11.1
Apache Camel 2.15.2
Apache CXF 3.0.4
Apache Karaf 2.4.3 .
So in-order to get fix for CAMEL-9480, i tried to upgrade camel to 2.16.2 by doing service mix upgrade to 5.6.0 which supports following dependencies
Activiti 5.19.0.2
Apache ActiveMQ 5.12.3
Apache Camel 2.16.2
Apache CXF 3.1.4
Apache Karaf 2.4.4
after upgrade i am getting following error during deployment
[caused by: Unable to resolve 295.0: missing requirement [295.0] osgi.wiring.package; (&(osgi.wiring.package=org.eclipse.jetty.util.log)(version>=9.2.0)(!(version>=10.0.0)))]
when i checked camel-jetty-2.16.2.pom,it uses camel-jetty9 and in karaf features its mentioned as below.
<details>camel-jetty9 intend to work with jetty9, so this feature only works in the karaf container which support jetty9, e.g. karaf 4.x</details>
so is it possible to use camel-2.16.2 with karaf 2.4.4 or we need upgrade to karaf 4.x?
There are two bundles and two features:
camel-jetty which support jetty8 (and Karaf 2/3)
camel-jetty9 which support jetty9 and Karaf 4
However, It depends too on the other camel features you use. Some feature uses a feature jetty without versions, other use directly camel-jetty9 or camel-jetty, etc. Sometimes, It necessary to rewrite some feature to fix a version range, but in most case, it works out of the box.
Has anyone been able to use camel-blueprint together with logback? It seems that there are dependencies in camel blueprint which forces you to use log4j even though the log4j dependencies are removed from the pom. After running the project it starts to download the slf4j-log4j12 and then then complains of multiple bindings because it finds both log4j and logback.
I did the same with a camel java project and it worked fine to switch to logback. Does camel-blueprint force you to use log4j as its logging implementation?
Answer found via nabble forum in through discussion with the camel community. For more details go here:
http://camel.465427.n5.nabble.com/camel-blueprint-force-usage-of-log4j-td5772826.html#a5772852
Essentially there are certain dependencies in the maven plugin which uses log4j. For production in JBoss Fuse or Karaf, its Pax logging.
I'm using Alfresco 5.0.c. Recently I've upgraded from Solr 1.4 to Solr 4 (locally and on server).
The problem I've faced with is that custom properties are not indexed anymore.
In Solr 1.4 to index custom properties I was using search.get.config.xml file with following content:
<search>
<default-operator>AND</default-operator>
<default-query-template>
%(cm:name cm:title cm:description
<!--custom properties-->
xz:personStatus xz:username xz:typeName xz:orgUnit xz:fullName
TEXT TAG)
</default-query-template>
</search>
But it seems that for Solr 4 this approach doesn't work.
How I can tell Solr 4 to index custom properties?
Another related question.
I installed clean version of alfresco 5.0.c using maven sdk and found out that out of the box it uses solr 1.4 not solr 4 as it was advertized.
In pom.xml of solr artifact-id is alfresco-solr not alfresco-solr4.
Do I miss something?
In my experience I installed Alfresco community 5.0.c using the setup wizard and, as stated in the docs Alfresco SolR4 installation and configuration
The Solr 4 search subsystem is installed by default when you install Alfresco One 5.0 using the setup wizards (installer)
I can assure you that my custom properties are successfully indexed.
Inspecting the Alfresco nexus repository I can see that the correct dependency for 5.0.c is alfresco-solr, whereas under the org.apache.solr.apache-solr branch there is a latest 1.4.1-alfrescopatched-20141112 dependency
For more info take a look here Alfresco SDK 2.0.0
I am using Solr 1.4 , by default it comes with web application deployed as "solr.war" in webapps directory in example .
I tried to upgrade to solr 3.1 , but this vesrion (3.1) doesn't have attached web admin interface ,
I copied the solr.war from 1.4 and put it in webapps in 3.1
but this will lunch the 1.4 version of solr rather than 3.1 , I wanted to use edismax feature in 3.1 and other features and improvements ,
Please how can I use ediamx or give me regular steps to upgrade to solr 3.1 or even compile from source !!!
Thank you
Solr 3.1 does have a web admin interface. The web application archive is in the dist directory of the official distribution, the file is named apache-solr-3.1.0.war
download the source package for 3.1
and run "ant example" to build the example solr application
the new war for 3.1 should be under solr/example/webapp dir.
you will need to add the following config in your solrconfig.xml
<luceneMatchVersion>LUCENE_31</luceneMatchVersion>
also make sure your "unique id" field in schema.xml is of type string