Hello
I am trying to use a MySQL database and connect to it using a Desktop App.

I need to have it embedded and I am using netbeans and I am connected to the database

I am also in the admin console for glassfish.

I tried setting it up once and on ping it said that the class name was wrong for the connection pool

I am re doing it now. Does someone know how to help me do this?
thanks

If you want database to embedded why don't you use serverless DB like SQLite, HSQLDB or similar instead of MySQL that would become pre-requirement for your application to be able run on different machine.

Also mentioning connection pool name, some relevant coding and exact error you getting is always helpful (you should know that you are not first time poster her ;) )

If you want database to embedded why don't you use serverless DB like SQLite, HSQLDB or similar instead of MySQL that would become pre-requirement for your application to be able run on different machine.

Also mentioning connection pool name, some relevant coding and exact error you getting is always helpful (you should know that you are not first time poster her ;) )

My project started as a web app so I built the db in MySQL which is the only way I know for now. But do to trying to learn the basics and
adding JSP ,servers etc. I decided to make JDesktop app to load tabbed panes instead then I could learn the basic pseudo program operation.
If at all possible I would like to keep the present app using MySQL to use it to develop the web app.

I inadvertently did not post the error because I thought I had. As it turns out I was included in an earlier post. but here it is:

Not sure what needs to be done to find: jdbc/xhoolofdb.
Hello.
Can someone explain what this InitialContext(): is looking for?

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());
        }
    }
DAO=model.dao.JDBCSchoolofdbDAO





JavaCompEnv=java:jdbc/schoolofdb
DataSource=jdbc:mysql://localhost:3306/schoolofdb 
user=root
password=xxxxxxxx
pr 16, 2010 8:12:31 AM model.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)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at model.dao.JDBCSchoolofdbDAO.<init>(JDBCSchoolofdbDAO.java:35)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at model.ModelUtils.getNewUserDAO(ModelUtils.java:49)
        at view.LoginInfoBean.loginAction(LoginInfoBean.java:50)
        at view.SchoolJDesktopPane.login(SchoolJDesktopPane.java:157)
        at view.SchoolJDesktopPane.<init>(SchoolJDesktopPane.java:106)
        at view.Main.createJDesktopPane(Main.java:35)
        at view.Main.main(Main.java:30)
Exception in thread "main" java.lang.InternalError: 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 model.dao.JDBCSchoolofdbDAO.<init>(JDBCSchoolofdbDAO.java:41)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
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.