3 Replies Latest reply on Feb 16, 2011 2:16 PM by First Last

    Issue with Separate Server and Deploy Directories

    First Last Newbie

      I have a base server instance where I have all the server modules such as jbossweb.sar, jbossws.sar, etc under /apps/jboss-as-5.1/server. Then, I have a separate directory under  /apps/server/sia that serves as my home url/dir. The below is a snippet of my JBoss config:

       

        JBoss Bootstrap Environment

       

        JBOSS_HOME: /apps/jboss-as-5.1

       

        JAVA: /apps/java/jdk1.6.0_23/bin/java

       

        JAVA_OPTS: -Dprogram.name=run.sh -server -Xms512m -Xmx512m -XX:PermSize=256m -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -Dsun.rmi.dgc.clie

      nt.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djboss.service.binding.set=ports-01 -Dapp.dir=/app

      s/server/sia -Druntime.env= -Djboss.server.name=sia -Djboss.server.home.dir=/apps/server/sia -Djboss.server.home.url=file:/apps/server/sia -Djboss.server.log.

      dir=/logs/sia -Djboss.server.lib.url=file:/apps/jboss-as-5.1/server/default/lib -Dcodebase=file:/apps/jboss-as-5.1/server/sia-standard -Djboss.server.central.

      repo.url=/apps/jboss-as-5.1/server/default/ -Djava.net.preferIPv4Stack=true

       

        CLASSPATH: /apps/server/sia/lib/*.jar:/apps/jboss-as-5.1/bin/run.jar:/apps/java/jdk1.6.0_23/lib/tools.jar

       

      =========================================================================

       

      Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future

      18:07:46,849 INFO  [ServerImpl] Starting JBoss (Microcontainer)...

      18:07:46,854 INFO  [ServerImpl] Release ID: JBoss [EAP] 5.1.0 (build: SVNTag=JBPAPP_5_1_0 date=201009150028)

      18:07:46,854 INFO  [ServerImpl] Bootstrap URL: null

      18:07:46,855 INFO  [ServerImpl] Home Dir: /apps/jboss-as-5.1

      18:07:46,855 INFO  [ServerImpl] Home URL: file:/apps/jboss-as-5.1/

      18:07:46,855 INFO  [ServerImpl] Library URL: file:/apps/jboss-as-5.1/lib/

      18:07:46,863 INFO  [ServerImpl] Patch URL: null

      18:07:46,863 INFO  [ServerImpl] Common Base URL: file:/apps/jboss-as-5.1/common/

      18:07:46,864 INFO  [ServerImpl] Common Library URL: file:/apps/jboss-as-5.1/common/lib/

      18:07:46,864 INFO  [ServerImpl] Server Name: sia

      18:07:46,864 INFO  [ServerImpl] Server Base Dir: /apps/jboss-as-5.1/server

      18:07:46,864 INFO  [ServerImpl] Server Base URL: file:/apps/jboss-as-5.1/server/

      18:07:46,864 INFO  [ServerImpl] Server Config URL: file:/apps/server/sia/conf/

      18:07:46,864 INFO  [ServerImpl] Server Home Dir: /apps/server/sia

      18:07:46,864 INFO  [ServerImpl] Server Home URL: file:/apps/server/sia/

      18:07:46,864 INFO  [ServerImpl] Server Data Dir: /apps/server/sia/data

      18:07:46,864 INFO  [ServerImpl] Server Library URL: file:/apps/jboss-as-5.1/server/default/lib/

      18:07:46,864 INFO  [ServerImpl] Server Log Dir: /logs/sia

      18:07:46,864 INFO  [ServerImpl] Server Native Dir: /apps/server/sia/tmp/native

      18:07:46,865 INFO  [ServerImpl] Server Temp Dir: /apps/server/sia/tmp

      18:07:46,865 INFO  [ServerImpl] Server Temp Deploy Dir: /apps/server/sia/tmp/deploy

      18:07:48,554 INFO  [ServerImpl] Starting Microcontainer, bootstrapURL=file:/apps/server/sia/conf/bootstrap.xml

      18:07:49,668 INFO  [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.CombinedVFSCache]

      18:07:49,672 INFO  [VFSCacheFactory] Using VFSCache [CombinedVFSCache[real-cache: null]]

      18:07:50,191 INFO  [CopyMechanism] VFS temp dir: /apps/server/sia/tmp

      18:07:50,210 INFO  [ZipEntryContext] VFS force nested jars copy-mode is enabled.

      18:07:51,871 INFO  [ServerInfo] Java version: 1.6.0_23,Sun Microsystems Inc.

      18:07:51,871 INFO  [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

      18:07:51,872 INFO  [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 19.0-b09,Sun Microsystems Inc.

      18:07:51,872 INFO  [ServerInfo] OS-System: Linux 2.6.27.19-5-default,amd64

      18:07:51,873 INFO  [ServerInfo] VM arguments: -Dprogram.name=run.sh -Xms512m -Xmx512m -XX:PermSize=256m -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingE

      nabled -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true -Djboss.service.binding.se

      t=ports-01 -Dapp.dir=/apps/server/sia -Druntime.env= -Djboss.server.name=sia -Djboss.server.home.dir=/apps/server/sia -Djboss.server.home.url=file:/apps/serve

      r/sia -Djboss.server.log.dir=/logs/sia -Djboss.server.lib.url=file:/apps/jboss-as-5.1/server/default/lib -Dcodebase=file:/apps/jboss-as-5.1/server/sia-standar

      d -Djboss.server.central.repo.url=/apps/jboss-as-5.1/server/default/ -Djava.net.preferIPv4Stack=true -Djava.endorsed.dirs=/apps/jboss-as-5.1/lib/endorsed

       

       

      In my /apps/server/sia/conf/bootstrap/profile.xml, I have added the following:

      <list elementClass="java.net.URI">

                                      <value>${jboss.server.home.url}deploy</value>

                                      <value>${jboss.server.central.repo.url}deploy</value>

                                      <value>${jboss.server.home.url}applications</value>

                              </list>

       

      where jboss.server.central.repo.url is pointing to /apps/jboss-as-5.1/server. The idea is that in my /apps/server/sia should be application specific configs and war files, whereas all the common shared sar files should be in /apps/jboss-as-5.1/server. However, every time when I add <value>${jboss.server.central.repo.url}deploy</value>, I end up with the following exception:

       

      17:58:46,583 ERROR [ScopedProfileServiceController] Error installing to Create: name=ProfileKey@5b8b0b4a[domain=default, server=default, name=applications] state=Configured mode=On Demand requiredState=Installed

      java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:97)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:77)

              at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.install(AbstractProfileLifeCycleAction.java:49)

              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)

              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1652)

              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:938)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:988)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:778)

              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:543)

              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)

              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:256)

              at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

              at org.jboss.Main.boot(Main.java:221)

              at org.jboss.Main$1.run(Main.java:556)

              at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.NullPointerException

              at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)

              at org.jboss.virtual.spi.VFSContextFactoryLocator.getFactory(VFSContextFactoryLocator.java:187)

              at org.jboss.virtual.VFS.getVFS(VFS.java:198)

              at org.jboss.virtual.VFS.createNewRoot(VFS.java:228)

              at org.jboss.virtual.VFS.getRoot(VFS.java:244)

              at org.jboss.system.server.profileservice.repository.AbstractVFSProfileSource.getCachedVirtualFile(AbstractVFSProfileSource.java:353)

              at org.jboss.system.server.profileservice.repository.BasicDeploymentRepository.load(BasicDeploymentRepository.java:114)

              at org.jboss.system.server.profile.repository.AbstractProfile.create(AbstractProfile.java:158)

              ... 22 more

       

      When I take out that line and put all the sar files under /apps/server/sia/deploy, everything works just fine.

       

      Any ideas? I am thrown off by the null pointer. Usually, if I have a faulty path, I get some sort of a FileNotFoundException. This NullPoint leaves me clueless.

       

      Thanks in advance.