[Exception]: a java mail exception

do you get this exception stack:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message
 at javamail.Main.main(Main.java:8)
Caused by: java.lang.ClassNotFoundException: javax.mail.Message
 at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
 ... 1 more
Java Result: 1

the exception thrown because you miss the Mail API.
You can download it here: http://java.sun.com/products/javamail/downloads/index.html
to fix it up, just add the required Mail API.
[see here to see how to link an external library]

have a good day

[Exception]: a database exception [part 1]

do you get this exception stack:


Exception in thread "main" Local Exception Stack:
Exception [TOPLINK-4003] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Exception Description: Configuration error.  Class [com.mysql.jdbc.Driver] not found.
at oracle.toplink.essentials.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:101)
at oracle.toplink.essentials.sessions.DefaultConnector.loadDriver(DefaultConnector.java:183)
at oracle.toplink.essentials.sessions.DefaultConnector.connect(DefaultConnector.java:98)
at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:582)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:280)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
at simplejpa.entities.manager.DBManager.refreshEntityManager(DBManager.java:17)
at simplejpa.entities.manager.DBManager.addNewAccount(DBManager.java:28)
at simplejpa.Main.main(Main.java:13)
Java Result: 1

the exception thrown because you miss the Database Driver, exception above occurs if you forget to link the MySQL Database Driver [sometimes called with MySQL Connector]. for MySQL, you can get the Driver here: http://dev.mysql.com/downloads/connector/j/
to fix it up, just add the required JDBC Driver.
[see here to see how to link an external library]

have a good day