Added JAR File is not visible in programs (Eclipse Europa/JBoss4.2.2 GA/EJB3.0)
After wasting so much time on googling, I found it would be better posting my problem in forums. Please any body concentrate on problem I am getting, even though it look simple one.
I have been using Eclipse Europa with JBoss 4.2.2 GA, to do my Java Enterprise Application Projects.
I have created (Eclipse Europa automatically generated) 2 modules (EJB, WEB modules) in one of my Enterprise Application project. In my EJB module(EJB Project) I need to perform some database operations, for that I added mysql-connector-java-5.1.6-bin.jar by following way below.
1) Rightclick on project->New->Folder-><lib>
2) Rightclick on lib folder->Import->General/FileSystem-> Browse-> <mysql-connector-java-5.1.6-bin.jar >
3) Rightclick on project->Properties->JavaBuildpath-> Libraries->Add Jars ->
<Slected mysql-connector-java-5.1.6-bin.jar> -> Ok -> Ok.
In This way I added mysql-connector-java-5.1.6-bin.jar to my EJB Project in Eclipse Europa. But When I run Project It is throwing Exception
"Initial SessionFactory creation failed.org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver."
***Note: when i do copy and paste mysql-connector-java-5.1.6-bin.jar file in "<JBOSS_HOME>\server\default\lib." My project working fine. The Only problem is Adding JAR File from Ecipse Europa
Please Anyone help me immediately pls. Every one saying that above mentioned 1st way is correct and always works. What would be problem in my ecipse or its settings
Thanks & Regards