This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java in General and the fly likes stmt.executeUpdate(sql) - exception null Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "stmt.executeUpdate(sql) - exception null" Watch "stmt.executeUpdate(sql) - exception null" New topic
Author

stmt.executeUpdate(sql) - exception null

Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 147
have somthing like this, and falls into red marked code


The sql is plain simple, this:



I run like 15 sql like this with other values and it dies on exactly this one, the rest of them works ok.

Any tip ?


Searchable nature photo gallery: http://agrozoo.net/jsp/Galery.jsp?l2=en
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13869
    
  10

What kind of exception are you getting? Change the code to handle the exception to this:

Then copy & paste the stack trace that is printed here.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Miran Cvenkel
Ranch Hand

Joined: Nov 23, 2010
Posts: 147
Thanks for tip.

Getting somewhere, connection is null for some reason ....
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13869
    
  10

So it's a NullPointerException.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stmt.executeUpdate(sql) - exception null
 
Similar Threads
jdbc , sql injection & mysql keywords!
NullPointerException with stmt.executeUpdate
JDBC insert error
how to get the next sequence number ..
Setting Location for database to be used by javadb