Breaking News
Home / Java (page 3)

Java

Data truncation: Data too long for column – JDBC

Issue Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘columname‘ at row 1     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3595)     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)     at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2625)     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2415)     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2333)     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2318)     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)     at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)     at com.infuze.service.subscription.dao.SubscriptionDao.addSubscriptionTrail(SubscriptionDao.java:674)     at com.infuze.service.subscription.workflow.SubscriptionAddonWorkflow.executeProcess(SubscriptionAddonWorkflow.java:100)     … 10 more<!

Read More »

Hibernate SQL Error: 904

Issue 2012-02-21 12:20:00,341[ExecuteThread: ’93’ for queue: ‘default’]DEBUG CustomerDAOFactory [#23640743#]-method : CustomerAttribDAO getCustomerAttributesDAO() 2012-02-21 12:20:00,341[ExecuteThread: ’93’ for queue: ‘default’]DEBUG CustomerAttributesDAOImpl [#23640743#]-method : CustomerAttributes findOrCreateBy(String accountId) 2012-02-21 12:20:00,350[ExecuteThread: ’93’ for queue: ‘default’]WARN JDBCExceptionReporter [#23640743#]-SQL Error: 904, SQLState: 42000 2012-02-21 12:20:00,350[ExecuteThread: ’93’ for queue: ‘default’]ERROR JDBCExceptionReporter [#23640743#]-ORA-00904: “CUSTOMERAT0_”.”AUTH_REDUCTION_FLG”: invalid identifier 2012-02-21 12:20:00,350[ExecuteThread: ’93’ …

Read More »

How to progamatically get the Java version?

Snippet The key here is to use the system property java.version and get minor and point version.   public class CheckVersion {   public static void main(String[] args) {     String version = System.getProperty(“java.version”);     char minor = version.charAt(2);     char point = version.charAt(4);     if(minor …

Read More »

java.lang.OutOfMemoryError: nativeGetNewTLA

Exception 2011-11-22 13:07:43,988[IncomingMailProcessor]ERROR IncomingMailProcessor -Error while processing mailjavax.ejb.EJBException: EJB Exception: : java.lang.OutOfMemoryError: nativeGetNewTLA        at sun.reflect.UTF8.encode(UTF8.java:18)        at sun.reflect.ClassFileAssembler.emitConstantPoolUTF8(ClassFileAssembler.java:85)        at sun.reflect.AccessorGenerator.emitBoxingContantPoolEntries(AccessorGenerator.java:326)        at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:337)        at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)        at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:301)        at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1191)        at java.io.ObjectStreamClass.access$1300(ObjectStreamClass.java:47)        at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:347)        at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:333)        at java.io.ObjectStreamClass.lookup0(ObjectStreamClass.java:253)        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java)        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1015)        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1337)        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1309)        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1252)        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1057)        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)<!

Read More »