peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Connection at line 115 is null because you did only call methods to establish connection, but never actually assigned to the one that you declared on 30. You just call for it with

BankDBDriver.loadDriver();
BankDBDriver.makeConnection();

but that connections stays in your BankDBDrviver class. Give makeConnection() method return type of Connection and assign it to "con" so you can use it in this class

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This is Java section. You either have to create new thread there (and please "Mark As Solved" this), or tell me now and I can move whole this thread to one of the sections.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@jon.kiparsky agree notepad for win!

@ztini you would be first person that I met using BlueJay in industry, or perhaps you are still student...
UML diagrams
>I would say rather rarely used as their take hell of time to create and people do understand them differently in what they supposed to mean

rapid deployment of test classes and debugging
>Any IDE can do it so you missed point here

Why anyone would suggest not using an IDE is beyond me.
>Simple, to understand basics. To get hang of errors that compiler throws at me and be able to deal with them no matter what IDE I may use or be forced to use (there are still some companies that persist on use of Eclipse or NetBeans, mostly because management decided so 10 years ago). To be able compile robust program from command line (you never know when you will be on client side trying to debug server application but you cannot not connect with your beloved desktop/laptop or install your favourite IDE because of complicated security measurement company put in place to protect their network/servers).
Call me crazy or stupid but while learning Java I did 3-4months only notepad with console, after that I used JCreator LE (his is free version, nice GUI, only syntax highlighting, no auto suggestion/completer) for good 2 years.


It's like telling an art student they can't use acrylic paint, paint brushes, or a canvas---they …

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Java doesn't support this. You need to do it in C or C++

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please do not double post in the future. There is 30 min period you can always edit your post to add new information

Line 109 you are calling BankDBDriver.retrieveData(); is throwing error. I presume you have another class BankDBDriver that you need to post before we can help you. Or was that above line mistake and you just wanted to call retrieveData() that is on line 112?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please do not post this sort of code here. The file/s been obfuscated for a reason (security, commercial interest protection).

Thread closed .

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm sorry I'm not willing to go through that code it does look very messy. Have look at Processing XML with Java you do not necessary have to read it whole, you can simply start with JDOM which is very straight forward by my opinion

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Not sure if these sites are suitable just after one month. The thing is that you need to grasp basic from command line, to gui, simple web development and database connectivity and then just expand in area of interest through personal mini projects or by looking on or perhaps participating in open source projects. Learning new tools and ideas...
Nice that you have confidence, but one month is very short period to learn (any) programming language.
All in all I can recommend that you start actively participating on forums like this, try to help people (maybe try to solve problem on your own) and listen what others have to say

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thanks friend, you have solved the problem it was ',' and not ';'. It works perfectly now!
P.S.
It's awfull when you are convinced that the problem is something else! :)

Problem is that you did not posted precise copy of code that you been trying to execute. Out of the two lines there nobody would have been wise...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@benmar congratulations, you just provided same link as I already did. Next time please read previous replies...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well then only route left is to find out from whom and what models are these components and check manufacturers websites for appropriate drivers

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

>>So it's the || operator that doesn't verify its second parameter ?
Not exactly. It is combination of what you want to check for and what would be next step after you pass this test.

>>Ok, but the problem still persists because it's the string returned that is null. So why didn't struts initialised it? It initialised the second parameter, why not the first?
There isn't much I can help as I do not have knowledge of Struts, only logical thing I can advice is to have closer look on your Project object and see why it wasn't populated. Check how you are populating it, check that you are are storing data into database. Testing frameworks are your best friend...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Well lets have small show&see

public class NullObjectTest{

	public static void main(String[] args){
		Project test = new Project("T-E-S-T");
		Project empty = new Project("");

		System.out.println("Validate initialize project by Peter");
		validateByPeter(test);
		validateByPeter(empty);
		validateByPeter(null);

		System.out.println("\n\nValidate initialize project");
		validate(test);
		validate(empty);
		validate(null);
	}

