Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with database connection after upgrading from 10.1.2 to 10.1.3.

546505Mar 21 2008 — edited Mar 24 2008
So I went ahead and use the JDeveloper 10.1.3 that come with the OAS 10.1.3 DVD. It's the complete studio version and include a JDK.

Does anyone know if JDeveloper 10.1.3 come with J2SE or J2EE? How come in the Project Properties, it uses the word "J2SE" to allow me to point to various versions of JDK's???? Even when I tried to download J2EE JDK 1.5 from sun, the word "Standard Edition", "J2SE Development Kit 5.0" are used?! Has there been change of terminology?

Anyway, while I had NO problem compiling and debugging my projects using JDeveloper 10.1.2, I have all kinds of troubles with JDeveloper 10.1.3. I don't know if it is because it's not J2EE, JDeveloper 10.1.3 seems to have all kinds of problem with database connectivities.

QUESTIONS:

1. I got "DataSource not found" when compiling. I point to "J2SK" 1.3.1_02 as I have done always up to this point with 10.1.2. The code hint says "import javax.sql.* not used". Here's the heading of my class:

package com.aastra.servicemanagerdb;
import java.io.*;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.pool.*;

public class DbConnector
{
protected DataSource ds;


2. If I point to "J2SE" 1.4.2_06 in the project properties, the compiler error goes away but now I get the following runtime error:

"javax.naming.NameNotFoundException: jdbc/pooled/svcmgrAMDS not found".

Here's an except of my JSP file:

<%@ page import="com.aastra.servicemanager.*" %>
<%@ page import="com.aastra.servicemanagerdb.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.net.*" %>
<%@ page errorPage="errorPage.jsp" %>
<%!
com.aastra.servicemanagerdb.DbConnector conManager;
com.aastra.servicemanager.ServiceManagerAdminManager svcMgrAdminMgr;
String currentState = "";
String errorMessage = "";
String jndi_data_source_location = "jdbc/pooled/svcmgrAMDS";
public void jspInit(){
try{
conManager = new DbConnector(jndi_data_source_location);
svcMgrAdminMgr = new com.aastra.servicemanager.ServiceManagerAdminManager(conManager);
javax.servlet.ServletContext appl = getServletConfig().getServletContext();
appl.setAttribute("conManager", conManager);
appl.setAttribute("svcMgrAdminMgr", svcMgrAdminMgr);
} catch(Exception e){
errorMessage = "error while jspInit(): " + e.toString();
}
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 21 2008
Added on Mar 21 2008
3 comments
690 views