glassfish-3

Which Maven GlassFish plugin to use?

爱⌒轻易说出口 提交于 2019-11-27 12:46:17
问题 I've been trying to integrate deploying java .war 's in GlassFish V3 through Maven. While I have found a few plugins, none of them look to be very active: Maven Glassfish Plugin Eskato's Wordpress Blog on Maven And I got the most information out of Eskato's Blog, it was written March 2008, so I don't know what the state of GlassFish Maven integration is, nor can I find a suitable plugin to work with. With the Maven GlassFish Plugin I have had some success, but it still doesn't work entirely

How should I log uncaught exceptions in my RESTful JAX-RS web service?

萝らか妹 提交于 2019-11-27 11:46:57
I have a RESTful web service running under Glassfish 3.1.2 using Jersey and Jackson: @Stateless @LocalBean @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) @Path("users") public class UserRestService { private static final Logger log = ...; @GET @Path("{userId:[0-9]+}") public User getUser(@PathParam("userId") Long userId) { User user; user = loadUserByIdAndThrowApplicableWebApplicationExceptionIfNotFound(userId); return user; } } For expected exceptions, I throw the appropriate WebApplicationException , and I'm happy with the HTTP 500 status that is returned if an

“Certificate has expired” in log by starting Glassfish 3.1.2

情到浓时终转凉″ 提交于 2019-11-27 10:31:35
问题 Today by starting my glassfish I saw an error message about a certificate that has expired... Can someone help me and say what I can/must do? Here the message: ... [exec] [exec] [#|2013-08-15T08:57:42.106+0200|INFO|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.services.impl|_ThreadID=39;_ThreadName=Thread-2;|Grizzly Framework 1.9.50 started in: 16ms - bound to [0.0.0.0:1307 6]|#] [exec] [exec] [#|2013-08-15T08:57:42.262+0200|INFO|glassfish3.1.2|javax.enterprise.system.core

How to set response header in JAX-RS so that user sees download popup for Excel?

佐手、 提交于 2019-11-27 06:52:45
I wrote code that generate Excel file using REST JAX-RS and I confirmed that the generated Excel file is in GlassFish server directory. But my goal is when user click on the button (which generate Excel .xls), I want download popup to show up asking user whether to save or open the .xls file just like any other web services doing for downloading any type of files. According to my search, the step is: generate Excel .xls (DONE) write the excel to stream in JAX-RS file, set response header to something like, String fileName = "Blah_Report.xls"; response.setHeader("Content-Disposition",

eclipse error: glassfish\\domains\\domain1 does not exist

纵饮孤独 提交于 2019-11-27 05:20:56
I have java ee6 web profile sdk & I am using eclipse ee. I installed Glassfish plugin for eclipse using Download additional server adapters in the New Server wizard. Now during building a test app, eclipse raise this error glassfish\domains\domain1 does not exist . Whats the reason & how can I remove it? Either your eclipse glassfish plugin points to the wrong domain or your server has no domain although there should be at least a default domain which is usually named domain1 . Check what's the name of your domain in glassfish-install-dir\glassfish\domains directory. If there is no subdir, you

Encoded slash (%2F) with Spring RequestMapping path param gives HTTP 400

谁说我不能喝 提交于 2019-11-26 22:47:39
问题 This is not a duplicate referenced question, because it is Spring specific. Whoever added that (3 years after the fact!) didn't bother to read the question or comment thread to see what the real answer was. The accepted answer isn't quite the answer, but the author of the answer never came back and edited it like I asked. Given the restful method below, Spring 3.1 gives a 400 error with "The request sent by the client was syntactically incorrect ()." when the token parameter contains a URL

How to get rid of WARNING: PWC4011: Unable to set request character encoding to UTF-8

坚强是说给别人听的谎言 提交于 2019-11-26 22:23:15
This is on GlassFish 3.1, using PrimeFaces over Mojarra and salted with MyFaces CODI. On just about every request the following message appears: WARNING: PWC4011: Unable to set request character encoding to UTF-8 from context /com.myapp_war_0.1, because request parameters have already been read, or ServletRequest.getReader() has already been called This has happened ever since I started the project -- so far I have been ignoring it but now I have realized I am wasting a lot of time reading around it. I found an interesting but incomplete work-around here , but I don't understand it. Can

How to install the GlassFish 3 server adapter with Eclipse Helios 3.6

我的未来我决定 提交于 2019-11-26 22:11:45
Question as stated in the title: how to install the GlassFish Server Adapter on Eclipse Helios 3.6? Pascal Thivent Eclipse Helios 3.6 At the time of writing this (07/26/2010), there are in theory two ways to install the GlassFish Server adapter: via the Eclipse Marketplace or via an update site. Update: As mentioned by Thorbjørn in a comment, the adapter is now (09/24/2010) available in the Additional server adapters dialogue (the "normal way"). New Server There are several ways to do this but one ways is to right-click in the Server view, select New > Server then click the Download additional

Upgrading GlassFish 3.1.2.2 to use JPA 2.1

老子叫甜甜 提交于 2019-11-26 22:02:33
问题 I am working with GlassFish 3.1.2.2 (I can not upgrade to 4 due to OS restrictions). I'm interested in upgrading JPA 2.0 to JPA 2.1 GlassFish 3.1.2.2. How can I achieve this? 回答1: This is most likely not possible at all. JPA 2.1 is part of EE 7 and therefore not fully integrated with EE 6 GF 3.1.2.2. 回答2: Did you try just replacing the EclipseLink and JPA jar files in Glassfish? It will probably work, but if you use managed persistence units they will not expose any JPA 2.1 API, you would

LoginException: Login failed: Security Exception

我的梦境 提交于 2019-11-26 20:59:18
问题 I am attempting to setup container managed security with GlassFish v3.1.1 Build 12 and JSF 2.1. I keep getting the following exception for some reason and I am unable to login. WARNING: WEB9102: Web Login Failed: com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception WARNING: Exception com.sun.enterprise.security.auth.login.common.LoginException: Login failed: Security Exception at com.sun.enterprise.security.auth.login.LoginContextDriver