4 Replies Latest reply on Nov 30, 2006 9:02 AM by Robert Schuff

    Portal 2.4 as a windows service

    Robert Schuff Newbie

      Hi Folks,

      I'm a little unclear on what all I need to do to run JBoss portal 2.4 as a windows service. I have searched the archives and seen that I will probably have to use JavaService but I have not found anything that indicates how to have the portal run as a service.

      I have installed the 2.04 bundled portal distribution.

      thanks

        • 2. Re: Portal 2.4 as a windows service
          Robert Schuff Newbie

          You did with JBoss portal? any chance I can see your wrapper.conf file? I keep getting a java.lang.NoClassDefFoundError: org/tanukisoftware/wrapper/WrapperSimpleApp

          error.

          thanks

          rob

          • 3. Re: Portal 2.4 as a windows service
            Burkhard Vogt Newbie

             

            "schuffr" wrote:
            You did with JBoss portal? any chance I can see your wrapper.conf file? I keep getting a java.lang.NoClassDefFoundError: org/tanukisoftware/wrapper/WrapperSimpleApp

            error.

            thanks

            rob

            I used 2.4 CR1, but that should not be the reason as the error is a classpath error.

            My configuration needs an env var named JBOSS_PORTAL_JAVA_HOME, which defines the JAVA_HOME for the JBOSS portal (service) to be used.
            Doing this preserves the flexibility to have a different location on another box, while the wrapper.conf remains the same.

            I created the following directory/file structure before copying its content into $JBOSS_HOME (the parent directory):

             Verzeichnis von D:\jBoss\jboss-4.0.5.GA\wrapper
            
            29.11.2006 14:05 <DIR> .
            29.11.2006 14:05 <DIR> ..
            29.11.2006 14:07 <DIR> bin
            29.11.2006 13:29 <DIR> conf
            29.11.2006 13:29 <DIR> lib
            29.11.2006 14:05 <DIR> logs
             0 Datei(en) 0 Bytes
            
             Verzeichnis von D:\jBoss\jboss-4.0.5.GA\wrapper\bin
            
            29.11.2006 14:07 <DIR> .
            29.11.2006 14:07 <DIR> ..
            17.10.2006 23:22 1.271 InstallWrapper-NT.bat
            17.10.2006 23:22 1.275 UninstallWrapper-NT.bat
            17.10.2006 23:22 1.423 Wrapper.bat
            17.10.2006 23:22 204.800 wrapper.exe
             4 Datei(en) 208.769 Bytes
            
             Verzeichnis von D:\jBoss\jboss-4.0.5.GA\wrapper\conf
            
            29.11.2006 13:29 <DIR> .
            29.11.2006 13:29 <DIR> ..
            29.11.2006 14:09 3.737 wrapper.conf
             1 Datei(en) 3.737 Bytes
            
             Verzeichnis von D:\jBoss\jboss-4.0.5.GA\wrapper\lib
            
            29.11.2006 13:29 <DIR> .
            29.11.2006 13:29 <DIR> ..
            17.10.2006 23:22 81.920 wrapper.dll
            17.10.2006 23:22 83.820 wrapper.jar
             2 Datei(en) 165.740 Bytes
            
             Verzeichnis von D:\jBoss\jboss-4.0.5.GA\wrapper\logs
            
            29.11.2006 14:05 <DIR> .
            29.11.2006 14:05 <DIR> ..
             0 Datei(en) 0 Bytes
            


            The wrapper.conf itself contains:
            #********************************************************************
            # Wrapper Properties
            #********************************************************************
            # Java Application
            wrapper.java.command=%JBOSS_PORTAL_JAVA_HOME%/bin/java
            
            # Java Main class. This class must implement the WrapperListener interface
            # or guarantee that the WrapperManager class is initialized. Helper
            # classes are provided to do this for you. See the Integration section
            # of the documentation for details.
            wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
            
            # Java Classpath (include wrapper.jar) Add class path elements as
            # needed starting from 1
            wrapper.java.classpath.1=../lib/wrapper.jar
            wrapper.java.classpath.2=%JBOSS_PORTAL_JAVA_HOME%/lib/tools.jar
            wrapper.java.classpath.3=../bin/run.jar
            
            # Java Library Path (location of Wrapper.DLL or libwrapper.so)
            wrapper.java.library.path.1=../lib
            
            # Java Additional Parameters
            wrapper.java.additional.1=-Dprogram.name=run.bat
            
            # Initial Java Heap Size (in MB)
            wrapper.java.initmemory=64
            
            # Maximum Java Heap Size (in MB)
            wrapper.java.maxmemory=512
            
            # Application parameters. Add parameters as needed starting from 1
            wrapper.app.parameter.1=org.jboss.Main
            
            #********************************************************************
            # Wrapper Logging Properties
            #********************************************************************
            # Format of output for the console. (See docs for formats)
            wrapper.console.format=PM
            
            # Log Level for console output. (See docs for log levels)
            wrapper.console.loglevel=INFO
            
            # Log file to use for wrapper output logging.
            wrapper.logfile=../logs/wrapper.log
            
            # Format of output for the log file. (See docs for formats)
            wrapper.logfile.format=LPTM
            
            # Log Level for log file output. (See docs for log levels)
            wrapper.logfile.loglevel=INFO
            
            # Maximum size that the log file will be allowed to grow to before
            # the log is rolled. Size is specified in bytes. The default value
            # of 0, disables log rolling. May abbreviate with the 'k' (kb) or
            # 'm' (mb) suffix. For example: 10m = 10 megabytes.
            wrapper.logfile.maxsize=10m
            
            # Maximum number of rolled log files which will be allowed before old
            # files are deleted. The default value of 0 implies no limit.
            wrapper.logfile.maxfiles=10
            
            # Log Level for sys/event log output. (See docs for log levels)
            wrapper.syslog.loglevel=NONE
            
            #********************************************************************
            # Wrapper Windows Properties
            #********************************************************************
            # Title to use when running as a console
            wrapper.console.title=JBOSS-Portal
            
            #********************************************************************
            # Wrapper Windows NT/2000/XP Service Properties
            #********************************************************************
            # WARNING - Do not modify any of these properties when an application
            # using this configuration file has been installed as a service.
            # Please uninstall the service before modifying this section. The
            # service can then be reinstalled.
            
            # Name of the service
            wrapper.ntservice.name=JBOSS-Portal
            
            # Display name of the service
            wrapper.ntservice.displayname=JBOSS-Portal
            
            # Description of the service
            wrapper.ntservice.description=JBOSS-Portal
            
            # Service dependencies. Add dependencies as needed starting from 1
            wrapper.ntservice.dependency.1=
            
            # Mode in which the service is installed. AUTO_START or DEMAND_START
            wrapper.ntservice.starttype=AUTO_START
            
            # Allow the service to interact with the desktop.
            wrapper.ntservice.interactive=false
            
            # BV: valid values are: LOW | NORMAL | HIGH | REALTIME
            wrapper.ntservice.process_priority=HIGH
            


            • 4. Re: Portal 2.4 as a windows service
              Robert Schuff Newbie

              Thanks! duh! I had a typo in my

              wrapper.java.classpath.1=../lib/wrapper.jar

              line.

              Works now!

              thanks