STS 3.4.0 with Websphere 8.5.5.0 don't deploy my application - eclipse

I try to deploy my application on WebSphere from Eclipse.
Here some conditions:
STS 3.4.0
Websphere Plugin: IBM WebSphere Application Server V8.5 Developer Tools for Kepler/Luna
Websphere 8.5.5.0
After i installed the plugin i can add the Server and start/stop him, but when i try to add my application for deployment i get the feedback "There are no resources that can be added or removed from the server"
I have an ear project and a war project in my workspace which are deployable with JBoss without problems. Do i have to add something to my projects to make them deployable?
Is there any clue for this?
* Update *
Here you can see the project structure of my ear module.

I found a workaround which is ok i think.
I created a "Enterprise Application Project" and added my war modules to it.
This was deployable with WebSphere.

You can only add EAR projects via right click on Server > Add and Remove.... You should see dialog with projects that can be deployed to your server. If your EAR project is not visible there maybe it is not correctly recognized as EAR project. Check in Project properties > Project Facets if it has EAR facet checked.
Just for test you can try to export your project as EAR and then deploy it using web admin console.

Related

WebSphere Liberty Eclipse won't publish application to apps directory

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?)

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 Create EAR file in RAD 7.5

I have checked out a dynamic web project from a CVS repository. But, there was no EAR file to check in. Now how can I create an EAR file for the project to deploy in WAS 6?
Also can I run my project in RAD without creating an .ear file? I am a newbie to Java EE projects.
In order to be able to export an EAR, you can add a new Enterprise Application project ( New > Enterprise Application project) and select your Web project as a Java EE module dependency.
This way you can export an EAR file that will contain a WAR file built from your Web project.
If you run the wizard for creating a new enterprise application (File->New), one of the options is to add an existing web project in your workspace into the application as you create it. You can then export the enterprise application as an EAR file ready to deploy into WebSphere Application Server or, if you have the test environment set up, you can just drag-and-drop it onto the server in the Servers view. To test your web application, right-click it and choose Run->Run on Server.
Try importing as project instead of EAR files

missing jars when publishing a web app to glassfish with eclipse juno and maven integration

I use eclipse juno with GlassFish Server Open Source Edition 3(java EE6), m2e and maven 3.0.4.
When I create a war file by 'mvn package' command and deploy it to a glassfish,
the war file works just fine.
However, when I publish a web app to a glassfish from the server view of eclipse,
the web app fails.
I guess the reason of this failure is that publishing from eclipse is not configured correctly
to get jars from my maven repository and then jar files in eclipseApps//WEB-INF/lib directory are missing.
Can I configure eclipse to use a maven configuration when publishing a web app to a glassfish?
Thanks.
I found the answer
"anyway I solved the issue by adding following row Properties > Deployment Assembly: /target/myapp/WEB-INF/lib -> WEB-INF/lib"
in
Glassfish Deployment out of Eclipse Helios SR2 fails
Thanks.

deploying a war file in WTP(Eclipse) tomcat server

I have a maven build Java project.
My war file name is: test-1.0-SNAPSHOT.war
I am using M2E plugin in Eclipse.
I have run target mvn package.
Added server as tomcat version 7 in eclipse indigo 3.7. Server started. But my war file didn't deployed in the server.
I have tried by right clicking tomcat server and Add remove..., it says "there is no resources that can be added or removed from the server".
How can i deploy my war file in the eclipse WTP tomcat server?. Do i need to run any maven target?
Make sure that you have "Maven Integration for WTP" installed in your Eclipse instance.
First check if it's available through
Window->Preferences->Maven->Discovery->Open Catalog
If for whatever reason this does not work, you can get WTP integration from this update site (that's the version I am currently using):
https://repository.sonatype.org/content/repositories/forge-sites/m2eclipse-wtp/0.13.0/S/0.13.0.20110623-0455
This integration does a lifecycle mapping of maven-war-plugin into m2e architecture.
Once you've installed the WTP integration, you must restart eclipse and once it's restarted, right click on your web app project and choose: Maven->Update Project Configuration...
Also, I would advise to run a clean build at this time.
Last, but not least, delete and recreate your Tomcat server configuration (I don't know why, but I had to do it quite a few times when I switched to m2e).
I think eclipse is not recognizing your project as a web app, To confirm this
Open to do open J2ee perspective on your eclipse, If you open the project folder of your app, You should see (Deployment Descriptor)
If you don't see it, your app is not web app as far as eclipse is concerned
I have see this in case if you imported/created a maven command line project
To fix this
Select Project ==> Properties ==> Project Facets ==> make sure Dynamic Web Module check box is checked
If you do that the local tomcat server will add your app when do add remove projects
I think eclipse is not recognizing your project as web app,convert your project into web app by command mvn eclipse:eclipse -Dwtpversion=2.0 and try to deploy in Eclipse configured tomcat,it will work.
If you have Eclipse 3.5 or above you should ensure that you have both the m2eclipse (m2e for 3.7) plugin installed and its WTP add-on. With these you shouldn't need to change your configuration by hand.
Did you try to build your project from the command line and deploy it in Tomcat by hand?
By the way, have you read this wiki post? It's a bit old, but it may still be relevant.
Adding 2 cents to Prasanna wonderful solution.
I realized that building maven war files "mvn package" was just creating .war file but eclipse was not picking up that war but was deploying its some internal version of it's app war.
I found that server > Browse Deployment Location.. in Eclipse server view .. it was taking to some abstract location like "C:\Programs\workspaceSTS.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps"
Where I could see my exploded app deployed but it was not having any /classes folder just limited files.
Using Prasanna's method I realized that eclipse now was deploying full exploded .war now.
So this was happening coz changing the facets to Dynamic Web Module has actually populated "R-click project > Properties > Deployment Assembly "
This Web Deployment Assembly window only tells eclipse what to deploy and what not. So even if your project is NOT setup as Dynamic Web Module , and still if you configure "Web Deployment Assembly" values properly , eclipse will deploy the app fine to Tomcat/ Server.