Hi,
I guess I'll need at least
* the source code of
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader
* some context about what you are attempting to achieve
to interpret the logs and be any useful.
Regards.
On 17/07/2017 05:09, Changseok Keum wrote:
Hi
I added codes and logs blow.
Thanks for your kind.
BR
code :
@Autowired
private UserDAO userDAO;
..
...
LOG.debug("call userDAO.save() with param : {}", user);
LOG.debug("- username : {}", user.getUsername());
LOG.debug("- password : {}", user.getPassword());
LOG.debug("- role : {}", user.getRoles());
for (UPlainAttr attr : user.getPlainAttrs()) {
LOG.debug("- plainAttrs schema : {}", attr.getSchema());
LOG.debug("- plainAttrs value : {}", attr.getValuesAsStrings());
}
account = userDAO.save(user); <------ After this code, not go ahead
LOG.debug("return saved account : {}", account); <--- can not be called.
...
..
related log :
11:41:00.520 [main] DEBUG
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader - call
userDAO.save() with param : JPAUser[null]
11:41:00.520 [main] DEBUG
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader - -
username : master
11:41:00.520 [main] DEBUG
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader - -
password :
2B29260C62D57F9CC3D497F8A29FC1F4C5823BCD2A4B4BA8368531F93814D1F1CD6849E7CC7C22BCAFEE0505B552A3137FF3DAAA5C488811372EBB6BBFED696A
11:41:00.520 [main] DEBUG
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader - - role
: [JPARole[MASTER_ADMIN]]
11:41:00.520 [main] DEBUG
kr.keum.im.core.persistence.jpa.content.StandardAccountLoader - -
plainAttrs schema : JPAPlainSchema[email]
11:41:00.520 [main] DEBUG
kr.keum.im.core.core.persistence.jpa.content.StandardAccountLoader - -
plainAttrs value : [keum...@gmail.com <mailto:keum...@gmail.com>]
39286 Master TRACE [main] openjpa.DataCache - Cache miss while
looking up key "".
39286 Master TRACE [main] openjpa.jdbc.SQLDiag -
getInitializeStateResult: oid= class
org.apache.syncope.core.persistence.jpa.entity.user.JPAUser
39286 Master TRACE [main] openjpa.jdbc.SQLDiag - Eager relations:
[org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.accountPolicy,
org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.connector,
org.apache.syncope.core.persistence.jpa.entity.JPARealm.accountPolicy,
org.apache.syncope.core.persistence.jpa.entity.JPARealm.passwordPolicy,
org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.passwordPolicy,
org.apache.syncope.core.persistence.jpa.entity.resource.JPAExternalResource.pullPolicy,
org.apache.syncope.core.persistence.jpa.entity.JPARealm.parent,
org.apache.syncope.core.persistence.jpa.entity.user.JPAUser.resources,
org.apache.syncope.core.persistence.jpa.entity.user.JPAUser.securityQuestion,
org.apache.syncope.core.persistence.jpa.entity.AbstractAny.realm]
39286 Master TRACE [main] openjpa.jdbc.SQL - <t 63178138, conn
980801953> executing prepstmnt 929278717
SELECT t0.creationDate, t0.creator, t0.lastChangeDate,
t0.lastModifier, t1.id <http://t1.id/>,
t2.id <http://t2.id/>, t2.description, t2.maxAuthenticationAttempts,
t2.propagateSuspension, t1.name <http://t1.name/>, t3.id
<http://t3.id/>, t3.ACCOUNTPOLICY_ID, t3.name <http://t3.name/>,
t3.PASSWORDPOLICY_ID, t4.id <http://t4.id/>, t4.description,
t4.allowNullPassword,
t4.historyLength, t0.status, t0.workflowId, t0.changePwdDate,
t0.cipherAlgorithm, t0.failedLogins, t0.lastLoginDate,
t0.lastRecertification, t0.lastRecertificator,
t0.mustChangePassword,
t0.password, t0.securityAnswer, t5.id <http://t5.id/>,
t5.content, t0.suspended,
t0.token, t0.tokenExpireTime, t0.username, t6.user_id, t7.id
<http://t7.id/>, t8.id <http://t8.id/>,
t8.description, t8.maxAuthenticationAttempts,
t8.propagateSuspension,
t9.id <http://t9.id/>, t9.bundleName, t9.connRequestTimeout,
t9.connectorName,
t9.displayName, t9.location, t9.maxIdle, t9.maxObjects,
t9.maxWait,
t9.minEvictableIdleTimeMillis, t9.minIdle, t9.version,
t7.createTraceLevel, t7.deleteTraceLevel,
t7.enforceMandatoryCondition,
t7.overrideCapabilities, t10.id <http://t10.id/>,
t10.description,
t10.allowNullPassword, t10.historyLength, t7.propagationPriority,
t7.provisioningTraceLevel, t11.id <http://t11.id/>,
t11.description,
t7.randomPwdIfNotProvided, t7.updateTraceLevel
FROM SyncopeUser t0 LEFT OUTER JOIN Realm t1 ON t0.REALM_ID =
t1.id <http://t1.id/> LEFT OUTER
JOIN SecurityQuestion t5 ON t0.SECURITYQUESTION_ID = t5.id
<http://t5.id/> LEFT OUTER
JOIN SyncopeUser_ExternalResource t6 ON t0.id
<http://t0.id/> = t6.user_id LEFT OUTER
JOIN AccountPolicy t2 ON t1.ACCOUNTPOLICY_ID = t2.id
<http://t2.id/> LEFT OUTER JOIN
Realm t3 ON t1.PARENT_ID = t3.id <http://t3.id/> LEFT OUTER
JOIN PasswordPolicy t4 ON
t1.PASSWORDPOLICY_ID = t4.id <http://t4.id/> LEFT OUTER JOIN
ExternalResource t7 ON
t6.resource_id = t7.id <http://t7.id/> LEFT OUTER JOIN
AccountPolicy t8 ON
t7.ACCOUNTPOLICY_ID = t8.id <http://t8.id/> LEFT OUTER JOIN
ConnInstance t9 ON
t7.CONNECTOR_ID = t9.id <http://t9.id/> LEFT OUTER JOIN
PasswordPolicy t10 ON
t7.PASSWORDPOLICY_ID = t10.id <http://t10.id/> LEFT OUTER JOIN
PullPolicy t11 ON
t7.PULLPOLICY_ID = t11.id <http://t11.id/>
WHERE t0.id <http://t0.id/> = ?
ORDER BY t6.user_id ASC
[params=(String) ]
39291 Master TRACE [main] openjpa.jdbc.SQL - <t 63178138, conn
980801953> [5 ms] spent
39382 Master TRACE [main] openjpa.Runtime - Found datasource1:
datasource 41260873 from configuration. StoreContext:
org.apache.openjpa.kernel.BrokerImpl@261c5d1f
<mailto:org.apache.openjpa.kernel.BrokerImpl@261c5d1f>
39382 Master TRACE [main] openjpa.Runtime -
org.apache.openjpa.persistence.EntityManagerFactoryImpl@fbe70d8
<mailto:org.apache.openjpa.persistence.EntityManagerFactoryImpl@fbe70d8> created
EntityManager
org.apache.openjpa.persistence.EntityManagerImpl@261c5d1f
<mailto:org.apache.openjpa.persistence.EntityManagerImpl@261c5d1f>.
39382 Master TRACE [main] openjpa.DataCache - Cache hit while
looking up key "USER".
39382 Master TRACE [main] openjpa.DataCache - Cache hit while
looking up key "BaseUser".
39382 Master TRACE [main] openjpa.DataCache - Cache hit while
looking up key "email".
39382 Master TRACE [main] openjpa.DataCache - Cache hit while
looking up key "USER".
39382 Master TRACE [main] openjpa.jdbc.SQLDiag - load: class
org.apache.syncope.core.persistence.jpa.entity.JPAAnyType oid: USER
39382 Master TRACE [main] openjpa.jdbc.SQLDiag - Eager relations:
[org.apache.syncope.core.persistence.jpa.entity.JPAAnyType.classes]
39382 Master TRACE [main] openjpa.jdbc.SQL - <t 63178138, conn
716294057> executing prepstmnt 1084093309
SELECT t0.kind, t1.anyType_id, t2.id <http://t2.id/>
FROM AnyType t0 LEFT OUTER JOIN AnyType_AnyTypeClass t1 ON t0.id
<http://t0.id/> =
t1.anyType_id LEFT OUTER JOIN AnyTypeClass t2 ON
t1.anyTypeClass_id =
t2.id <http://t2.id/>
WHERE t0.id <http://t0.id/> = ?
ORDER BY t1.anyType_id ASC
[params=(String) USER]
39382 Master TRACE [main] openjpa.jdbc.SQL - <t 63178138, conn
716294057> [0 ms] spent
39382 Master TRACE [main] openjpa.jdbc.SQLDiag - Loading eager
toMany: classes for
org.apache.syncope.core.persistence.jpa.entity.JPAAnyType
39382 Master TRACE [main] openjpa.jdbc.JDBC - <t 63178138, conn
716294057> [0 ms] close
39382 Master TRACE [main] openjpa.DataCache - Cache hit while
looking up key "USER".
39382 Master TRACE [main] openjpa.Runtime -
org.apache.openjpa.persistence.EntityManagerImpl@261c5d1f.close
<mailto:org.apache.openjpa.persistence.EntityManagerImpl@261c5d1f.close>()
invoked.
11:41:26.337 [HikariPool-1 housekeeper] DEBUG
com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats
(total=11, active=1, idle=10, waiting=0)
11:41:56.339 [HikariPool-1 housekeeper] DEBUG
com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats
(total=11, active=1, idle=10, waiting=0)
referenced library :
**
**
refer attachment
2017. 7. 14. 오후 8:44에 "Changseok Keum" <keum...@gmail.com
<mailto:keum...@gmail.com>>님이 작성:
Of course, I will send codes and logs after weekend.
Thanks a lot.
2017. 7. 14. 오후 8:31에 "Francesco Chicchiriccò"
<ilgro...@apache.org <mailto:ilgro...@apache.org>>님이 작성:
On 14/07/2017 13:23, Changseok Keum wrote:
Hi,
I recently updated the syncope version to 2.0.4 released
with views.xml and indexes.xml referenced by guide.
As testing, EntityManager.merge() not doing anything, no
error log when userDAO.save() called with parameterized
user added with some plainAttributes. (without
plainAttributes, there is no problem.)
The same codes works well before the version 2.0.3.
I think I did something wrong with updating, but I can not
proceed with debugging inside EntityManager merge function
so it is hard to find the reason.
Could you please give me some advice to solve this situations?
Hi,
can you share your code? Or some logs?
Regards.
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/