File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes problem in login page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem in login page" Watch "problem in login page" New topic
Author

problem in login page

Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47

Hi All,

I my project I am using Oracle database,using Hibernate I remotely connect to the database.
When I deploy the war and run the project I am able to login into my application,but suppose next day I try to login in that application it gives "Invalid username or password" it means not able to login in application,
and than I deploy war and again login it login successfully.login page is normal jsp page.

please give the suggestions.
Thanks in advance.


Divya
SCJP1.6
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

Till Now, what have you done to debug this? i.e. Have you made sure that that parameters are passed correctly and the connection to database is not lost, also HQL Queries are executed correctly and the results it returns is correct .

What exactly is the root cause for the error?
Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47

Prasad Krishnegowda wrote:Till Now, what have you done to debug this? i.e. Have you made sure that that parameters are passed correctly and the connection to database is not lost, also HQL Queries are executed correctly and the results it returns is correct .

What exactly is the root cause for the error?


But it is working when for whole day it create problems for the next day when without deploy the war I try to login into the page.
Oli Wurster
Greenhorn

Joined: Mar 09, 2012
Posts: 6
Could you post some source code here? Or could you give us more information about the database schema or the database connection? Can you log into the application several times on that one day?
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

Divya Chandel wrote:
But it is working when for whole day it create problems for the next day

What happens the nextday? Is the server restarted? you need to TellTheDetails..
Divya Chandel wrote:
when without deploy the war I try to login into the page.

I didn't understand this, can you please be more clear on this.. Without the war file deployed, how will the application be launched?
Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47


I check, it gives problem when I shut-down and then start my system(PC).
But Database is not on my system(Remote Database),I am not able to understand this
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
When you shutdown your machine, all your java processes and database connection to remote machine get killed. When you start your PC in the morning, you will have to make sure that
web server is up and application is deployed as war.
Oli Wurster
Greenhorn

Joined: Mar 09, 2012
Posts: 6
Please send us a code snippet of your hibernate connection (hibernate.cfg.xml). And a code snippet of the authentication function would be useful too. Have you tried to connect to oracle with an oracle client (sqlplus / sqldeveloper)?
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 587
    
    3

So, basically whenever you restart your server, you get this problem. I repeat, What have you done to debug this? Your log files are not giving you any information as DB connection failed or any other error?
Divya Chandel
Ranch Hand

Joined: Jun 09, 2011
Posts: 47

Oli Wurster wrote:Please send us a code snippet of your hibernate connection (hibernate.cfg.xml). And a code snippet of the authentication function would be useful too. Have you tried to connect to oracle with an oracle client (sqlplus / sqldeveloper)?

My connection String is (hibernate .cfg.xml file)


Database connection code is-

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in login page