On this problem, I have a revisit today. And find some weird things:
From the test bed:
[service.tag.impl ] userName=wenxzhen;tagName=hadoop;status=1;createdAt=1478615472986
...
[org.apache.commons.beanutils.converters.ArrayConverter] Converting 'java.net.URL[]' value '[Ljava.net.URL;@5d975bc5' to type 'java.net.URL[]'
[org.apache.commons.beanutils.converters.ArrayConverter] No conversion required, value is already a java.net.URL[]
[org.apache.commons.beanutils.converters.LongConverter] Converting 'Long' value '1478615472986' to type 'Long'
[org.apache.commons.beanutils.converters.LongConverter] No conversion required, value is already a Long
[org.apache.commons.beanutils.ConvertUtils] Convert string 'hadoop' to class 'java.lang.String'
[org.apache.commons.beanutils.converters.StringConverter] Converting 'String' value 'hadoop' to type 'String'
[org.apache.commons.beanutils.ConvertUtils] Convert string 'wenxzhen' to class 'java.lang.String'
[org.apache.commons.beanutils.converters.StringConverter] Converting 'String' value 'wenxzhen' to type 'String'[org.hibernate.engine.spi.ActionQueue] Executing identity-insert immediately
[druid.sql.Statement ] {conn-110030, pstmt-120003} created. insert into user_tag_record (created_at, status, tag_name, user_name) values (?, ?, ?, ?)
[org.hibernate.SQL ] insert into user_tag_record (created_at, status, tag_name, user_name) values (?, ?, ?, ?)
From the production box:
[service.tag.impl ] userName=wenxzhen;tagName=java;status=1;createdAt=1478571296820
...
[org.apache.commons.beanutils.converters.ArrayConverter] No conversion required, value is already a java.net.URL[]
[org.hibernate.engine.spi.ActionQueue] Executing identity-insert immediately
[druid.sql.Statement ] {conn-110030, pstmt-120002} created. insert into user_tag_record values ( )
[org.hibernate.SQL ] insert into user_tag_record values ( )
[druid.sql.Statement ] {conn-110030, pstmt-120002} Parameters : []
[druid.sql.Statement ] {conn-110030, pstmt-120002} Types : []
We can see the difference, but I didn't know how it happened? Please help to advice.
wenxzhen wrote:
Dear all,
I posted a question on the stackoverflow in the link:
http://stackoverflow.com/questions/3940 ... -against-m.
The problem I met was that the generated Insert SQL statment came without any binding parameters. Please help to advice.
Quote:
[druid.sql.Statement ] {conn-110022, pstmt-125053, rs-155055} query executed. 6.067257 millis. select usertagrec0_.id as id20_, usertagrec0_.created_at as created2_20_, usertagrec0_.status as status20_, usertagrec0_.tag_name as tag4_20_, usertagrec0_.user_name as user5_20_ from user_tag_record usertagrec0_ where usertagrec0_.tag_name=? and usertagrec0_.user_name=?
[druid.sql.ResultSet ] {conn-110022, pstmt-125053, rs-155055} open
[druid.sql.ResultSet ] {conn-110022, pstmt-125053, rs-155055} Header: [id, created_at, status, tag_name, user_name]
[druid.sql.ResultSet ] {conn-110022, pstmt-125053, rs-155055} closed
[druid.sql.Statement ] {conn-110022, pstmt-125053} closed
[org.hibernate.engine.internal.StatefulPersistenceContext] Initializing non-lazy collections
[service.tag.impl ] userName=wenxzhen;tagName=hadoop;status=1;createdAt=1473219014318
[org.hibernate.engine.spi.ActionQueue] Executing identity-insert immediately
[druid.sql.Statement ] {conn-110022, pstmt-125056} created. insert into user_tag_record values ( )
[org.hibernate.SQL ] insert into user_tag_record values ( )
[druid.sql.Statement ] {conn-110022, pstmt-125056} Parameters : []
[druid.sql.Statement ] {conn-110022, pstmt-125056} Types : []
[druid.sql.Statement ] {conn-110022, pstmt-125056} update executed. effort 1. 5.189083 millis. insert into user_tag_record values ( )
[druid.sql.ResultSet ] {conn-110022, pstmt-125056, rs-155056} open
[druid.sql.ResultSet ] {conn-110022, pstmt-125056, rs-155056} Header: [GENERATED_KEY]
[druid.sql.ResultSet ] {conn-110022, pstmt-125056, rs-155056} Result: [254096]
[org.hibernate.id.IdentifierGeneratorHelper] Natively generated identity: 254096
[druid.sql.ResultSet ] {conn-110022, pstmt-125056, rs-155056} closed
Thank you very much,
Best, Wenxing