Javax.persistence.Persistence.createEntityManagerFactory does not work with ClassGuard

I will just take a look at ClassGuard (although I know a few objections ).

However, I get javax.persistence.PersistenceException: [PersistenceUnit: MyPU] class or package not foundone that does not get without ClassGuard.

The exception is thrown by java.lang.ClassNotFoundException when my annotated class is @PersistenceUnit(unitName = "MyPU")not found.

ClassGuard overrides the class loader to load encrypted class files. Therefore, this can be a problem.

Can I use ClassGuard with JPA?

Unfortunately, I could not find any related information or mailing lists on the Internet. And since ClassGuard was recommended several times here on SO, I decided to try ...

Thanks
Mike

+3
2

classguard , "objection", . . , , , - , , .

, JVM arg Loader ClassGuard. java........ -Djava.system.class.loader = net.jsecurity.classguard.bootstrap.ClassGuard.......

, , , .

+1

, . (: .)

persistence .jar, ClassGuard . .

0

Source: https://habr.com/ru/post/1788237/


All Articles