Weblogic hot deployment during development (like WSSD/RAD) - eclipse

All my previous projects were on websphere. I am right now in a team developing an application on weblogic.
In Websphere development (WSSD/RAD) the server was more "integrated" with the IDE, so a build could automatically trigger an incremental deployment to the (development/local) server.
Is such a setup possible in a weblogic environment? I googled for some weblogic plugins for eclipse, but I dont see this mentioned as a feature.
What is the best setup for development on weblogic+eclipse, so that the build/deploy/restart overhead is minimal during development?

There is a WebLogic ant task for redeploying an application. I'm using this from a command-line build.xml as a separate 'redeploy' target, under WLS 9.2, but it can be added to Eclipse's build quite easily I think:
<!-- Redeploy the application to WebLogic Server -->
<wldeploy
action="redeploy" verbose="true" name="<application name>"
user="<admin user>" password="<admin password>"
adminurl="t3://<admin server URL>" targets="<server name>" />
<server name> might be a managed server, or could be your admin server, depending on your configuration.
If you're using sessions and are going to be redeploying frequently, you may find it helpful add a persistent-store-type to your weblogic.xml to allow sessions to span redeploys, if you aren't doing so already - but as so often, depends what you're doing with your application.
Edited to add link to docs

Related

Jelastic Eclipse Plugin - All Tomcat applications restart on Deploy

I have a Tomcat 7 server running on Jelastic. I'm using the Jelastic Eclipse Plugin to Deploy my projects, and all is good. However, I have more than one application deployed (in /webapps) on the Tomcat server and noticed that when I Deploy one project from Eclipse, the server restarts, thus restarting my unchanged application as well.
I had modified the server.xml to autoDeploy="false", but since it seems to be restarting the server, that wouldn't make any difference.
Is there some setting that would prevent this, or is it just the behavior of the plugin?
This is а regular deployment procedure and there is no way to prevent it if you use Eclipse Plugin for deploying.
But you can deploy your project without the node restarting. There are two ways:
Upload yourproject.war into the webapps folder using Jelastic's DashBoard file manager:
Disable the restarting after projects deploying.
Note: this option requires the administrative rights and you should contact your hoster to disable it.

How to configure application level settings in Websphere developer tool in Eclipse?

I install WebSphere Developer tools for Eclipse and refer to my local WebSphere 7 installation. Then deploy a Spring application within an EAR project. However, when I deploy the EAR project into WebSphere server instance in Eclipse, I find no options/UI to assign external library or assign role/user mapping etc, just like what I can do in WebSphere console.
When log on WebSphere console I do see the project setting but cannot save the change.
So is there anyway to configure on the UI or I have to make every change in an WebSphere XML configuration file?
In Eclipse, I find no options/UI to assign external library or assign role/user mapping etc
Yes, you have to do it via console.
When log on WebSphere console I do see the project setting but cannot save the change.
Thats the common problem. Open the Server configuration and uncheck Minimize application files copied to the server. Restart server, undeploy and redeploy application. You should be able to save mappings.
If this doesn't help (helps in most cases but not for some settings and I don't remember for which), then in the Publishing options, switch to Run server with resources on Server, this will work for sure, but deployment will be a bit longer. Of course restart and redeploy app.
You will see the missing OK buttons in the admin console then.

IBM Worklight 6.0 - .war file deployment fails

