aspose file tools*
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "running a JBOSS server ... elsewhere" Watch "running a JBOSS server ... elsewhere" New topic
Author

running a JBOSS server ... elsewhere

Fred Keegan
Greenhorn

Joined: Aug 16, 2010
Posts: 4
Hi,

I want to run a JBOSS server outside of
%JBOSS_HOME%/server/myServerDir
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

Frank
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

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
Greenhorn

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 127.0.0.1 -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
rvice.xml
org.jboss.deployment.DeploymentException: No ClassLoaders found for: org.jboss.management.j2ee.LocalJBossServerDomain; -
nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.management.j2ee.LocalJBossSer
verDomain)
at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)


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
C:\frank\sandbox\JBossTesting\server\conf\xmdesc\org.jboss.deployment.MainDeployer-xmbean
So nothing got left behind that was in the original server location...

Can you help me again?
Fred Keegan
Greenhorn

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

Joined: Jul 20, 2005
Posts: 9343
    
111

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
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

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: http://aspose.com/file-tools
 
subject: running a JBOSS server ... elsewhere
 
Similar Threads
Failed to boot JBoss:
Jboss 4.2.3GA with JDK1.6.0
Problem Installing
jboss not starting - config issue?
How to Install JBoss