I got a new job to maintain a java web application that was already deployed on wildfly 10. They do not have a backup of the application. In wildfly web interface, I found no option for downloading the EAR file.
Please guide me if there any way to download EAR file from wildfly web interface or terminal?
Thanks
Added Later:
CLI Attachment command is not available.
You can download the war/ear file using JBoss CLI.
1.
[user#user bin]$ cd /opt/$EAP_HOME/bin/
2.
[user#user bin]$ ./jboss-cli.sh -c
[standalone#localhost:9990 /]
3.
[standalone#localhost:9990 /] ls deployment
test.war
4.
[standalone#localhost:9990 /] attachment save --operation=/deployment=test.war:read-content() --file=/home/user/test.war
File saved to /home/user/test.war
In Wildfly 9 there are some folders named data. In them there are some directories with a name in hexadecimal.
Like: /wildfly/standalone/data/content/0d/bd50f8f78f3e1d99f9eca38a60c4a7d3ed31c8
Here are a file named content that is a app.
To make sure that it is the file you are looking for, you will have to find an XML where that code is, and it will tell you the name of the application. If you rename it, you can make the backup.
Something like:
<deployment name="app.jar" runtime-name="app.jar">
<content sha1="0dbd50f8f78f3e1d99f9eca38a60c4a7d3ed31c8"/>
</deployment>
In my case are standalone.xml, but sometimes it`s domain.xml
Related
I am taking my very first steps with WildFly application server. I want to create a database driver.
I had a look at https://www.adam-bien.com/roller/abien/entry/installing_oracle_jdbc_driver_on on how to do it manually. And now I want to do it by jboss-cli.sh. I read about these commands e. g. here and here.
So I am typing...
wildfly-26.0.0.Final/bin$ ./jboss-cli.sh -c
[standalone#localhost:9990 /] module add --name=com.oracle --resources=/home/user/Downloads/ojdbc8.jar --dependencies=javax.api,javax.transaction.api
The command is going to be executed without error.
I would expect it to
create the module-subfolders (step 2 in the linked tutorial by Adam Bien)
copy the JAR file to the newly created folder (step 3)
create the module.xml file (step 4)
maybe even to add the necessary <driver /> tag in the standalone.xml (do not know if that should be part of the add module command?) (step 5)
Basically it does a lot of that, but different than I expect.
It creates the subfolder in a wrong(?) location. It is not created in [WILDFLY_HOME]/modules/system/layers/base/com/oracle/main like it is decribed by Adam Bien but it is created [WILDFLY_HOME]/modules/com/oracle/main. The JAR file is correctly copied, the module.xml file is created but the folder seems to be wrong. And the standalone.xml is not altered at all.
If I start the web management console I do not see the driver next to the default H2 one.
So my question is what am I doing wrong with the command so that the folder is created in the correcy localtion? Or does this work as designed and the location is not that relevant and I am making other mistakes that it does not show in management console nor in standalone.xml?
By the way, I also tried to change the command module add --name=system.layers.base.com.oracle .... Now the folder was correct, but in the module.xml the name of the module was also system.layers.base.com.oracle.
I tested with WildFly 26.0.0 and WildFly-preview 26.0.0 under Ubuntu.
It should not be created in modules/system/lasers/base. That is for components provided by the container. Having the module off the root $JBOSS_HOME/modules directory is correct.
An architect is having issues bringing Liberty up. Currently, an individual is running a server on his local computer and they want to move it to a shared server. When he tries to deploy a simple “helloworld” it’s failing and he is receiving an error “Context Root Not Found”. He is not sure what to set in server.xml file to have wlp recognize the application. They have ODM 8.5 on the mainframe. He thinks it might help if he saw an example of an EAR or WAR file deployed. Any ideas or suggestions?
Either put your application in the dropins folder, it will be detected and started automatically, or put it in the apps folder and configure in server.xml like this:
<webApplication id="HelloApp" location="HelloApp.war" name="HelloApp"/>
by default context root is application file name without extension, but you can change it by adding contextRoot="mycontext" attribute.
How To deploy Adempiere project .war file on jboss server?
Kindly describe the steps briefly.
Manually Adempiere deployment is some what more complicated. You can't find the only one specific .war file in adempiere.
If you are going to do adempiere manually deployment then you need to find the following
*.jars and *.wars from source and place the jars and wars in respective places in jboss application server
webui.war
adempiereApps.war
adempiereRootBase.war
Adempiere.jar
AdempiereApps.jar
AdempiereRoot.jar
CCTools.jar
CSTools.jar
CompiereJasperReqs.jar
Generating the Adempiere Installer :- (You can download adempiere installer from sourceforge also)
Adempiere already integrated with jboss 4.2.3. For getting adempiere installers sake you need run the *ADEMPIERE_Trunk/utils_dev/build.xml* using ant. then system will craete installers for you. These installers are available *ADEMPIERE_Trunk/adempiere/install*.
Now copy these installer (.zip or .tar.gz) and place into your desired server location and extract it. Ex :-( C:\Adempiere or /home/user/Adempiere, this path we called as ADEMPIERE_HOME)
To Configure Adempiere server :-
open up a console window and go to the $ADEMPIERE_HOME/ directory. Run the script RUN_setup(.bat or .sh depending on your OS), Now it will open a popup enter your data (related to database configuration , application server configurations and ports) and click on the OK button. after 1 to 2 Minutes the process will be completed.
To Run Adempiere server :-
To run the ADempiere Server from a console, open up a console window and go to the $ADEMPIERE_HOME/utils directory. Run the script RUN_Server2 (.bat or .sh depending on your OS).
Now you can access from browser.
I am Trying to deploy Jboss esb over Jboss AS using Ant. but i am getting the following error and it is giving me a build fail. I certainly have changed the .Properties file with the correct Server home and server config paths.
Below is the error i am getting
Also I have Jboss 5.1.0 AS and Jbossesb 4.1.0
I am not sure what changes do i need to make with my build.xml file.
C:\jbossesb-4.10\install>ant deploy
Buildfile: C:\jbossesb-4.10\install\build.xml
check.deploy.props:
dependencies.source:
dependencies.jbossesb:
dependencies:
init.bindings.props:
undeploy.bindings:
undeploy.jbossas5:
undeploy.jbossas6:
undeploy:
BUILD FAILED
C:\jbossesb-4.10\install\build.xml:480: Directory does not exist: C:\jbossesb-4.10\install\jboss-5.1.0.GA\server\all\lib
You've probably set bad server path in property file. Did you unpack server to "C:\jbossesb-4.10\install\jboss-5.1.0.GA\" directory?
You need to set the path to jboss-as directory. Correct may be something like this.
C:\jbossesb-4.10\install\jboss-5.1.0.GA\jboss-as\
In order to deploy jboss-esb on to jboss-as you need to have deployment.properties file in
your install folder of jboss-esb (for ex: \jbossesb-4.6\jbossesb-4.6\install)
in that deployment properties file you need to set your jboss-as home
ex: org.jboss.esb.server.home=D:/J Boss Book Installs/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA
NOTE: the direction of slash is very important it should be forward slash(/) (as specified in example above) for it get indexed in to the given server.home location .
Otherwise you will get directory doesn't exist errors just like the one you specified above in your question .
Check your deployment.properties file and correct server.home it would probably resolve your error !!!
I had a two bat files start.bat and stop.bat for starting and stopping SOLR server manually,
Is it possible for me to create a windows serive which will call start.bat on starting the service and also call stop.bat on stopping the sERVICE
Consider Solr Multicore feature with Tomcat. Each core is like a fully fledged installation, "separate configurations and indexes, with their own config and schema for very different applications, but still have the convenience of unified administration" http://wiki.apache.org/solr/CoreAdmin
Even if you dont use multiple indexes, it's much more elegant to set up. Solr is available on startup if Tomcat is set that way. I assume you are using Solr 1.4.
You need to do these steps:
Set up a solr root directory
Overview
c:\solr
|-lib
|-solr.war
|-solr.xml
Create c:\solr
from the Solr package directory, copy the lib directory to the root dir.
from \example\webapps of Solr package directory, copy the solr.war
solr.xml has the following contents
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="false" sharedLib="lib">
<cores adminPath="/admin/cores">
<core name="myindex" instanceDir="myindexdir" />
</cores>
</solr>
The core parameter specifies a new core. The attributes specify that for serving http//localhost:8080/mysearchapp/myindex, the index directory is myindexdir, which brings us to the next step.
Create the actual core
Overview
c:\solr
|-lib
|-solr.war
|-solr.xml
|-myindexdir
|-bin
|-conf
|-data
copy the conf directory, where you have done your configuration to myindexdir. Dont bother creating bin and data, it will be automatically created.
Set up tomcat
install Tomcat, run it once (dont skip this) and open http://localhost:8080 to see if it is successfully installed
Of course, set it to start on boot by using services.msc
Open this directory
Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
Create the file mysearchapp.xml
Context docBase="c:\solr\solr.war" debug="0" crossContext="true" >
<Environment name="solr/home" type="java.lang.String" value="c:\solr\" override="true" />
</Context>
Restart tomcat and open http://localhost:8080/mysearchapp/
If all goes well it will display
Welcome to Solr!
Solr Admin myindex
Now do your operations on your core like http://localhost:8080/mysearchapp/myindex/select?q=MY-QUERY
Solr runs on top of a Servlet container like Tomcat. So for starting Solr you have to configure Solr with your Servlet container and then start.
Yes you can of course create a Windows Service. However you have not mentioned which Servlet container are you using for running Solr?
If it is Apache Tomcat here you go:
1. Just go to tomcat/bin folder from command prompt
2. Say service.bat install
3. You can see the service being listed in the Microsoft Services
Application
4. Right click on the service and add solr home (in Start
parameters). For an example if your Solr home is in D drive then:
-Dsolr.solr.home="D:\solr"
5.You are done. Just right click on the service, start it or even you can set
it to start automatically when your system starts.