Re: tomee testing

2018-06-24 Thread Romain Manni-Bucau
Maybe try adding openejb-javaagent on the test jvm in your test configuration (and surefire args if it works). Le dim. 24 juin 2018 14:27, Matthew Broadhead a écrit : > if i comment out fetch then it works! hooray! > Root quoteType = cq.from(QuoteType.class); > //

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
if i comment out fetch then it works! hooray!         Root quoteType = cq.from(QuoteType.class); //        quoteType.fetch("quoteTypeCategories", JoinType.LEFT); is there any way to make fetch work or do you think i have a mapping error somewhere?  i have never had any problems so far On

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
i am loading the PU with a producer like @ApplicationScoped public class EntityManagerProducer {     @PersistenceUnit(unitName = "sales")     private EntityManagerFactory entityManagerFactory;     @Produces     @Default     @RequestScoped     public EntityManager create() {         return

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
i changed @Descriptors(@Descriptor(name = "persistence.xml", path = META-INF/persistence.xml")) to @Descriptors(@Descriptor(name = "persistence.xml", path = "src/main/resources/META-INF/persistence.xml")) and now it is loading the persistence.xml i still get the same error.  if i turn

Re: tomee testing

2018-06-24 Thread Romain Manni-Bucau
mapping error in your model it seems or bad persistence unit definition if you dont use scanning. Romain Manni-Bucau @rmannibucau | Blog | Old Blog | Github |

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
thanks.  removing the @Jars helped.  it is now injecting CDI bean fine.  but now i get OpenJPA NPE on List quoteTypeList = query.getResultList(); org.apache.openjpa.persistence.PersistenceException: null     at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:1029)     at

Re: tomee testing

2018-06-24 Thread Romain Manni-Bucau
you don't need @Jars for that why you get an exception is cause appcomposers knows mysql has no EE classes so it is excluded from the "find" logic. @Jars means "grab the jars matching this prefix and scan them to include them in the deployed app". Romain Manni-Bucau @rmannibucau

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
i tried adding test scope to pom.xml             mysql mysql-connector-java ${mysql.connector.version}             test         also added mysql-connector-java-5.1.33.jar to the root of src/test/resources but i still get java.lang.IllegalArgumentException: mysql not found in classpath     at

Re: tomee testing

2018-06-24 Thread Romain Manni-Bucau
Appcopposer loads classes in the classpath so add it as a test dependency. Le dim. 24 juin 2018 11:37, Matthew Broadhead a écrit : > not much luck with arquillian. i am trying ApplicationComposer again. > now i understand the properties format > @ContainerProperties({

Re: tomee testing

2018-06-24 Thread Matthew Broadhead
not much luck with arquillian.  i am trying ApplicationComposer again.  now i understand the properties format @ContainerProperties({ @ContainerProperties.Property(name = "sales", value = "new://Resource?type=DataSource"),         @ContainerProperties.Property(name = "sales.JdbcDriver", value =