Hi Sukhram,

This seems interesting could you carry the burden a little more far?
1) create a Jira for this, see 
https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices
2) complete/comment if necessary at 
https://cwiki.apache.org/confluence/display/OFBTECH/Tomcat

TIA

Jacques

From: "sukhram.bharti" <[email protected]>
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.

Reply via email to