When I adde below method in BookRepositoryTest, I got error.
@Test public void saveBook() { Book book = new Book("Clean Code"); repo.save(book); assertNotNull(book.getId()); }
Error:
Tests in error: saveBook(pl.patrykgala.ee.testing.jpa.repository.BookRepositoryTest): Failed calling Repository: [Repository=pl.patrykgala.ee.testing.jpa.repository.BookRepository,entity=pl.patrykgala.ee.testing.jpa.entity.Book,method=save,exception=class javax.naming.NoInitialContextException,message=Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
When I adde below method in BookRepositoryTest, I got error.
@Test public void saveBook() { Book book = new Book("Clean Code"); repo.save(book); assertNotNull(book.getId()); }
Error:
Tests in error: saveBook(pl.patrykgala.ee.testing.jpa.repository.BookRepositoryTest): Failed calling Repository: [Repository=pl.patrykgala.ee.testing.jpa.repository.BookRepository,entity=pl.patrykgala.ee.testing.jpa.entity.Book,method=save,exception=class javax.naming.NoInitialContextException,message=Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial