2 Replies Latest reply: Apr 16, 2012 2:16 AM by Arunbodap-Oracle RSS

    ClassNotFound exception when WLS started as a service

      I'm getting the error java.lang.ClassNotFoundException: oracle.dms.wls.DMSServletFilter when I start WebLogic 10.3.5 as a Windows Service. If I start it from the user_projects\domains\base_domain\bin\startWebLogic.bat file, everything works fine.

      I'm going to assume that the installSvc.bat file is for some reason missing something important as part of the configuration.

      Has anyone had this sort of error before?
        • 1. Re: ClassNotFound exception when WLS started as a service
          Shashi Ranjan

          When you use startWeblogic.bat to start weblogic server, it runs a script to set all the required environment variable. Also it sets classpath variable. In case when it's running as service i guess, there is problem in setting classpath. Try with mannually passing all entries into system classpath variable. You can open startWeblogic.bat to see those values for classpath.

          Edited by: user5547545 on Apr 13, 2012 9:38 PM
          • 2. Re: ClassNotFound exception when WLS started as a service
            This issue is occurring due to oracle jars missing from the classpath when you run as windows service.

            When you look at installSvc.cmd, you would realize that it is calling only commEnv.cmd to set the environment variables, due to which CLASSPATH is not set specific to the domain.
            set WL_HOME=D:\Middleware\wls1036\wlserver_10.3
            call "%WL_HOME%\common\bin\commEnv.cmd"
            To enforce the environment variables to be set specific to a domain, I recommend invoking setDomainEnv.cmd

            So, in the install script, change the above two lines as shown below:
            set WL_HOME=D:\Middleware\wls1036\wlserver_10.3
            set DOMAIN_HOME=D:\Middleware\wls1036\user_projects\domains\ArunBaseDomain1036
            call "%DOMAIN_HOME%\bin\setDomainEnv.cmd"
            NOTE: setDomainEnv.cmd internally calls commonEnv.cmd, so we need not explicitly call commonEnv.cmd again in our installSvc.cmd script

            Doing this will ensure that the installSvc.cmd is setting the environment variables like CLASSPATH exactly as they are set when you use startWebLogic.cmd from your domain.