Questions tagged [apache-tomee]
Apache TomEE is the Java Enterprise Edition of Apache Tomcat that combines several Java enterprise projects.
apache-tomee
968
questions
98
votes
11
answers
127k
views
How to use Tomcat 8.5.x and TomEE 7.x with Eclipse?
I need to setup a Tomcat 8.5.x server version in Eclipse. When I try to create a server using Eclipse GUI, I get in Eclipse Luna as choice the latest version "Apache Tomcat v8.0". When I select it ...
80
votes
2
answers
60k
views
What is the difference between Tomcat and TomEE, TomEE and TomEE Plus
I want to deploy EJB ear in a server but I am really confused about choosing a server among tomcat, TomEE and TomEE Plus.
What are the differences between Tomcat and TomEE?
What are the new features ...
40
votes
1
answer
39k
views
Whats the difference between service tomcat start/stop and ./catalina.sh run/stop
Whats the difference between service tomcat start/stop and ./catalina.sh run/stop in Tomcat or TomEE?
Do they do exactly the same thing?
24
votes
1
answer
16k
views
How to configure connection failover for a PostgreSQL Hot Standby setup in a JavaEE application?
I have two Linux servers (A and B) with a PostgreSQL 9.5 database installed. I configured hot standby mode as described in the documentation. In this setup, A is configured as master, B in hot standby ...
23
votes
2
answers
33k
views
What's the difference between localhost.log, catalina.log, manager.log, host-manager.log ?
I'm using Tomee. The logs folder contains files like this
localhost_access_log.2016-12-02.txt
localhost.2016-12-02.log
catalina.2016-12-02.log
host-manager.2016-12-02.log
manager.2016-12-02.log
I ...
21
votes
2
answers
18k
views
How can I map postgresql json data type using Hibernate?
I am following the example mentioned in the below URL ?
Mapping PostgreSQL JSON column to a Hibernate entity property
But always get the following exception:
Caused by: org.hibernate.MappingException: ...
14
votes
6
answers
3k
views
JavaEE solution configuration best practices
We build 3-tier enterprise solutions that typically consists of several webapp and ejbjar modules that all talk to a db and have several external integration points.
Each module typically needs its ...
13
votes
6
answers
30k
views
TomEE starts but Netbeans gives "Failed to start" error
I'm using NetBeans 8.0.2 (also, tried it in the latest nightly build) and trying to start TomEE Plume server on port 8084 (tried it on different port too). Server starts and works fine, but NetBeans ...
12
votes
2
answers
24k
views
minimum hibernate version compatible with java8
I have a terrible time trying to find out which is the minimum version of Hibernate that supports being run on a java8 JRE, where the user code will use java8 features.
I found this bug, but it talks ...
12
votes
4
answers
25k
views
logrotate doesn't rotate catalina.out
I am trying to use logrotate to rotate out tomcat's catalina.out automatically on a daily basis even though I can manually call logrotate and it works fine. I am using I have tried every solution out ...
11
votes
3
answers
21k
views
How do I add EJB capabilities to an Eclipse dynamic web project?
I am developing a simple application with EJB 3.0 using OpenEJB for deployment and Eclipse as an IDE.
I created the project as a 'dynamic web application' in Eclipse. When I tried creating the first ...
10
votes
6
answers
11k
views
How can I integrate Jersey with TomEE / openEJB
I am upgrading a code that uses Jersey JAX-RS to run on an Apache TomEE server. Unfortunately it throws errors when I try to use Jersey with TomEE.
I am using eclipse and have the JAX-RS project ...
10
votes
3
answers
5k
views
Tomcat/TomEE: TomEE GUI page 404 error
I recently installed "apache-tomee-webprofile-1.7.2" on to a "Red Hat Enterprise Linux Server (6.6).
I am able to access the Tomcat home page by accessing x.x.x.x:8080 and via this, I am able to ...
10
votes
2
answers
8k
views
How to selectively inactivate REST endpoints in a Java application?
I am working on an application that consists of several backend services and a frontend client. The entire application is written in Java, and we use the Apache TomEE webserver to run it.
The backend ...
9
votes
3
answers
13k
views
How to use TomEE with Hibernate
I have created very simple app with persistence context (hibernate as provider) to read some value from database. I use Eclipse with Maven.
First, I get
Caused by: org.apache.openejb....
9
votes
1
answer
8k
views
How to test a Java EE7 Websocket
I have implemented a WebSocket using the api provided with Java EE 7. Additionally I have implemented a client that requests my WebSocket without any problems. To be sure this remains working when ...
9
votes
3
answers
51k
views
why EntityManager is null?
In my web applicaton I use OpenJPA on Apache Tomcat (TomEE)/7.0.37 server. I use Netbeans to auto generate class ("Entity Class from database..." and "Session Beans From Entity Class..."). At ...
8
votes
2
answers
11k
views
Gradle -> How to omit some jars from WEB-INF/lib
I have a subproject with a war spec that looks like this:
war {
from('resources') {
include '*.properties'
into 'WEB-INF/classes/'
}
webXml = file('src/main/webapp/...
8
votes
2
answers
10k
views
DDL generation and general persistence.xml settings (OpenJPA)
Summary
I'm trying to run a Java web application JPA 2.0 example. The example application was written to run in Glassfish, using EclipseLink as JPA provider.
I would like to convert it to run in ...
8
votes
1
answer
812
views
Custom exception mapping for bean validation on TomEE 7?
Context
We use a javax.ws.rs.ext.ExceptionMapper<Exception> annotated as @javax.ws.rs.ext.Provider to handle all exceptions. Internally this ExceptionMapper is distinguishing between different ...
7
votes
1
answer
5k
views
Tomcat 8 (and 9) coerce behaviour, null strings are incorrectly set as empty strings
I have just migrated to Tomcat 8. I used to work with system property org.apache.el.parser.COERCE_TO_ZERO=false so empty strings, numbers, booleans etc. are treated as null.
In Tomcat 8, EL 3.0, it ...
7
votes
1
answer
981
views
What is the workflow for application startup and configuration when using Apache TomEE
I understand that Apache TomEE is a regular Tomcat installation with openejb as a web app.
I am trying to understand how all this bootstraps. I will try and ask a few directed questions:
Is it ...
7
votes
2
answers
664
views
Hazelcast threads prevent TomEE from stopping
Context
We want to use Hazelcast as our JCache implementation inside TomEE. As we don't need insane performance, at the moment, we want to run the Hazelcast node as part of our application.
We use ...
7
votes
1
answer
12k
views
"No resource methods" when using JAX-RS on TomEE+
Using stock TomEE+, I cannot get a simple JAX-RS resource to work. I constantly get an error of:
Jun 30, 2012 5:09:59 PM org.apache.cxf.jaxrs.utils.ResourceUtils checkMethodDispatcher
WARNING: No ...
7
votes
2
answers
3k
views
TomEE :- Caused by: java.lang.RuntimeException at org.apache.xbean.asm5.MethodVisitor.visitTypeAnnotation(Unknown Source)
I have a spring mvc web application (maven). It runs on JDK 1.7 perfectly , but the error occurred when i try with 1.8.
Similar question asked here. Where they moved back to 1.7.
But i want to run ...
6
votes
1
answer
3k
views
How to use Jackson as JSON provider for JAX-RS-Client instead of Johnzon in TomEE 7?
I use TomEE 7.0.1 with Jackson 2 as JAX-RS JSON provider (configured in openejb-jar.xml). Posting json to jax-rs services works perfectly well and uses the jackson annotations.
But using JAX-RS ...
6
votes
2
answers
2k
views
CDI | Application / Dependent Scope | Memory Leak - javax.enterprise.inject.Instance<T> Not Garbage Collected
I am using Instance as a lazy / dynamic injector in a TomEE Java application, and I have noticed a memory leak in my application. This is a first for me, so it's actually surprising to see a memory ...
6
votes
2
answers
3k
views
Why is TomEE Java EE6 certified but TomEE+ not?
Like the title says. I don't have much knowledge regarding the inner workings of Java EE6 certification. However, it seems that TomEE+ is just just a superset of TomEE, so shouldn't TomEE+ also be ...
6
votes
3
answers
10k
views
Using JDBC datasources from context.xml in TomEE
TomEE is a great project, combining the lightweight experience of Tomcat with Java EE features. I have many JDBC datasources declared in context.xml, but when I want to use that Datasource via JNDI I ...
6
votes
1
answer
5k
views
Unable to enlist connection in transaction: enlistResource returns 'false'
All of sudden I got the following error continuously for a select query.
Unable to enlist connection in transaction: enlistResource returns 'false'
This appears to be thrown from DBCP (https://...
6
votes
3
answers
11k
views
Making @Schedule run only once in a clustered environment
I have two tomee instances clustered.
Each one have a method annotated like
@Schedule(dayOfWeek = "*")
public void runMeDaily() {...}
I'd like to run this method only once a day. Not twice a day (...
6
votes
1
answer
2k
views
Maven with automated testing using TestNG, JSFUnit 2 and Arquillian
im currently trying to make a JSFUnit-Test with Arquillian and TestNG, but the JSFServerSession and JSFClientSession-object is NULL. Is there a working EXAMPLE for having JSFUnit and TestNG? Or is ...
6
votes
2
answers
3k
views
EJB-3.1 @Startup & @Schedule anotation in Apache Tomee for Timer Execution
I have following code to run on Apache-tomee, i am using eclipse for coding, and i want to run my simple schedule job using @Schedule annotation at application start-up.
@Startup
@Singleton
public ...
6
votes
0
answers
4k
views
Why does injected UriInfo use a different hostname than injected HttpServletRequest?
I'm learning JAX-RS, and like the idea of returning URLs to other relevant actions in a response. Using Apache TomEE JAX-RS 1.5.1, for some reason the URLs provided by an injected UriInfo instance are ...
5
votes
1
answer
2k
views
Security error - Starting TomEE Plume 1.7.4
I downloaded the newest TomEE Plume 1.7.4 Version and tried to start it from inside IntelliJ IDEA 14 with what seems to me to be a normal server setup and I get a timeout error with the following ...
5
votes
2
answers
7k
views
EJB testing with TomEE embedded EJBContainer api: java.lang.ClassFormatError exception
I would test my EJB with TomEE embedded EJBContainer.
This is my JUnit test case skeleton:
package com.xxx.indexer.scheduler.service;
import java.util.Properties;
import javax.ejb.embeddable....
5
votes
5
answers
3k
views
Tomee 1.5.2 JAX-RS with Jackson 1.9.12
I've been trying for ages to get Tomee 1.5.2 JAX-RS work with Jackson. I think I've tried 100 ways.
Here is my last attempt:
I added in conf/system.properties the following:
openejb.cxf.jax-rs....
5
votes
1
answer
3k
views
EJB injections vs only JSF managed beans
I don't know may be my question is completely meaningless, but I can't find any straight information about it.
I had my JSF + Tomcat application and it worked just fine. I want to implement Restful ...
5
votes
1
answer
18k
views
The absolute uri cannot be resolved in either web.xml or the jar files deployed with this application
I'm converting a web application to use TomEE instead of Jboss 5.1.0 and seeing the following exception:
ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[mlui]- Servlet....
5
votes
3
answers
10k
views
How to override 'org.apache.cxf.stax.maxChildElements' property value inside a TomEE container?
I've got a JAX-WS web service endpoint configured purely via annotations running in TomEE 7 environment. Basically, the method being called has to return a List<String> of all node names ...
5
votes
1
answer
11k
views
java.lang.IllegalArgumentException: Unsupported class file major version 58
I have included TomEE with Eclipse in order to start developing dynamic web projects (I am still new to it).
Before adding the project to the TomEE server, I am able to start it without any problem.
...
5
votes
2
answers
599
views
How to configure HikariCP via Tomee.xml?
I want to test out hikaricp in TomEE. I have added the jar-file into my lib folder, and have tried defining the resources like this:
<Resource id="myJtaDs" type="DataSource" class-name="com....
5
votes
1
answer
17k
views
Java EE Error: javax.enterprise.inject.UnsatisfiedResolutionException: Api type
I'm in the process of building a simple webapp modelled on the MVC architecture. I have a little JSP page with an HTML form. The form data gets forwarded to a servlet which then delegates to the ...
5
votes
1
answer
2k
views
Johnzon desirializing date over rest
I have a tomee server and from android i can call GET methods and works well. Now i try to POST with volley library an entity which has a field java.util.Date but in server i get:
WARNING - ...
5
votes
2
answers
6k
views
org.apache.activemq.broker.TransportConnection serviceTransportException WARNING: java.io.EOFException
In my server log I can see occasionally exceptions like:
Aug 11, 2015 10:13:34 AM org.apache.activemq.broker.TransportConnection serviceTransportException
WARNING: Transport Connection to: tcp://127....
5
votes
2
answers
8k
views
How do I generate WADL from RESTful Java code in IntelliJ IDEA?
I have a simple RESTful service in IntelliJ IDEA 12.1.3 Ultimate.
I've tested it. It works. Now I want to create a Java client for this service and need a WADL.
Per the instructions at http://wiki....
5
votes
1
answer
2k
views
EJB JAX-RS @Context HttpServletRequest NullPointerException - Why?
Consider the following service:
@Path("/")
@Stateless
public class SomethingService {
@Context
final HttpServletRequest request
@POST
@Path("post/something/")
@Produces("...
5
votes
0
answers
916
views
How to make Concurrency utilities (JSR 236) work in plain non-EE Tomcat 8?
My technical stack includes
Tomcat 8.5.47 (plain, not EE)
Weld 2.4.8.Final (as a reference implementation of CDI 1.2)
To be able to use ManagedExecutorService and manage threads more wisely and in ...
4
votes
3
answers
6k
views
java.lang.IllegalAccessError while trying to test a jersey REST webservice deployed on TomEE
I have a Jersey-based REST webservice which is working fine when deployed on Glassfish. When I deploy the same war file on Apache TomEE+ 1.6 version, i get the exception
java.lang.IllegalAccessError:...
4
votes
1
answer
857
views
Transactions inside tasks of ManagedScheduledExecutorService on TomEE 7.0.0?
Context
I want to schedule recurring background tasks using ManagedScheduledExecutorService. I get my Runnables/Callables via an Instance, so I have injection capabilities available inside my tasks.
...