Eclipse to wildfly in debug mode - deployment timeouts after few times - java

I have a problem that after about 3 deployments from eclipse to wildfly - deployment times out.
The odd thing is that when I deploy .war through management console everything is fine even when I run wildfly in debug mode, and does not get slower.
Another odd thing is that it fails on the same step (Initilizing servlet) when the option "Deploy projects as compressed archives" is enabled but fails randomly when it's not enabled.
There are no classloader memory leaks and I removed all breakpoints, even tried it on different PC with same result. Im using Eclipse 2021-03 and wildfly 23.0.2.
What else can I try?

You did not describe which Eclipse plugin is used to connect to Wildfly.
If you are not already using the JBoss Tools plugin, please take a look at
https://www.baeldung.com/eclipse-wildfly-configuration and install and configure the plugin as described at the website.
If you are still using JBoss Tools plugin you could try following:
Switch to an another JBoss tools plugin version and check if the problem still exists.
Open Get involved JBoss page and report the issue
(here the direct link to JBoss tools issue tracker )
Ask the question at the JBoss tools community - e.g. inside the user forum
If none of the former steps did solve your poblem, you could still try out another eclipse plugin for EE respectively Wildfly on eclipse marketplace.

Related

Compatibility Glassfish and Eclipse for WebApplications

I tried some tutorials for creating Web Applications using Eclipse Neon 3, Hibernate, Spring and Glassfish server 4.1. I downloaded Glassfish Tools via Eclipse Marketplace, but I don't know how to solve my error about not publishing via Glassfish server the project. Could you tell me what is the compatibility between them? Glassfish tools don't refer to the Glassfish server 4.1, just 4.
I read another questions and tried the solutions found there but it didn't work.
The error is: Could not publish to the server.
java.lang.NullPointerException
cannot Deploy [project_name]
deploy is failling = java.util.concurrent.TimeoutException
In Eclipse Project---> Clean --> Clean all projects---> ok.
Try to run the project Run as server.
Right click on the Glassfish Server -> Properties -> GlassFish -> Tick on the Use JAR Archives for deployment. (at the bottom)
This might work.
And also if you get any domain related errors, just change the location of the installed Glassfish server from C: drive to other drives as Glassfish needs administrative access if placed in C: drive. So better place in other drives.

Issues configuring JBoss EAP on Netbeans 8

I have downloaded JBoss EAP 7 and am configuring it on Netbeans 8. I have reached the wizard "instance Properties" where am asked to select a "domain" from a select box. When I open the select box, it is empty. There is nothing there to choose from. Because of this, the "finish" button also is inactive which make in impossible to complete the configuration.
I am adding Jboss via the "services" tab. What is going wrong here?
JBoss EAP 6.4.0 works perfectly fine with Netbeans 8.1, however, if you are like me and wanted to take advantage of the JSF 2.2 functionality, which was only added in JBoss EAP 7.0.0, you will currently need to do some work-arounds.
In Netbeans 8.1 I managed to work around the problem with the blank domain by setting up JBoss EAP 7.0.0 selecting the "WildFly Application Server" option instead of "JBoss Application Server". Here's are more detailed instructions:
In Netbeans 8.0.1, select "Services", right click on "Servers" and select "Add Server...", pick the option "WildFly Application Server", point "server location" to the root of your JBoss EAP 7 install (e.g. c:\jboss7) and then point the server configuration option to c:\jboss7\standalone\configuration\standalone-full.xml and that's it.
However, even after doing this the application server is now added, there is still a bug where your code will not deploy correctly, see details here:
https://netbeans.org/bugzilla/show_bug.cgi?id=258091
Thankfully, this has been fixed in the Netbeans nightly build. It looks like the bug was actually fixed in Feb 2016. I installed NetBeans IDE Build 201607140002, which includes this fix (as will any other newer I presume). So, you can grab the nightly build from here (alternatively, you can wait for the bug fix in Netbeans 8.2, whenever that will be):
http://bits.netbeans.org/dev/nightly/
It should be noted, even after using the nightly build, I still had to add the server to Netbeans using the above technique (add it as a "WildFly Application Server", not a "JBoss Application Server" otherwise you will still get the blank domain issue).
Everything appears to be working as expected so far anyway using the above... of course, there is an element of risk using the nightly build, as it's technically still in a test phase. This is the price we pay for living on the sharp edge of the sword! :)
There is no support for domain mode in NetBeans. What use case should be covered with a domain deployment ? We're talking about an IDE used for development.
Also I'm not sure EAP 7 is correctly detected.

