Tuesday, July 23, 2013

Failed while installing JPA 2.0. org.osgi.service.prefs.BackingStoreException: Resource ... /.settings' does not exist.



The "eclipse-jee-juno-SR1-win32-x86_64" installation was generating the following error message:

Failed while installing JPA 2.0. org.osgi.service.prefs.BackingStoreException: Resource ...
'$RELATIVE_PROJECT_PATH/.settings' does not exist.








This error may have many causes.
Here I gonna show two methods to fix it, and certainly there are many others.

All eclipse configuration is saved under "$WORKSPACE/.metadata" and "$ECLIPSE_INSTALL " folders.

The error may be caused by:


- Plugins incompatibilities,
   or
- Some configuration that became corrupted.


Fixing Plugins incompatibilities



It was installed the following plugins from marketplace - follow by the pictures.



                  Maven Integration for Eclipse WTP (Juno)
  


                  and JBoss Tools:









Inspecting the installation details (menu, help, About Eclipse, Installation Details), I noticed that JBoss also installed maven stuff, and probably would be conflicting with WTP's installation.





The solution was to uninstall one of them.
So, I've decided to uninstall "Maven WTP".
Pressing the button unistall, the procedure begins...






Restarted Eclipse, the problem was gone.



---------------------------------------------------------







Fixing configuration that became corrupted

In this case, you may try to reinstall the plugin.
Uninstall it and install again.

I also got an alternative solution using the workaround described as follows.

Trying to fix the problem, I extracted a new virgin installation and installed just "Maven Integration for Eclipse (Juno and newer)" from marketplace (menu, help, Eclipse Marketplace).

Then I started it using the same workspace when I got the problem.
After, I imported the project which had thrown the error message, but this time the import was successful.
The new installation was closed.

I returned to the previous installation,  where I was getting the JPA error messages,  restarting it, using always the same workspace.
The problem had gone.

So, the new installation had overwritten some improper configuration under $WORKSPACE_PATH/.metadata folder.
Remember that eclipse configuration is saved there.

I always keep a backup file of workspace's .metadata folder.For each expressive change, a new backup is done.
In this case, I had not generated a backup yet since it was the first installation in progress and test.

When a backup is not available, or the old one has problems, it is possible to generate a new workspace from scratch. Go to menu, file, switch workspace and set a new path, of course different from the prior one and press enter to proceed.
The Eclipse is restarted with a new configuration. The old one is gone.

This alternative is useful when it is ineffective an attempt using the usual procedures through the project's properties. When metadata is defective, it usually rejects the configuration adjusted or it causes some malfunction.


No comments:

Post a Comment

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...