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 Error in opening connection 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 » Databases » Object Relational Mapping
Bookmark "Error in opening connection" Watch "Error in opening connection" New topic
Author

Error in opening connection

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I am using swing with hibernate. My application was working fine. But suddenly this exception is thrown in every classes which connects with database(either for insert or retrieval)

Can any one explain me the reason behind this?




kunal
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
I have committed a blunder. I have create Configuration , SessionFactory, session and Transaction object in every method(each method runs a different SQL query) of 6 DAO classes.

Is that the reason for this Exception? Please Explain
Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
No reply
E Armitage
Rancher

Joined: Mar 17, 2012
Posts: 761
    
    9
The XE version has some restrictions on the number of processes.
Log into the database as SYS and run the command
where SomeValue is something higher than 100, try 200.
You'd need to restart the database after running that command.
And yes, don't repeat yourself in the code. Create reusable classes/methods.

Kunal Lakhani
Ranch Hand

Joined: Jun 05, 2010
Posts: 618
Thanks E Armitage for your suggestions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error in opening connection
 
Similar Threads
Cannot insert record into Database!
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
Network adapter connection error
Got minus one from a read call - IO Exception
java.sql.SQLException: Io exception: Unknown host specified