Click here to Skip to main content
15,888,984 members
Home / Discussions / Java
   

Java

 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ThetaClear29-Sep-14 5:33
ThetaClear29-Sep-14 5:33 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan29-Sep-14 5:43
mveRichard MacCutchan29-Sep-14 5:43 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ZurdoDev30-Sep-14 10:30
professionalZurdoDev30-Sep-14 10:30 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan30-Sep-14 21:02
mveRichard MacCutchan30-Sep-14 21:02 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
ZurdoDev1-Oct-14 1:17
professionalZurdoDev1-Oct-14 1:17 
GeneralRe: Deploy an ASP.NET application on WebLogic Pin
Richard MacCutchan1-Oct-14 1:27
mveRichard MacCutchan1-Oct-14 1:27 
AnswerRe: Deploy an ASP.NET application on WebLogic Pin
jschell29-Sep-14 7:53
jschell29-Sep-14 7:53 
QuestionError connecting Oracle on localhost: Could not get JDBC Connection ? Pin
taibc27-Sep-14 5:56
taibc27-Sep-14 5:56 
Hi everyone,

I am trying to connect Oracle database from my web application using Eclipse.
But I got the error:org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;

I used below code:


Java
public static void initDB(){
		try {
			BasicDataSource ds = new BasicDataSource();
			ds.setDriverClassName("oracle.jdbc.driver.OracleDriver");
			ds.setUrl("jdbc:oracle:thin:@localhost:1521:xe");
			ds.setUsername("mybank");
			ds.setPassword("123456");
			
			jdbcTemplate  = new JdbcTemplate(ds); // throw exceptiong after this line
			isConnected = true;
			initSystemPros();
		} catch (Exception e) {
			System.err.println("Cannot connect to DataBase");
			isConnected = false;
		}
	}


I tried to use SQL Developer to create a connection using above settings and successful.

Do you know what is wrong ?

Thanks and regards,
Tai
AnswerRe: Error connecting Oracle on localhost: Could not get JDBC Connection ? Pin
jorgesys9-Oct-14 11:12
jorgesys9-Oct-14 11:12 
Questionadding smileys to client server program in java Pin
Member 1111353426-Sep-14 23:02
Member 1111353426-Sep-14 23:02 
AnswerRe: adding smileys to client server program in java Pin
Richard MacCutchan27-Sep-14 2:24
mveRichard MacCutchan27-Sep-14 2:24 
QuestionRunning Java Code Errors: Console Output Result Termination Pin
Member 1109874321-Sep-14 9:59
Member 1109874321-Sep-14 9:59 
AnswerRe: Running Java Code Errors: Console Output Result Termination Pin
Richard MacCutchan21-Sep-14 21:14
mveRichard MacCutchan21-Sep-14 21:14 
GeneralRe: Running Java Code Errors: Console Output Result Termination Pin
Member 1111160626-Sep-14 0:52
Member 1111160626-Sep-14 0:52 
QuestionRe: Running Java Code Errors: Console Output Result Termination Pin
Richard MacCutchan26-Sep-14 0:59
mveRichard MacCutchan26-Sep-14 0:59 
AnswerRe: Running Java Code Errors: Console Output Result Termination Pin
Member 1115477414-Oct-14 23:59
Member 1115477414-Oct-14 23:59 
Questionhow to read mifare card using java smratcardio? Pin
Member 1102461020-Sep-14 17:40
Member 1102461020-Sep-14 17:40 
QuestionRe: how to read mifare card using java smratcardio? Pin
Richard MacCutchan20-Sep-14 20:48
mveRichard MacCutchan20-Sep-14 20:48 
AnswerRe: how to read mifare card using java smartcardio? Pin
Member 1102461020-Sep-14 21:08
Member 1102461020-Sep-14 21:08 
GeneralRe: how to read mifare card using java smartcardio? Pin
Richard MacCutchan20-Sep-14 21:24
mveRichard MacCutchan20-Sep-14 21:24 
Questiondate validation Pin
20siva20-Sep-14 4:43
20siva20-Sep-14 4:43 
AnswerRe: date validation Pin
Richard MacCutchan20-Sep-14 20:48
mveRichard MacCutchan20-Sep-14 20:48 
GeneralRe: date validation Pin
20siva21-Sep-14 4:11
20siva21-Sep-14 4:11 
GeneralRe: date validation Pin
Richard MacCutchan21-Sep-14 7:48
mveRichard MacCutchan21-Sep-14 7:48 
QuestionEncoding / Decoding 7 bit User Data for SMS PDU (PDU Bit Packer) using java Pin
Member 1104686618-Sep-14 20:54
Member 1104686618-Sep-14 20:54 

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.