Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Libra » "OSGI Bundle" facet should requires "Java" facet
"OSGI Bundle" facet should requires "Java" facet [message #754999] Sun, 06 November 2011 10:16 Go to next message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 289
Registered: July 2009
Senior Member
Hi,

On Eclipse Indigo, I have tried to create a Faceted Project with the
"OSGI Bundle" Facet but get the following exception :

at
org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:495)
at
org.eclipse.jdt.internal.core.JavaModelManager.getPerProjectInfoCheckExistence(JavaModelManager.java:2305)
at
org.eclipse.jdt.internal.core.JavaProject.getPerProjectInfo(JavaProject.java:1890)
at
org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1940)
at
org.eclipse.jdt.internal.core.JavaProject.getAllPackageFragmentRoots(JavaProject.java:1413)
at
org.eclipse.jdt.internal.core.JavaProject.getAllPackageFragmentRoots(JavaProject.java:1408)
at
org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.getJavaSourceFolderPaths(OSGiBundleFacetInstallDelegate.java:320)
at
org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.getBundleClasspath(OSGiBundleFacetInstallDelegate.java:287)
at
org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.createBundleProjectDescription(OSGiBundleFacetInstallDelegate.java:134)
at
org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.doExecute(OSGiBundleFacetInstallDelegate.java:83)
at
org.eclipse.libra.facet.OSGiBundleFacetInstallDelegate.execute(OSGiBundleFacetInstallDelegate.java:76)
at
org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)

because the created project must have the java nature but doesn't have
then I conclude that the "Java" facet is required.

Attached a fix.

Best Regards.
  • Attachment: fix.patch
    (Size: 0.94KB, Downloaded 93 times)
Re: "OSGI Bundle" facet should requires "Java" facet [message #755968 is a reply to message #754999] Thu, 10 November 2011 05:58 Go to previous message
Kaloyan Raev is currently offline Kaloyan Raev
Messages: 185
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Esteban,

Thank you for reporting this issue.

This is a bug that needs to be fixed. However, we don't want to enforce the OSGi facet to require the Java facet, because OSGi can be used also outside the context of Java. So, instead introducing such requirement, it would be better to make the code tolerant to the condition if the Java facet is not selected.

I've created a bug in Bugzilla to track the issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=363452

Thanks,
Kaloyan
Previous Topic:[WAR Product] Validation issue for classes provided by the application server
Next Topic:by using eclipse wtp3.3 create WAR product configuration´╝îexport war file,one error occurs
Goto Forum:
  


Current Time: Tue Jul 29 19:14:10 EDT 2014

Powered by FUDForum. Page generated in 0.03769 seconds