facebook

NullPointerException when clicking on New module manifests

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #237492 Reply

    Roshan D’Souza
    Participant

    I have only just downloaded the latest version of MyEclipse (v4.0) and am in the process of trying to set up our existing projects in it. I have also downloaded and installed eclipse 3.1 SDK.

    Our existing workspace consists of 4 projects:
    1 Enterprise project
    1 Web project
    1 EJB project
    1 Standard Java project.

    The relations between the above projects is as follows:
    1) The Standard Java project has a User Library in its classpath that is also marked for export.
    2) The EJB project refrences the Standard Java project.
    3) In the EJB project properties the refrenced Standard Java project is marked for export.
    4) The Web project refrences the EJB project.
    5) In the Web project properties the refrenced Ejb project is marked for export.
    6) The Enterprise project refrences the Ejb project, the Web project and the Standard java project.

    After setting up the projects in exactly the same way (mentioned above) as they are in the existing environment (eclipse 3.1M4, myeclipse 3.8.4), when I right-click on the Enterprise project and click on MyEclipse > New module manifests, i find that it bombs out with the following exception:

    java.lang.NullPointerException
    at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3873)
    at org.eclipse.jdt.internal.core.UserLibraryClasspathContainerInitializer.initialize(UserLibraryClasspathContainerInitializer.java:35)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1591)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1040)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1326)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.ă(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.getEARsIncludedJarPaths(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.ui.action.UpdateManifestsActionDelegate.runWithEvent(Unknown Source)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:236)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)

    In the Enterprise project, I then removed the refrence to the Standard java project. Now when I clicked on MyEclipse > New module manifests, I found that it does not throw any exceptions. However, it does not populate the classpath as I expected it to. The classpath in the both the module’s manifests is empty.

    In my existing environment (eclipse 3.1M4, myeclipse 3.8.4) when i click on New module manifests, all the jars in the User Library refrenced by the standard java project are placed in the classpath. Also, the Standard java project is placed in the classpath as a jar entry. I am not able to get this to work in the new setup (eclipse 3.1, myeclipse 4.0) . Need help.

    Roshan

    #237496 Reply

    Roshan D’Souza
    Participant

    The interesting thing is that if instead of adding the User Library to Standard java project build path and then marking it for export I add the jars in the User Library as External Jars to the build path and mark it for export, I do not get the exception and the classpath is populated correctly in the manifests. Therefore, it looks like this new version does not support User Libraries. This seems a bit backwards as the previous version does support User Libraries.

    Roshan

    #237543 Reply

    Scott Anderson
    Participant

    Roshan,

    Can you verify that you performed a new, clean install of Eclipse 3.1 final (not M4) and installed MyEclipse 4.0 to point to it? User library support was only increased in 4.0, not decreased, so the issue is likely an installation / configuration problem. Can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #237554 Reply

    Roshan D’Souza
    Participant

    Scott,

    Following is the information that you requesterd:
    – WindowsXP Professional SP1
    – Eclipse SDK Version: 3.1.0 Build:I20050627-1435
    – A clean of Eclipse SDK 3.1.0 was done for Myeclipse
    – No external plugins are installed
    – Following are the directories in <eclipse>/plugins directory that are like org.eclipse.pde.*
    – org.eclipse.pde.build_3.1.0
    – org.eclipse.pde.doc.user_3.1.0
    – org.eclipse.pde.junit.runtime_3.1.0
    – org.eclipse.pde.source_3.1.0
    – Following are the jars in the <eclipse>/plugins directory that are like org.eclipse.pde.*
    – org.eclipse.pde.core_3.1.0.jar
    – org.eclipse.pde.runtime_3.1.0.jar
    – org.eclipse.pde.ui_3.1.0.jar
    – org.eclipse.pde_3.1.0.jar
    – MyEclipse 4.0.0
    – JDK 1.4.2_04 is used to launch eclipse
    – JDK 1.4.2_04 is used to launce app server
    – Weblogic 8.1 sp3
    – Following is the entry in the eclipse log file:

    !ENTRY org.eclipse.ui 4 4 2005-09-17 10:12:03.851
    !MESSAGE Unhandled event loop exception

    !ENTRY org.eclipse.ui 4 0 2005-09-17 10:12:03.851
    !MESSAGE java.lang.NullPointerException
    !STACK 0
    java.lang.NullPointerException
    at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:3873)
    at org.eclipse.jdt.internal.core.UserLibraryClasspathContainerInitializer.initialize(UserLibraryClasspathContainerInitializer.java:35)
    at org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1591)
    at org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1040)
    at org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1326)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.ă(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.DeploymentUtil.getEARsIncludedJarPaths(Unknown Source)
    at com.genuitec.eclipse.ast.deploy.core.ui.action.UpdateManifestsActionDelegate.runWithEvent(Unknown Source)
    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:236)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
    at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
    at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
    at org.eclipse.core.launcher.Main.run(Main.java:973)
    at org.eclipse.core.launcher.Main.main(Main.java:948)

    We are still using the old environment (eclipse 3.1M4, myeclipse 3.8.4) and we are definitly using a User Library to specify all the jars that are required on the classpath of the Standard Java project. The New module manifests in this environment (eclipse 3.1M4, myeclipse 3.8.4) definitly works and produces the correct classpath entries in both the Web and the EJB projects manifests without throwing any exceptions. We have been using this functionality on a daily basis in the life of this project that we are working on for about 8 months now. So I’m a bit surprised that you mentioned in your reply that User Library support was added only in the 4.0 release of MyEclipse.

    Anyways, need help to resolve this issue. Thanks.

    Roshan.

    #237897 Reply

    Roshan D’Souza
    Participant

    This message has not been recovered.

    #237917 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #237968 Reply

    Roshan D’Souza
    Participant

    This message has not been recovered.

    #237978 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #238643 Reply

    Roshan D’Souza
    Participant

    Rkalla,

    Sorry for the late rsponse.
    I did a clean install of Eclipse 3.1 SDK and MyEclipse 4.0 into new directories and re-ran my tests as you asked me to. I still get the same exception. One think that I forgot to mention is the default deployment settings of EAR Project, EJB Project and Web Projects. Following are the settings:

    1) Click on Window > Preferences…
    2) Now click on My Eclipse > J2EE Project > EAR Project
    3) Check(select) the following:

      Jar dependant Java Projects
      Jars exported from dependant Java Projects
      User Library Jars exported from dependant Java Projects

    4) Next click on EJB Project
    5) Check(select) the following in the Deployment tab:

      Merge into EJB Project output folder

    6) Finally click on Web Project
    7) Check(select) the following in the Deployment tab:

      Use smart deployment for dependant Java Projects
      Jars on Web Project build path
      Jars on Web Project’s user libraries
      Jars exported from dependant Java projects
      User Library Jars exported from dependant Java Projects

    8) Click on the OK button.

    Once the above defaults have been set, right-click the EAR Project(that you have previously created using the steps outlined in my prior post) and select New module manifests. This results in the NullPointerException.
    Could you kindly perform the above settings and let me know if you get the same error as I do.
    Thanks.

    Roshan

    #238745 Reply

    Riyad Kalla
    Member

    Roshan,
    Again your details steps have led us to the bug right away and it has been filed, we should hope to have this fixed ASAP.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: NullPointerException when clicking on New module manifests

You must be logged in to post in the forum log in