Showing posts with label ant. Show all posts
Showing posts with label ant. Show all posts

Friday, March 2, 2012

Glassfish 3.1.2: Unable to load resource [com.mysql.jdbc.EscapeProcessor]

While I am building JEE6 web profile application, using EJB3.1, JPA2.1, JSF (IceFaces 3) against MySQL database v5.1.15, my java web app fails in Netbeans v7.1 when I try to run it.

Netbeans reports successful deployment, but then I get this error when executing a JPA query against MySQL:

java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [com.mysql.jdbc.EscapeProcessor], because it has not yet been started, or was already stopped.
This error occurs at the first query against the database. The entire application works fine with Netbeans version 7.1.
One potential clue is that I had to manually add the MySQL driver to the project for unit test the project using embedded glassfish 3.1.2.

After reviewing/tracing the problem and some googling about the problem here is the fix:

  1. For unit testing put the MySQL driver in the test libraries only don't add it to the project to final deployment.
  2. For production, the MySQL driver should not be in the project ... it should be in <DOMAIN>/lib/ext... in your glassfish v3.1.2 folder.
If there is any help just leave your comment.

Friday, September 16, 2011

ADF: Oracle ADF Development Essentials


Learn basic best practices for building Oracle Application Development Framework (ADF)-based apps productively.



The developer community provides a wealth of information through tutorials, how-to's, sample applications, and so on that help new as well as experienced developers learn how to be productive. For example, it's important for developers to be trained up on subjects such as version control/working in teams, automated unit testing, and using Ant for building projects, but the amount and complexity of information out there on these topics can be overwhelming.

This series of technical articles offers development best practices and techniques in the context of Oracle ADF development in a compact, consumable package. Each article focuses on a specific topic and includes step-by-step examples showing how to implement these practices in an Oracle ADF project. Step-by-step instructions will also be given for installing and configuring any third-party software required (which may include Oracle JDeveloper extensions and/or free or open-source third-party software). Particular attention is given as to why the technique/best practice is important and how to get up and running quickly.

Tutorials link: Oracle ADF Essentials.