1
votes

I'm trying to deploy an EAR application on a Weblogic 10.3.3 server. When using the Weblogic admin-console on http://localhost:7001/console/, it works fine. When using Intellij IDEA, it works fine.

However, when deploying from Eclipse Mars, I have the following error, caused by Spring JPA:

Caused By: java.lang.IllegalArgumentException: Not an managed type: class package.xxx.MyClass
    at org.hibernate.ejb.metamodel.MetamodelImpl.managedType(MetamodelImpl.java:171)
    at org.springframework.data.jpa.repository.support.JpaMetamodelEntityInformation.<init>(JpaMetamodelEntityInformation.java:68)
    at org.springframework.data.jpa.repository.support.JpaEntityInformationSupport.getMetadata(JpaEntityInformationSupport.java:65)
    at org.springframework.data.jpa.repository.support.JpaRepositoryFactory.getEntityInformation(JpaRepositoryFactory.java:149)
    at investmentcafe.ngs.dao.BaseRepositoryFactoryBean$NGSRepositoryFactory.getTargetRepository(BaseRepositoryFactoryBean.java:34)

I'm using Spring 3.2.14.RELEASE, with Spring-data-jpa 1.6.6.RELEASE. The problem occurs on Eclipse Mars.1 (4.5.1 build 20150924-1200), with the Oracle WebLogic Server Tools version 8.4.0.201510191754. I'm deploying "as a virtual application" from the Weblogic tools.

I'm quite puzzled by this strange behavior. Any ideas on how to explain such Eclipse-specific behavior and/or on how to troubleshoot/fix it?

1

1 Answers

0
votes

It seems that moving the hibernate .xml file in the META-INF folder fixed the problem. (So the persistence.xml can be renamed, but cannot be moved #GiveEclipseSomeLove)