• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting null  RSS feed

 
ajjju kumar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am using webservice for User login authentication ..if i am returning static value it is throwing me exactly given value..

But if i am checking with data base and returning the value dynamically i am getting 'null' value..

Please help me!

Here is the service exposed..

It is giving null value..

Please help me i have tried many times not even getting exception to trace it..

Thanks in Advance..


 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "it"? Which value is null? If that means that that's printed by the exception handler, then extend that to print the stack trace. How else are you going to know what causes the problem? My guess would be that the Connection object is null, but you can easily establish that by putting a lot more logging into the code.

Also note hat -unless you're doing strict validation elsewhere- your code is horribly open to SQL injection attacks. Change it to use a PreparedStatement at the least.
 
ajjju kumar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right..I am getting connection to null

Because of missing database jar file..

I use Eclipse and i given the path of the jar file to the project ..Even though i am getting the ClassNotFoundException for mysql driver.

So i manually placed it in tomcat lib folder ans its worked fine..

@Ulf :: I have a doubt here..if i want to take the webservice developer in Eclipse IDE to production..How can i do that? i mean i have to take the webservice(.aar file) and its client program..

Please assist me..
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would install the Axis2 web app into your servlet container, and drop the .aar file into WEB-INF/services. I'm not familiar with Eclipse' Axis2 support, so can't help with that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!