-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: postgres batch update or column mismatch ?
PostPosted: Thu Feb 26, 2004 4:34 am 
Beginner
Beginner

Joined: Thu Feb 19, 2004 6:07 am
Posts: 21
Hi all,
I am trying to insert an object into a postgres db using session.save(), but I find that I get errors - here is the complete log.
Something about jdbc batch updates - i have jdbc.batch_size set to 0.
And the latest postgres driver pg74.1jdbc3.jar
And something about null not being able to be inserted into non null
column replyid - but in the constructor for the object I did specify
replyid as 1. So what gives ?....um.....
Code:
15:16:01,234  INFO Environment:432 - Hibernate 2.1.1
15:16:01,250  INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.username=sanjeev, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql:frmdb, jdbc.batch_size=0, hibernate.connection.driver_class=org.postgresql.Driver, hibernate.query.substitutions=yes 'Y', no 'N'}
15:16:01,265  INFO Environment:481 - using CGLIB reflection optimizer
15:16:01,265  INFO Configuration:318 - Mapping resource: Forum.hbm.xml
15:16:02,093  INFO Binder:225 - Mapping class: Forum -> forum
15:16:02,234  INFO Configuration:318 - Mapping resource: Post.hbm.xml
15:16:02,281  INFO Binder:225 - Mapping class: Post -> post
15:16:02,296  INFO Configuration:318 - Mapping resource: Poster.hbm.xml
15:16:02,343  INFO Binder:225 - Mapping class: Poster -> poster
15:16:02,343  INFO Configuration:584 - processing one-to-many association mappings
15:16:02,343  INFO Configuration:593 - processing one-to-one association property references
15:16:02,343  INFO Configuration:618 - processing foreign key constraints
15:16:02,390  INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
15:16:02,390  INFO SettingsFactory:62 - Use outer join fetching: true
15:16:02,390  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
15:16:02,390  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
15:16:02,406  INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:postgresql:frmdb
15:16:02,421  INFO DriverManagerConnectionProvider:72 - connection properties: {user=sanjeev, password=}
15:16:02,421  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
15:16:02,953  INFO SettingsFactory:89 - Use scrollable result sets: true
15:16:02,953  INFO SettingsFactory:90 - JDBC 2 max batch size: 15
15:16:02,953  INFO SettingsFactory:99 - Query language substitutions: {no='N', yes='Y'}
15:16:02,953  INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
15:16:02,968  INFO Configuration:1057 - instantiating and configuring caches
15:16:03,250  INFO SessionFactoryImpl:119 - building session factory
15:16:03,687  INFO SessionFactoryObjectFactory:82 - no JNDI name configured
15:16:03,843  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
15:16:03,843 ERROR JDBCExceptionReporter:46 - Batch entry 0 [Ljava.lang.Object;@156b386 was aborted.
15:16:03,859  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
15:16:03,859 ERROR JDBCExceptionReporter:46 - ERROR:  ExecAppend: Fail to add null value in not null attribute threadid

15:16:03,859  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
15:16:03,859 ERROR JDBCExceptionReporter:46 - Batch entry 0 [Ljava.lang.Object;@156b386 was aborted.
15:16:03,859  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
15:16:03,859 ERROR JDBCExceptionReporter:46 - ERROR:  ExecAppend: Fail to add null value in not null attribute threadid

15:16:03,875 ERROR JDBCExceptionReporter:38 - Could not execute JDBC batch update
Batch entry 0 [Ljava.lang.Object;@156b386 was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:140)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
15:16:03,890 ERROR SessionImpl:2269 - Could not synchronize database state with session
net.sf.hibernate.JDBCException: Could not execute JDBC batch update
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:125)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:140)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: Batch entry 0 [Ljava.lang.Object;@156b386 was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   ... 29 more

___________________________________________________________
and this is my code from my main routine class.


Code:
Post thispost=new Post(1,1,1,new String("GUI: AWT vs Swing"),new String("Somebody told me that my interface looked hoakie and asked if Java can have GUIs that are as appealing as his VB interfaces. I just put basic swing components on my interface: buttons, text boxes, labels, etc...I didn't spend a whole lot of time figuring out how to change object attributes to possibly enhance my interface. As far as I understand swing is newer and better than AWT. Is this correct. Or do AWT interfaces look better? Can anybody direct me in this area and suggest the best way to get nice looking interfaces done with Java? Is this a drawback of Java?"),new Timestamp(System.currentTimeMillis()),1,1);
         session.save(thispost);
         System.out.println("Post saved:" + thispost.getPosttopic());
         session.flush();
         session.connection().commit();


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 4:44 am 
Beginner
Beginner

Joined: Thu Feb 19, 2004 6:07 am
Posts: 21
And my Post class contructor looks like this -
Code:
public Post(int id, int threadid, int replyid, String posttopic, String posttext, Timestamp timestmp, int f_id, int p_id){


so 1 is the threadid - and hence - this error: 15:16:03,859 ERROR JDBCExceptionReporter:46 - ERROR: ExecAppend: Fail to add null value in not null attribute threadid
>>does not appear to make sense...

I'm sure there is a better explanation though.
Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 4:56 am 
Beginner
Beginner

Joined: Thu Feb 19, 2004 6:07 am
Posts: 21
Sorry for the duplicate post - musta been mouse-happy.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 26, 2004 5:20 am 
Beginner
Beginner

Joined: Thu Feb 19, 2004 6:07 am
Posts: 21
And here is the DEBUG log:

Code:
16:14:37,875  INFO Environment:432 - Hibernate 2.1.1

16:14:37,890  INFO Environment:466 - loaded properties from resource hibernate.properties: {hibernate.connection.username=sanjeev, hibernate.connection.password=, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql:frmdb, jdbc.batch_size=0, hibernate.connection.driver_class=org.postgresql.Driver, hibernate.query.substitutions=yes 'Y', no 'N'}
16:14:37,890  INFO Environment:481 - using CGLIB reflection optimizer
16:14:37,906  INFO Configuration:318 - Mapping resource: Forum.hbm.xml
16:14:38,500 DEBUG DTDEntityResolver:20 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
16:14:38,500 DEBUG DTDEntityResolver:29 - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
16:14:38,734  INFO Binder:225 - Mapping class: Forum -> forum
16:14:38,843 DEBUG Binder:449 - Mapped property: forum_id -> forum_id, type: integer
16:14:38,859 DEBUG Binder:449 - Mapped property: name -> name, type: string
16:14:38,859  INFO Configuration:318 - Mapping resource: Post.hbm.xml
16:14:38,875 DEBUG DTDEntityResolver:20 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
16:14:38,890 DEBUG DTDEntityResolver:29 - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
16:14:38,921  INFO Binder:225 - Mapping class: Post -> post
16:14:38,937 DEBUG Binder:449 - Mapped property: id -> id, type: integer
16:14:38,937 DEBUG Binder:449 - Mapped property: replyid -> replyid, type: integer
16:14:38,937 DEBUG Binder:449 - Mapped property: threadid -> replyid, type: integer
16:14:38,937 DEBUG Binder:449 - Mapped property: posttopic -> posttopic, type: string
16:14:38,937 DEBUG Binder:449 - Mapped property: posttext -> posttext, type: string
16:14:38,937 DEBUG Binder:449 - Mapped property: timestmp -> timestmp, type: timestamp
16:14:38,937 DEBUG Binder:449 - Mapped property: f_id -> f_id, type: integer
16:14:38,937 DEBUG Binder:449 - Mapped property: p_id -> p_id, type: integer
16:14:38,953 DEBUG Binder:449 - Mapped property: forum -> f_id, type: Forum
16:14:38,953 DEBUG Binder:449 - Mapped property: poster -> p_id, type: Poster
16:14:38,953  INFO Configuration:318 - Mapping resource: Poster.hbm.xml
16:14:38,968 DEBUG DTDEntityResolver:20 - trying to locate http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath under net/sf/hibernate/
16:14:38,968 DEBUG DTDEntityResolver:29 - found http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd in classpath
16:14:39,015  INFO Binder:225 - Mapping class: Poster -> poster
16:14:39,015 DEBUG Binder:449 - Mapped property: poster_id -> poster_id, type: integer
16:14:39,015 DEBUG Binder:449 - Mapped property: name -> name, type: string
16:14:39,015 DEBUG Binder:449 - Mapped property: usernm -> usernm, type: string
16:14:39,015 DEBUG Binder:449 - Mapped property: joindt -> joindt, type: timestamp
16:14:39,015  INFO Configuration:584 - processing one-to-many association mappings
16:14:39,015  INFO Configuration:593 - processing one-to-one association property references
16:14:39,031  INFO Configuration:618 - processing foreign key constraints
16:14:39,031 DEBUG Configuration:628 - resolving reference to class: Forum
16:14:39,031 DEBUG Configuration:628 - resolving reference to class: Poster
16:14:39,062  INFO Dialect:82 - Using dialect: net.sf.hibernate.dialect.PostgreSQLDialect
16:14:39,078  INFO SettingsFactory:62 - Use outer join fetching: true
16:14:39,078  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
16:14:39,078  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 20
16:14:39,093  INFO DriverManagerConnectionProvider:71 - using driver: org.postgresql.Driver at URL: jdbc:postgresql:frmdb
16:14:39,093  INFO DriverManagerConnectionProvider:72 - connection properties: {user=sanjeev, password=}
16:14:39,109  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended)
16:14:39,109 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
16:14:39,109 DEBUG DriverManagerConnectionProvider:94 - opening new JDBC connection
16:14:39,328 DEBUG DriverManagerConnectionProvider:100 - created connection to: jdbc:postgresql:frmdb, Isolation Level: 2
16:14:39,343 DEBUG DriverManagerConnectionProvider:114 - returning connection to pool, pool size: 1
16:14:39,343  INFO SettingsFactory:89 - Use scrollable result sets: true
16:14:39,343  INFO SettingsFactory:90 - JDBC 2 max batch size: 15
16:14:39,343  INFO SettingsFactory:99 - Query language substitutions: {no='N', yes='Y'}
16:14:39,359  INFO SettingsFactory:110 - cache provider: net.sf.ehcache.hibernate.Provider
16:14:39,359  INFO Configuration:1057 - instantiating and configuring caches
16:14:39,656  INFO SessionFactoryImpl:119 - building session factory
16:14:39,656 DEBUG SessionFactoryImpl:125 - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=, sun.boot.library.path=D:\j2sdk1.4.2\jre\bin, java.vm.version=1.4.2-beta-b19, hibernate.connection.username=sanjeev, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 1, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\dasgupta\forumproj, java.runtime.version=1.4.2-beta-b19, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=D:\j2sdk1.4.2\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=D:\DOCUME~1\sanjeev\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, log4j.configuration=log4j-to-file.properties, java.library.path=D:\j2sdk1.4.2\jre\bin;.;D:\WINDOWS\System32;D:\WINDOWS;d:\apache-ant-1.6.0\bin\;d:\j2sdk1.4.2\bin;d:\apache-ant-1.6.0\bin\;d:\j2sdk1.4.2\bin;d:\apache-ant-1.6.0\bin\;d:\j2sdk1.4.2\bin;D:\WINDOWS\System32;d:\postgres\bin;;d:\postgres\bin;;d:\postgres\bin;, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=D:\Documents and Settings\sanjeev, user.timezone=Asia/Bangkok, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.connection.driver_class=org.postgresql.Driver, java.class.path=D:\dasgupta\forumproj\lib;D:\dasgupta\forumproj\bin;D:\dasgupta\forumproj\lib\hibernate2.jar;D:\dasgupta\forumproj\lib\ant.jar;D:\dasgupta\forumproj\lib\c3p0.jar;D:\dasgupta\forumproj\lib\cglib2.jar;D:\dasgupta\forumproj\lib\commons-collections.jar;D:\dasgupta\forumproj\lib\commons-dbcp.jar;D:\dasgupta\forumproj\lib\commons-lang.jar;D:\dasgupta\forumproj\lib\commons-logging.jar;D:\dasgupta\forumproj\lib\commons-pool.jar;D:\dasgupta\forumproj\lib\concurrent.jar;D:\dasgupta\forumproj\lib\connector.jar;D:\dasgupta\forumproj\lib\dom4j.jar;D:\dasgupta\forumproj\lib\ehcache.jar;D:\dasgupta\forumproj\lib\jaas.jar;D:\dasgupta\forumproj\lib\jboss-cache.jar;D:\dasgupta\forumproj\lib\jboss-common.jar;D:\dasgupta\forumproj\lib\jboss-jmx.jar;D:\dasgupta\forumproj\lib\jboss-system.jar;D:\dasgupta\forumproj\lib\jcs.jar;D:\dasgupta\forumproj\lib\jdbc2_0-stdext.jar;D:\dasgupta\forumproj\lib\jgroups.jar;D:\dasgupta\forumproj\lib\jta.jar;D:\dasgupta\forumproj\lib\junit.jar;D:\dasgupta\forumproj\lib\kunststoff.jar;D:\dasgupta\forumproj\lib\log4j.jar;D:\dasgupta\forumproj\lib\odmg.jar;D:\dasgupta\forumproj\lib\optional.jar;D:\dasgupta\forumproj\lib\oscache.jar;D:\dasgupta\forumproj\lib\pg73jdbc2ee.jar;D:\dasgupta\forumproj\lib\pg74.1jdbc3.jar;D:\dasgupta\forumproj\lib\proxool.jar;D:\dasgupta\forumproj\lib\swarmcache.jar;D:\dasgupta\forumproj\lib\xalan.jar;D:\dasgupta\forumproj\lib\xerces.jar;D:\dasgupta\forumproj\lib\xml-apis.jar, user.name=sanjeev, hibernate.query.substitutions=yes 'Y', no 'N', java.vm.specification.version=1.0, java.home=D:\j2sdk1.4.2\jre, sun.arch.data.model=32, hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql:frmdb, [b]jdbc.batch_size=0,[/b] user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2-beta, java.ext.dirs=D:\j2sdk1.4.2\jre\lib\ext, sun.boot.class.path=D:\j2sdk1.4.2\jre\lib\rt.jar;D:\j2sdk1.4.2\jre\lib\i18n.jar;D:\j2sdk1.4.2\jre\lib\sunrsasign.jar;D:\j2sdk1.4.2\jre\lib\jsse.jar;D:\j2sdk1.4.2\jre\lib\jce.jar;D:\j2sdk1.4.2\jre\lib\charsets.jar;D:\j2sdk1.4.2\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
16:14:40,078 DEBUG SessionFactoryObjectFactory:39 - initializing class SessionFactoryObjectFactory
16:14:40,093 DEBUG SessionFactoryObjectFactory:76 - registered: 40288a47faf11aa500faf11aa84e0000 (unnamed)
16:14:40,093  INFO SessionFactoryObjectFactory:82 - no JNDI name configured
16:14:40,093 DEBUG SessionFactoryImpl:196 - instantiated session factory
16:14:40,156 DEBUG SessionImpl:528 - opened session
16:14:40,171 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
16:14:40,171 DEBUG DriverManagerConnectionProvider:78 - total checked-out connections: 0
16:14:40,171 DEBUG DriverManagerConnectionProvider:84 - using pooled JDBC connection, pool size: 0
16:14:40,171 DEBUG SQL:223 - select nextval ('hibernate_sequence')
16:14:40,171 DEBUG BatcherImpl:227 - preparing statement
16:14:40,187 DEBUG SequenceGenerator:80 - Sequence identifier generated: 14
16:14:40,187 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
16:14:40,187 DEBUG BatcherImpl:240 - closing statement
16:14:40,187 DEBUG SessionImpl:786 - saving [Post#14]
16:14:40,187 DEBUG Cascades:341 - id unsaved-value strategy NULL
16:14:40,187 DEBUG Cascades:341 - id unsaved-value strategy NULL
16:14:40,203 DEBUG SessionImpl:2193 - flushing session
16:14:40,203 DEBUG SessionImpl:2321 - Flushing entities and processing referenced collections
16:14:40,203 DEBUG SessionImpl:2664 - Processing unreferenced collections
16:14:40,218 DEBUG SessionImpl:2678 - Scheduling collection removes/(re)creates/updates
16:14:40,218 DEBUG SessionImpl:2217 - Flushed: 1 insertions, 0 updates, 0 deletions to 1 objects
16:14:40,218 DEBUG SessionImpl:2222 - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections
16:14:40,218 DEBUG Printer:75 - listing entities:
16:14:40,234 DEBUG Printer:82 - Post{p_id=0, timestmp=26 February 2004 16:14:40, [b]replyid=1, posttopic=GUI: AWT vs Swing, posttext=Somebody told me that my interface looked hoakie and asked if Java can have GUIs that are as appealing as his VB interfaces. I just put basic swing components on my interface: buttons, text boxes, labels, etc...I didn't spend a whole lot of time figuring out how to change object attributes to possibly enhance my interface. As far as I understand swing is newer and better than AWT. Is this correct. Or do AWT interfaces look better? Can anybody direct me in this area and suggest the best way to get nice looking interfaces done with Java? Is this a drawback of Java?, forum=Forum#1, threadid=1, f_id=0, id=14, poster=Poster#1[/b]}
16:14:40,234 DEBUG SessionImpl:2258 - executing flush
16:14:40,250 DEBUG EntityPersister:454 - Inserting entity: [Post#14]
16:14:40,250 DEBUG BatcherImpl:192 - about to open: 0 open PreparedStatements, 0 open ResultSets
16:14:40,250 DEBUG SQL:223 - [b]insert into post (replyid, timestmp, f_id, p_id, id) values (?, ?, ?, ?, ?)[/b]

UM - DON'T UNDERSTAND THIS - THE POST CONSTRUCTOR IS NOT  LIKE THIS :-(

16:14:40,250 DEBUG BatcherImpl:227 - preparing statement
16:14:40,250 DEBUG EntityPersister:389 - Dehydrating entity: [Post#14]
16:14:40,250 DEBUG Cascades:341 - id unsaved-value strategy NULL
16:14:40,250 DEBUG Cascades:341 - id unsaved-value strategy NULL
16:14:40,250 DEBUG BatcherImpl:28 - Adding to batch
16:14:40,250 DEBUG BatcherImpl:50 - Executing batch size: 1
16:14:40,296 DEBUG JDBCExceptionReporter:36 - SQL Exception
Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:144)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
16:14:40,312  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:14:40,312 ERROR JDBCExceptionReporter:46 - Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
16:14:40,312  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:14:40,312 ERROR JDBCExceptionReporter:46 - ERROR:  ExecAppend: [b]Fail to add null value in not null attribute threadid[/b]

>>ABOVE IT JUST SAID THAT THREAD IS IS 1 - NOW IT IS NULL ? :-(
16:14:40,312 DEBUG BatcherImpl:199 - done closing: 0 open PreparedStatements, 0 open ResultSets
16:14:40,312 DEBUG BatcherImpl:240 - closing statement
16:14:40,328 DEBUG JDBCExceptionReporter:36 - SQL Exception
Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:144)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
16:14:40,328  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:14:40,328 ERROR JDBCExceptionReporter:46 - Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
16:14:40,328  WARN JDBCExceptionReporter:38 - SQL Error: 0, SQLState: null
16:14:40,328 ERROR JDBCExceptionReporter:46 - ERROR:  ExecAppend: Fail to add null value in not null attribute threadid

16:14:40,328 ERROR JDBCExceptionReporter:38 - Could not execute JDBC batch update
Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:144)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
16:14:40,328 ERROR SessionImpl:2269 - Could not synchronize database state with session
net.sf.hibernate.JDBCException: Could not execute JDBC batch update
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:125)
   at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2311)
   at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
   at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
   at QueryEngine.runprog(QueryEngine.java:144)
   at QueryEngine.<init>(QueryEngine.java:39)
   at Myfe.actionPerformed(Myfe.java:111)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
   at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
   at java.awt.Component.processMouseEvent(Component.java:5099)
   at java.awt.Component.processEvent(Component.java:4896)
   at java.awt.Container.processEvent(Container.java:1569)
   at java.awt.Component.dispatchEventImpl(Component.java:3614)
   at java.awt.Container.dispatchEventImpl(Container.java:1627)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
   at java.awt.Container.dispatchEventImpl(Container.java:1613)
   at java.awt.Window.dispatchEventImpl(Window.java:1606)
   at java.awt.Component.dispatchEvent(Component.java:3476)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
   at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: Batch entry 0 [Ljava.lang.Object;@739f3f was aborted.
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:105)
   at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
   at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:118)
   ... 29 more


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.