WebLogic server using wrong files?

I created a Weblogic server project. The project builds and runs fine with one problem: the server is using files from the wrong project!

Some background: I'm an Eclipse user. I have various Eclipse setup to work with Weblogic. The Intellij webserver appears to be pointing to the last project that I used under in Eclipse.

In Eclipse, I never had to manually tell the server which project to use.

How can I configure this?

Comment actions Permalink

In the run/debug configuration there is a deployment tab. On it you can define the artifact (or exploded directory) to deploy.You have the option of deploying the war/ear file or the exploded directory. The advantage of using the exploded directory is it allows for hot reloads as you change files.IDEA should only expose artifacts within your project. So if WebLogic is deploying an artifact outside the project, it is picking up that configuration elsewhere.

Comment actions Permalink

Wierd. You're absolutely right that Weblogic is picking up a configuration from somewhere else.
In debug mode, it picks up changes to Java files but for some reason, all web files (html/CSS) are from the wrong project.
Investigating how to configure Weblogic...

Update: Eclipse has a server setting "Add and Remove Resources" where you can add a project to the server.
Looking for the equivalent in Intellij. Unfortunately, I don't understand Weblogic enough to know what the equivalent is.

Comment actions Permalink

After unconfiguring the server from Eclipse, I'm now getting this error in Intellij:

<Jul 10, 2013 11:15:28 AM EDT> <Error> <Deployer> <BEA-149205> <Failed to initialize the application '_auto_generated_ear_' due to error weblogic.management.DeploymentException: [Deployer:149003]Unable to access application source information in 'C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp9\eclipse\_auto_generated_ear_' for application '_auto_generated_ear_'. The specific error is: [Deployer:149158]No application files exist at 'C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp9\eclipse\_auto_generated_ear_'...
weblogic.management.DeploymentException: [Deployer:149003]Unable to access application source information in 'C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp9\eclipse\_auto_generated_ear_' for application '_auto_generated_ear_'. The specific error is: [Deployer:149158]No application files exist at 'C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp9\eclipse\_auto_generated_ear_'..
     at weblogic.deploy.internal.targetserver.BasicDeployment.verifyLocalApp(BasicDeployment.java:123)
     at weblogic.deploy.internal.targetserver.BasicDeployment.createDeployment(BasicDeployment.java:143)
     at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:110)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:38)
     at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:177)
     Truncated. see log file for complete stacktrace

So yes there is some configuration that Intellij hasn't overriden.

Update: I was using the Eclipse domain. I obviously need a new Weblogic domain for Intellij. The solution was to use the configuration wizard (config.cmd---pick all the default options). However, now the problem is figuring out how to deploy the application. I'm not sure what artifacts to create.

Comment actions Permalink

Freakin A... this was so frustrating but I finally figured it out. The main problem is that Eclipse handles everything for you. With Intellij, the initial setup is a manual process which is difficult if you don't understand how Weblogic works. The second problem was that I needed to use a provided ant script to build the application---I could never get the Artifacts to work.

  • Create a domain for Intellij---use config.cmd
  • Add the ant script by right clicking on build.xml and selecting the appropriate option. Intellij should now recognize the ant script.
  • Add the ant script to the web server startup. Open the server run configuration. Add the ant script to "Before launch." Add it to after make.
  • Start the server
  • Open weblogic console. Go to <webserver_url>/console. Select deployment and add the application generated by the ant script.
  • Start the application from the console.

Again, as I said before, Eclipse did all of this for you in a simple UI window called "Add to Server"...

Comment actions Permalink


Just in case, here is step-by-step manual "How to create and deploy EAR with embedded WAR with IntelliJ IDEA".

Hope that helps,

Comment actions Permalink

I am not sure why you had to go through all of these steps.

You can do everything in one dialog. Go to Edit Configuration, select Weblogic->Local, choose an app server (you can configure one there if you hadn't added one). Enter your user/pass for your Weblogic domain, enter your weblogic domain directory. Go to deployment tab, choose the the exploded artificat which IntelliJ already created for you. Done. This is a one time setup.

If you choose "Share Configuration" you can store the configuration in version control so it is available on branches and to other team members.

Comment actions Permalink

If you look at my comments, you'll find that 1) I didn't have a Weblogic domain. The only one I had was configured to use Eclipse. 2) For some reason, Intellij could never deploy the WAR to Weblogic. I had to manually do that through the Weblogic admin console...but only the first time.

Investigating a bit further, Oracle provides a Web Tools plugin for Eclipse that does all of this transparently thru the Eclipse GUI. Unfortunately, they don't provide a similar plugin for Intellij.


Please sign in to leave a comment.