Starting JBoss 7.1.1 from eclipse fails - java

When starting JBoss from the servers view inside Eclipse Indigo SR2 with JBoss Tools 2.3.0 on my machine, everything runs fine.
I have copied all contents of my work folder containing Eclipse and JBoss-7.1.1.Final to a different machine.
Now, when I try to start the server, it fails with this message:
Starting JBoss 7.1.1 Runtime encountered an error. The archive: /jboss/jboss-modules.jar which is referenced by the classpath, does not exist.
I don't see anything referencing the jar in the runtime or server or project configurations. And the jboss-modules.jar is inside the root folder of the JBoss server, as expected. There are no deployments in the standalone.xml.
Both machines are running SuSe 12. .bashrc and .profile are empty.
The server starts fine from command line.
I have created a new runtime and a server using this runtime from scratch in Eclipse, but get the same error.
Any ideas are appreciated.

modules.jar is required to run JBOSS 7.1 Runtime, which is missing.
Go to Window > Preferences > Server > Runtime Environment > Default Classpath.
If you don't see any classpath in the right side menu,you can tweek the classpath setting by-
Change server to JBOSS 7.0 Runtime.
Again Change server to JBOSS 7.1 Runtime.
Delete and Add Server Again,
while Add new server,
Please Check the 2nd and 3rd checkboxes
-"Listen on all Interfaces to allow remote web connections"
-"Expose your management port as server's hostname"
now everything will run fine.

I have found the solution just now:
I have found the reference to the jboss-modules.jar in the launch configuration of the server under User Libraries. All attempts to delete it failed. After removing or resetting to defaults and applying, I started the server, received the same error and the .jar was in the launch cofig classpath again.
I actually had a project named jboss without any facets, just to have the JBoss files visible from the eclipse project browser. This project was closed.
After I opened it, the server started fine again.
I am still clueless about how the reference to the jboss-modules.jar from a project got into the launch config classpath and why it resisted removing attempts.

I know this is a late response but in case anyone needs a solution to this issue.
If you go to Window > Preferences > Servers > Runtime Environments > Default Classpath
You will see that the 'JBoss 7.0 Runtime' does not have 'modules../-[*/.jar]' dependency, which is where the jboss-modules.jar lives. After selecting the 'JBoss 7.0 Runtime' rather than the JBoss 7.1 Runtime, the error relating to the jboss-modules.jar went away, and the server starts without error.
My application also started without error. I am using JBoss 7.1.1.

Related

How to configure JBoss server in IntelliJ with server base dir and a settings.xml

I'm trying to switch from Eclipse to IntelliJ Ultimate. But I have trouble configuring an application server.
What I have:
IntelliJ IDEA Ultimate 2020.3
a JavaEE application running on JBoss EAP 7.1
What I already achieved:
Adding an application server in Settings -> Build, Execution, Deployment -> Application Servers: I added a JBoss Server and specified the JBoss home directory
Adding a Run/Debug Configuration where I chose the JBoss server, added the artifacts which should be deployed, added some VM options, specified the JRE
Where I am stuck:
Here are the things I miss from the Eclipse configuration, and I can't find any documentation or help about that:
In Eclipse, there is a "server runtime environment" which specifies a "server base directory" and a "configuration file" (settings.xml) in addition to the server home directory and JRE. Where can I find these settings in IntelliJ?
Alternatively, there is the "launch configuration" in Eclipse, where you can define "program arguments" in addition to VM arguments. These also seem to set the server config and base dir.
Any help is highly appreciated. Thanks a lot!
There are instructions from IntelliJ site:
Application Servers
Application server run configurations
Update:
Basically you add your JBoss server
Settings->Application Servers- click + icon to add server
screenshot here
Then in run configurations you add and config your JBoss server
screenshot here

"Error: no label provider for Tomcat v9.0 at localhost"

I'm trying to simply attach a Tomcat server to my Eclipse project, however every time I try to add a server I get an error in the server view section of Eclipse. The server info shows up in the project explorer, but you cannot run/edit the server from the server view.
This is what the error looks like:
Even right clicking inside of the server view just says, "Clean Tomcat work directory..." and "Browse deployment location..." rather than creating a new server.
My Tomcat installation works fine, checking localhost:8080, so it must be something with Eclipse.
I'm using Tomcat v9.0 as well as jdk 1.8.0_241
To solve this error create new workspace and add your projects to that workspace.
This error is just related with current workspace only, so by creating new workspace in eclipse you can add tomcat server and continue your work with no issue.

Unable to install breakpoint in Eclipse: Absent Line Number Information

I have a Java 1.6.0 web application that I am developing using a Kepler Version 2 Eclipse development environment. I am using an Oracle Weblogic Server Administration Console 12c.
I'm running the app locally - and trying to debug it. Instead of stopping at any of the breakpoints I've set - I get the following error:
When I installed the application to Weblogic, I ran the Weblogic console and then installed the application by adding the ear file.
I thought I did everything exactly the same as previous web applications I've done this way - but I was always able to debug those applications.
Also - one other thing that is different. When make any changes and re-build the ear file - I actually have to delete and reinstall from the Weblogic console for the changes to take place. I'm thinking this might be related.
Any suggestions?
Thanks!
Have a jar file added to a build path in any of the projects that
include the classes in your project

Deploy java-application on tomcat

I have developed a java webservice application that I have been running on my dev-computer and in the meanwhile been setting up a dedicated ubuntu based linux server.
I have installed oracle-jre, mysql and apache tomcat 7 on this linux server and
after reading documentation I understand that I can either copy the deployed project archive (.WAR) or I can simply copy the project folder, into the servers /webapps/ folder from my development computer. Then restart tomcat7 and it should automatically run the webapp.
On my dev-computer with Eclipse IDE the webservice works properly as expected, but I cannot access the POST URL methods at all on the server
e.g. localhost:8080/Webservice/rest/account/login
(The installation on the server seems to be O.K as the Apache examples all work properly.)
I cannot see any logs in the /logs/ directory, in fact the folder is completely empty, so I cannot debug whats actually happening. Why aren't logs writing to the Catalina.out file?
Am I deploying this correctly as explained above?
Do I need to configure Eclipse or any project settings to reflect the change from the eclipse IDE / dev-computer to the server? E.g Is there any real difference?
A lot of questions there, but I wanted to clarify as much as possible,
Cheers,
Oliver
I fixed this issue by reinstalling tomcat.

NetBeans - Java EE server classpath is not correctly set up - server home directory is missing error

I am getting an error when I try to build my project in NetBeans. I am using JBoss 5.1.0 server and have attached that to my project. The error is -
The following error occurred while executing this line:
.../myPath/build-impl.xml:176: The Java EE server classpath is not correctly set up - server home directory is missing.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
ant -Dj2ee.server.home=<app_server_installation_directory>
I am using Mac OS X Lion.
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
I do have Weblogic Server set up under /home (on a Linux machine).
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
(where wlserver = the server name)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
This worked for me.
Right click on the Project -> Properties -> Run
And Change the server Setting from the current server to another sever and click OK.
Wait for any background scanning to finish.
Repeat the processes 1 to 3 again this time selecting the actual server you want to run the code on.
Then try Re-Running your application.
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
I solved it like this, I added in the ANT properties field
"j2ee.server.home=http://localhost/"
tolls>options>java>Ant
this in linux netbeans
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.

Categories