Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Start Equinox programmatically within web app
Start Equinox programmatically within web app [message #500267] Wed, 25 November 2009 14:29
No real name is currently offline No real name
Messages: 1
Registered: November 2009
Junior Member
Hello!

I have written a command line OSGi Eqinox application and now would like to create a web-based user interface for it.

In order to do so, I would like to programmatically start equniox within the web application.

I tried this by calling following code within a (JSF) managed bean:

Properties properties = new Properties();
EclipseStarter.setInitialProperties(properties);
EclipseStarter.startup(new String[] { "-clean" }, null);
}


unfortunately this results in following excetion:

_ErrorPageWriter: An exception occurred 
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

	at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:106)
	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:356)
	at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
	at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
	at java.lang.Thread.run(Thread.java:595)


I read here http://forums.sun.com/thread.jspa?threadID=694101, that this problem might be related to some class loading issue.

What do I need to do to get this working?

Many thanks in advance!


[Updated on: Wed, 25 November 2009 15:40]

Report message to a moderator

Previous Topic:OSGI Web Container
Next Topic:Eclipse-BuddyPolicy: global question
Goto Forum:
  


Current Time: Sat Oct 25 11:13:28 GMT 2014

Powered by FUDForum. Page generated in 0.13907 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software