MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
edbras
Post subject: Nullpointer exception on deployment??  PostPosted: Jan 22, 2012 - 06:43 PM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

The following exception appears in the log file during deployment of a project to an external tomcat 7 container.
After this error, the deployment stops and doesn't appear in the server view, but it does after a restart. However the deployment is broken and servers starts with errors.

----

java.lang.NullPointerException
at com.genuitec.eclipse.ast.deploy.core.packaging.DefaultPackagerStrategy.explodeDependentProjects(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.packaging.PackageUtils.explodeDependentProjects(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.WebDeployment.Ć(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.WebDeployment.doProjectTypeSpecificPostResyncAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.Deployment.resyncAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.Deployment.resyncAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.webProjectBuildAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.buildAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY com.genuitec.eclipse.core.common 1 0 2012-01-22 19:38:48.258
!MESSAGE Error collecting output paths
!STACK 0
java.lang.NullPointerException

!ENTRY org.eclipse.core.jobs 4 2 2012-01-22 19:38:48.261
!MESSAGE An internal error occurred during: "Add Deployment".
!STACK 0
java.lang.NullPointerException
at com.genuitec.eclipse.ast.deploy.core.packaging.DefaultPackagerStrategy.explodeDependentProjects(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.packaging.PackageUtils.explodeDependentProjects(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.WebDeployment.Ć(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.WebDeployment.doProjectTypeSpecificPostResyncAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.Deployment.resyncAll(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.ModuleDeployment.deployAsExplodedArchive(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.Deployment.deploy(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.jobs.C.ā(Unknown Source)
at com.genuitec.eclipse.ast.deploy.core.jobs.C.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-swapna
Post subject:   PostPosted: Jan 23, 2012 - 05:41 AM



Joined: Nov 11, 2010
Posts: 2673

edbras ,

Sorry that you are seeing this issue with MyEclipse.
Can you answer some more questions for us ?

1) Is your web project referencing any other projects like a resource project ? Check the project properties > "Project References". If yes then please remove all project references and check if the deployment works fine

2) We came across a similar issue which is fixed in 10.0.1. Take a look at this thread :
http://beta.myeclipseide.com/PNphpBB2-viewtopic-t-17659-view-next.html

Please update to version 10.0.1 as outlined here and check if the issue persists: http://www.myeclipseide.com/PNphpBB2-viewtopic-t-28470.html

3) If installing 10.0.1 milestone stream doesn't fix it, please give us detail steps along with project creation and dependency setup for us to be able to track the issue down.

Let us know how it works for you.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
edbras
Post subject:   PostPosted: Jan 23, 2012 - 07:46 AM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

support-swapna wrote:

1) Is your web project referencing any other projects like a resource project ? Check the project properties > "Project References". If yes then please remove all project references and check if the deployment works fine

I reference about 10 other projects in the same workspace. Removing these projects is useless as the web project will not work/start at all. The web project (as it should) is only a collection of other not-web projects to enabled web functionality. In my case the web project only contains resources like spring config and no java classes.

support-swapna wrote:

2) We came across a similar issue which is fixed in 10.0.1. Take a look at this thread :
http://beta.myeclipseide.com/PNphpBB2-viewtopic-t-17659-view-next.html

Sorry, too much work. I need every minute of my time (that's why I post it in the weekend). Push it as an update and will update myeclipse. Reinstalling is too much to ask

My Work around: of this failing web project; removed any eclipse config files and recreate them with maven and then add web capabilities. I never understand how/why I can't remove web capabilities..
I works better now, but still throws the NullPointer exception when I do a restart of Tomcat 7 and I changed something directoy in the deployed files outside Eclipse. No idea why. If you ask me: it's a bug.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: Jan 24, 2012 - 06:20 AM



Joined: Mar 09, 2011
Posts: 959

Edbras,

Did you check if any dependent projects have no class files to deploy? This is what causes the problem. Note that in the thread swapna pointed to, the user worked around the problem by removing Project References (in the project properties) - not the class path dependencies. Have you tried that workaround?

As mentioned, the problem is fixed in the milestone stream but will not be available in an update (for 10.0) for a little while (10.1 is currently in the works). Note that you can install the milestone stream release alongside your current installation and you can use either installation with the same workspace. Installation will be quick, especially if you already have release 10.0 installed. See the link provided by Swapna for more information.

Please let us know if this helps.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
edbras
Post subject:   PostPosted: Jan 24, 2012 - 07:59 AM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

support-tony wrote:
Edbras,
Did you check if any dependent projects have no class files to deploy?

Like mentioned above, the web project itself has not class files, and yes one dependency has also no class files.
At the moment the situation is "workable" so I won't change anything and wait till the update is available.
If it get worse, I will look in to the .project dependency workaround.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: Jan 24, 2012 - 10:33 AM



Joined: Mar 09, 2011
Posts: 959

edbras,

OK. At least we have confirmed that you have a dependent project that has no classes to deploy, which is the problem that was fixed in the milestone stream release. You also have a possible workaround if the problem worsens.

Regarding an update, can you confirm that you are on MyEclipse 10.0? Just to point out again that an installation of 10.0.1 should be fairly quick, if you have 10.0 installed, since the on-line installer will only download the changes. Then you could open your workspace with 10.0.1. However, that's your call.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
edbras
Post subject:   PostPosted: Jan 24, 2012 - 10:55 AM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

Yes, I do have 10.0 (see the installation details in my other posts recently)
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
edbras
Post subject:   PostPosted: Jan 24, 2012 - 12:10 PM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

One more thing:
After I recreated my eclipse project files I ended up again with these warning (about 80 of them):
Code:

Description   Resource   Path   Location   Type
Classpath entry M2_REPO/c3p0/c3p0/0.9.1.2/c3p0-0.9.1.2.jar will not be exported or published. Runtime ClassNotFoundExceptions may result.     bv-web      P/bv-web   Classpath Dependency Validator Message


How do I get ride of them?
I think I filtered them out before, but I am not sure what I did before why I didn't see them anymore..
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: Jan 26, 2012 - 07:37 AM



Joined: Mar 09, 2011
Posts: 959

Ed,

If you right-click on the warning, there should be a quick-fix option. If you select one of the options, this will add an entry to the .classpath file, in your project. You can see the effect by going to the build path window and expanding the definition for the jar on the Libraries page.

If you need to do a lot of these, look at the .classpath file for the markup that needs to be added and it might be quicker to add the entries manually, though you'd probably need to refresh your project or close/open it.

Another option, if you're sure that the jars will be available at runtime, is to disable the validation for classpath dependencies. Right-click on the project, select MyEclipse and Manage Validation. By default, the workspace settings are used so, if you want to modify this on a project basis, select "Enable project specific settings" and deselect the build box for the Classpath Dependency Validator. You can also deselect the Manual box though, if you leave it set, you can run the validation manually and see these issues (you can run validation through the MyEclipse context menu). Now clean the project. To change the workspace settings click on the link on the Manage Validation window or go to MyEclipse->Preferences->MyEclipse->Validation.

Let us know if this helps.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
edbras
Post subject:   PostPosted: Jan 26, 2012 - 09:29 AM
Veteran Member
Veteran Member


Joined: Dec 02, 2003
Posts: 99

Thanks for reminding me.
The validation did ring a bell. I turned if off before. I wrote it down this time and hope not to forget it this time.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-tony
Post subject:   PostPosted: Jan 26, 2012 - 10:17 AM



Joined: Mar 09, 2011
Posts: 959

Ed,

No problem. Glad to be of service.

_________________
Tony
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits