• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MissingProjectException by Maven in Netbeans 7.2

 
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am desperate to solve this problem because it's crucial to solve it and I've been trying to fix it for a week.

When I try to either Build, Clean and Build or Run (play button) my 'Maven Webapplication' in NetBeans, I get the following output:



This is what I have tried to fix the problem:

- Googled about 30 threads on this exact subject and tried their solutions to no avail
- Uninstalled NetBeans 7.2, removed .m2 directory, removed .nbi directory (I don't know if this belongs to NetBeans), rebooted and reinstalled NetBeans 7.2
- Uninstalled NetBeans 7.2 and installed NetBeans 7.0.1
- modified the POM file of the project
- modify the context.xml file in META-INF/ folder of my project to point it to a different path.
- Correctly install Maven by adding the proper environment variables (works)

My projects used to build and run perfectly with no problems when I was using NetBeans 7.0.1, until I installed NetBeans 7.2. That's when I started getting this error.
The error doesn't go away no matter what I try.

Other strange behavior:
- When I try to create a new Maven Webapplication in NetBeans, it always creates it under the root of my drive E:\ in a folder even though I explicitly tell it to install it under my projects folder.

What works:

-The only time when my projects successfully build and run is when I run them in my Windows XP SP3 virtual machine.
So I don't know what to think here. What application or configuration is at fault? I find it very difficult to troubleshoot.

-Running this command: https://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
thus using an explicit path to my project
I don't want to do this every time. I want it to work like it's supposed to.

I can't get rid of this error.
If anyone can help, I would be very thankful.

Thank you

Specs:
JDK 1.7
Sourcecode java version: 1.6
OS: Windows 7 x64
Server used: Tomcat 7.x

 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Real path on previous post replaced by ??? at the OP’s request.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a NetBean problem, not a Maven problem. I assume that if you opened a command prompt, cd'ed to your project's folder and ran 'mvn install' that it would work, correct? Thus the issue is that NetBeans seems to be screwing things up (typical for most IDEs).

I would try digging through the project configuration information in NetBeans (right-click the project and select Properties), and also through the global config settings (Tools > Options) - something somewhere is telling NetBeans to use 'e:/' instead of the project's base directory. (By the way, when you reinstalled Netbeans, did you let it re-read your old configuration? If so, you might want to try an reinstall again but this time wipe out the configuration settings.)

Meanwhile. I'll move this post to the proper forum where you can get NetBeans help.
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried looking everywhere in Tools->Options and in the project's properties and POM file to no avail. It continues to generate this error and it continues to create new projects in C: for some reason unknown to me. Someone wrote to me:
"I had the same problem, I got a new working station (with Windows 8 64bit). I tried to build my EJB and got the same exception you did.
I knew my projects dir was in the My Documents dir, I also knew that this dir was actually redirected to the server. This seemed to be the problem I have my projects somewhere local now and everything builds OK."

I tried this as well. My projects are already local (though the last project I created was pulled from a public svn:// server of my university).
Didn't work.

I also tried running Maven with the -f parameter from commandline. That worked, but that doesn't fix my problem. Here's the output:



I'm out of ideas.

 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The strange thing is that NetBeans 7.2 keeps creating my Maven Webapplications in C:\, regardless of where I tell it to create my project. It ignores my specified project path.
When I create a regular Java application however, NetBeans creates it in the location specified and I get no problems with it.

So why is it only creating Maven Webapplications in a folder directly under C:\?
Could this have anything to do with the Archetype plugin?
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you create a Maven Web Application, step 2 of the New Project dialog asks for the Project Location and Project Folder. What are those values when you create a project?

I doubt the archetype plugin is causing this - it is very difficult to get any Maven plugin to place files outside the project directory. (I assume you mean a Maven plugin and not a NetBeans plugin)
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Project location: E:\Dev\Java
Project name: mavenproject1
ArtifactId: mavenproject1
groupId: org.me
version: 1.0-SNAPSHOT
package: org.me.mavenproject1
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do have an E: drive, correct?
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I have an E: drive. It's where I put my projects (E:\Dev\Java). How do I wipe out my NetBeans configuration?
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Search for folders named NetBeans in your user profile folder. The name of that folder is in the USERPROFILE variable, if you're unsure where it is located on you computer, type SET on command promt (it will display all environment variables, the USERPROFILE will be towards the end of the list). NetBeans configuration is stored in that folder.

On my Windows 7 computer, it is located in C:\Users\<username>\AppData\Roaming\NetBeans. This folder contains subfolders for various versions of NetBeans. Quit NetBeans, move the subfolder (in my case, it is 7.2.1) elsewhere (so that you have a backup) and restart NetBeans -- they'll rebuild the configuration. If there are configurations for older versions, NetBeans will probably offer to import older settings, if you really want brand fresh configuration, don't import the old settings.

Note: older versions have put the folder to slightly different locations, eg. C:\Users\<username>\.netbeans\7.0. Search for all folders containing "netbeans" to make sure you've found the correct folder.
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I deleted all of that but it didn't resolve my problem.
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anyone have any other ideas? I need to fix this problem urgently..
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, I'm completely out of ideas. Something is seriously screwed up on your system, but I can't think of what, especially since you deleted the NetBean configuration directory.

But as a last shot, you could try uninstalling NetBeans, then delete these directories in your home directory: .nbi, .nbprofiler, .netbeans, .netbeans-derby (and anything else with 'nb' or 'netbeans' in it), then delete the NetBean directory in one of the Program Files directories. Then move your NetBeans project directory (zip it up, backup it up, and then remove it). The idea is to not leave around anything that might be picked up later.

Reboot (probably not necessary, but do it anyway). Then reinstall NetBeans. Create a new Maven project and see if it behaves now. If it does, create a new project with the same options as your old project, then using Explorer copy only the source files from your backed up project to your new project. Hopefully, this will fix the issue.

Just an aside: The above process is a heck of a lot easier with Eclipse - since Eclipse uses "xcopy installation" you can install Eclipse in numerous locations (I usually have two or three copies installed) and use each to edit numerous workspaces. Each installation maintains its own copy of its settings within it installation directory, or in the workspace directory. Often fixing an issue is as simple as downloading and unzipping a new copy of Eclipse and creating a new workspace (no need to uninstall anything). I really dislike Netbeans requirement to install using the Windows installer, and then its use of the home directory to store config info; this prevents me from installing multiple copies of NetBeans like I can with Eclipse.
 
I'm so happy! And I wish to make this tiny ad happy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic