I have downloaded the latest activiti source code(5.21.0),by default the activiti will point to h2 database and I want to change that to postgres.I made changes in db.properties file in-order to point my database.When I restart the activiti-explorer still it's pointing to h2 db. I have added the dependency of postgres in activiti POM file as well. My db.properties file is as follow:
db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbc:postgresql://localhost:5432/activitiDB
jdbc.username=postgres
jdbc.password=password
Can anyone help me to sort it out.
Sagari , did you try modifying the activiti engine as well. There is a configuration file for the same which contains the datasource properties. This can be used as the alternative to the property file approach.
It is elaborated here :
http://www.activiti.org/userguide/
(Database configuration)
Also could you try mvn clean and try running again. May be it will help
How are you running Explorer? Did you do a build of the webapp to get the war.
If so, changing the db.properties is all that's needed indeed. Where did you put that file?
Also, there's no need to clone the source code, you can download the latest zip file from http://activiti.org/download.html, it contains the explorer war file already.
Related
There is Magnolia cms module magnolia-personalization-traits-1.4.6.jar. It uses internally GeoLite2 ip-to-country database. Database is stored in a file info/magnolia/personalization/geoip/GeoLite2-Country.mmdb which is stored in aforementioned jar file. The problem is that database is quite old and out of date.
I would like to update this database file but cannot see any possibility to do that. I tried to put new version of the database file in identical package in my project but that (obviously) failed. Is there any possibility to to update this file?
edit: I'm using Magnolia v 5.5.6
You need to get newer file first on the class path. Best way to achieve that is to put it in /WEB-INF/classes folder of your Tomcat in folder structure identical to that found in jar file.
I'm using neo4j 3.0 on Windows and I try to use stored procedures new feature.
I have built the apoc.jar from github sources.
This jar is copied into plugins repository (C:\Program Files\Neo4j Community\plugins)
I get a Neo.ClientError.Procedure.ProcedureNotFound error when I try to call any apoc stored procedure from neo4j browser.
I tried to follow this post, but dbms configuration parameter does not work for me...
I was having the same problem but then I came to know that I was copying the jar file in the wrong directory. I created a plugins folder in the following directory and copied the jar file in plugins folder then everything started to work.
Path: C:\Users\<username>\Documents\Neo4j\default.graphdb
This is the path where your neo4j instance is residing. While starting neo4j you can see the path of DB for which you are starting Neo4j.
The commenter is right, the Desktop version has these issues for sure. I ran into the same problem on windows but I've switched to the zipped version and everything is working correctly, I was able to deploy the apoc procedures and it is running.
I have a Java Project which includes a config.properties file, in which this config.properties file has property values of paths to some executable files.
I've configured a Git Repository (using EGit eclipse) tool, but the application is simply not working due to the fact that the config.properties file is not included in the Git Repository (in gitignore) since all users who will push/pull to Git will have a different config.properties file. How shall I solve this problem? Is there a way to map the config file without including it to the repository.
Any help is highly appreciated, and I'm quite sure theres a solutions to this problem. 'Thanks in advance.
A way could be to gitignore config.properties, and add a config.properties-template with all parameters and comments explaining how to fill them if needed.
Solved. What I did was to include a piece of code whick will create a config.properties file with default values if none are found. –
I have implemented log4j in my web application project. Project is done using net beans,using tomcat 7.0.41. At first,I created log4j.property file and placed under web page->Web-INF->classes->log4j.properties in net beans and it asks me to locate the file in my project,so I manually located that file to implement log4j in my application. After that I changed the place of the log4j.properties file to myproject->build->web->WEB_INF->classes->log4j.properties in location of my project saved, now its working fine, it did not ask me to manually locate the property file, It takes automatically when my class files executed. Now my problem is that once I committed the project and again checkout the project on some day, property file does not appear and it again ask for property file. So where can I create the log4j property file in my project so that my team mates can utilize it when they checkout project in their system.
Normally you put log4j.properties to src/main/resources/ and it will be copied to the right place by the build process.
I never use net beans, but I think put log4j.properties under Classpath will work.
Not sure how Net Beans handels this, but i think that the "build" directory is where the "compiled" project is put to.
So i would not recommend to put any files there which should be versioned because mostly those directories are ignored for versioning ( see .gitignore files for example when using git).
Resources like property files should be within the sources and your IDE should copy them to the correct place when building the project.
I've done a java aplication that have some images as resources like this:
->src
->resources
->images
For accessing this resources i've used getClass().getResource("/resources/images/img.jpg"), this works fine when i am on eclipse, but when i export the project to a jar the path change to something this genre: "jar:C:/path/deployed.jar!/resources/images/img.jpg".
What i am doing wrong? It is possible to export all the project in one jar?
One more question, this resources include a derby db that dont work either when deployed in jar file
Thanks
Try using getResourceAsStream() instead of getResource() to access resources in your jar file.
One more question, this resources include a derby db that dont work either when deployed in jar file
As Hovercraft stated, Derby DB (meaning the data files, not implementation) won't start from a jar. And it doesn't matter you don't insert anything, Derby needs to open these files for writing. They need to be in a directory where you have writing access.