johan.i.zahri
johan.i.zahri

Reputation: 316

Running Jboss 7 using different config folder under standalone-servers

I'm used to jboss 5 deployment schemes where i use this command to deploy:

D:\jboss5\bin\run.bat -c ZZZ

which will deploy whatever in the jboss5\server\ZZZ folder

I have this structure on my jboss7:

D:\jboss7\
+standalone-servers
++ZZZ
+++modules

when i try to run jboss7 like this:

D:\jboss7\bin\standalone-servers.bat -c ZZZ

it complains with the following:

org.jboss.modules.ModuleNotFoundException: Module org.jboss.as.standalone:main is not found in local module loader @7559ec47 (roots: D:\jboss7\standalone-servers\modules) at org.jboss.modules.LocalModuleLoader.findModule(LocalModuleLoader.java:126) at org.jboss.modules.ModuleLoader.loadModuleLocal(ModuleLoader.java:275) at org.jboss.modules.ModuleLoader.preloadModule(ModuleLoader.java:222) at org.jboss.modules.LocalModuleLoader.preloadModule(LocalModuleLoader.java:94) at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:204) at org.jboss.modules.Main.main(Main.java:262)

how to tell jboss7 to look for the right configuration that resides in the folder ZZZ?

appreciate for answers

Upvotes: 0

Views: 2678

Answers (2)

Abhishek Gupta
Abhishek Gupta

Reputation: 32

A possible reason is your jboss runtime is corrupt. Reason for

**org.jboss.modules.ModuleNotFoundException: org.jboss.as.standalone:main
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:224)
at org.jboss.modules.Main.main(Main.java:341)**

is that jboss-eap-6.2\modules\system\layers\base\org\jboss\as\server\main package is missing inside your jboss directory. This package contains jboss-as-server-7.3.0.Final-redhat-14.jar and module.xml which are essential to run jboss server.

Upvotes: 0

shonky linux user
shonky linux user

Reputation: 6428

By default the base directory for a standalone JBoss EAP 6 / JBoss AS 7 instance is ${JBOSS_HOME}/standalone

You can override this by supplying -Djboss.server.base.dir=ZZZ

You need to create ZZZ/configuration and ZZZ/deployment directories, and place your standalone.xml file in ZZZ/configuration, then start jboss using the option.

standalone.bat -Djboss.server.base.dir=path_to_ZZZ

If your JBoss configuration file is not called standalone.xml then you will also need to add

-Dtarget.appserver.configfile=my_standalone_config.xml

The JBoss instance base directory does not need to be within the ${JBOSS_HOME} subdirectory tree. In fact it is better to keep it somewhere separate as it allows you to update / reinstall JBOSS binaries without overwriting your configuration files.

The modules folder should remain within ${JBOSS_HOME}

So if your ${JBOSS_HOME} were c:\jboss7 it would look something like

C:\jboss7
+bin
+modules
+standalone <- not used!
... etc

c:\standalone-servers
+ZZZ
++configuration
+++standalone.xml
++deployments

Upvotes: 3

Related Questions