ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sukhram.bharti" <sukhram.bha...@gmail.com>
Subject Re: Running under external tomcat
Date Sun, 23 Sep 2012 10:29:16 GMT
BJ, Mansour,


I looked through the problem..the main problem is entities/components are
not getting loaded.
I was able to solve an get my 11.04 code working under tomcat6.

Sharing details of changes that will make it work upto 10.04 (though further
analysis may be needed to bring this to same capability as trunk works in
)...

1) org.ofbiz.webapp.control.ContextFilter
>>Added code load containers before calling getContainers() <<


    *// load the containers
        try{
        	ContainerLoader.loadContainers(CONTAINER_CONFIG, null);
        } catch (StartupException e) {
            Debug.logError(e, module);
            throw new ServletException("Unable to load containers; cannot
start ContextFilter");
        }*
        Container container = getContainers();
2) org.ofbiz.base.container.ContainerLoader
>>Added following method <<<
 public static synchronized void loadContainers(String config, String[]
args) throws StartupException {
       
        if(containerMap.isEmpty()) {
        	 Config cfg = new Config();
        	cfg.containerConfig = config;
        	ContainerLoader loader = new ContainerLoader();
        	loader.load(cfg, args);
        }
    }

I am not a commitor etc. on ofbiz. Hope this helps and someone can properly
check in.



--
View this message in context: http://ofbiz.135035.n4.nabble.com/Running-under-external-tomcat-tp4201942p4636432.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Mime
View raw message