Meaningless Drivel is fun!
The moose likes JBoss/WildFly and the fly likes running a JBOSS server ... elsewhere Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "running a JBOSS server ... elsewhere" Watch "running a JBOSS server ... elsewhere" New topic

running a JBOSS server ... elsewhere

Fred Keegan

Joined: Aug 16, 2010
Posts: 4

I want to run a JBOSS server outside of
for example my complete server including deployment jar, standard libs, etc shall be in
%DEPOTDIR%\projectA e.g. C:\users\john\depot\projectA

The reason is, that this would make versioning system deployment/collaboration way more simple...

So, the server should remain where it is, just fiddling with the run.bat parameters resp. coming up with
a custom taylored "run.bat" making use of %DEPOTDIR% (and all those dreaded classpath issues...)

JBoss 4.0.5, Java 5, Windows 7
Symbolic/hard links are not a viable option

Peter Johnson

Joined: May 14, 2008
Posts: 5852

Fred, welcome to Java Ranch!

Try this: Add the jboss.server.base.url and jboss.server.base.dir entries to the command line. These properties define the location of server/xxx. Example:

run -Djboss.server.base.dir=%DEPOTDIR% -Djboss.server.base.url=file://%DEPOTDIR% -c projectA

JBoss In Action
Fred Keegan

Joined: Aug 16, 2010
Posts: 4
Hey Peter,

thank you for your reply. I can feel, it's almost working :-)

I start as you indicate (my server dir is uninspiredly called "server" within my JBossTesting project folder. This "server" dir directly contains conf, data, deploy, etc... ):

%JBOSS_HOME%\bin\run.bat -b -c server -Djboss.server.base.dir=C:\frank\sandbox\JBossTesting -Djboss.server.base.url=file://C:\frank\sandbox\JBossTesting

Things boot up nicely (and those backward slashes do get converted properly for the URL, so I could go with an env var later on), but then I do get an exception..

10:05:15,640 INFO [Server] Starting JBoss (MX MicroKernel)...
10:05:15,641 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
10:05:15,642 INFO [Server] Home Dir: C:\java\jboss-4.0.5.GA
10:05:15,643 INFO [Server] Home URL: file:/C:/java/jboss-4.0.5.GA/
10:05:15,644 INFO [Server] Patch URL: null
10:05:15,644 INFO [Server] Server Name: server
10:05:15,644 INFO [Server] Server Home Dir: C:\frank\sandbox\JBossTesting\server
10:05:15,645 INFO [Server] Server Home URL: file://C:/frank/sandbox/JBossTesting/server/
10:05:15,645 INFO [Server] Server Log Dir: C:\frank\sandbox\JBossTesting\server\log
10:05:15,645 INFO [Server] Server Temp Dir: C:\frank\sandbox\JBossTesting\server\tmp
10:05:15,646 INFO [Server] Root Deployment Filename: jboss-service.xml
10:05:18,382 INFO [ServerInfo] Java version: 1.5.0_21,Sun Microsystems Inc.
10:05:18,382 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.5.0_21-b01,Sun Microsystems Inc.
10:05:18,383 INFO [ServerInfo] OS-System: Windows 7 6.1,x86
10:05:18,558 INFO [Server] Core system initialized
10:05:21,627 ERROR [MainDeployer] Could not create deployment: file://C:/frank/sandbox/JBossTesting/server/conf/jboss-se
org.jboss.deployment.DeploymentException: No ClassLoaders found for:; -
nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for:
at org.jboss.system.ServiceConfigurator.install(

LocalJBossServerDomain is the very first mbean in JBossTesting/server/conf/jboss-service.xml,
so I guess I need to fix something about the preceding:

<classpath codebase="${jboss.server.lib.url:lib}" archives="*"/>

I have no clue what and how, though... (the lib folder within my server folder is intact and unchanged,
but I guess, I

Btw, there is a
So nothing got left behind that was in the original server location...

Can you help me again?
Fred Keegan

Joined: Aug 16, 2010
Posts: 4
Someone has an insight. Come on, it must be trivial (except for me)
Jaikiran Pai

Joined: Jul 20, 2005
Posts: 10441

Can you post the contents of your boot.log? I am mainly interested in seeing the Library URL and Server Library URL it's picking up.

[My Blog] [JavaRanch Journal]
Peter Johnson

Joined: May 14, 2008
Posts: 5852

Did you copy jboss_home/server/default as C:/frank/sandbox/JBossTesting/server/default?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1179

EDIT: removed again....

Regards, Rene Larsen
Dropbox Invite
I agree. Here's the link:
subject: running a JBOSS server ... elsewhere
jQuery in Action, 3rd edition