glassfish-4

How to enable weaving in EclipseLink?

大城市里の小女人 提交于 2019-12-11 07:46:41
问题 I receive the following warning on the GlassFish terminal while deploying an application that has lazy fetching in entities, WARNING: Reverting the lazy setting on the OneToOne or ManyToOne attribute [zoneTable] for the entity class [class entity.ZoneCharge] since weaving was not enabled or did not occur. for whatever entities are listed in the project. My persistence.xml file looks something like the following. <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http:/

Enabling Jersey trace logging causes MaxHeaderCountExceededException

心已入冬 提交于 2019-12-11 06:58:40
问题 I am trying to debug my jersey 2 app on Payara 162, but on every request, after the trace information is printed I get this exception and the client gets no response: org.glassfish.grizzly.http.util.MimeHeaders$MaxHeaderCountExceededException: Illegal attempt to exceed the configured maximum number of headers: 100 at org.glassfish.grizzly.http.util.MimeHeaders.createHeader(MimeHeaders.java:396) at org.glassfish.grizzly.http.util.MimeHeaders.addValue(MimeHeaders.java:422) at org.glassfish

getting error Invalid Oracle URL specified: OracleDataSource.makeURL

大城市里の小女人 提交于 2019-12-11 01:55:01
问题 I am getting error when I try to run my application on Server. I am suing eclipse and glass fish server 4. I made a glassfish-resources.xml file and put it in the WEB-INF directory. When I try to run on server. I get the following exception Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Invalid Oracle URL specified: OracleDataSource.makeURL Error Code: 0 at org.eclipse.persistence.exceptions.DatabaseException

Getting 404 trying to render a JSP from Jersey 2

孤街醉人 提交于 2019-12-11 00:42:29
问题 I'm trying to make a simple example of a web application using Jersey 2 and JSP, and to deploy it on Glassfish 4. However, I keep getting 404 errors trying to access my only resource. First, the project structure: Here are the important classes and files: web.xml I'm setting Jersey as a filter, instead of a servlet, because I read it needs to be defined that way in order to make it work with JSP. <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org

Glassfish 4.1 - Latest Jersey version

浪子不回头ぞ 提交于 2019-12-10 18:21:28
问题 We want to integrate latest Jersey Version in Glassfish 4.1. Glassfish provides Jersey 2.21.0 implementations, so we added Jersey 2.22.2 to WEB-INF/lib. It seams to work with new version. But is this the correct solution? Will Glassfish always put the libraries in WEB-INF before its own to the classpath? 回答1: If it is not an option to modify glassfish installation, you still may force glassfish to consider the libs in your web app before the global ones. You just need to provide file

does glassfish support password aliases in jvm args?

陌路散爱 提交于 2019-12-10 16:39:11
问题 I'm trying to use an aliased password as a jvm arg, but the aliased password does not seem to be provided to the web app. Here is my domain.xml config: <jvm-options>-Dmy_password=${ALIAS=my_password_alias}</jvm-options> However, trying to retrieve the password just returns null String password = System.getEnv("my_password"); // returns null and String password = System.getProperty("my_password"); // returns "${ALIAS=my_password_alias}" I've tried on: GlassFish Server Open Source Edition 3.1.2

EntityManager.createQuery() throws NullPointerException

做~自己de王妃 提交于 2019-12-10 14:56:27
问题 'm getting NullPointerException everytime any EntityManager.createQuery() or EntityManager.createNamedQuery() is called. I'm using Glassfish 4.0, Hibernate 4.3.5 and EJB. I have following hierarchy: DaoTemplate where I have PersistenceContext and generic methods @Singleton public class DaoTemplate<T extends IdEntityInterface> { @PersistenceContext(unitName = "pu_name") protected EntityManager em; .... } Abstract class with constructor beacuse bean can't extend another bean. public abstract

spring Integration kafka outboundchannel object Injection Error by glassfish

五迷三道 提交于 2019-12-10 11:54:12
问题 Added @ImportResource("classpath:outbound-kafka-integration.xml") on top of my SpringConfig class where i create beans in Java code... Added below dependency in pom.xml <dependency> <groupId>org.springframework.integration</groupId> <artifactId>spring-integration-kafka</artifactId> <version>1.3.0.RELEASE</version> </dependency> it gives the below error when im debugging from SOAP UI client(my application is rest api)... MultiException stack 1 of 4 org.glassfish.hk2.api

getJavaFileForOutput(…) method of custom JavaFileManager not called by compiler

狂风中的少年 提交于 2019-12-10 10:47:55
问题 I have a custom JavaFileManager that looks something like this: public class InMemoryForwardingFileManager extends ForwardingJavaFileManager<StandardJavaFileManager> { private final Map<String, ByteArrayJavaFileObject> javaFileObjects = new HashMap<>(); @Override public JavaFileObject getJavaFileForOutput(Location location, String className, Kind kind, FileObject sibling) throws IOException{ JavaFileObject fileObject = new ByteArrayJavaFileObject( ... ); javaFileObjects.put(className,

GF4 incorrect timeout exception thrown in Servlet when multiple large responses are returned (requested)

房东的猫 提交于 2019-12-10 10:27:03
问题 The issue occurs when multiple requests (in this example, for images) are handled by GF. For some reason, the response outputstream blocks (for larger writes) and I get a timeout after a few seconds. I downloaded the latest (2/12/2013) promoted built from glassfish repo and replaced nucleus-grizzly-all.jar but I still get the same issue. Any ideas of what causes this issue and how I can resolve it? Thanks. Exception java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish