Topia-devel
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 323 discussions
Hello,
Sur topia y'a plein de branches existantes et qui m'est avis ne servent à rien sauf
topia-2.6-maintenance/
Elles seront supprimées la semaine prochaine sauf avis contraire.
Les voicis :
tchemit@tc:~/projets/nuiton-central$ svn list http://svn.nuiton.org/svn/topia/branches
2.0.28.1/
2.1.6.x/
2.6.x-jta/
codelutin/
from2.2.2-eugene2-beta/
generators-refactoring/
hibernate_to_jpa_migration/
poussin/
topia-2.6-maintenance/
topia-2.6.x/
topia1-trunk/
--
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit(a)codelutin.com
http://www.codelutin.com
1
0
See <http://ci.nuiton.org/jenkins/job/topia/1434/>
------------------------------------------
[...truncated 914 lines...]
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,36] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,59] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,91] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,114] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,148] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[192,171] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[194,40] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[194,63] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[195,38] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[195,61] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[196,37] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[196,60] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[203,39] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[205,36] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[237,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[238,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[239,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[241,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[242,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[243,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[244,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[246,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[247,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[248,20] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[73,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[74,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[75,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[161,49] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[168,49] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[176,51] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[184,51] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[190,39] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[201,39] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[207,38] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[218,38] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[235,52] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[236,51] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationOperationTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[68,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[69,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[70,12] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[151,35] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[169,38] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[169,85] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[182,28] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[182,54] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[184,25] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[184,54] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[185,29] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[185,55] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[187,26] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[187,55] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,31] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,54] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,86] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,109] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,143] error: cannot find symbol
[ERROR] symbol: class TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[197,166] error: cannot find symbol
[ERROR] symbol: variable TopiaTckItEntityEnum
location: class TopiaReplicationServiceImplAllTest
<http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/s…>:[206,37] error: cannot find symbol
[INFO] 85 errors
[INFO] -------------------------------------------------------------
projectFailed org.nuiton.topia:topia-service-replication:3.0-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ToPIA ............................................. SUCCESS [6.300s]
[INFO] ToPIA :: Persistence .............................. SUCCESS [16.660s]
[INFO] ToPIA :: Persistence :: Test Compatibility Kit .... SUCCESS [15.284s]
[INFO] ToPIA :: Persistence :: Hibernate ................. SUCCESS [1:10.382s]
[INFO] ToPIA :: Service Replication ...................... FAILURE [1.677s]
[INFO] ToPIA :: Service Migration ........................ SKIPPED
[INFO] ToPIA :: Service Security ......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:52.673s
[INFO] Finished at: Wed May 23 12:40:32 CEST 2012
[INFO] Final Memory: 32M/192M
[INFO] ------------------------------------------------------------------------
Projects to build: [MavenProject: org.nuiton:topia:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/pom.xml,> MavenProject: org.nuiton.topia:topia-persistence:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence/pom.xml,> MavenProject: org.nuiton.topia:topia-persistence-tck:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-tck/pom.x…,> MavenProject: org.nuiton.topia:topia-persistence-hibernate:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-hibernate…,> MavenProject: org.nuiton.topia:topia-service-replication:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/p…,> MavenProject: org.nuiton.topia:topia-service-migration:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-migration/pom…,> MavenProject: org.nuiton.topia:topia-service-security:3.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-security/pom.…]>
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-migration/pom…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-service-migration/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-service-migration/3.0-SNAPSHOT/topia-service-migration-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/pom.xml> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton$topia/builds/2012-05-23_12-38-35/archive/org.nuiton/topia/3.0-SNAPSHOT/topia-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/target/topia-3.0-SNAPSHOT-s…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton$topia/builds/2012-05-23_12-38-35/archive/org.nuiton/topia/3.0-SNAPSHOT/topia-3.0-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence/pom.xml> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence/3.0-SNAPSHOT/topia-persistence-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence/target/to…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence/3.0-SNAPSHOT/topia-persistence-3.0-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-replication/p…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-service-replication/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-service-replication/3.0-SNAPSHOT/topia-service-replication-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-service-security/pom.…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-service-security/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-service-security/3.0-SNAPSHOT/topia-service-security-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-tck/pom.x…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence-tck/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence-tck/3.0-SNAPSHOT/topia-persistence-tck-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-tck/targe…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence-tck/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence-tck/3.0-SNAPSHOT/topia-persistence-tck-3.0-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-hibernate…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence-hibernate/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence-hibernate/3.0-SNAPSHOT/topia-persistence-hibernate-3.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/topia/ws/trunk/topia-persistence-hibernate…> to /var/local/jenkins/data/jobs/topia/modules/org.nuiton.topia$topia-persistence-hibernate/builds/2012-05-23_12-38-35/archive/org.nuiton.topia/topia-persistence-hibernate/3.0-SNAPSHOT/topia-persistence-hibernate-3.0-SNAPSHOT.jar
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.4:testCompile (default-testCompile) on project topia-service-replication: Compilation failure
cause : Compilation failure
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.4:testCompile (default-testCompile) on project topia-service-replication: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:678)
at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
channel stopped
1
9
Hello,
Dans ToPIA on a un certain nombres de modules non activités.
Il serait bon qu'on statut sur leur devenir dans ToPIA 3.0
topia-tutorial
--------------
Perso, je pense que c'est pas une bonne idée pour les raisons suivantes :
- personne ne va le maintenir (en tout cas pas moi)
- mieux vaut écrire de bonnes documentations pour les utilisateurs ou bien un archetype.
- ça rajoute du travail
topia-soa
---------
A supprimer pour moi, car non utilisé depuis trop longtemps (donc pas de reel besoin)...
topia-service-history
---------------------
Tentative de service d'historisation, désactivé car pas fonctionnel (et depuis longtemps)
topia-service-index
-------------------
Tentative de service d'indexation, désactivé car pas fonctionnel (et depuis longtemps)
Dans ToPIA 3.0 je serais d'avis qu'on supprime tout et on réintroduira de nouveaux modules quand on aura les bonnes solutions
techniques pour les coder. Autrement dit que ToPIA soit pleinement fonctionnel. Dans tous les cas rien n'est perdu avec le svn...
--
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit(a)codelutin.com
http://www.codelutin.com
4
3
21 May '12
Au niveau des exceptions
------------------------
Il faut vraiment qu'on rediscute de la manière de gérer les excpetions.
Il me semblait qu'on avait de parler des exceptions spécifiques et la je vois
du new TopiaException(...) partout :(
De plus certaines fois on utilise des TopiaException et des fois des IllegalStateException
faudrait aussi qu'on revoit ça car le fait que le context topia par exemple est fermé pour moi c'est du ISE...
Utiliser l'api de guava Preconditions plutôt que faire des if (xx ==null) throw new NPE(); (idem pour les ISE)
Pour la réplication
-------------------
Je comprends pas les noms utilisés :
- receiveReplicatedEntity ? ça veut dire quoi ? moi j'aurai mis replicate tout simplement
- replicateOnDestinationContext ? euh je préfèrerais mon replicate0 ...
Begin forwarded message:
Date: Tue, 15 May 2012 16:47:31 +0200 (CEST)
From: athimel(a)users.nuiton.org
To: topia-commits(a)list.nuiton.org
Subject: [Topia-commits] r2484 - in trunk: topia-persistence/src/main/java/org/nuiton/topia/framework topia-persistence/src/main/java/org/nuiton/topia/persistence/util topia-persistence/src/main/resources/i18n topia-persistence-hibernate/src/main/java/org/nuiton/topia/persistence
Author: athimel
Date: 2012-05-15 16:47:30 +0200 (Tue, 15 May 2012)
New Revision: 2484
Url: http://nuiton.org/repositories/revision/topia/2484
Log:
Implement 'replicate' operation (Hibernate only)
Remove i18n exception messages
Modified:
trunk/topia-persistence-hibernate/src/main/java/org/nuiton/topia/persistence/TopiaHibernateSpecificUtil.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaSpecificUtil.java
trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java
trunk/topia-persistence/src/main/resources/i18n/topia-persistence_en_GB.properties
trunk/topia-persistence/src/main/resources/i18n/topia-persistence_es_ES.properties
trunk/topia-persistence/src/main/resources/i18n/topia-persistence_fr_FR.properties
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImpl.java 2012-05-15 14:47:30 UTC (rev 2484)
@@ -35,6 +35,7 @@
import org.nuiton.topia.TopiaContextFactory;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.TopiaNotFoundException;
+import org.nuiton.topia.TopiaRuntimeException;
import org.nuiton.topia.event.TopiaContextListener;
import org.nuiton.topia.event.TopiaEntitiesVetoable;
import org.nuiton.topia.event.TopiaEntityListener;
@@ -75,7 +76,6 @@
import java.util.WeakHashMap;
import java.util.zip.GZIPInputStream;
-import static org.nuiton.i18n.I18n._;
//import org.hibernate.EntityMode;
//import org.hibernate.ReplicationMode;
@@ -333,13 +333,13 @@
}
@Override
- public TopiaSpecificUtil getSpecificUtil() throws TopiaException {
+ public TopiaSpecificUtil getSpecificUtil() {
TopiaSpecificUtil result = specificUtil;
if (getParentContext() != null) {
result = getParentContext().getSpecificUtil();
}
if (result == null) {
- throw new TopiaException("No TopiaSpecificUtil found.");
+ throw new TopiaRuntimeException("No TopiaSpecificUtil found.");
}
return result;
}
@@ -455,76 +455,6 @@
// } else {
// hibernateConfiguration = new Configuration();
//
-// // Ajout du listeners pour les events
-// TopiaFiresSupport.TopiaHibernateEvent listener =
-// new TopiaFiresSupport.TopiaHibernateEvent(this);
-//
-// PreInsertEventListener[] preInsertEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPreInsertEventListeners();
-// preInsertEventListeners = ArrayUtil.concatElems(
-// preInsertEventListeners, listener);
-//
-// PreLoadEventListener[] preLoadEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPreLoadEventListeners();
-// preLoadEventListeners = ArrayUtil.concatElems(
-// preLoadEventListeners, listener);
-//
-// PreUpdateEventListener[] preUpdateEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPreUpdateEventListeners();
-// preUpdateEventListeners = ArrayUtil.concatElems(
-// preUpdateEventListeners, listener);
-//
-// PreDeleteEventListener[] preDeleteEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPreDeleteEventListeners();
-// preDeleteEventListeners = ArrayUtil.concatElems(
-// preDeleteEventListeners, listener);
-//
-// PostInsertEventListener[] postInsertEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPostInsertEventListeners();
-// postInsertEventListeners = ArrayUtil.concatElems(
-// postInsertEventListeners, listener);
-//
-// PostLoadEventListener[] postLoadEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPostLoadEventListeners();
-// postLoadEventListeners = ArrayUtil.concatElems(
-// postLoadEventListeners, listener);
-//
-// PostUpdateEventListener[] postUpdateEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPostUpdateEventListeners();
-// postUpdateEventListeners = ArrayUtil.concatElems(
-// postUpdateEventListeners, listener);
-//
-// PostDeleteEventListener[] postDeleteEventListeners =
-// hibernateConfiguration.getEventListeners().
-// getPostDeleteEventListeners();
-// postDeleteEventListeners = ArrayUtil.concatElems(
-// postDeleteEventListeners, listener);
-//
-// hibernateConfiguration.getEventListeners().
-// setPreInsertEventListeners(preInsertEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPreLoadEventListeners(preLoadEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPreUpdateEventListeners(preUpdateEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPreDeleteEventListeners(preDeleteEventListeners);
-//
-// hibernateConfiguration.getEventListeners().
-// setPostInsertEventListeners(postInsertEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPostLoadEventListeners(postLoadEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPostUpdateEventListeners(postUpdateEventListeners);
-// hibernateConfiguration.getEventListeners().
-// setPostDeleteEventListeners(postDeleteEventListeners);
-//
// // ajout des repertoires contenant les mappings hibernate
// String[] dirs = getConfig().getProperty(
// TopiaContextFactory.CONFIG_PERSISTENCE_DIRECTORIES, "").split(",");
@@ -552,13 +482,14 @@
public <E extends TopiaEntity> TopiaDAO<E> getDAO(Class<E> entityClass)
throws TopiaException {
if (entityClass == null) {
- throw new IllegalArgumentException(
- _("topia.persistence.error.null.param",
- "entityClass", "getDAO"));
+ String message = String.format(
+ "The method '%s' requires a non null parameter '%s'.",
+ "getDAO", "entityClass");
+ throw new IllegalArgumentException(message);
}
if (equals(getRootContext())) {
throw new TopiaException(
- _("topia.persistence.error.rootContext.access"));
+ "You are on root context, you MUST open a transaction to perform any database access.");
}
Set<EntityType<?>> entities = getEntityManagerFactory().getMetamodel().getEntities();
boolean found;
@@ -575,8 +506,8 @@
// if (!found) {
// log.info(_("topia.persistence.supported.classes.for.context",
// getEntityManagerFactory().getMetamodel().getEntities()));
-// throw new TopiaException(
-// _("topia.persistence.error.unsupported.class",
+// throw new TopiaException(String.format(
+// "Entity type '%s' not managed by this context, you probably forgot to declare it.",
// entityClass.getName()));
// }
@@ -616,7 +547,7 @@
@Override
public TopiaContext beginTransaction() throws TopiaException {
- checkClosed(_("topia.persistence.error.context.is.closed"));
+ checkClosed("beginTransaction");
TopiaContextImpl result = new TopiaContextImpl(this);
EntityManagerFactory factory = getEntityManagerFactory();
@@ -651,9 +582,8 @@
}
throw new TopiaException(
- _("topia.persistence.error.open.transaction.failed",
- eee.getMessage()),
- eee);
+ "An error occured while getting a new transaction : "
+ + eee.getMessage(), eee);
}
// 20081217 : add child AFTER EntityManager opening
@@ -666,12 +596,12 @@
@Override
public void commitTransaction() throws TopiaException {
- if (equals(getRootContext())) {
- throw new TopiaException(_("topia.persistence.error.unsupported.operation.on.root.context",
- "commit"));
+ boolean isRootContext = equals(getRootContext());
+ if (isRootContext) {
+ String message = String.format("Operation '%s' is not permitted on root context", "commitTransaction");
+ throw new TopiaException(message);
}
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "commit"));
+ checkClosed("commitTransaction");
try {
// for (TopiaDAO<? extends TopiaEntity> dao : daoCache.values()) {
@@ -697,19 +627,20 @@
// hibernate = getEntityManagerFactory().openSession();
// hibernate.setFlushMode(FlushMode.NEVER);
} catch (Exception eee) {
- throw new TopiaException(_("topia.persistence.error.on.commit",
- eee.getMessage()), eee);
+
+ throw new TopiaException(
+ "An error occured during commit operation : " +
+ eee.getMessage(), eee);
}
}
@Override
public void rollbackTransaction() throws TopiaException {
if (equals(getRootContext())) {
- throw new TopiaException(_("topia.persistence.error.unsupported.operation.on.root.context",
- "rollback"));
+ String message = String.format("Operation '%s' is not permitted on root context", "rollbackTransaction");
+ throw new TopiaException(message);
}
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "rollback"));
+ checkClosed("rollbackTransaction");
try {
// for (TopiaDAO<? extends TopiaEntity> dao : daoCache.values()) {
// // TODO-fdesbois-20100507 : need to be removed for 2.5 version
@@ -735,15 +666,15 @@
} catch (PersistenceException eee) {
throw new TopiaException(
- _("topia.persistence.error.on.rollback",
- eee.getMessage()), eee);
+ "An error occured during rollback operation : " +
+ eee.getMessage(), eee);
}
}
@Override
public void closeContext() throws TopiaException {
// Throw exception if context is already closed
- checkClosed(_("topia.persistence.error.context.already.closed"));
+ checkClosed("closeContext");
// FD-20100421 : Ano #546 : no need to copy childContexts, the
// {@link #getChildContext()} provides a thread-safe copy to iterate
@@ -793,8 +724,9 @@
return closed;
}
- protected void checkClosed(String message) throws TopiaException {
+ protected void checkClosed(String method) throws TopiaException {
if (closed) {
+ String message = String.format("This context is closed, unable to perform operation '%s'", method);
throw new TopiaException(message);
}
}
@@ -919,8 +851,7 @@
@SuppressWarnings({"unchecked"})
@Override
public TopiaEntity findByTopiaId(String id) throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "findById"));
+ checkClosed("findByTopiaId");
Class<TopiaEntity> entityClass = TopiaId.getClassName(id);
TopiaDAO<TopiaEntity> dao = getDAO(entityClass);
@@ -941,8 +872,7 @@
@Override
public List<?> find(String hql, Object... args) throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "find"));
+ checkClosed("find");
try {
Query query = getEntityManager().createQuery(hql);
@@ -965,16 +895,15 @@
result = firesSupport.fireEntitiesLoad(this, result);
return result;
} catch (PersistenceException eee) {
- throw new TopiaException(_("topia.persistence.error.on.query",
- hql, eee.getMessage()), eee);
+ String message = String.format("An error occured (%s) during a query operation : %s", eee.getMessage(), hql);
+ throw new TopiaException(message, eee);
}
}
@Override
public List<?> find(String hql, int startIndex, int endIndex, Object... args)
throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "find"));
+ checkClosed("find");
try {
Query query = getEntityManager().createQuery(hql);
@@ -997,8 +926,8 @@
result = firesSupport.fireEntitiesLoad(this, result);
return result;
} catch (PersistenceException eee) {
- throw new TopiaException(_("topia.persistence.error.on.query",
- hql, eee.getMessage()), eee);
+ String message = String.format("An error occured (%s) during a query operation : %s", eee.getMessage(), hql);
+ throw new TopiaException(message, eee);
}
}
@@ -1012,8 +941,7 @@
*/
@Override
public int execute(String hql, Object... args) throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "find"));
+ checkClosed("execute");
try {
Query query = getEntityManager().createQuery(hql);
@@ -1023,15 +951,14 @@
int result = query.executeUpdate();
return result;
} catch (PersistenceException eee) {
- throw new TopiaException(_("topia.persistence.error.on.query",
- hql, eee.getMessage()), eee);
+ String message = String.format("An error occured (%s) during a query operation : %s", eee.getMessage(), hql);
+ throw new TopiaException(message, eee);
}
}
@Override
public void add(TopiaEntity e) throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "add"));
+ checkClosed("add");
String id = e.getTopiaId();
Class<TopiaEntity> entityClass = TopiaId.getClassName(id);
@@ -1073,8 +1000,7 @@
@Override
public boolean isSchemaExist(Class<?> clazz)
throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicateEntity"));
+ checkClosed("isSchemaExist");
boolean result = getSpecificUtil().isSchemaExist(clazz);
@@ -1092,9 +1018,8 @@
getSpecificUtil().createSchema(showSchema);
getFiresSupport().firePostCreateSchema(this);
} catch (PersistenceException eee) {
- throw new TopiaException(
- _("topia.persistence.error.create.schema",
- eee.getMessage()), eee);
+ throw new TopiaException("Schema could not be created for the following reason : "
+ + eee.getMessage(), eee);
}
}
@@ -1103,9 +1028,8 @@
try {
getSpecificUtil().showCreateSchema();
} catch (PersistenceException eee) {
- throw new TopiaException(
- _("topia.persistence.error.create.schema",
- eee.getMessage()), eee);
+ throw new TopiaException("Schema creation could not be displayed for the following reason : "
+ + eee.getMessage(), eee);
}
}
@@ -1120,9 +1044,8 @@
getSpecificUtil().updateSchema(showSchema);
getFiresSupport().firePostUpdateSchema(this);
} catch (PersistenceException eee) {
- throw new TopiaException(
- _("topia.persistence.error.update.schema",
- eee.getMessage()), eee);
+ throw new TopiaException("Schema could not be updated for the following reason : "
+ + eee.getMessage(), eee);
}
}
@@ -1147,16 +1070,19 @@
TopiaService service = (TopiaService) newInstance;
if (key.equals("topia.service." + service.getServiceName())) {
result.put(service.getServiceName(), service);
- log.info(_("topia.persistence.service.loaded",
+
+ log.info(String.format(
+ "Service '%s' loaded (implementation %s)",
key, classService));
} else {
- log.warn(_("topia.persistence.warn.service.not.loaded",
+ log.warn(String.format(
+ "The service with key '%s' has a different name '%s' ! (service not activated)",
key, service.getServiceName()));
}
} catch (Throwable eee) {
- String message =
- _("topia.persistence.error.service.unknown",
- key, classService);
+ String message = String.format(
+ "The service %s of type %s was not found.",
+ key, classService);
if (log.isDebugEnabled()) {
log.debug(message, eee);
} else if (log.isErrorEnabled()) {
@@ -1171,7 +1097,8 @@
protected void preInitServices(Map<String, TopiaService> services) {
for (TopiaService service : services.values()) {
if (!service.preInit(this)) {
- log.warn(_("topia.persistence.warn.service.not.preInit",
+ log.warn(String.format(
+ "The service named '%s' could not be pre-initialized (service not activated)",
service.getServiceName()));
}
}
@@ -1180,7 +1107,8 @@
protected void postInitServices(Map<String, TopiaService> services) {
for (TopiaService service : services.values()) {
if (!service.postInit(this)) {
- log.warn(_("topia.persistence.warn.service.not.postInit",
+ log.warn(String.format(
+ "The service named '%s' could not be post-initialized (service not activated)",
service.getServiceName()));
}
}
@@ -1236,15 +1164,12 @@
String name = getServiceName(interfaceService);
result = (E) getService(name);
} catch (Exception eee) {
- throw new TopiaNotFoundException(
- _("topia.persistence.error.service.not.retreaved",
- interfaceService, getProperExceptionMessage(eee)),
- eee);
+ String message = String.format("Could not retrieve service '%s' for following reason : %s", interfaceService, getProperExceptionMessage(eee));
+ throw new TopiaNotFoundException(message, eee);
}
if (result == null) {
throw new TopiaNotFoundException(
- _("topia.persistence.error.service.not.found",
- interfaceService));
+ String.format("The service '%s' not found.", interfaceService));
}
return result;
}
@@ -1257,7 +1182,8 @@
String name = getServiceName(interfaceService);
result = serviceEnabled(name);
} catch (Exception eee) {
- String message = _("topia.persistence.warn.service.not.found",
+ String message = String.format(
+ "The service named '%s' could not be found for following reason : %s",
interfaceService, getProperExceptionMessage(eee));
if (log.isDebugEnabled()) {
log.debug(message, eee);
@@ -1273,7 +1199,7 @@
@Override
public void importXML(Reader xml) throws TopiaException {
-// checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
+// checkClosed(String.format("This context is closed, it is not possible to perform the operation '%s'",
// "importXML"));
//
// Document doc;
@@ -1286,8 +1212,8 @@
// }
// } catch (DocumentException de) {
// throw new TopiaException(
-// _("topia.persistence.error.on.loding.xml.doc",
-// de.getMessage()), de);
+// "Could not read XML document for following reason : %s" +
+// de.getMessage(), de);
// }
//
// if (doc != null) {
@@ -1299,22 +1225,22 @@
// try {
// sessionDom4j.replicate(entity, ReplicationMode.EXCEPTION);
// } catch (PersistenceException he) {
-// log.warn(_("topia.persistence.error.replicate.entity",
+// log.warn(String.format(
+// "Could not replicate entity '%s' pour following reason : %s",
// entity, he.getMessage()), he);
// }
// }
// // must commit data, otherwise : no effects...
// sessionDom4j.flush();
// } else {
-// throw new TopiaException(
-// _("topia.persistence.error.empty.doc"));
+// throw new TopiaException("Empty document");
// }
}
@Override
public void exportXML(Writer xml, Object... entityAndcondition)
throws TopiaException {
-// checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
+// checkClosed(String.format("This context is closed, it is not possible to perform the operation '%s'",
// "exportXML"));
//
// String[] queries = buildQueries(entityAndcondition);
@@ -1372,28 +1298,24 @@
// result.close();
//
// } catch (PersistenceException eee) {
-// throw new TopiaException(_("topia.persistence.error.on.export",
-// eee.getMessage()), eee);
+// throw new TopiaException("An error occurred during export operation : %s" +
+// eee.getMessage(), eee);
// } catch (IOException eee) {
-// throw new TopiaException(_("topia.persistence.error.on.export",
-// eee.getMessage()), eee);
+// throw new TopiaException("An error occurred during export operation : %s" +
+// eee.getMessage(), eee);
// }
}
@Override
- public void replicate(TopiaContext dstCtxt, Object... entityAndCondition)
+ public void replicate(TopiaContext destinationContext, Object... entityAndCondition)
throws TopiaException, IllegalArgumentException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicate"));
+ checkClosed("replicate");
- TopiaContextImpl dstContextImpl = (TopiaContextImpl) dstCtxt;
- dstContextImpl.checkClosed(
- _("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicate"));
+ TopiaContextImpl destinationContextImpl = (TopiaContextImpl) destinationContext;
+ destinationContextImpl.checkClosed("replicate");
- if (getRootContext().equals(dstContextImpl.getRootContext())) {
- throw new IllegalArgumentException(
- _("topia.persistence.error.replicate.on.same.context"));
+ if (getRootContext().equals(destinationContextImpl.getRootContext())) {
+ throw new IllegalArgumentException("Can not perform a replication operation on same database.");
}
String[] queries = buildQueries(entityAndCondition);
@@ -1404,51 +1326,47 @@
}
// acquire data to replicate
List<?> entities = find(query);
- replicate0(dstContextImpl, entities.toArray());
+ replicateOnDestinationContext(destinationContextImpl, entities.toArray());
if (log.isDebugEnabled()) {
log.debug("replication of entities " + query +
" was sucessfully done.");
}
}
} catch (PersistenceException eee) {
- throw new TopiaException(_("topia.persistence.error.on.replicate",
- eee.getMessage()), eee);
+ throw new TopiaException(
+ "An error occurs while a replication operation : " + eee.getMessage(), eee);
}
}
@Override
- public <T extends TopiaEntity> void replicateEntity(TopiaContext dstCtxt,
+ public <T extends TopiaEntity> void replicateEntity(TopiaContext destinationContext,
T entity)
throws TopiaException, IllegalArgumentException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicateEntity"));
+ checkClosed("replicateEntity");
- TopiaContextImpl dstContextImpl = (TopiaContextImpl) dstCtxt;
- dstContextImpl.checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicateEntity"));
- if (getRootContext().equals(dstContextImpl.getRootContext())) {
- throw new IllegalArgumentException(_(
- "topia.persistence.error.replicate.on.same.context"));
+ TopiaContextImpl destinationContextImpl = (TopiaContextImpl) destinationContext;
+ destinationContextImpl.checkClosed("replicateEntity");
+
+ if (getRootContext().equals(destinationContextImpl.getRootContext())) {
+ throw new IllegalArgumentException("Can not perform a replication operation on same database.");
}
- replicate0(dstContextImpl, entity);
+ replicateOnDestinationContext(destinationContextImpl, entity);
}
@Override
- public <T extends TopiaEntity> void replicateEntities(TopiaContext dstCtxt,
+ public <T extends TopiaEntity> void replicateEntities(TopiaContext destinationContext,
List<T> entities)
throws TopiaException, IllegalArgumentException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicateEntities"));
+ checkClosed("replicateEntities");
- TopiaContextImpl dstContextImpl = (TopiaContextImpl) dstCtxt;
- dstContextImpl.checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "replicateEntities"));
+ TopiaContextImpl destinationContextImpl = (TopiaContextImpl) destinationContext;
+ destinationContextImpl.checkClosed("replicateEntities");
- if (getRootContext().equals(dstContextImpl.getRootContext())) {
- throw new IllegalArgumentException(_("topia.persistence.error.replicate.on.same.context"));
+ if (getRootContext().equals(destinationContextImpl.getRootContext())) {
+ throw new IllegalArgumentException("Can not perform a replication operation on same database.");
}
- replicate0(dstContextImpl, entities.toArray());
+ replicateOnDestinationContext(destinationContextImpl, entities.toArray());
}
/**
@@ -1462,8 +1380,7 @@
*/
@Override
public void backup(File file, boolean compress) throws TopiaException {
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "backup"));
+ checkClosed("backup");
try {
String options = "";
if (compress) {
@@ -1475,9 +1392,8 @@
query.getResultList();
} catch (Exception eee) {
- throw new TopiaException(_(
- "topia.persistence.error.on.backup",
- eee.getMessage()), eee);
+ throw new TopiaException(
+ "Unable to backup to file : " + eee.getMessage(), eee);
}
}
@@ -1492,8 +1408,7 @@
public void restore(File file) throws TopiaException {
// send event
getFiresSupport().firePreRestoreSchema(this);
- checkClosed(_("topia.persistence.error.unsupported.operation.on.closed.context",
- "restore"));
+ checkClosed("restore");
String sql = null;
String options = "";
@@ -1525,9 +1440,9 @@
// send event AFTER restore
getFiresSupport().firePostRestoreSchema(this);
} catch (Exception eee) {
- throw new TopiaException(_(
- "topia.persistence.error.on.restore",
- sql, eee.getMessage()), eee);
+ throw new TopiaException(
+ "Unable to restore from file : " + eee.getMessage() + ". " +
+ "SQL is " + sql, eee);
}
}
@@ -1552,7 +1467,7 @@
root.finalize();
} catch (Throwable eee) {
throw new TopiaException(
- _("topia.persistence.error.on.clear", eee.getMessage()), eee);
+ "Unable to perform clear operation : " + eee.getMessage(), eee);
}
}
@@ -1626,23 +1541,29 @@
return queries;
}
- protected void replicate0(TopiaContextImpl dstContextImpl,
- Object... entities) throws TopiaException {
+
+ protected void replicateOnDestinationContext(
+ TopiaContextImplementor destinationContext,
+ Object... entities) throws TopiaException {
try {
-// for (Object entity : entities) {
-// // dettach entity to source session, to make possible copy of
-// // collection without a hibernate exception (list opened in
-// // two session...)
-// getEntityManager().detach(entity);
-// dstContextImpl.getEntityManager().replicate(entity,
-// ReplicationMode.EXCEPTION);
-// }
+ for (Object entity : entities) {
+ // detach entity from the source session, to make possible copy
+ // of collection without a hibernate exception (list opened in
+ // two sessions...)
+ getEntityManager().detach(entity);
+ destinationContext.receiveReplicatedEntity(entity);
+ }
} catch (PersistenceException eee) {
- throw new TopiaException(_("topia.persistence.error.on.replicate",
- eee.getMessage()), eee);
+ throw new TopiaException(
+ "An error occurs while a replication operation : " + eee.getMessage(), eee);
}
}
+ @Override
+ public void receiveReplicatedEntity(Object entity) {
+ getSpecificUtil().receiveReplicatedEntity(this, entity);
+ }
+
} //TopiaContextImpl
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaContextImplementor.java 2012-05-15 14:47:30 UTC (rev 2484)
@@ -134,7 +134,7 @@
* @return the specificUtil instance registered
* @see TopiaSpecificUtil
*/
- TopiaSpecificUtil getSpecificUtil() throws TopiaException;
+ TopiaSpecificUtil getSpecificUtil();
/**
* Used to register the TopiaSpecificUtil. The registered instance will be
@@ -145,5 +145,11 @@
*/
void registerSpecificUtil(TopiaSpecificUtil specificUtil);
+ /**
+ * Method used to receive an entity to replicate
+ *
+ * @param entity the entity to replicate
+ */
+ void receiveReplicatedEntity(Object entity);
+
} //TopiaContextImplementor
-
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaSpecificUtil.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaSpecificUtil.java 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/framework/TopiaSpecificUtil.java 2012-05-15 14:47:30 UTC (rev 2484)
@@ -2,6 +2,7 @@
import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.persistence.TopiaEntity;
/**
* Provides all non-JPA standard methods (specific to an implementation) needed
@@ -48,4 +49,14 @@
*/
void updateSchema(boolean showSchema);
+ /**
+ * Method used by the given TopiaContext when it receives a replicated
+ * entity
+ *
+ * @param context this receiver context
+ * @param entity the entity to replicate
+ * @see TopiaContext#replicateEntity(TopiaContext, TopiaEntity)
+ */
+ void receiveReplicatedEntity(TopiaContextImplementor context, Object entity);
+
}
Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java
===================================================================
--- trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/java/org/nuiton/topia/persistence/util/TopiaEntityHelper.java 2012-05-15 14:47:30 UTC (rev 2484)
@@ -1146,9 +1146,10 @@
String parameterName,
Object value) {
if (value == null) {
- throw new NullPointerException(
- _("topia.persistence.error.null.param",
- methodName, parameterName));
+ String message = String.format(
+ "The method '%s' requires a non null parameter '%s'.",
+ methodName, parameterName);
+ throw new NullPointerException(message);
}
}
Modified: trunk/topia-persistence/src/main/resources/i18n/topia-persistence_en_GB.properties
===================================================================
--- trunk/topia-persistence/src/main/resources/i18n/topia-persistence_en_GB.properties 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/resources/i18n/topia-persistence_en_GB.properties 2012-05-15 14:47:30 UTC (rev 2484)
@@ -1,29 +1 @@
-topia.persistence.error.context.already.closed=Context was alredy closed
-topia.persistence.error.context.is.closed=Context is closed, no operation is possible.
-topia.persistence.error.create.schema=Schema could not be created for following reason \: %1$s
-topia.persistence.error.empty.doc=Empty document
-topia.persistence.error.null.param=The method '%1$s' requires a non null parameter '%2$s'.
-topia.persistence.error.on.clear=
-topia.persistence.error.on.commit=An error occurs while commit operation \: %1$s
-topia.persistence.error.on.export=An error occurs while export operation \: %1$s
-topia.persistence.error.on.loding.xml.doc=Could not read xml document for following reason \: %1$s
-topia.persistence.error.on.query=An error occurs while query operation \: %1$s
-topia.persistence.error.on.replicate=An error occurs while a replication operation \: %s
-topia.persistence.error.on.rollback=An error occurs while rollback operation \: %1$s
-topia.persistence.error.open.transaction.failed=An error occurs while asking a new transaction \: %1$s
-topia.persistence.error.replicate.entity=Could not replicate entity '%1$s' pour following reason \: %2$s
-topia.persistence.error.replicate.on.same.context=Can not do a replication operation on same database.
-topia.persistence.error.rootContext.access=You are on root context, you MUST open a transaction to perform any database access.
-topia.persistence.error.service.not.found=The service %1$s was not found.
-topia.persistence.error.service.not.retreaved=Could not retrive service %1$s for following reason \: %2$s
-topia.persistence.error.service.unknown=The service %1$s of type %2$s was not found.
-topia.persistence.error.unsupported.class=The following entity type %1$s is not managed by this context, you probably forgot to declare it.
-topia.persistence.error.unsupported.operation.on.closed.context=This context is closed, it is not possible to release the operation '%1$s'
-topia.persistence.error.unsupported.operation.on.root.context=
-topia.persistence.error.update.schema=Schema could not be updated for following reason \: %1$s
-topia.persistence.service.loaded=Service '%1$s' loaded (implementation %2$s)
topia.persistence.supported.classes.for.context=List of supported persistence classes \: %1$s
-topia.persistence.warn.service.not.found=The service named '%1$s' could not be found for following reason \: \: %2$s
-topia.persistence.warn.service.not.loaded=The service with key '%1$s' has a different name '%2$s' \! (service not activated)
-topia.persistence.warn.service.not.postInit=The service named '%1$s' could not be pre-initialized (service not activated)
-topia.persistence.warn.service.not.preInit=The service named '%1$s' could not be post-initialized (service not activated)
Modified: trunk/topia-persistence/src/main/resources/i18n/topia-persistence_es_ES.properties
===================================================================
--- trunk/topia-persistence/src/main/resources/i18n/topia-persistence_es_ES.properties 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/resources/i18n/topia-persistence_es_ES.properties 2012-05-15 14:47:30 UTC (rev 2484)
@@ -1,29 +1 @@
-topia.persistence.error.context.already.closed=El contexto ya ha sido cerrado
-topia.persistence.error.context.is.closed=Este contexto ya ha sido cerrado, no se puede comenzar una transacción
-topia.persistence.error.create.schema=No se puede crear el esquema debido a la razón siguiente \: %2$s
-topia.persistence.error.empty.doc=Documento vacío
-topia.persistence.error.null.param=El método '%1$s' requiere un parámetro '%2$s' no nulo.
-topia.persistence.error.on.clear=
-topia.persistence.error.on.commit=Se produjo un error durante el guardado \: %1$s
-topia.persistence.error.on.export=Se produjo un error durante la exportación \: %1$s
-topia.persistence.error.on.loding.xml.doc=No se puede leer el documento debido a \: %1$s
-topia.persistence.error.on.query=Se produjo un error duratne la busqueda (consulta %1$s) \: %2$s
-topia.persistence.error.on.replicate=Se produjo un error durante la vuelta a atrás (replication) \: %1$s
-topia.persistence.error.on.rollback=Se produjo un error durante la vuelta a atrás (rollback) \: %1$s
-topia.persistence.error.open.transaction.failed=
-topia.persistence.error.replicate.entity=Error de repliación de la entidad %1$s\ndebido a la siguiente razón \: %2$s
-topia.persistence.error.replicate.on.same.context=No se puede duplicar en la misma base
-topia.persistence.error.rootContext.access=Está usted en la raíz, debe abrir una transacción para acceder a los datos.
-topia.persistence.error.service.not.found=El servicio %1$s no está disponible
-topia.persistence.error.service.not.retreaved=El servicio %1$s debido a \: %2$s
-topia.persistence.error.service.unknown=El servicio '%1$s' de clase '%2$s' es desconocido
-topia.persistence.error.unsupported.class=La clase %1$n no está soportada por TopiaContext, puede que se halla olvidado de añadir su mapa
-topia.persistence.error.unsupported.operation.on.closed.context=El contexto está cerrado, no se puede realizar la operación %1$s
-topia.persistence.error.unsupported.operation.on.root.context=
-topia.persistence.error.update.schema=El esquema no se puede actualizar debido a \: %2$s
-topia.persistence.service.loaded=Servicio '%1$s' cargado por '%2$s'
-topia.persistence.supported.classes.for.context=Classes supportées par ce TopiaContext \: %1$s
-topia.persistence.warn.service.not.found=El nombre del servicio '%1$s' no ha sido encontrado debido a \: %2$s
-topia.persistence.warn.service.not.loaded=Le service de clé '%1$s' tiene un nombre de servicio '%2$s' diferente \! (servicio desactivado)
-topia.persistence.warn.service.not.postInit=El servicio '%1$s' no puede ser inicializado (servicio desactivado)
-topia.persistence.warn.service.not.preInit=El servicio '%1$s' no puede ser inicializado (servicio desactivado)
+topia.persistence.supported.classes.for.context=List of supported persistence classes \: %1$s
Modified: trunk/topia-persistence/src/main/resources/i18n/topia-persistence_fr_FR.properties
===================================================================
--- trunk/topia-persistence/src/main/resources/i18n/topia-persistence_fr_FR.properties 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence/src/main/resources/i18n/topia-persistence_fr_FR.properties 2012-05-15 14:47:30 UTC (rev 2484)
@@ -1,29 +1 @@
-topia.persistence.error.context.already.closed=Ce contexte a deja ete ferme
-topia.persistence.error.context.is.closed=Ce contexte a ete ferme, impossible de commencer une transaction
-topia.persistence.error.create.schema=Le schéma n'a pas pu être crée pour la raison suivante \: %2$s
-topia.persistence.error.empty.doc=Document vide
-topia.persistence.error.null.param=La méthode '%1$s' requière un paramètre '%2$s' non null.
-topia.persistence.error.on.clear=
-topia.persistence.error.on.commit=Une erreur est apparue pendant le commit \: %1$s
-topia.persistence.error.on.export=Une erreur est apparue pendant l'export \: %1$s
-topia.persistence.error.on.loding.xml.doc=Lecture du document impossible pour la raison suivante \: %1$s
-topia.persistence.error.on.query=Une erreur est apparue pendant le recherche (requête %1$s) \: %2$s
-topia.persistence.error.on.replicate=Une erreur lors de la réplication est survenue \: %s
-topia.persistence.error.on.rollback=Une erreur est apparue pendant le rollback \: %1$s
-topia.persistence.error.open.transaction.failed=Une erreur est apparue pendant la demande de transaction \: %1$s
-topia.persistence.error.replicate.entity=Echec de replication de l'entite %1$s\npour la raison suivante \: %2$s
-topia.persistence.error.replicate.on.same.context=Impossible de dupliquer dans la même base
-topia.persistence.error.rootContext.access=Vous êtes sur le root context, vous devez ouvrir une transaction pour pouvoir accéder aux données.
-topia.persistence.error.service.not.found=Le service %1$s n'est pas disponible
-topia.persistence.error.service.not.retreaved=La service %1$s n'a pas pu être récupéré pour la raison suivante \: %2$s
-topia.persistence.error.service.unknown=Le service '%1$s' ayant pour classe '%2$s' n'est pas connu
-topia.persistence.error.unsupported.class=La classe %1$s n'est pas supportée par ce TopiaContext, vous avez sans doute oublié d'ajouter son mapping
-topia.persistence.error.unsupported.operation.on.closed.context=Ce contexte a été fermé, impossible de réaliser l'opération %1$s
-topia.persistence.error.unsupported.operation.on.root.context=
-topia.persistence.error.update.schema=Le schéma n'a pas pu être mis à jour pour la raison suivante \: %2$s
-topia.persistence.service.loaded=Service '%1$s' chargé par '%2$s'
topia.persistence.supported.classes.for.context=Classes supportées par ce TopiaContext \: %1$s
-topia.persistence.warn.service.not.found=Le nom du service '%1$s' n'a pas été trouvé pour la raison suivante \: %2$s
-topia.persistence.warn.service.not.loaded=Le service de clé '%1$s' a un nom de service '%2$s' différent \! (service désactivé)
-topia.persistence.warn.service.not.postInit=Le service '%1$s' n'a pas pu être initialisé (service désactivé)
-topia.persistence.warn.service.not.preInit=Le service '%1$s' n'a pas pu être finalisé (service désactivé)
Modified: trunk/topia-persistence-hibernate/src/main/java/org/nuiton/topia/persistence/TopiaHibernateSpecificUtil.java
===================================================================
--- trunk/topia-persistence-hibernate/src/main/java/org/nuiton/topia/persistence/TopiaHibernateSpecificUtil.java 2012-05-15 10:10:32 UTC (rev 2483)
+++ trunk/topia-persistence-hibernate/src/main/java/org/nuiton/topia/persistence/TopiaHibernateSpecificUtil.java 2012-05-15 14:47:30 UTC (rev 2484)
@@ -2,17 +2,24 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.hibernate.ReplicationMode;
+import org.hibernate.Session;
import org.hibernate.cfg.AvailableSettings;
import org.hibernate.cfg.Configuration;
import org.hibernate.dialect.Dialect;
+import org.hibernate.ejb.EntityManagerImpl;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Table;
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.hibernate.tool.hbm2ddl.SchemaUpdate;
import org.hibernate.tool.hbm2ddl.TableMetadata;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaRuntimeException;
+import org.nuiton.topia.framework.TopiaContextImplementor;
import org.nuiton.topia.framework.TopiaSpecificUtil;
+import javax.persistence.EntityManager;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
@@ -117,4 +124,17 @@
return result;
}
+
+ @Override
+ public void receiveReplicatedEntity(TopiaContextImplementor context, Object entity) {
+ try {
+ EntityManager entityManager = context.getEntityManager();
+ if (entityManager instanceof EntityManagerImpl) {
+ Session session = ((EntityManagerImpl) entityManager).getSession();
+ session.replicate(entity, ReplicationMode.EXCEPTION);
+ }
+ } catch (TopiaException te) {
+ throw new TopiaRuntimeException("Unable to receive replicated entity", te);
+ }
+ }
}
_______________________________________________
Topia-commits mailing list
Topia-commits(a)list.nuiton.org
http://list.nuiton.org/cgi-bin/mailman/listinfo/topia-commits
--
Tony Chemit
--------------------
tél: +33 (0) 2 40 50 29 28
email: chemit(a)codelutin.com
http://www.codelutin.com
2
1
See <http://ci.nuiton.org/jenkins/job/topia/1427/changes>
Changes:
[Arnaud Thimel] Remove explicit Hibernate dependency
[Arnaud Thimel] fixes #2076 Deprecate some code (.util package + TopiaQuery + ServiceTransformer)
[Tony Chemit] remove svn Id property on pom.xml
[Tony Chemit] updates to mavenpom 3.3.1 and migrates to fluido skin
[Arnaud Thimel] fixes #684 Remove all deprecated code before ToPIA 3.0
------------------------------------------
Started by an SCM change
Building on master in workspace <http://ci.nuiton.org/jenkins/job/topia/ws/>
Updating http://svn.nuiton.org/svn/topia/trunk
At revision 2444
Parsing POMs
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 76, column 17
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 81, column 17
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 84, column 17
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1224)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1049)
at hudson.FilePath.act(FilePath.java:832)
at hudson.FilePath.act(FilePath.java:814)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.parsePoms(MavenModuleSetBuild.java:914)
at hudson.maven.MavenModuleSetBuild$RunnerImpl.doRun(MavenModuleSetBuild.java:658)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:473)
at hudson.model.Run.run(Run.java:1410)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
1
5
Nous avons commencé en début de semaine le développement de ToPIA 3.
Le but est de se baser sur JPA 2 plutôt que directement sur Hibernate.
Ceci devrait nous permettre à terme d'être indépendant de
l'implémentation de JPA 2 et donc de pouvoir utiliser autre chose
qu'Hibernate.
Voici un peu ce que nous avons fait cette semaine.
Le module topia-persistence ne dépend plus d'Hibernate, mais dépend de
l'API JPA (en provided car chaque implem vient avec son API - pratique
!). On ne parle plus de Session Hibernate, mais d'EntityManager.
La création d'un EntityManagerFactory passe par une méthode statique
(fournie par l'API JPA) qui va chercher dans le classpath un fichier
indiquant quel PersistenceProvider il faut utiliser. Le module
topia-persistence contient un PersistenceProvider abstrait qui
uniformise le comportement quel que soit l'implémentation JPA.
Un nouveau module a été créé (topia-persistence-hibernate) qui dépend de
topia-persistence et Hibernate (dernière version) et qui fournit un
PersistenceProvider en n'implémentant que la partie spécifique à la
création d'un EntityManagerFactory Hibernate. Ce PersistenceProvider
permet de lire à la fois des fichiers de mapping MonEntite.hbm.xml et
MonEntite-orm.xml.
Il reste malgré tout un certain nombre de choses qui étaient dans
topia-persistence mais qui sont spécifiques à l'implémentation de JPA :
- la gestion du schéma (SchemaExport, SchemaUpdate) ;
- l'import/export XML ;
- la réplication d'entités ;
- ... (certainement d'autres qu'on a pas encore bien identifié)
Pour gérer ces cas particuliers, j'ai créé une interface
(TopiaSpecificUtil - oui je sais le nom est moisi, mais j'ai pas mieux)
qui regroupe les méthodes que le TopiaContext ne peut accomplir sans une
implémentation spécifique. Lors de la création du PersistenceProvider de
l'implémentation choisie, une instance spécifique est créée et injectée
au TopiaContext qui pourra ensuite l'utiliser pour les méthodes non JPA.
(NB: La gestion du schéma a été migrée dans le module hibernate, mais
pas encore l'import/export XML et la réplication d'entités)
Le module topia-persistence fournissait aussi un ConnectionProvider qui
corrige celui de base d'Hibernate. Étant donné que c'est spécifique
Hibernate, ça a été tout naturellement déplacé dans le module
topia-persistence-hibernate.
Au niveau de la génération des mappings XML, Tony s'arrache bien les
cheveux : beaucoup de choses que nous définissions auparavant dans la
génération des .hbm.xml n'existe pour les mappings -orm.xml. Nous ne
savons pas encore si ces limitations vont être bloquantes. Pour rajouter
un peu de peine à la réécriture du générateur, la XSD impose un ordre
entre les informations d'une entité (tous les one-to-one, PUIS tous les
one-to-many PUIS ... - pratique !). D'autre part, comme 90% des gens
utilisent les annotations, 90% des docs qu'on trouve ne parlent même pas
des mappings XML : pratique !
(Tony je te laisse compléter si tu veux)
Comme nous avons rendu topia-persistence indépendant d'une
implémentation JPA, les tests présents dans ce module et nécessitant
Hibernate ne peuvent plus s'exécuter depuis ce module (dépendance
cyclique). Nous avons donc créé un module topia-persistence-tck (pour
Test Compatibility Kit) qui dépend de topia-persistence et qui contient
des tests en src/test (non dépendant d'une implem) et des TestSuite en
src/main.
Dans le module topia-persistence-hibernate, nous avons une dépendance en
scope test vers le module topia-persistence-tck et nous surchargeons les
TestSuite, ce qui fait que les mêmes tests pourront être partagés entre
les différents modules topia-persistence-(hibernate|openjpa|...)
À l'heure actuelle, une grande majorité des tests passent en utilisant
les mappings .hbm.xml, nous ne savons pas encore ce que ça donnera avec
les mappings -orm.xml.
Personnellement, je pense que ça va le faire (naturellement optimiste ?)
je suis ""juste"" inquiet sur la propagation des évènements (je vais
faire un mail dédié). Tony est moins confiant, c'est surement dû au fait
que c'est lui qui s'occupe des mappings ORM...
Arnaud
2
4
Salut,
Sur mon temps libre, j'ai essayé d'utiliser la méthode merge d'hibernate
pour simplifier les problématiques de mises à jour de collection en
cascade depuis une composition (ajout/suppression/modification) sans
avoir à le faire à la main.
La méthode merge[1] est un peu différente de saveOrCreate[2] et permet
de pouvoir rattacher les objets correctement et d'éviter les problèmes
sur les cascade. En effet, la méthode update pose problème sur les
objets modifiés en cascade (déjà rattaché à la session) et n'effectue
pas les suppressions. Un post intéressant sur les différences : [3]
Le seul souci dans Topia, c'est que les topiaId sont générés sur la
méthode create des DAO. Mais vu que dans ce cas les créations se font en
cascade, on ne passe pas par la méthode create.
Deux solutions :
- soit appeler la méthode create sur toute les nouvelles entités (cela
reviendrait à parcourir toute la collection à mettre à jour...)
- soit utiliser un autre mécanisme pour générer le topiaId. (via un
IdentifierGenerator[4] ou un listener sur le persist/merge[5]). Avec
hibernate pur, le IdentifierGenerator semble plus approprié. En JPA on
peut cependant utiliser le PrePersist pour générer le topiaId. Chose
étrange, en hibernate pur, le merge n'envoie pas d'évènement prePersist
pour les nouvelles entités, contrairement à la spec JPA.
Ci-joint un patch qui implémente la solution du IdentifierGenerator.
Cela implique :
- modification des mappings générés pour préciser le generator
- ajout du generator appliqué au contexte du modèle pour pouvoir
récupérer les interfaces des entités simplement avec le TopiaEntityEnum.
Le MergeTest illustre les deux cas d'utilisations possibles :
- depuis une entité non chargé dans hibernate (newInstance)
- depuis une entité chargé dans hibernate (findByTopiaId)
Les avantages :
- plus besoin de gérer manuellement les merge de collection
- la génération du topiaId est intégré aux mécanismes du framework
sous-jacent
Les inconvénients :
- aucun, la génération du topiaId est transparente et ne casse pas la
compatibilité avec l'existant
Reste à ajouter une méthode merge dans le DAO si cette idée/solution
vous semble intéressante à intégrer pour l'évolution de la librairie.
Quand pensez-vous ?
[1]
http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/Session.htm…
[2]
http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/Session.htm…
[3]
http://www.stevideter.com/2008/12/07/saveorupdate-versus-merge-in-hibernate/
[4]
http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/id/Identifi…
[5] http://www.objectdb.com/java/jpa/persistence/event
PS : pour appliquer le patch à la racine du projet topia :
patch -p1 -i 0001-Add-merge-test.patch
5
5
Je tombe sur un point plutôt bloquant.
JPA prévoit des annotations pour ajouter des callback/listener, mais
directement sur les entités. Au niveau XML, c'est beaucoup plus tendu.
J'ai réussi à déclarer un listener global, mais c'est du pur Hibernate.
Je n'arrive pas à mettre en oeuvre un équivalent JPA (je réessaye en
début de semaine).
Mais je serai moins inquiet si j'arrivai tout de même à faire marcher la
version pur Hibernate.
Dans ToPIA 2, lorsque ToPIA reçoit un event, il regarde dans l'event
pour aller chercher la Session Hibernate, puis parcourt la hiérarchie
des TopiaContext pour retrouver le bon et déclencher la propagation des
event sur ce TopiaContext.
Mon problème, c'est qu'avec la dernière version d'Hibernate, je récupère
bien l'event, mais c'est sa Session que je récupère, et non
l'EntityManager. Alors que dans le TopiaContext, je n'ai plus de trace
de la Session, il m'est donc impossible d'identifier le bon TopiaContext
sans l'EntityManager, or je ne parvient pas à le récupérer depuis l'event :(
Je continuerai de me pencher à là dessus en début de semaine, mais je
suis sceptique...
Arnaud
1
0
Bonjour,
Je pense qu'il y a un gros problème avec les hashcode et
les equals Topia du à l'utilisation que l'ont peut en faire
dans certaines application.
Par exemple:
MonEntity entite = new EntityImpl();
Ici, le hashcode est calculé sur une date de creation
null donc on renvoit 0.
entite = dao.create(entite);
le hashcode change.
J'ai actuellement l'erreur suivante dans une application:
Caused by: org.hibernate.NonUniqueObjectException: a different object with the
same identifier value was already associated with the session:
[org.chorem.lima.entity.FinancialPeriodImpl#org.chorem.lima.entity.FinancialPeriod#1336742425698#0.7640494428199309]
at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:190)
at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:143)
Et je pense que c'est du à ca.
--
Éric Chatellier <chatellier(a)codelutin.com>
Tel: 02.40.50.29.28
http://www.codelutin.com
2
4
Salut,
Tony, j'ai un p'ti doute sur les dépendances.
Ce que j'avais fait c'est : ( -> signifie "dépend de" )
topia-persistence -> geronimo-specs (API JPA non liée à Hibernate)
topia-persistence-hibernate -> hibernate -> hib-jpa-api (API JPA hib)
topia-persistence-hibernate -> topia-persistence excludes geronimo-specs
Dans topia-p-hibernate, il n'y a donc d'une API JPA (celle d'Hibernate)
Avec ton commit, il n'y a plus le exclude, ce qui fait qu'on a les 2 API
JPA dans le module topia-p-hibernate et j'ai peur que ça pose des soucis.
Qu'en dis-tu ?
Arnaud
Le 09/05/2012 19:03, tchemit(a)users.nuiton.org a écrit :
> Author: tchemit
> Date: 2012-05-09 19:03:12 +0200 (Wed, 09 May 2012)
> New Revision: 2461
>
> Url: http://nuiton.org/repositories/revision/topia/2461
>
> Log:
> use two different DAOHelper for it and mapping models
>
> Added:
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/mapping/test1/Test1.java
> Modified:
> trunk/topia-persistence-hibernate/src/test/java/org/nuiton/topia/framework/TopiaConnectionProviderTest.java
> trunk/topia-persistence-tck/pom.xml
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/TestHelper.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/TopiaDatabase.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/it/EnumTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/it/deletetest/DeleteEntityTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/ano1882/DAOAbstractTransformerTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/ano1991/TopiaQueryTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/framework/TopiaContextReplicateTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/generator/TopiaTestCase.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/persistence/EntityVisitorExportXmlTest.java
> trunk/topia-persistence-tck/src/main/java/org/nuiton/topia/tck/legacy/persistence/NaturalIdTest.java
> trunk/topia-persistence-tck/src/main/xmi/topia-tck-mapping.zargo
> trunk/topia-persistence-tck/src/test/java/org/nuiton/topia/persistence/util/CollectorTest.java
> trunk/topia-persistence-tck/src/test/java/org/nuiton/topia/persistence/util/EntityOperatorTest.java
> trunk/topia-persistence-tck/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityBinderTest.java
> trunk/topia-persistence-tck/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityHelperTest.java
> trunk/topia-persistence-tck/src/test/java/org/nuiton/topia/persistence/util/TopiaEntityRefTesterTest.java
[...]
2
2