On Tue, May 4, 2010 at 3:33 PM, Lahiru Gunathilake <lah...@wso2.com> wrote:
> > > On Tue, May 4, 2010 at 3:18 PM, Samisa Abeysinghe <sam...@wso2.com> wrote: > >> So what is the verdict? Does it work? > > Always use the given CarbonUtils method when you want to get conf directory > location. > > CarbonUtils.getCarbonConfigDirPath > This is a code change. Do we have any other config level solution? Samisa... > > Lahiru > >> >> For non-working case, do we know the steps to get it to work? >> >> Samisa... >> >> >> On Tue, May 4, 2010 at 1:22 PM, Lahiru Gunathilake <lah...@wso2.com>wrote: >> >>> Hi Waruna, >>> >>> I think this is wrong to use CARBON_CONFIG_DIR_PATH system property, it >>> should get the first priority only if someone set that system property, else >>> we just have to consider the configuration location as >>> CARBON_HOME/repository/conf directory. >>> >>> So always have to use method CarbonUtils.getCarbonConfigDirPath >>> >>> public static String getCarbonConfigDirPath() { >>> String carbonConfigDirPath = >>> System.getProperty(ServerConstants.CARBON_CONFIG_DIR_PATH); >>> if (carbonConfigDirPath == null) { >>> carbonConfigDirPath = >>> System.getenv(CarbonConstants.CARBON_CONFIG_DIR_PATH_ENV); >>> if (carbonConfigDirPath == null) { >>> return getCarbonHome() + File.separator + "repository" + >>> File.separator + "conf"; >>> } >>> } >>> return carbonConfigDirPath; >>> } >>> >>> Thanks >>> Lahiru >>> >>> On Tue, May 4, 2010 at 10:42 AM, Waruna Ranasinghe <war...@wso2.com>wrote: >>> >>>> >>>> >>>> On Mon, May 3, 2010 at 6:04 PM, Waruna Ranasinghe <war...@wso2.com>wrote: >>>> >>>>> Hi devs, >>>>> >>>>> I started the server using following command >>>>> >>>>> wso2server.sh start >>>>> >>>>> The stack-trace is given below >>>>> >>>>> [2010-05-03 17:09:00,362] ERROR - Error occurred during >>>>> initialization of BPEL Server {org.wso2.carbon.bpel.BPELDeployer} >>>>> java.lang.NullPointerException >>>>> at java.io.File.<init>(File.java:222) >>>>> at >>>>> org.wso2.carbon.bpel.ode.integration.BPELServerManager.initBPELServer(BPELServerManager.java:111) >>>>> at >>>>> org.wso2.carbon.bpel.BPELDeployer.init(BPELDeployer.java:155) >>>>> at >>>>> org.apache.axis2.deployment.DeploymentEngine.addDeployer(DeploymentEngine.java:1405) >>>>> at >>>>> org.wso2.carbon.utils.deployment.service.processors.DeployerServiceProcessor.processConfigurationService(DeployerServiceProcessor.java:39) >>>>> at >>>>> org.wso2.carbon.utils.deployment.service.listeners.Axis2ConfigServiceListener.processRegisteredAxis2ConfigServices(Axis2ConfigServiceListener.java:91) >>>>> at >>>>> org.wso2.carbon.utils.deployment.service.listeners.Axis2ConfigServiceListener.serviceChanged(Axis2ConfigServiceListener.java:54) >>>>> >>>>> >>>>> The code snippet is given below >>>>> >>>>> public void initBPELServer(AxisConfiguration axisConfig) throws >>>>> Exception { >>>>> this.axisConfig = axisConfig; >>>>> String carbonConfDir = >>>>> System.getProperty(ServerConstants.CARBON_CONFIG_DIR_PATH); >>>>> >>>> >>>> The Carbon config dir path is read as follow and it fixed the issue >>>> >>>> String carbonConfDir = >>>> CarbonUtils.getCarbonConfigDirPath(); >>>> >>>> Thanks, >>>> Waruna >>>> >>>> >>>>> >>>>> this.configDir = new File(carbonConfDir); *//line no: 111* >>>>> >>>>> >>>>> It seems that ServerConstants.CARBON_CONFIG_DIR_PATH property is not >>>>> available when starting as a UNIX daemon. This works fine, if I start the >>>>> server using wso2server.sh command. >>>>> >>>>> >>>>> Thanks >>>>> Waruna >>>>> >>>>> -- >>>>> >>>>> ------------------------------------------------------------------------- >>>>> Waruna Ranasinghe >>>>> Software Engineer, WSO2 >>>>> >>>>> Mobile: +94 724 318285 >>>>> BLOG: http://warunapw.blogspot.com >>>>> >>>>> www.wso2.com - "Lean . Enterprise . Middleware" >>>>> >>>> >>>> >>>> >>>> -- >>>> >>>> ------------------------------------------------------------------------- >>>> Waruna Ranasinghe >>>> Software Engineer, WSO2 >>>> >>>> Mobile: +94 724 318285 >>>> BLOG: http://warunapw.blogspot.com >>>> >>>> www.wso2.com - "Lean . Enterprise . Middleware" >>>> >>>> _______________________________________________ >>>> Carbon-dev mailing list >>>> Carbon-dev@wso2.org >>>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>> >>>> >>> >>> >>> -- >>> Lahiru Gunathilake >>> >>> Senior Software Engineer - WSO2 Inc. >>> >>> Blog: www.lahiru.or >>> >>> >>> >>> _______________________________________________ >>> Carbon-dev mailing list >>> Carbon-dev@wso2.org >>> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>> >>> -- >> >> Samisa Abeysinghe >> Director, Engineering - WSO2 Inc. >> >> http://wso2.com/ - "lean . enterprise . middleware" >> >> >> >> _______________________________________________ >> Carbon-dev mailing list >> Carbon-dev@wso2.org >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > > -- > Lahiru Gunathilake > Senior Software Engineer - WSO2 Inc. > > Blog: www.lahiru.or > > > > _______________________________________________ > Carbon-dev mailing list > Carbon-dev@wso2.org > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Samisa Abeysinghe Director, Engineering - WSO2 Inc. http://wso2.com/ - "lean . enterprise . middleware"
_______________________________________________ Carbon-dev mailing list Carbon-dev@wso2.org https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev