How to run and debug JBoss EAP 6 from Eclipse? - eclipse

I installed JBoss EAP 6.01 on my local computer, and JBoss tools in my eclipse (Juno), I try to access JBoss and debug from within my eclipse, I follow the new server wizard to create and configure sever in eclipse, see attached images:
I then tried to start the server, however, I got error connecting to jmx for JBoss Runtime Server
Can anyone help me figure out why?
Thanks a lot!

It's a little unclear from your question if you want to a) run a fully managed JBoss inside eclipse or b) you want to start Jboss manually and then get eclipse to connect to it.
I'm assuming it's point 'a' and you want eclipse to start and manage jboss eap server for you.
In this case on your second screenshot you need to unselect all the checkboxes and hit next. Also make sure after the server is created in your servers tab to doubleclick the server to bring up the server configuration page and enter username/password etc.
You should be all set. Let me know if that works.

Related

Netbeans 12 and JBoss

Is it possible to add a JBoss 5.x server on Netbeans 12?
When I add a new WildFly server going on Servers -> Add Server Instance and I choose the folder where I have the JBoss 5.1.0.GA installed, it keeps saying "Provide a valid WildFly Location" and I'm unable to get further.
I can successfully use Eclipse with the same server, but I really wold like to change the IDE
Any help appreciated :)
thanks

Use running instance of Tomcat in Eclipse

On my pc I have a running instance of tomcat, that I use with axis to export web-services. I'd like to use the same instance of tomcat with eclipse to run my servlets. How can I configure this?
create a basic web project in eclipse and try to deploy it, then it should ask for the server. if your eclipse is already configured with tomcat (even on axis), it should display for you to select as the application server.
try this tutorial which shows how to make it work.
it shows from the scratch (download tomcat and configure with Eclipse) but you can get an idea on the latter configuration.

Jboss server keeps starting up

I have configured Jboss 5.1 in the eclipse environment.
The problem comes when I start the server,in the console it shows as JBoss server has started in xx min and xx seconds, however it still keeps showing that the jboss server is starting in eclipse server window.
It finally times out and stops the server based on the server timeout for startup of Jboss.
Same problem. Solved!
There are couple of options that you might want to try out.
Make sure your jobss is using JDK instead of JRE in eclipse. To do that make sure in your eclipse, windows ->> preferences ->> java ->> installed JREs ->> select JDK.
If you have changed the port, make sure eclipse is using the same port. you can always check it inside Jboss folder ->> standalone ->> configuration ->> standalone.xml file. scroll down. you will get all the port details.
Last one that I did and solved my problem. in your eclipse, double click on Jboss, select "web port" as a Startup Poller, uncheck the management port option "detect from local runtime". Restart the server. it should work.
There is a nice explanation with snapshots. you can always check it out. click here
Before starting JBoss double click on the configuration in Server window. JBoss configuration should be opened. Look for the timeouts section - adjust it as needed (5 minutes should be enough even if you deploy large applications). Extend both start and stop timeout. If JBoss is not stopped properly then you will need to kill Java process from Task Manager). Don't forget to save modified configuration (Ctrl S).
On the topic of jboss/wildfly keeping strating up.
Please be aware that on the most recent version of the wilfly/jboss eclipse plugin an issue was introduced with the deployment scanners.
https://issues.jboss.org/browse/WFLY-10629
The plugin from eclipse will automatically add deployment scanners to your standalone.xml which cause an inifine deploy issue to take place.
When double cliking on the server, you can disable the plugin from modifying your standalone.xml with these deployment scanners.

Eclipse + JBoss Tools won't run webapp to configured JBoss AS

I am using Eclipse 3.7.2 with JBoss Tools 3.3 under Ubuntu 12 and have configured a locally installed copy of JBoss AS 7.1.1 in Eclipse under "Preferences::Server::Runtime" Environments.
However, when trying to run a Java EE application by double-clicking on the project or an .xhtml page I only see "Run As / Run" on Server as an option and I get an HTTP 404 from Apache Tomcat/7.0.26 at localhost:8080. That is, it seems like Eclipse is trying to deploy to a Tomcat server as opposed to the JBoss AS I have configured in "Preferences::Server::Runtime" and I don't get an option like "Run on JBoss" or anything. When I export my application as a war and manually deploy to JBoss AS the app runs fine.
The idea is to add your application to a specific server that you have configured. Additionally; just adding the server runtime isn't enough.
You need to open the Servers view, and from there right click on the background and select New, and then Server. If you choose JBoss Community -> JBoss AS 7.1 here, you can select your previously created Server runtime in the Server runtime environment, or optionally create a new one.
Then comes the mental twist that you need to make. In WTP you don't use the Run As command, but instead right click the server in the Servers view (default name should be JBoss 7.1 Runtime Server, and select Add and Remove. Select one or more applications from your workspace that you would like to run on your server. Click finish when done.
Now right click again on your server, and choose either Start or Debug.

Tomcat issues inside eclipse

I am very new to Tomcat and web development in general and apologize for what may be a very silly question.
Consider 2 situations:
1.
I start Tomcat outside of Eclipse.
I use eclipse to create a war file.
I deploy it via admin console.
All is ok
2.
I start Tomcat via Eclipse
I can't access admin console
http://localhost:8080/manager/html greets me with 404 error
Same page is behaving properly when Tomcat is started outside of Eclipse
Please advise
Why might the issue be?
Why might the issue be?
You need to configure Eclipse to take control of your Tomcat installation. To do so:
double click on the Tomcat Server in the Servers view
under Server Locations, select Use Tomcat installation
This is illustrated on the screenshot below:
Eclipse creates a new Tomcat configuration separate to your Tomcat installation, in the 'Servers' project. This allows Eclipse to deploy webapps without interfering with anything you've done in your installation (via the manager app or by editing config files manually).
You can reconfigure Eclipse so that it uses the config from your Tomcat installation (see Pascal's answer), or to re-enable the manager app - but read the WTP Tomcat FAQ first as there are good reasons for it working the way it does. I don't recall ever needing to do this - the 'Servers' tab in Eclipse lets you deploy/start/stop/debug/configure apps as required.