Code Generation

I have tried unsuccessfully to generate code for “some” of my java classes. What I have found is, I have extended a class but in there relationships tab of the class it has two relationships. If I delete one and refresh both are gone. If I recreate both reappear. Is something is being cached? This is extremely annoying.

Also, when I click on certain classes I cannot see the code that will be generated. These are usually the classes that will not be generated. The error message is invalid name of package. However, other classes in the same package will generate. Someone please explain.