I've installed IBM Worklight v6.0 Consumer Edition with WAS Liberty Profile 8.5.5 on a linux server and an oracle database.
I've built a .war with IBM Worklight Studio v6.0 and deployed it in my Liberty apps' directory /worklightServer/apps.
Then I changed server.xml with the following:
<!-- Configuration for Test app -->
<application id="TestApp" name="TestApp" location="TestProjectWL6.war" type="war">
<classloader delegation="parentLast">
<commonLibrary>
<fileset dir="${shared.resource.dir}/lib" includes="worklight-jee-library.jar"/>
</commonLibrary>
</classloader>
</application>
The .war file does not get deployed because of following errors in messages.log:
[7/5/13 14:42:47:289 CEST] 00000012
m.ibm.ws.app.manager.internal.statemachine.ResolveFileAction E
CWWKZ0021E: Application TestApp at location TestProjectWL6.war is
invalid.
How to make the .war valid? I followed the IBM Worklight and WebSphere Information Centers on how to deploy, but it's not working.
The error identifier CWWKZ0021E suggests a problem with the "archive or directory at the specified location". I would make sure that
The file usr/servers/worklightServer/apps/TestProjectWL6.war exists (file name case being significant),
It is really a file, not a directory.
Its access rights don't prevent the Liberty server process from reading it. Use ls -l .../usr/servers/worklightServer/apps/TestProjectWL6.war to check it.
It is not truncated (i.e. unzip -l .../usr/servers/worklightServer/apps/TestProjectWL6.war gives a reasonable listing of its contents).
The server.xml you modified is really the one in usr/servers/worklightServer/ and not the one belonging to a different server.
This all sounds stupid, but these kinds of things occasionally are wrong when manual application server configuration is performed. Configuration through the Ant task <configureApplicationServer> is more reliable.
How did you install IBM Worklight v6.0?
How did you deploy your project's .war file?
Did you use the supplied Ant scripts that are copied to disk when using the IBM Worklight Installation Manager?
The process of installing Worklight Server as well as deploying a .war file in IBM Worklight v6.0 is much different than it was in v5.
Make sure you follow the updated documentation:
Installing Worklight Server
Deploying an IBM Worklight project
I am willing to bet you did not use the Ant scripts to deploy the .war file; Most likely you are pointing to the wrong location of the Worklight JEE .jar file. You will need to correct the path.
I suggest using the supplied Ant scripts.
i've cleaned all my environment: remove all applications config in server.xml (including application center console installed with worklight server installation), remove every war from apps & dropins directory.
then i built with ant task, and now it's ok.

Running Maven project on glassfish server

I want to run web based Maven project on glassfish server. I am totally new on maven. However, i have successfully build the maven project and glassfish server is up and running also. Moreover, there is WAR file also in target folder but i am confused what is the next step to run that project on glassfish ?
Any help will be highly appreciated.
You have different options to solve this task:
If you are new to Eclipse I suggest to change to NetBeans. It comes with integrated support for application server deployments. You just add your maven (or nearly any other type of project like WAR, EJB and EAR) project and your desired application server instance (Glassfish) and you are ready: Right-click your project and choose Deploy and it'll get deployed to your server. NetBeans also supports hot-deployment.
You can deploy your WAR file manually in GLASSFISH_ROOT/glassfish/domains/domain1/autodeploy and it'll get deployed if your server is running. But this is not very efficient during development.
If you want to stay with Eclipse you can use the maven-glassfish-plugin or this maven plugin to do the deployment for you. I'm not sure which one is better but this topic is also discussed in this question and this question.

How to avoid that glassfish deploys all the previous project?

When I start the glassfish server I have noted that it loads all the previous projects that i have developed and previously deployed.
I think that somewhere there is a config file that tells the server to reload the projects, but if i would like to work just on one of them what i have to do?
i suppose that i have to change or delete some entry in a glassfish configuration file, but i don't know where it is and how to do that.
thanks
Massimo
You have different options.
You can go to the Glassfish admin GUI via http://localhost:4848 and look under "Applications". You can undeploy properly deployed applications there.
If this is not working you can manually delete the applications from the glassfish folder: Look at
/[glassfish_installation_path]/glassfish/domains/[your_domain]/applications
or
/[glassfish_installation_path]/glassfish/domains/[your_domain]/autodeploy
Glassfish is running applications in these folders at startup time.
The undeployment depends somehow on the method you used to deploy the applications...if you used NetBeans to deploy you can probably even select the application in NetBeans and click "Clean and build" do undeploy it.