glassfish-3

GlassFish 3: how do you change the (default) logging format?

自闭症网瘾萝莉.ら 提交于 2019-11-29 03:07:49
问题 The question originated from here: http://www.java.net/forum/topic/glassfish/glassfish/configuring-glassfish-logging-format - without an answer. The default GlassFish 3 logging format is very annoying, much too long. [#|2012-03-02T09:22:03.165+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=113;_ThreadName=AWT-EventQueue-0;| MESSAGE... ] This is just a horrible default IMO. The docs just explain all the fields, but not how to change the

Which Maven GlassFish plugin to use?

我的未来我决定 提交于 2019-11-28 20:11:55
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 well for all goals it says it supports, which makes some of the commands ineffective. Has anyone else

Will it be possible to use Java 8 on Glassfish 3?

浪尽此生 提交于 2019-11-28 19:17:32
We currently use Glassfish 3 and I really want to use Java 8. I tried upgrading to Glassfish 4, but I experienced two bugs in the Glassfish 4 code so I had to revert back to Glassfish 3. Will Glassfish 3 work with Java 8 or will I have to upgrade my application container? No, it won't be possible (at the moment, maybe a workaround will occur later). I tried Glassfish 3.1.1 and Glassfish 3.1.2.2 with the final Java 8 JDK which was released today. It doesn't even start the server, some OSGI exceptions are thrown. As the comment to your question showed, it doesn't even work with earlier builds of

Glassfish 3.1 CREDENTIAL_ERROR in Eclipse

拜拜、爱过 提交于 2019-11-28 10:12:56
I can't start Glassfish 3.1 on Eclipse Indigo with "Oracle Glassfish Server Tools" plugin on Windows 7. After installing the plugin, I've chosen "New" -> "Server" in the server view and clicked on GlassFish 3.1 and downloaded the installation through Eclipse. Every time I try to start it, I've the following message: The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR I've found out that the initial password is 'changeit' and I've changed it to my own, on the command line: bin/asadmin change-master-password domain1 Enter the current master password>

Reading properties file in JSF2.0 which can work in war also

拜拜、爱过 提交于 2019-11-28 09:46:31
问题 To read a properties file in JSF2.0 with Glassfishv3 webserver, which is located at root directory of my web application, I am using below code- ServletContext ctx = (ServletContext) FacesContext .getCurrentInstance().getExternalContext().getContext(); String deploymentDirectoryPath = ctx.getRealPath("/"); Properties prop = new Properties(); prop.load(new FileInputStream(deploymentDirectoryPath + File.separator + "portal-config.properties")); Below is the screenshot of web portal- While

Upgrading GlassFish 3.1.2.2 to use JPA 2.1

為{幸葍}努か 提交于 2019-11-28 01:45:50
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? 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. 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 need to unwrap the EntiyManager to access these. I'm using Hibernate 4.3.8 (requires JPA 2.1) with Glassfish 3.1.2.2

LoginException: Login failed: Security Exception

﹥>﹥吖頭↗ 提交于 2019-11-27 22:26:30
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.doPasswordLogin(LoginContextDriver.java:394) at com.sun.enterprise.security.auth.login.LoginContextDriver.login

GlassFish: How to set Access-Control-Allow-Origin header

僤鯓⒐⒋嵵緔 提交于 2019-11-27 21:40:32
I am using the latest version of GlassFish. I want to set the Access-Control-Allow-Origin header in response so that my API which is hosted on GlassFish can be called from any domain. But I am not able to find out where to set it. In my case, the API requests are exclusively handled by Jersey, therefore I can set response headers in a ContainerResponseFilter : package my.app; import com.sun.jersey.spi.container.ContainerRequest; import com.sun.jersey.spi.container.ContainerResponse; import com.sun.jersey.spi.container.ContainerResponseFilter; public class CrossOriginResourceSharingFilter

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

北慕城南 提交于 2019-11-27 19:19:36
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 encoded slash (%2F), for example " https://somewhere.com/ws/stuff/lookup/resourceId/287559/token/R4o6lI

How to use 3rd party libraries in glassfish?

人走茶凉 提交于 2019-11-27 13:19:13
I need to connect to a MongoDB instance from my EJB3 application, running on glassfish 3.0.1. The Mongo project provides a set of drivers, and I'm able to use them in a standalone Java application. How would I use them in a Java EE application? Or maybe better phrasing: how would I make a 3rd party library available to my application when it runs in an EJB container? At the moment, I'm getting a java.lang.NoClassDefFoundError when deploying a bean that tries to import from the library: [#|2010-03-24T11:42:15.164+0100|SEVERE|glassfishv3.0|global|_ThreadID=28;_ThreadName=Thread-1;|Class [ com