• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

running a JBOSS server ... elsewhere

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Fred Keegan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Someone has an insight. Come on, it must be trivial (except for me)
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you copy jboss_home/server/default as C:/frank/sandbox/JBossTesting/server/default?
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EDIT: removed again....
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic