Tag Archives: eclipse

NullPointerException – could not publish to server

Ok, so this is an obscure one, but if it saves anyone from multiple days of banging their head against the wall it’s worth it…

Recently I was working in eclipse, had created my component, compiled it, and had it pushed to our ivy repository. I then went to bring it into another (web) project when I started getting complaints about a NullPointerException. For kicks I tried running the web app and received the error “NullPointerException (could not publish to server)”. With all that useful information how could I not figure out what the problem was?

Fortunately another developer I spoke with had seen the issue before and pointed me in the right direction. In the utility component/jar you have to (see screen shot below too)…

  1. Go to Project -> Properties
  2. Click on “Project Facets”
  3. Check “Utility Module”

And then it will just magically work. Wasn’t that completely obvious?

EclipseUtilityMode

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...