Can't Create a JBoss Server in Eclipse - java

I'm using eclipse indigo and I'm trying to follow this tutorial to set up jBoss. It says...
When installing software from this site, some different categories are shown to install - I have chosen the first one which is “Abridged JBoss tools 3.3”
which I have installed. Then, it says:
The next step after the plugins have been installed is again to install the application server itself.
Which I have (jBoss 4.2.2.GA). So now I'm supposed to do this:
Now, define the server runtime in Eclipse. Open "Window => Preferences" and navigate to the "Server => Runtime Environments" node. Press the "Add" button and in the "New Server Environment" dialog, choose "JBoss Community => JBoss 7.1 runtime". Press the "Next >" button. In the next dialog, enter the path to the directory where you have unpacked the JBoss server earlier.
And I'd love to do that, but I don't see the jBoss Runtime Option. I only see "Basic" and then HTTP Preview and HTTP Server (also J2EE Runtime). Plus, I don't have a JBoss perspective, which I should have, and JBoss Central didn't show up when I restarted eclipse. I tried searching my jBoss folder for runtime environments...I got nothing. It's like I don't have the JBoss Tools.
Apparently, this tutorial is exactly what I need to do to set up my server (says my co-worker). But I'm failing and I'm not sure why. I did set-up a JBoss server once before on a different (and also, now broken) laptop with no problem, but now I'm having trouble since nothing seems to be working correctly. Does anyone else know why this is failing/what's going on?

In eclipse, after clicking on "ADD" you can "download additionnal server adapters" on the top right of your frame! try to click on this and select "JBOSS" if it was not present!
By default i had Jboss in the list...
hope this helps!

Related

cannot add tomcat server on eclipseEE

I'm trying to add a new tomcat server in eclipse. However, when I'm defining a new server, the interface seems abnormal(the icons are all red):
what's more, after I click 'Next', there is no page telling me to select Tomcat installation directory.
After I click on finish, there is a problem pop up and I cannot start the server:
Could anyone tell me what's wrong with my eclipse and what should I do? Thank you!
my environment:
eclipseEE: neon.2
os: macOS Sierra
tomcat: apache-tomcat-8.0.41
Close Eclipse ide
Go to {workspace-directory}/.metadata/.plugins/
Delete the following folders:
org.eclipse.wst.server.core.prefs
org.eclipse.jst.server.tomcat.core.prefs
org.eclipse.core.runtime/.settings
Open Eclipse ide and try to configure again
Another option is when you open Eclipse ide and choose other workspace and configure all again.
If the problem persist maybe your eclipse or tomcat files are corrupts, try to download and setup all again.

Cannot deploy an application to Glassfish 4.1 in Eclipse

I have Glassfish 4.1 and Eclipse Luna installed on Ubuntu. When I tried to run a simple web application (jsp + servlet + java bean) I`ve received the following error:
Publishing to Glassfish 4 at localhost[domain1].. has encountered a
problem.
cannot Deploy mvcprj1 deploy is failing=Application with
name [mvcprj1] is not deployed
Nothing is appearing neither in the glassfish server log or in the eclipse console.
I had same deployment issue (eclipse Lune/Glassfish 4.1) and it was resolved thanks to Marvin's feedback.
You can find the "Use JAR archives for deployment" by:
right click on glassfish from eclipse server tab. Then, select Monitoring >Properties > Glassfish in new windows > Use JAR archives for deployment.
Then, the miracle occurs...
Try the following steps:
right click on glassfish server
click on properties
then you will get 3 options(general,glassfish,monitoring) at the left side of that box.
click on glassfish
click that checkbox "Use JAR archives for depolyment". Previously it was unchecked. That's why I was getting issue.
I have deleted the Glassfish server instance in eclipse and recreated it to solve this problem.
I believe, that occurs, when one has not closed the "Browser Page" in Eclipse, after he had tried out the same application previous time. After closing all open "Browser Pages" of this application in Eclipse, the deployment is possible again.

Why won't basic spring 4 sample run with Eclipse kepler?

I am using the sample project code here that i've downloaded from the following:
http://javahash.com/spring-4-mvc-hello-world-tutorial-full-example/
Direct link here:
http://javahash.com/wp-content/uploads/2014/02/Spring4MVCHelloWorld.zip
I have Eclipse Kepler SR2 (J2EE), Tomcat 7 64-bit, Java 7.
The project does not appear to be a web project, so I add "Dynamic Web Module" version 3.0 and "Java" (version 1.7) to it. I right click, maven install, which appears to run fine. When I try to actually deploy it on tomcat, it does not give any errors in the console, but when the browser window pops up it shows a 404
http://localhost:8080/Spring4MVCHelloWorld/
HTTP Status 404 - /Spring4MVCHelloWorld/
--------------------------------------------------------------------------------
type Status report
message /Spring4MVCHelloWorld/
description The requested resource is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.39
That said, how do I get this "basic" example running in eclipse? Anyone able to get this working successfully? It feels like it should be more trivial than the 5 hours I've spent on trying to get this sample code working to no avail.
UPDATE:
Still continues to fail despite using Tomcat 7.0 server.
Download the sample, extract contents to workspace directory.
"Import Existing Project" in Eclipse
Since there is no "Run On Server" option, I right click on the imported project directory and hit "Properties".
I go to "Project Facets" and check 2 things: "Dynamic Web Module" (3.0) and "Java" (1.7) and hit apply then "Ok".
I right click on the project Spring4MVCHelloWorld and click "Maven"->"Update Project". Then I click "Run On Server".
There are no errors in the console, but the web browser that pops up in eclipse shows a HTTP STATUS 404.
I tried going to:
http://localhost:8080/Spring4MVCHelloWord/hello
and the same:
HTTP Status 404 - /Spring4MVCHelloWorld/hello
shows up, but the tomcat shows up as:
Apache Tomcat/7.0.53
Note that this is the 64-bit version. What steps am I missing? How do I get around this silent failing?
Apart from what Dimitri stated, your log seems to indicate that you are using
Apache Tomcat/6.0.39
That version of Tomcat does not support ServletContainerInitializer which your Spring web application depends on for configuration. Upgrade to a Tomcat version 7+.
It seems like the Maven update doesn't work for you (or for me).
First, go into Properties -> Deployment Assembly. You need to get rid of Web Content if it's there and add src/main/webapp (which is a maven convention). You also need to add the Maven Dependencies as shown below.
Finally, and this might not be necessary, delete the web.xml provided to you and re-create it by selecting and right clicking Deployment Descriptor in the Project Explorer and clicking Generate Deployment Descriptor Stub.
Also, make sure your Java Build Path in the Properties has a Java 7+ version of the JRE.
As far as I can see your controller only maps to /hello, which means your URL should be:
http://localhost:8080/Spring4MVCHelloWorld/hello
Another thing that might be interesting to you is that if your having problems with certain project facets (like Dynamic Web Module) not being recognized, you can usually fix them by righ clicking your project, opening the Maven menu and choosing Update Project.

Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

Setup
I'm using Netbeans 7.4 on Mac OSX Mavericks and Glassfish 4.0 (build 89) on my dedicated server and JDK 1.7. To use the server locally I setup and ssh-tunnel. The following way:
ssh -L 4848:127.0.0.1:4848 -p 6122 glassfish#XXXXXXXXXX
This is working perfectly fine, I can access the server via localhost without any problems. To use this server I added a server in Netbeans, see prinscreen:
Problem
Now I'd like to deploy the project to the server (Right-Click Project -> Deploy) but I get following Error:
Building jar: /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war
Distributing /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war to [glassfish.ivo]
glassfish.ivo, deploy, null, false
/Users/tzhware7/NetBeansProjects/SkyLogicAddon/nbproject/build-impl.xml:1050: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 second)
Now I'd checked the line where the Error-Show's up, which is following (1049-1051). For me everything looks normal:
<target if="netbeans.home" name="-run-deploy-nb">
<nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
</target>
In advance I checked the serverlogs, which are empty - no error is shown. What am I doing wrong? Can someone advice me what to change? Thank you in advance!
Edit 1 - 08.01.2014
Allright, I didn't found a solution for solving the problem above, but following way worked at least to deploy the app manually.
Netbeans -> Right-Click on Project -> Clean/Build (now check your outputlog where it save's the project.
Now go to that path, you'll shoud find a .war file
Log into your glassfish-server -> Click Application's -> Click deploy -> upload the .war file -> Click again deploy
Now glassfish deploys the project for you. :)
Edit 2 - 17.01.2014
I could fix the problem, following was wrong. In netbeans I configured that the Target should be domain1, if you do this, it won't work. Let the target be empty, and everything works fine.
Thank you Tim B for your help!
If NetBeans can't talk to the server when you add it to the list then it silently fails. The server appears in the list but you can't click on the + and expand it out to see what it contains.
Check in your server list that NetBeans can actually see the server. Also keep in mind that NetBeans needs access to the admin port (usually 4848) not the normal web one, although it looks like your tunnel is correct for that.
You also need to turn on remote administration and set up the username and password etc. Try pointing a web browser to your localhost 6122 and check you can log in to the admin panel using the same username and password that netbeans is using.
To turn on remote administration:
https://blogs.oracle.com/quinn/entry/securing_adminstration_in_glassfish_server1
asadmin enable-secure-admin
You will also need to add an administrator username and password.

Can't Save "Is a Tomcat Project" setting in Eclipse Project Properties

I have a Spring MVC project that I've been deploying to Tomcat (installed both locally and on a server). I'm using Eclipse Indigo as my IDE. To deploy, I had been right clicking and choosing "run on server", which would run fine on localhost. For deploying a WAR to the actual server, I had been right clicking on Project, selecting Export, and going through the wizard to deploy a WAR file.
My Eclipse/Java is rusty, but I did remember that when I used it a couple of years back, I was using the Sysdeo plugin for Tomcat that would give me an option for Deploy to War right from the right click context. So, I poked around and found "Mongrel", which I installed. With that in place, I went to Mongrel under preferences, and set up my Tomcat version, so that I can click the little start/stop Tomcat icons and start/stop the server. This was successful.
What I can't now do for the life of me is, in Project Properties->Tomcat, choose "Is a Tomcat Project". I check the checkbox and then click Apply and/or OK to dismiss the window, and when I open it again, my setting is not recorded. I have tried checking the box and adding other options (like context name, path for a WAR file export, root sub-directory, and activating dev loader), but nothing I do "sticks".
Can someone tell me what I'm missing, or at least point me in the right direction? I'm stumped.
Thanks in advance.
I know this may be a late answer, but as I had the same issue today, I figure I could post my findings here.
I had the exact same problem as yours when I installed mongrel from the eclipse marcket place.
The solution for me was to uninstall mongrel, delete the plugin folder in the plugin directory of eclipse and then get the plugin from the project page on sourceforge.

Categories

Resources