openejb

What to put into jta-data-source of persistence.xml?

◇◆丶佛笑我妖孽 提交于 2019-12-18 11:41:20
问题 What value should I place into <jta-data-source> of my persistence.xml ? In glassfish admin panel I created a datasource name "abcDS" . In my jndi.properties (inside src/test/resources ) I defined it like this: [...] abcDS=new://Resource?type=DataSource abcDS.JdbcDriver=org.hsqldb.jdbcDriver abcDS.JdbcUrl=jdbc:hsqldb:mem:testdb abcDS.JtaManaged=true [...] What shall I place into persistence.xml ? I've found a lot of variants in the Net, like: "jdbc/abcDS" , "java:/abcDS" , "abcDS" . Which one

integration test with openejb container and hibernate fails

旧时模样 提交于 2019-12-13 06:26:29
问题 I'm trying to write integration tests for my java ee 6 application. This works with open jpa and also with eclipselink. But is doesn't work with hibernate. I've created a minimal project on github to debug the problem here: https://github.com/Crydust/guestbooktwo These work D:\Projects\guestbooktwo>mvn clean verify -P openjpa D:\Projects\guestbooktwo>mvn clean verify -P eclipselink These don't work D:\Projects\guestbooktwo>mvn clean verify -P hibernate-a D:\Projects\guestbooktwo>mvn clean

Maven, JUnit, OpenEJB, ApplicationComposer leads to java.lang.NoSuchMethodError

末鹿安然 提交于 2019-12-13 04:27:02
问题 While executin the test (test looks like this: http://tomee.apache.org/examples-trunk/application-composer/README.html), I always get: java.lang.NoSuchMethodError: org.apache.openejb.jee.ManagedBean.<init>(Ljava/lang/String;Ljava/lang/String;Z)V at org.apache.openejb.junit.ApplicationComposer$DeployApplication.evaluate(ApplicationComposer.java:194) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java

TomEE + CXF configuration reference

混江龙づ霸主 提交于 2019-12-12 15:48:31
问题 So I was trying to find any reference documentation or non-trivial examples for using the three. The 'best' I found was: TomEE/OpenEJB JAXRS refactoring Some tips for TomEE and JAXRS config The TomEE Documentation doesn't list Jax-RS at all, and I was only able to find some examples consisting of a single endpoint class Where can I find a comprehensive reference of configuration options? The main problem is that I'd know how to do most of the things I want when using standalone CXF, but I

Remote EJB lookup using OpenEJB in Tomee

六眼飞鱼酱① 提交于 2019-12-12 04:44:19
问题 Am trying to use example given here http://openejb.apache.org/hello-world.html With OpenEJB I am able to output HelloWorld I am trying same in Apache Tomee I have Remote EJB bean like this @Remote public interface Hello{ public String sayHello(); } @Stateless public class HelloBean implements Hello{ public String sayHello(){ return "Hello World!!!!"; } } packed it in a jar jar cvf hello.jar org Deployed on Apache Tomee Tomee Log after deploying hello.jar 03-Oct-2017 15:55:51.778 INFO

TomEE deploy failed datasource not found

吃可爱长大的小学妹 提交于 2019-12-12 03:22:43
问题 I want to deploy a war file to TomEE but fails with: Caused by: javax.naming.NameNotFoundException: Name openejb/Resource/application_name/mysql_ds" not found. If I restart the server, the deploy goes fine but only once, then the same error encounters. I have defined datasource in WEB-INF/resources.xml file <tomee> <Resource id="mysql_ds" type="javax.sql.DataSource"> JdbcDriver = com.mysql.jdbc.Driver JdbcUrl = jdbc:mysql://IP:3306/db?serverTimezone=UTC&autoReconnect=true UserName = user

java.lang.NoClassDefFoundError: javax/persistence/Converter Exception using hibernate with tomee and maven

倖福魔咒の 提交于 2019-12-11 19:23:18
问题 I have the following exception: org.apache.openejb.OpenEJBException: Creating application failed: /home/mmarnc/apache-tomee-webprofile-1.7.1/webapps/name_vorname: javax/persistence/Converter at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:896) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:623) at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1248) at org.apache.tomee.catalina

Instrumented (by cobertura) @Decorator bean could not validated by OpenEJB for unit testing

天涯浪子 提交于 2019-12-11 18:09:22
问题 In order to get code coverage report, i instrument the @Decorator bean by cobertura maven plugin. When running my unit test in OpenEJB container. The container reports some error during start up (new initial context). Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Decorator : MyDecorator, Name:null, WebBeans Type:DECORATOR, API Types:[org.apache.commo ns.configuration.Configuration,net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,org.apache.commons

Problems with CDI in setup for functional testing with TomEE (or OpenEJB), Jetty and Selenium

≡放荡痞女 提交于 2019-12-11 08:45:24
问题 I'm trying to setup programatically an environment with Jetty, OpenEJB and WebApps to development and run Selenium tests. Something very similar described in this article: http://tomee.apache.org/functional-testing-with-openejb,-jetty-and-selenium.html. This setup is very good, because I can start selenium test by the IDE or Maven, and use the same code to start a Server for development. I saw this setup working using an old version of Jetty (6.2) and with an unknown EJB container (called

Openejb rest integration tests with exception mappers

℡╲_俬逩灬. 提交于 2019-12-11 03:34:13
问题 I'm writing some integration tests towards my jax-rs service where I have a set of exception mappers. So, when performing a given request I expect a certain response code based on the exception mapper. The problem is that I cannot get the exception mappers to be invoked when running in this environment. My service which should throw a logicalexception in my test: @Stateless @Path("/baseCustomer") public class BaseCustomerService { @EJB //this one gets mocked in the unittest private