|
|
|
This may help – I again deleted and recreated from scratch all project structure (project and module files) and cache and the first time I compiled the project it validated fine – the second time I compiled the project I again got the double definitions of all types in both persistence units.
It seems that your modules depend on each other.
You should probably use "exclude-unlisted-classes". At the moment deployment configuration is not taken into account, this is an issue. Could this be the same problem that others are facing with the 'more than on dependency injection configured" ejb validation errors? I have that problem as well which means that EJB validation pretty much is useless for anything but trivial projects. Doesn't this seem like a pretty big bug? Could you add something to testing regimen that includes these sorts of ejbs dependent on ejbs in a different jar scenario? Apparently this test would shake out some interesting problems.
I've fixed the EJB problem but JPA case is a bit different so I still cannot reproduce it.
Can you create and post here some simple project which will expose the issue? I spent some time on this issue, too. However, since i was relying on the ANT buider, this wasn't a blocker to me. And I also happened to find one of the workaround if you have to use IDEA to compile your code. Hope this info is helpful.
so, i happened to have a super abstract class for some session beans and by doing this the IDEA thinks it's ok. abstract class protected SomeEJB some; abstract void setSome(SomeEJB some); then, implement the dummy setter in each of the concrete session bean: concrete class @EJB void setSome(SomeEJ some){ this.some = some;}
Hey Gregory,
Really sorry to be unhelpful but my project is pretty huge and proprietary and I am on deadline after getting back from vacation – so I can't send you what I have and don't have time to recreate something smaller and non-proprietary. I can say that is that its two persistence units in two layers where the upper layer one depends on the lower layer one (unidirectional). If I turn off the dependency all is fine, if I turn the dependency on I get a series of 'more than one attribute configured for field' on whatever fields are there. If I turn the dependency off – the duplications go away. And if I switch to JAVA EE structure view - it shows that the lower layer JPA facet has two of each of its entity beans and the upper layer one has the same duplicates from the lower layer in its set of entity beans without duplicates of its entity beans. Translated that means the lower layer beans are being duplicated both in the lower layer facet and in the upper layer facet. The entity beans in the upper layer facet seem to be ok. If y ou have two beans in the lower layer and two beans in the upper layer you get four beans in the lower layer and 6 in the upper layer. Turn off the dependency and you get two in each layer. Hope that helps! erik Here is another nudge to fix this – I would like to turn on validation again someday.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-Both persistence units share a common EJB datasource.