473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

java + database

254 100+
Expand|Select|Wrap|Line Numbers
  1.  
  2. imageValue=null
  3.  
  4. SEVERE:-->
  5. com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'Gout_msgtext' cannot be null
  6.     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
  7.     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
  8.     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
  9.     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
  10.     at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
  11.     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
  12.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)
  13.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
  14.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
  15.     at asiamsms.dbo.Gout.insertRequest(Gout.java:363)
  16.     at asiamsms.product.ProcessM$RemindTask.run(ProcessM.java:234)
  17.     at java.util.TimerThread.mainLoop(Unknown Source)
  18.     at java.util.TimerThread.run(Unknown Source)
  19.  
the table column 'Gout_msgtext' datatype is longblob , not null.

i set the imageValue to "0" as string, at first;

and then i do this :
Expand|Select|Wrap|Line Numbers
  1. imageValue = Product.product_image;
  2.  
and then i System.print the imageValue, and it get "null" like this --:
Expand|Select|Wrap|Line Numbers
  1. //output
  2. imageValue = null
  3.  
product_image is actually get value from database table, and the data type is also longblob, but get the value as String in java...

i have no idea why it get "null"...
Jul 17 '07 #1
1 1931
r035198x
13,262 8TB
Expand|Select|Wrap|Line Numbers
  1.  
  2. imageValue=null
  3.  
  4. SEVERE:-->
  5. com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'Gout_msgtext' cannot be null
  6.     at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
  7.     at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
  8.     at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
  9.     at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
  10.     at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
  11.     at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
  12.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)
  13.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
  14.     at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
  15.     at asiamsms.dbo.Gout.insertRequest(Gout.java:363)
  16.     at asiamsms.product.ProcessM$RemindTask.run(ProcessM.java:234)
  17.     at java.util.TimerThread.mainLoop(Unknown Source)
  18.     at java.util.TimerThread.run(Unknown Source)
  19.  
the table column 'Gout_msgtext' datatype is longblob , not null.

i set the imageValue to "0" as string, at first;

and then i do this :
Expand|Select|Wrap|Line Numbers
  1. imageValue = Product.product_image;
  2.  
and then i System.print the imageValue, and it get "null" like this --:
Expand|Select|Wrap|Line Numbers
  1. //output
  2. imageValue = null
  3.  
product_image is actually get value from database table, and the data type is also longblob, but get the value as String in java...

i have no idea why it get "null"...
Expand|Select|Wrap|Line Numbers
  1. imageValue = Product.product_image;
can easily result in imageValue being null after that statement. Especially if it is executed before the value of product_image has been initialized.
Jul 17 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: JShurmatz | last post by:
If anyone can shed some light on this problem I would greatly appreciate it. I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web...
2
by: Dave Brueck | last post by:
Below is some information I collected from a *small* project in which I wrote a Python version of a Java application. I share this info only as a data point (rather than trying to say this data...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
5
by: Hassan Naqvi | last post by:
Hi, Basically, I am Java developer. In past I have played with Oracle using Java (JDBC). But this is the time to play with IBM DB2 using Java (JDBC). So kindly help this DB2 newbie. I have a...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
0
oll3i
by: oll3i | last post by:
package library.common; import java.sql.ResultSet; public interface LibraryInterface { public ResultSet getBookByAuthor(String author); public ResultSet getBookByName(String name);
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.