Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Run app in Tomcat - includes two copies of JAR file?

$
0
0

I recently purchased the "ultimate edition" of Intellij and have been trying to use the "Tomcat Server" option to deploy and run my Java project in my local installation of Tomcat 6.0.32.  My IntelliJ project looks like this:

 

MyMainProject

--->MyAppDomain (builds a JAR)

--->MyAppWAR (builds a WAR incorporating the above JAR)

 

The problem I am running into is this.  When I build my WAR using Maven, and drop it into the /webapps directory manually, it works.   When I deploy with Intellij, I get this (stack trace abbreviated for brevity):

 

java.lang.IllegalStateException:

Conflicting persistence unit definitions for name 'caPersistenceUnit':

file:/C:/JavaSoftware/apache-tomcat-6.0.32/webapps/MyApplication/WEB-INF/lib/MyAppDomain.jar,

file:/C:/JavaSoftware/apache-tomcat-6.0.32/webapps/MyApplication/WEB-INF/lib/MyAppDomain-1.0.0.jar

 

The build process is including TWO COPIES of the MyAppDomain.JAR file, the one built from Maven (wanted) and another one that it's building on its own (unwanted).    I don't even know where to begin to look to fix this.   Anyone familiar with the "Run Tomcat" run task, can you chime in on this?


Viewing all articles
Browse latest Browse all 5661

Trending Articles