0
我正在嘗試將openJPA faset的動態Web項目部署到TomEE Plus服務器。然而,當我在服務器上啓動應用程序它給了我下面的錯誤:如何在運行時打開JPA增強功能?
111 INFO [main] openjpa.Runtime - OpenJPA dynamically loaded a validation provider. 131 INFO [main] openjpa.Runtime - Starting OpenJPA 2.2.0 202 INFO [main] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary".
Exception in thread "main" <openjpa-2.2.0-r422266:1244990 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: This configuration disallows runtime optimization, but the following listed types
were not enhanced at build time or at class load time with a javaagent: "
de.webshop.internal.db.Producer
de.webshop.internal.db.Stock
de.webshop.internal.db.Product".
at org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:115)
at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:314)
at org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:238)
at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
at de.webshop.inventory.service.business.logic.utils.ProductAvailabilityInStock.isEnoughProductsInStock(ProductAvailabilityInStock.java:43)
at de.webshop.inventory.service.implementation.InventoryWebService.CheckOrderItemsAvailability(InventoryWebService.java:52)
at test.de.webshop.TestClass.testWBService(TestClass.java:40)
at test.de.webshop.TestClass.main(TestClass.java:12)
你有什麼建議?