Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Deploy plugin project classes to tomcat(where to define dependencies?)
Deploy plugin project classes to tomcat [message #698362] Tue, 19 July 2011 10:46 Go to next message
Marius M. is currently offline Marius M.Friend
Messages: 2
Registered: July 2011
Junior Member
Following situation: i have created an eclipse plugin project which requires bundles org.eclipse.core.runtime, org.eclipse.emf.core and a few more. And i have created a dynamic web application that runs successfully in tomcat.

Now the web application servlet needs to be extended to instantiate classes from the plugin project and operate on these objects. The problem is that tomcat does not know about the required bundles of the plugin project, so that all my attempts end in several ClassNotFound exceptions.

How can i combine a dynamic web application and an eclipse plugin project so that tomcat is invoked with the correct settings?

thanks
marius
Re: Deploy plugin project classes to tomcat [message #698488 is a reply to message #698362] Tue, 19 July 2011 14:31 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 7/19/2011 6:46 AM, Marius M. wrote:
> Following situation: i have created an eclipse plugin project which
> requires bundles org.eclipse.core.runtime, org.eclipse.emf.core and a
> few more. And i have created a dynamic web application that runs
> successfully in tomcat.
>
> Now the web application servlet needs to be extended to instantiate
> classes from the plugin project and operate on these objects. The
> problem is that tomcat does not know about the required bundles of the
> plugin project, so that all my attempts end in several ClassNotFound
> exceptions.
>
> How can i combine a dynamic web application and an eclipse plugin
> project so that tomcat is invoked with the correct settings?
>
> thanks
> marius

Web Tools offers support for dependent projects in dynamic web projects
on the Deployment Assembly page of the project's Properties dialog.
However, this only works with plain Java projects and does not support
plug-in projects. Your best bet is probably to make a copy of the jars
you need in the WebContent/WEB-INF/lib folder of the dynamic web project.

Also, note that Tomcat does not provide an "OSGI" type environment to
webapps, so any Eclipse/OSGI related entries in the MANIFEST.MF of those
jars will be ignored by Tomcat. If an "OSGI" type environment is needed
to run the plug-in jars, then it will be up to your webapp to provide
it. I don't know if something like RAP[1] would help in your situation.

Cheers,
Larry

[1] http://www.eclipse.org/rap/
Re: Deploy plugin project classes to tomcat [message #698757 is a reply to message #698488] Wed, 20 July 2011 07:36 Go to previous message
Marius M. is currently offline Marius M.Friend
Messages: 2
Registered: July 2011
Junior Member
Thanks for the reply. You're right, i have no problem with the servlet depending on plain java projects.

The problem is that the plugin requires the OSGi environment, and i will have to start the environment in the same way from the servlet as it is started with every eclipse application. If somebody can elaborate on the required steps, this will be great. Otherwise i'll have to study RAP in detail, because it seems to perform those steps.

thanks
marius
Previous Topic:Trying to build stub code for a WSDL that forces SSL and uses a self-signed cert
Next Topic:web fragments and META-INF/resources
Goto Forum:
  


Current Time: Fri Apr 26 18:31:59 GMT 2024

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

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

Back to the top