Hi Denis,
this problem is fixed now in the branch 1_1_X; you will need either to build 1.1.8-SNAPSHOT locally or to wait for Jenkins to publish these artifacts (job #181)

https://builds.apache.org/view/S-Z/view/Syncope/job/Syncope-1_1_X/

Regards.

On 25/06/2014 09:54, Denis Signoretto wrote:
Hi Francesco,

thanks for your answer. As you suggested I've changed 
core/src/test/resources/persistence.properties
but I still can't set H2 basedir outside workdir. In core.log I get this 
exception:

org.h2.jdbc.JdbcSQLException: IO Exception: <my-absolute-path> outside 
<standalone-install-dir>/apache-tomcat-7.0.53/work/Catalina/localhost/syncope-build-tools

After some investigation I saw that build-tools project use a second instance 
of H2 and in the class H2StartStopListener
it sets the H2 baseDir to work dir.

I'm not an expert of H2 but it seems baseDir it's a system property that 
affects all instances.

What's the best way to do you suggest to set basedir for syncope db outside 
work ?

Thanks,
Denis.

-----Messaggio originale-----
Da: Francesco Chicchiriccò [mailto:ilgro...@apache.org]
Inviato: martedì 24 giugno 2014 15:35
A: dev@syncope.apache.org
Oggetto: Re: Running Syncope Embed using a permanent h2 instance

On 24/06/2014 15:27, Denis Signoretto wrote:
Hi,
I've checked out Syncope 1_1_X to do some tests. I've seen that Syncope h2 db 
it's created within target directory.
Everytime I launch mvn -P debug, target dir it's deleted.
This means you are directly running from the actual Syncope sources: I'd 
suggest you instead to generate your own project from SNAPSHOT archetype [1] 
and then run in embedded mode [2] via mvn -P embedded.

I'm wondering if is there a way to launch Syncope embed mode/debug profile 
using a permanent h2 location.
I've tried adding a customized persistence.properties file in 
syncope-console\src\resources specifying both absolute and relative path 
outside target dir but it seems workdir it's needed.

Is there a better way to do it or get the same result ?
You can proceed similar to the standalone distribution [3]: only, you need to 
change

core/src/test/resources/persistence.properties

not

core/src/main/resources/persistence.properties

The former is used for tests and for embedded mode, the latter for production, 
e.g. for the WAR to be deployed into a real-world deployment.

HTH
Regards.

[1]
https://cwiki.apache.org/confluence/display/SYNCOPE/Create+a+new+Syncope+project#CreateanewSyncopeproject-Snapshot(development)releases
[2]
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+embedded+mode
[3]
https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution#RunSyncopestandalonedistribution-Internalstorage

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to