Tuesday, November 1, 2011

weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@c76e5f19(/LibraryRefs[[CompoundKey: adf.oracle.domain]])

Hi,

If you ever see this exception on your JDeveloper while trying to deploy an application:

weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@c76e5f19(/LibraryRefs[[CompoundKey: adf.oracle.domain]])


Most probably it is not your fault... what I found out was that my weblogic-application.xml file was somehow, "bigger"... a lot of duplicated values:



 Well, if you remove all duplicated values, your application will work fine. At least it did for me.

Why this would happen? Honestly, I am not sure.. sometimes things  get messy... Maybe the back and forth between JDeveloper versions... I cannot really say.. But anyway, the solution is simple and fairly easy.
To locate the weblogic-application.xml file, just find the Application Resources section of the Application Navigator.




Double click on the weblogic-application.xml file and correct the mistakes.

Here is a healthy default weblogic-application.xml file:



Regards.

9 comments:

  1. Thanks! This helped alot! (And no this is not spam, I actually came across this error haha)
    I opened a 11.1.2 workspace in 11.1.1.2 to see whether a bug was reproducable and it messed up my weblogic-application.xml

    regards
    Wendy Tromp

    ReplyDelete
  2. Thank you. it's helped me.

    ReplyDelete
  3. Thank you. I got this error when I downloaded a sample and it upgraded it to new jdev version.

    ReplyDelete
  4. great man it really helped me a lot thankyou very much

    ReplyDelete
  5. Its work. one of content is duplicate in xml

    ReplyDelete
  6. Great. Solved the issue for me. Thanks.

    ReplyDelete
  7. Thank you very much. Saved my time

    ReplyDelete

LinkWithin

Related Posts Plugin for WordPress, Blogger...