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.
Related
I have a 4-project, Maven-based EAR application (JavaEE-7.0) with a parent, WAR, resources, and EAR project. I am using Eclipse Oxygen with the latest release of WAS Liberty 17.0.0.2 and the latest release of the WAS Liberty plugin for Eclipse Oxygen.
I have no error markers anywhere in any of my files and Maven can produce an EAR.
When I try to publish to Liberty, nothing happens. I've done all number of possible cleans: workspace cleans, Liberty server clean, Maven clean, etc. but even though the server says [Synchronized], nothing ever shows up in the apps directory of my server.
The server is locally hosted on Windows 10 and I'm using JRE 8u141.
When WLP starts up, it says CWWKZ0014W: The application foo could not be started as it could not be found at location blah.ear.
I've tried nuking my WLP installation and reinstalling from scratch; still no dice.
(Cue rant about tools keeping me from getting work done...)
How can I resolve this?
Are you using the Add/Remove dialog from the Servers view to publish the EAR to the server? This works for me using my sample maven EAR project.
A few things to check:
EAR project's Deployment Assembly page references the other projects
The WebSphere Application Server Liberty Targeted Runtime is checked on the Targeted Runtimes properties page for each of the projects
Project > Build Automatically is turned on (or you've done a Build All) in your workspace
Your server's server.xml should contain an 'enterpriseApplication' element after the publish
If the publish still doesn't work, can you provide more details about your EAR's pom as well as how you created the project. (using an archetype? based off of a sample? converted an existing EAR project to a maven project?)
I have an existing JBoss project on which I am working on.
Currently every time I make a change, even to a JSP file, I have to run an ANT build to make a EAR file and then import the file in JBoss localhost that I started from the command line.
I would like to run JBoss in Eclipse to make development easier.
I have installed JBoss Tools from Eclipse's Marketplace. However, when I try to install a runtime environment, I cannot get past the configuration screen. Even when I point the configuration directory to the directory with my standalone.xml.
This is the picture of screen I cannot pass
Any ideas?
On your New Server Runtime Environment window, instead of selecting JBoss 6.x Runtime from the JBoss Community folder option, you should instead select the folder Red Hat JBoss Middleware and choose the JBoss Enterprise Application Platform 6.1+ Runtime:
That's the runtime suited for JBoss EAP 6.4.0.
Afterwards you just need to set your Home Directory path.
I'm attempting to upgrade our environment to Eclipse Luna w/ JBoss Tools from our current Indigo instance. Most things are sorted well enough, but I'm running into a wall when deploying our application to a JBoss server within Eclipse.
As far as I can see, the lib/ directory of the .ear file generated contains none of the transitive dependencies from maven that we would normally expect to see, and as a result the application does not deploy or run correctly on the server. For clarity, we use the 'use workspace metadata' deployment option on the JBoss server within Eclipse.
By contrast, if I right click on the relevant project within Eclipse and say Export... .ear file, the resulting .ear contains all the .jars that I'd expect inside the lib/ folder (there's over 50 of these things, so it's pretty easy to spot the difference). Subsequently dropping the .ear into the deploy directory of JBoss and starting a server manually has the application working fine.
Has anyone ever encountered this sort of issue within JBoss Tools / Luna, and if so what steps were taken to try and remediate it?
Cheers for any help.
Dave.
EDIT: For what it's worth, this is a JBoss Enterprise Application Platform 5.x server instance, and we're using JBoss EAP 5.2
I want to run two different WAR files in same Worklight server. I came know it is possible from this link. But want to know how to achieve this?
How to change the context root path of war file while
building?
This link explains only to change the context root for local development environment. But i want to run it in one of the testing servers.
Do i need to mention context root while deploying? -
Currently after building ill send the war files to other team to
deploy. They do have a ant script to deploy the war into server.
Let me know do i need to take care of anything else while running 2 wars in same server.
In Eclipse Worklight Studio you will have 2 Worklight projects. Each Worklight project will have its own .war file (in the \bin folder). By default, the context root of each project is the name of the project.
These .war files are separate of each other. They run separate of each other whether you are running in Worklight Studio or outside of it.
Outside of Eclipse Worklight Studio, you are not deploying the .war files to the Worklight Server.
You are deploying the .war files to the application server (WAS, Liberty, Tomcat) that Worklight Server is also deployed to it.
So pointing to http://worklightserver/contextRootA will be the first project, and pointing to http://worklightserver/contextRootA will be the second project
We have created gwt application on eclipse juno 4.2 and gwt 2.5.1 and exported the application as war file using GWT Web App Export. Added the war file to the EAR project
of the eclipse.
If I deploy it on the websphere through eclipse it gets deployed. But if I try to deploy the same ear file through the admin console of WAS , the process hangs, I have tried all
the suggestions available over the net but all in vain.
Can anybody throw some light on this and provide guidence.
Thanks
Bhavani
Now I am able to deploy it through Websphere console.
Thanks for (fnt) by specifying about the size of the application.
When I posted the question the size of the war/ear was 111MB ,I removed
all the jar files and placed it in Websphere app servers ext foloder and
I build the war file through GWT compiler to contain only the binary codes of sources required for the application. The size was reduced to 7MB (the previous war file was
having jasper jars which was accounting for the most of the size)
Then I deployed the ear file through the admin console. Still It almost took
more than 20 minutes to deploy it through the admin console and I am
successfully able to deploy it and aceess the GWT application.
Thanks
Bhavani