Hot to load external properties file in log4j2 2.1.9. version
tried context.setConfigLocation(new File(filepath).toURI()); but not working
Related
Getting the following error on neo4j server startup with the apoc plugin.
Have copied the jar to the plugins folder.
Caused by:
org.neo4j.kernel.api.exceptions.ComponentInjectionException: Unable to
set up injection for procedure 'Static', the field 'apocConfig' has
type 'class apoc.ApocConfig' which is not a known injectable component
Neo4j version: 4.0.4
Apoc version: 4.0.0.13
What could be the problem?
I would suggest reviewing the installation procedure to see if you missed any steps,
https://neo4j.com/docs/operations-manual/current/installation/linux/
Also, double check the java version that neo4j is using, and check if there are any other local java environment factors specific to this install. class paths, other jars, etc.
We were having the same issue with neo4j 4.x and custom plugin folder.
Updating custom plugin folder in neo4j config didn't work, we had to add folder (or extension) into java CP (classpath) as well.
It worked in 3.x neo4j version without adding a folder into the classpath.
Try to make sure that you have plugins folder listed in -cp and might work for you.
Similar to Ilija's problem, our embedded database (using Eclipse with the Maven plugin) did not like our custom plugin folder.
Since the database was for setup and then deployment (effectively 2 separate things), we could move the database from the default Neo4j directory after it was setup.
As a test, you could delete the contents of your plugin folder and see if it works then.
After i updated my project from Grails 3.1.11 to 3.2.0 the project has stopped working.
When i start proj from IDE, it works fine. But when i pack it to jar and try to run in terminal, BootStrap.groovy does not execute.
What is the problem?
I just found an issue on GitHub. Now BootStrap.groovy and UrlMappings.groovy should be in the default package
Default package is indicated in application.yml
grails:
codegen:
defaultPackage: com.example.app
Migration docs has no information about this issue yet..
sergey Linnik's answer is correct the Bootstrap.groovy file should be in a default package, but lookout when using a IDE (in my case Intellij 2016.2.4) for refactoring the Bootstrap.groovy class from the init folder to a default package that it adds
package default //ensure the package folder is added
class BootStrap {///}
Otherwise when building the grails application it moves the Bootstrap.groovy file out of the default package again because the refactoring didn't update it. Not sure if it's an intellij bug or not..
I have recently installed Neo4j 3.0, and since I need to enable outside access, I need the configuration file, and where in the 2.3.3 the configuration files were located in within the /var/lib/neo4j/ structure.
I am not able to locate them anywhere in the 3.0 version. I know it have changed name to neo4j.conf.
My folder structure in the above directory is:
plugins
import
data
certificates
I am running Ubuntu 16.04 (Xenial Xerus).
I have tried the documentation. However, that doesn't describe the location. I also already tried "find -name "neo4j.conf" without luck.
[UPDATED]
According to the 3.0.0 Operations Manual, the default location of the config file for "Debian" is:
/etc/neo4j/neo4j.conf
Unable to reload grails application at runtime, My current development environment:
Grails app version 2.4.3
JDK: 1.7.0_21
I have added following setting in my BuildConfig file
grails.servlet.version = "3.0"
grails.reload.enabled = true
Some links
After going through different stack overflow links such as,
Grails auto-reloading new controller actions
I Checked springloaded jar file, tested app by replacing jar with snapshot jar from here.
Checked java version required by Grails 2.4.3
After checking some JIRA issues, I upgraded my Java version to latest java 1.7 version and tested app.
What is affecting to reload app at runtime?
grails -reloading run-app
after this your application starts reloading automatically.
After lots many debugging and checking online resources I succeeded to reload my app
Solution:
While running my grails app, I come across some java ioexception (user limit of inotify watches reached) which was restricting reloading of my grails app.
Updated system inotify watch limit link
Replaced springloaded jar shipped with grails 2.4.3 with snapshot version
(Check this link https://jira.grails.org/browse/GRAILS-11728)
I just downloaded the milestone edition grails 2.3.0 M2 .zip from the grails page and extracted in the c:\ directory after which it created the folder : C:\grails-2.3.0.M2.
Then I added C:\grails-2.3.0.M2\bin to the path system variable. After that when I try to run grails from command line (using C:\grails-2.3.0.M2\bin>grails), it gives me the following error:
Error opening zip file or JAR manifest missing : C:/grails-2.2.1/lib/org.springs
ource.springloaded/springloaded-core/jars/springloaded-core-1.1.3.jar
Error occurred during initialization of VM
agent library failed to init: instrument
It is interesting to note that the Jar belongs to the grails-2.2.1 installation folder and not the 2.3.0-m2.
I feel it worth mentioning that I already have grails 2.2.1 in my C drive (C:\grails-2.2.1) and before installing this new version, I was using this version. Also I have removed the old grails bin folder address (C:\grails-2.2.1\bin) from system variables. So anyone can guess what is causing the error?
Check you don't have a %GRAILS_HOME% variable set pointing to the old folder