running spring mvc openshift application locally

I have created an Java app on openshift platform with JBoss Application Server 7 and MySQL 5.5 using eclipse and Jboss Openshift Tools. Now I wannt to run this application on localhost but I am unable to find any option to do so.
I googled and followed some links and was able to create jboss-as-7.1.1 server but cannot figure out how to run the application using this server as there is not option to select a server in Run As window of eclipse. Do i need to modify anything in project settings?
Did you create a server adapter for your jboss-as-7.1.1 in Eclipse? I assume you did so it looks like your project is missing the required Eclipse WTP nature. Maven project (like any OpenShift Java app) get those for free if you have m2e-wtp installed. To me it looks like you're missing that one (and eventually possibly Eclipse m2e) and need to install it.
Either use the Eclipse marketplace or point Eclipse to the following update site:
http://download.eclipse.org/m2e-wtp/releases/luna/

WildFly 8.1 restarts after every change after upgrade to Eclipse Luna

I'm currently working on a Java EE 7 project using:
Eclipse Luna 4.4
JBOSS Tools 4.2.0 beta 2
WildFly 8.1.0 Final
MyFaces 2.2.4
After upgrade from Kepler, my servers started misbehaving - after every small change in XHTML server restarts. In server overview I've set Publishing -> Automatically publish when resources change, like it was before. Also checked both options in Deployment scanners. I have not change anything in my standalone.xml since the upgrade to Luna. Restarts happen even if I do not use Eclipse and only start the server from command line. Has anyone an idea how to change server's behaviour to NOT restart every time but merely do a HOT-swap?
This is fixed in JBoss Tools 4.2.0 Beta3. It should be released relatively soon. You're welcome to try a nightly build.
https://issues.jboss.org/browse/JBIDE-17724

Having hard time to publish files to Tomcat from Eclipse

Sorry if my question seems dumb. I've started using Eclipse Ganymede 3.4 this week and having hard time publishing my projects to the web app server.
First of all you need to know this issue:
i installed my Tomcat 6.0.18 from Netbeans that i use for PHP and J2SE project. While i can start that server from either Netbeans or Eclipse, it can not start manually for some reason even though i setup my JAVA_HOME correctly pointing to jdk/bin it's saying it's a jre. it a bit weird but i can use the IDE to get going. i did some research on the net and find out that eclipse doesn't publish to tomcat.
In fact i always develop by having a local copy on other drive than C where XP is installed and publish to a server installed on C.
So where i need to find a way to publish to Tomcat under C.
It there any simple way to do that?
Please share your experience.
Thanks for reading
Ps : i know that i can use Netbeans but i'ld like to use Eclipse and use its wysiwyg
thanks!
WTP (Web Tools Platform) should get you what you need. It's a set of Eclipse plugins which includes a one to start/stop/debug Tomcat and publish to a local Tomcat installation.
http://www.eclipse.org/webtools/
You can download a version of Eclipse that already includes WTP: Eclipse IDE for Java EE Developers.
I admit this is not the best practice for a general case, but in my local development environment I created a separate Tomcat environment and I simply store the project itself in this Tomcat's webapps directory. This way the 'deployment' is implicit and instant.
Of course when I need to do changes in the code which cannot be incrementally added during a debug session, I have to restart the Tomcat.

Categories