Click here to Skip to main content
15,558,279 members
Home / Discussions / Java
   

Java

 
AnswerRe: video tracking Pin
Django_Untaken5-Jul-17 20:30
Django_Untaken5-Jul-17 20:30 
QuestionObserver Pattern - Restart Thread Again When Exception Occurs Pin
Django_Untaken5-Jul-17 9:52
Django_Untaken5-Jul-17 9:52 
AnswerRe: Observer Pattern - Restart Thread Again When Exception Occurs Pin
Richard MacCutchan5-Jul-17 22:55
mveRichard MacCutchan5-Jul-17 22:55 
QuestionNo value specified for parameter 2 Pin
karengsh3-Jul-17 6:27
karengsh3-Jul-17 6:27 
AnswerRe: No value specified for parameter 2 Pin
Richard Deeming3-Jul-17 6:29
mveRichard Deeming3-Jul-17 6:29 
GeneralRe: No value specified for parameter 2 Pin
karengsh3-Jul-17 6:33
karengsh3-Jul-17 6:33 
GeneralRe: No value specified for parameter 2 Pin
Richard Deeming3-Jul-17 8:06
mveRichard Deeming3-Jul-17 8:06 
GeneralRe: No value specified for parameter 2 Pin
karengsh3-Jul-17 17:33
karengsh3-Jul-17 17:33 
Yes. It is easy to guess the problem.
I was thinking that (if) there is only a way I do not have to repeat the code with the ps.set blah blah blah for all the rest of the parameters and just on the Id alone. There is a lot of repeating code. Alas, I do not know how to overcome something like this.

The problem now is that I got a java.lang.NullPointerException on the line - Integer parameter - Age.

tutor m = new tutor();
		int tutor_id = m.getTutor_id();
		
		PreparedStatement pstmt = connection.prepareStatement(qry, new String[] { "tutor_id" });	
		pstmt.setInt(1, m.getTutor_id());
		pstmt.setString(2, m.getName());
		pstmt.setString(3, m.getNRIC());
		pstmt.setString(4, m.getEmail());
		pstmt.setString(5, m.getAddress2());
		pstmt.setString(6, m.getZipcode());
		pstmt.setString(7, m.getContactNo());
		pstmt.setInt(8, m.getAge()); // problem at this line which said null pointer exception


What causes the problem cos I have double checked I have indeed entered the value into the form.... Frown | :(

I don't think I can find out anything like this via googling except asking in forum....
GeneralRe: No value specified for parameter 2 Pin
Richard MacCutchan3-Jul-17 22:20
mveRichard MacCutchan3-Jul-17 22:20 
GeneralRe: No value specified for parameter 2 Pin
karengsh4-Jul-17 6:51
karengsh4-Jul-17 6:51 
GeneralRe: No value specified for parameter 2 Pin
LynxEffect9-Aug-17 10:56
LynxEffect9-Aug-17 10:56 
Questionusing firefox progmatically with java Pin
Member 132904603-Jul-17 3:45
Member 132904603-Jul-17 3:45 
AnswerRe: using firefox progmatically with java Pin
Richard MacCutchan3-Jul-17 4:22
mveRichard MacCutchan3-Jul-17 4:22 
Questionjava.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken1-Jul-17 10:57
Django_Untaken1-Jul-17 10:57 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan1-Jul-17 21:53
mveRichard MacCutchan1-Jul-17 21:53 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken2-Jul-17 0:39
Django_Untaken2-Jul-17 0:39 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan2-Jul-17 2:37
mveRichard MacCutchan2-Jul-17 2:37 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Django_Untaken2-Jul-17 8:33
Django_Untaken2-Jul-17 8:33 
GeneralRe: java.net.SocketException: Software caused connection abort: socket write error Pin
Richard MacCutchan3-Jul-17 4:23
mveRichard MacCutchan3-Jul-17 4:23 
QuestionInput:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Member 1327696824-Jun-17 8:52
Member 1327696824-Jun-17 8:52 
AnswerRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Michael_Davies24-Jun-17 9:42
Michael_Davies24-Jun-17 9:42 
SuggestionRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
Richard Deeming26-Jun-17 1:46
mveRichard Deeming26-Jun-17 1:46 
AnswerRe: Input:12-4-78==OUTPUT:12041978 //Input:9-4-78==OUTPUT:09041978 Pin
jschell28-Jun-17 7:16
jschell28-Jun-17 7:16 
QuestionHow should I go about getting the generated key from one DAOImpl to another DAOImpl ? Pin
karengsh18-Jun-17 6:30
karengsh18-Jun-17 6:30 
AnswerRe: How should I go about getting the generated key from one DAOImpl to another DAOImpl ? Pin
Mike.F.Hewitt18-Jun-17 12:14
Mike.F.Hewitt18-Jun-17 12:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.