payara / Payara-Examples

Repository for Example Code to demonstrate Payara specific features
144 stars 177 forks source link

Test fails #39

Closed mmroot closed 7 years ago

mmroot commented 8 years ago

hi there, I am trying to run the test PersonDaoTest in the arquillian example project with ibm jdk 1.8 and it fails with: Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/payaraEmbedded__pm at org.glassfish.jdbcruntime.service.JdbcDataSource.validateResource(JdbcDataSource.java:81) at org.glassfish.jdbcruntime.service.JdbcDataSource.setResourceInfo(JdbcDataSource.java:62) at org.glassfish.jdbcruntime.JdbcRuntimeExtension.lookupDataSourceInDAS(JdbcRuntimeExtension.java:136) at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:589)

smillidge commented 8 years ago

Which test?

mmroot commented 8 years ago

sorry, I have updated my comment above with the name of the test and the project. cheers,

smillidge commented 8 years ago

You could try changing the payara embedded dependency to http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22payara-blue-embedded-all%22 as Payara Blue targets IBM JDK.

mmroot commented 8 years ago

i got the same error ... is there somewhere an working example with Arquillian? thank you

smillidge commented 8 years ago

@mulderbaba any ideas?

mulderbaba commented 7 years ago

@RaZv are you trying to execute the test within IDE or through maven build? if the latter can you provide the output in an attachment please? The payara embedded is the jndi name for jdbc resource and it's defined in glassfish-resources.xml. The way of defining that resources.xml differs from IDE to maven build.

mmroot commented 7 years ago

@mulderbaba good call, I ran the test through maven and it worked. (running it from eclipse mars does not). Maven version: 3.2.5, Java 8 Thanks for bringing light to this.

mulderbaba commented 7 years ago

great @RaZv, this example is not based on eclipse since it does not provide any integration for arquillian. please checkout our blog http://blog.payara.fish/using-payara-embedded-as-an-arquillian-container-inside-intellij-idea for running the test inside Intellij IDEA. they provide integration points for arquillian directly from the IDE itself.