hello.
Could someone tell me what I need to change to get the initial contcext for my JDesktopApp?

public JDBCSchoolofdbDAO() {
        try {
            Context initCtx = new InitialContext();
            Context envCtx = (Context) initCtx.lookup(
                    ModelUtils.getResource("JavaCompEnv"));
            dataSource = (DataSource) envCtx.lookup(
                    ModelUtils.getResource("DataSource"));
        } catch (NamingException x) {
            ModelUtils.log(x);
            throw new InternalError(x.getMessage());
        }
    }

    private void close(Connection conn, PreparedStatement ps)
            throws SQLException {
        if (ps != null) {
            ps.close();
        }
        if (conn != null) {
            conn.close();
        }
    }
DAO=schoolAppModel.dao.JDBCSchoolofdbDAO


JavaCompEnv=java:comp/env
DataSource=jdbc:mysql://localhost:3306/schoolofdb 
user=root
password=x
Apr 7, 2010 9:14:40 PM schoolAppModel.ModelUtils log
SEVERE: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.