glassfish-4

How do I use Glass fish server with eclipse luna for Java EE?

蹲街弑〆低调 提交于 2019-12-19 22:00:43
问题 I thought that Glass Fish server came with Eclipse when you install the Glass fish tools for Java EE. However, after trying to install the Glass fish tools, it said there was nothing to update. Ok, so when I try to start the server, it asks for the server root. Does the glass fish server come with Eclipse? If so, how would I locate it? Or if I need to install it on my computer, which I did, why does it not recognize the folder where I installed Glass fish server as a valid installation of

CDI deployment failure:WELD-001414 Bean name is ambiguous

我只是一个虾纸丫 提交于 2019-12-19 06:22:13
问题 I have an application, which has multiple modules and various dependencies. When I deploy the application on Glassfish 4, I am getting error: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name JerseyClassAnalyzer resolves to beans: [Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default @Named @Any], Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default

CDI deployment failure:WELD-001414 Bean name is ambiguous

时光总嘲笑我的痴心妄想 提交于 2019-12-19 06:21:44
问题 I have an application, which has multiple modules and various dependencies. When I deploy the application on Glassfish 4, I am getting error: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name JerseyClassAnalyzer resolves to beans: [Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default @Named @Any], Managed Bean [class org.glassfish.jersey.internal.inject.JerseyClassAnalyzer] with qualifiers [@Default

Upgrading Jackson in GlassFish 4.1

十年热恋 提交于 2019-12-19 06:19:09
问题 I am using GlassFish 4.1, which includes Jackson 2.3.2. I would like to upgrade to the newest version of Jackson (currently 2.4.4). Is the procedure for upgrading Jackson in GlassFish 4.1 as simple as: a) stopping GlassFish b) deleting the osgi-cache c) replacing the Jackson 2.3.2 jars in the glassfish/modules directory with newer versions d) starting GlassFish Thanks. 回答1: Please @see https://java.net/jira/browse/GLASSFISH-21141 The procedure I followed was asadmin stop-domain delete felix

CDI : WELD-001408 Unsatisfied dependencies, how to resolve it?

一个人想着一个人 提交于 2019-12-18 18:48:09
问题 I do a small test project with CDI. My application is composed of an EJB EAR and WAR, all deployed on Glassfish 4. I'm using Hibernate 4.3.4 to access the database. My goal is to verify that a class in an EJB (DAO) can receive an injection of an EntityManager. The pattern SessionBean + EJB is not fantastic but I have to modify an application already created so I do not have much choice. Here is my code of the EJB: @Named public class DAOTest implements Serializable { private static final long

Jersey custom SecurityContext on EJB jax-rs resource

安稳与你 提交于 2019-12-18 17:11:54
问题 I am trying to implement my own ContainerRequestFilter and configure SecurityContext . It works well on jax-rs resources but EJB jax-rs throws javax.ejb.AccessLocalException Only relevant thing I found is 4 years old and the workaround doesn't seem pretty. https://java.net/projects/jersey/lists/users/archive/2010-05/message/265 My custom SecurityContext: @Provider @PreMatching public class SecurityFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext

Custom bean validation does not `@inject` CDI beans and does not interpolate message?

做~自己de王妃 提交于 2019-12-18 07:24:41
问题 I am using GF4 with bean validation. I am trying to @Inject a service bean in my custom validator but I get a null value. public class TestValidator implements ConstraintValidator<>{ @Inject Service myService; } Isn't this suppose to be working with JEE7? Also, I am trying to find built-in dynamic message interpolation (Without writing my own MessageInterpolator ). I did see some examples but they are not very clear. What I am looking for is to pass dynamic parameters from the

How can I define a JAX-RS service that processes multi-part data in JEE?

五迷三道 提交于 2019-12-18 01:07:08
问题 This is what I have so far: This initializes my REST service package com.dothatapp.web.rest; import javax.servlet.annotation.MultipartConfig; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; @ApplicationPath("/authed/rest") public class JaxRsActivator extends Application { } And this what my service looks like: import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import

org.hibernate.hql.internal.ast.QuerySyntaxException: table is not mapped

跟風遠走 提交于 2019-12-17 21:57:34
问题 I have example web application Hibernate 4.3.5 + Derby database 10.10.1.1+ Glassfish4.0 with IDE NetBeans 8.0Beta. I have the next exception: Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: CUSTOMERV is not mapped at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:189) at org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:109) at org.hibernate.hql.internal.ast.tree.FromClause

SimpleFormatter ignoring the java.util.logging.SimpleFormatter.format property

无人久伴 提交于 2019-12-17 13:55:11
问题 I'm using java.util.logging on GlassFish 4. I'm defining my own class to initialize the LogManager by defining the System property: -Djava.util.logging.config.class . My class loads the logging.properties file, merges it with some other property file and does some custom replacement. The following is the relevant part of my logging.properties file: java.util.logging.FileHandler.pattern=C:/Work/server/glassfish/domains/domain1/logs/JMSFileHandler%g.log java.util.logging.FileHandler.limit