facebook

[Closed] Controlling the export of JAR files

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #246108 Reply

    superdx
    Member

    Hi,

    I have a web project currently running on Tomcat 5 and Oracle 9i. I have setup an Oracle connection pool on Tomcat, thus the Oracle driver JAR will be placed in <Tomcat 5.0 Home>/common/lib.

    In my projects, I also make use of some Oracle specific classes, like oracle.sql.BLOB which is a Java object, so I also need to import the Oracle driver JAR into my project. This is ok.

    But when I deploy the project, the Oracle jar is also copied into my <project home>/WEB-INF/lib. Logically this is fine, but now Tomcat has two copies of the Oracle driver JAR and it is producing problems for me. I was getting ClassCastExceptions even though the class being used is exactly the same. I fixed the problem by manually deleting the Oracle driver JAR from <project home>/WEB-INF/lib and now Tomcat gets the correct version, as well as the application.

    The solution would be if I could somehow tell MyEclipse NOT to export the Oracle driver JAR, but it seems that as long as the JAR is in the project, then it will be exported.

    Does anyone have any possible solutions? Currently I have to manually delete the Oracle JAR every time I deploy, which isn’t acceptable as we are still in developing/testing.

    – Patrick

    #246127

    Riyad Kalla
    Member

    Patrick,
    What you want to do is open your project settings, go to MYEclipse-Web and then the Deployment tab, then you can “Override workbench settings” and then adjust your deployment rules.

    #246135

    superdx
    Member

    Hi, I checked the settings you described, and it doesn’t seem to affect the libraries being deployed. In fact, despite whatever I select or unselect, the libraries are exported regardless.

    Here is a screenshot of my settings. In this setting, it should be exporting no JARs or very little, but it is still deploying all.

    Thanks…

    #246138

    Riyad Kalla
    Member

    Be sure to erase your deployment first, then recreate it.

    #246140

    superdx
    Member

    I erased the deployment settings in MyEclipse, as well as manually deleting the project.war and project directory in Tomcat’s /webapp folder and all the JARs are still be exported, again regardless of settings. Any other ideas?

    #246141

    superdx
    Member

    I am using MyEclipse Workbench 4.0.3 GA if that helps any.

    #246146

    Riyad Kalla
    Member

    This is odd in deed, if you double check your project’s WEB-INF/lib directory using the Navigator view, are you sure the JAR isn’t in there in the project itself?

    #246197

    superdx
    Member

    That fixed it! I deleted the JAR (including several others I wanted to get rid of before) and now it doesn’t get redeployed along with the rest. Thanks!

    #246220

    Riyad Kalla
    Member

    Glad to hear it.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: [Closed] Controlling the export of JAR files

You must be logged in to post in the forum log in