	public static void validate(Project project){
		if(project !=null && project.getName().length()==0){
			System.out.println( "Name is required." );
		}else{
			System.out.println("Name is "+ project.getName());
		}
	}

	public static void validateByPeter(Project project){
		if(project ==null || project.getName().length()==0){
			System.out.println( "Name is required." );
		}else{
			System.out.println("Name is "+ project.getName());
		}
	}

	static class Project{
		private String name;

		public Project(String name){
			this.name = name;
		}

		public String getName(){
			return name;
		}
	}
}

Can you tell me what are the results?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

How I read that statement is: If project is not null and length of project name is equal to zero add error message.

Real time test: What happens if project is null? Well I'm project and I'm null therefore "not null" statement is not me, lets check if name length is equal to zero. Bang NullPointException

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Before importing make sure you created new database or you may get error

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Nokia is sort of misbehaving, many times stuff seems to be working on them but then moving to different manufacturer (Sony Ericsson, Samsung) issue does surface. As for Lava phone I have no idea. I tried to look for something like developer section or Lava sdk/emulator but quick search didn't get anything. What you need is to be able to debug your application directly on device which is easily done if manufacturer provide sdk for its products. Sorry :(

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes that can be easily done with MySQL GUI Tools :) (hence why I didn't go in details how to create backup)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I expect that you already have database installed on sever (MySQL/Oracle/Postgres). What you can always try is to create backup or export of existing DB in SQL or any convenient format to you and then try to import it on server side database

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Check this post

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Are you sure you wanted to use if(project !=null && project.getName().length()==0) and not if(project ==null || project.getName().length()==0) (sort of crude check actually)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Sending you code here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@coervivekmca
1. Read previous reply "Thanks for reply but i already figured out the answer "
2. Your code is recipe for disaster

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

set that as the host name for the smtp host?

I wouldn't even bother with this dude any more after revious experiences.
He does dump what ever question on forum waiting to get immediate answer, when you ask him for more details he doesn't reply and instead create another thread with modified requirements.
If you provide him with some help he doesn't say if it helped, doesn't say thank you and is lazy to even mark threads as solved. To top all these he is absolute lazy git with no intention of searching, just like here http://www.daniweb.com/forums/post1477199.html#post1477199 where I told him to ask these questions on goodady, even provided links.
Another individual that fits perfectly into category of I have XYZ certifications, I can do it all and in reality he has no clue...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This question is not well formed.
Are you asking how to install database, then check this
If you ask how to proceed when you want to connect midlet with database through servlet is a have servlet waiting for GET/POST request, some logic to take care of getting through received parameters and calling appropriate method which will talk to database, then return results to midlet.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This problem is most commonly due to programmer omitting use of threads to keep connection alive. Have look at book Beginning J2ME - From Novice to Professional - chapter 10 Connecting to the World. There is a good explanation on mobile devices and use of thread in Kicking Butt with MIDP and MSA: Creating Great Mobile Applications - chapter 18.3 Use Threads, but this books is only available through Safari Books service

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

here http://www.daniweb.com/forums/thread348178.html

I didn't asked it because I didn't know it, but because there are number of ways to do it (by configuring database, programmatically from code) and I wanted to know how OP decided to solve it it. Next time please read whole thread...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I also got the empty page. This page also turns up blank. He only posted an hour ago on all these threads, twice on the first blank page.

Because it is same thread :D

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@AndreRet I sorted one of the threads, but in case of second one I cannot open it (getting empty page). I left message for Dani to have look at it.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

First 5 statements is from Appframework. I couldn't found ready to use JAR therefore you will have to go their SVN, download source code for it, compile it and you will get JAR to use. Or perhaps is time for you to look into Maven 2 and create pom file (pom.xml) that will take care of getting all libraries for you.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Would you care to share solution?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Extract downloaded ZIP, inside you will find "lib" folder with number of libraries.
If I'm not mistaken you need in your project create directory "res" or "lib" (recommended to do on top level), copy&paste libraries there. Right click on project name, select Properties, select Build and then Libraries&Resources, in right side select Add JAR/ZIP and navigate to the location of libraries. (See this article with screenshots)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm a beginner in java programming and i need some body to help me to know more how to develop application for mobile. I need development tools and tutorials

1. hijacking somebody else question with your own is not nice
2. read Starting mobile development [SDK / tutorials / resources / faq] on the top of this section

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Already double posted in C section. Please follow discussion over there, as this thread is now closed.

@Prisms please read forum rules and do not double post as this is not welcome

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

PayPal provide SDKs for

  • Java
  • ASP.NET
  • Ruby
  • Classic ASP
  • PHP
  • ColdFusion

You can download necessary stuff here and examples can be found here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Opps, should be preparedStatement = conn.prepareStatement(todo); That's what happen when you type at work during lunch break...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Any reason to receive generic Object instead of receiving ModelNY? Also why not using PreparedStatement as showed bellow?

public void connect(ModelNY modelNY) {
		  Connection conn = null;
		  try {
   
		      Class.forName("com.mysql.jdbc.Driver").newInstance();
		      conn = DriverManager.getConnection("jdbc:mysql://localhost/test", "root", "Mg78QnuE");
		  
String todo = ("INSERT INTO personer(idPersoner, forNavn, etterNavn, adresse, epost) "+
		        	  "values (?,?,?,?,?)") ;
			  
		      PreparedStatement statement = conn.createStatement();
		      statement.setString(1, modelNY.getPersonID());
		      statement.setString(2, modelNY.getFName());
		      statement.setString(3, modelNY.getLName());
		      statement.setString(4, modelNY.getAdress());
		      statement.setString(5, modelNY.getEmail());
	          statement.executeUpdate(todo);
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Nobody can advise without seeing code...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@varia sorry about that if was it spotted in time we could have it moved out

@coervivekmca with your ignorance toward forum rules you will get banned from here soon

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

1. By posting in correct section (post been move there)
2. Maybe by reading this post

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There are some hot heads that thin it is OK to talk people in the same way as they do with their mates, "you must be stupid to think I didn't try..." and getting in more abusive terms. Warning cooled down many of these, the other either left or been "moved"

Pretending to be answering question and making lousy comments is not against the rules. Also daniweb community doesn't take it kindly and guilty person usually feel through their reputation overview. Once it established that person is ignoring attempts for moderation and change of attitude, then we imply first warning that can be later followed by infraction/s, which after accumulating 10 points lead to ban.

The case in discussion is one of the few that occurs once in a while and are just rare. Applying rules as suggested by you is not good idea.

I believe there is not a one person with certain amount of posts and regularity of posting that did not get in an argument about something while posting here...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yes, your best chance is to get some hosting plan so IP would remain same. Then provide a way to access database, PHP/Java/.NET service that accept request and some parameters, runs the query and return results back to device

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@VernonDozier the person was closely monitored due to previous circumstances. However majority of the posts been with in rules so we couldn't "interfere". When something went over the line appropriate steps been taken.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That tutorial is exactly what you need because your "local" database is local only to your laptop and not to any other device. And if you want to share that database you would have to provide means to do so like acquiring static IP for your laptop so you could connect to it from anywhere in the world.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@vijaybrar Do not post the same question multiple times. You are dealing with same string manipulation task so do not create multiple threads for it. As James already kindly pointed we expect you to work on it and prove you doing your work before we decide to advice on it. So come back when you have some code to discuss, we are NOT 24/7 coding support for lazy students

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Thread closed. If you want to follow discussion you can do so here

@ajayb in the future instead of double posting hit "Flag Bad Post" button and ask for post to be move to correct section

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Closing thread as OP will only come back, if ever, in 6 months and hopefully solve her personality and behaviour issues in the mean time

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Answer is here

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Here is whole package from HP website. Your best choice is to use Vista drivers, however you need to choose if 32bit or 64bit version since I do not know what Windows 7 version you used.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I'm 15. AND I'M NOT BEING CHILDISH!!!

Then take care what you posting and do not criticize suggestions that been given on your lousy descriptions