On 01/04/2015 16:33, Francesco Chicchiriccò wrote:
On 01/04/2015 03:32, Alan Evans wrote:
Hello,

I originally stumbled across the syncope.xml[1] file and uncommented and corrected the fields for my database setup (postgres). But I have been running into the problem described in SYNCOPE-606[2] where I get popups reading "Cannot commit when autoCommit is enabled" on the web UI.

I like to original poster did not read the instructions and configure persistence.properties correctly so I set about putting my system right. I commented out the Resource in syncope.xml [1]. I had also installed the 1.2.3 version of the deb so I had to correct coreContext.xml[3] and persistenceContext.xml [4] to update the lines with from "/home/.*" to "/etc/apache-syncope".

Now I am unable to get a session. I suspect my syncope instance isn't connecting to the database despite my /etc/apache-syncope/*.properties files being configured as recommended. I get an error message "Session expired: please login again." and a link to the login page.

This is a correct guess.

I thought ok, I would look at configuring a container managed datasource properly. Editing [5] web.xml and whatnot. I put my Resource back in syncope.xml [1] and edited web.xml [5] per the wiki [6] and also fix persistenceContextEMFactory.xml[7] per SYNCOPE-606 [2].

What is this? SYNCOPE-606 was not a problem, there should be nothing to fix in persistenceContextEMFactory.xml

Now I can login, but when I try to edit a user I get an error "[Unable to obtain a TransactionManager using null.]".

Some questions and observations.
1. The files I edit in /var/lib/tomcat7 are being overwritten when tomcat re-explodes the syncope-war.

Perhaps the deb could contain a pre-exploded application? Fixing the build so that paths don't refer to /home/<user> would help but only with files explicitly moved to /etc/apache-syncope.

2. When I upgraded from 1.2.2 to 1.2.3 the debian package overwrote some of the files in /etc/apache-syncope.

I thought deb pkgs always treated /etc/* as conf files and didn't blatantly overwrite them.

I thought so as well, this does not seem to comply with

https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html#sE.1

This lead me to look at the 'conffiles' of the deb pkg and it mentions syncope-core.xml [8] which doesn't seem to exist. Should that be syncope.xml [1]?

That's correct: would you mind to open an issue about this specific aspect?

Don't mind: I've fixed this problem with SYNCOPE-656 [9].

3. There is an example datasource in syncope.xml [1] but the wiki [6] mentions editing context.xml, which is the correct way? Does it matter?

The wiki page [6] is generally referred to standalone Tomcat instances, you are working instead with a DEB packaged Tomcat which expects a specific context file for each application. Shortly: use syncope.xml.

It might be prudent to move the commented section to the proper location if syncope.xml [1] isn't the proper location.

Regards,
-Alan

[1] /etc/tomcat7/Catalina/localhost/syncope.xml
[2] https://issues.apache.org/jira/browse/SYNCOPE-606
[3] /var/lib/tomcat7/webapps/syncope/WEB-INF/classes/coreContext.xml
[4] /var/lib/tomcat7/webapps/syncope/WEB-INF/classes/persistenceContext.xml
[5] /var/lib/tomcat7/webapps/syncope/WEB-INF/web.xml
[6] https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments#RunSyncopeinrealenvironments-Usedatasource [7] /var/lib/tomcat7/webapps/syncope/WEB-INF/classes/persistenceContextEMFactory.xml
[8] /etc/tomcat7/Catalina/localhost/syncope-core.xml
[9] https://issues.apache.org/jira/browse/SYNCOPE-656

--
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