glassfish-3

Failed to start glassfish server because Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log

余生长醉 提交于 2019-12-08 10:43:25
问题 admin@BRMSDEV:/opt/glassfishv3/glassfish/bin$ ./asadmin start-domain domain1 java.io.IOException: Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log at java.util.logging.FileHandler.openFiles(FileHandler.java:389) at java.util.logging.FileHandler.<init>(FileHandler.java:287) at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:85) at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:148) at com.sun

Multiple apps in glassfish JUL logging to different log files?

跟風遠走 提交于 2019-12-08 06:22:03
问题 I use java.util.logging and have multiple war apps in glassfish servers. I'd like JUL to log to a different file for each war (currently glassfish logs everything to server.log). I know this is easy to do with log4j or other logging modules, but I'd like to stick to JUL. (Would not like to discuss if JUL is my best option). Is it possible? Thanks 回答1: It is possible to append a different FileHandler to a Logger. If you have a normal logger: private final static Logger LOGGER = Logger

Installing Java EE 6 SDK

走远了吗. 提交于 2019-12-08 05:31:46
问题 This is the installation file: Java Platform, Enterprise Edition 6 SDK Update 3 (with JDK 6u27) The error occured during glassfish installation domain is: C:\glassfish3\glassfish\bin\asadmin.bat --user admin --passwordfile - create-domain --savelogin --checkports=false --adminport 4848 --instanceport 8080 --domainproperties=jms.port=7676:domain.jmxPort=8686:orb.listener.port=3700:http.ssl.port=8181:orb.ssl.port=3820:orb.mutualauth.port=3920 domain1 Error: could not open `C:\glassfish3\jdk\jre

WebSockets, GlassFish, Grizzly — can't connect

不打扰是莪最后的温柔 提交于 2019-12-08 04:19:53
问题 I am trying to get started with WebSockets, and trying to write a simple application to send messages back and forth via a websoket. However, it looks like the socket that I am trying to create never gets connected. Why can that be? Below is the code of my WebSockets class. When .onConnect() is called, it logs: I am socket, I was connected. Am i connected? - false Update: in JavaScript, where I create the socket in question, the readyState is 1 , which means "socket open, communication is

Glassfish - Preserve sessions across redeployment - SessionListener is not called on session recreation

半城伤御伤魂 提交于 2019-12-08 03:55:58
问题 So I made a simple session listener - there are many on the web : import javax.servlet.ServletContext; import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; import javax.servlet.annotation.WebListener; import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; @WebListener class SessionListener implements ServletContextListener, HttpSessionListener { private static final int MAX_INACTIVE

configure glassfish embedded server with logback logging

泄露秘密 提交于 2019-12-08 03:43:35
问题 Is there any way to configure Glassfish embedded server for testing with third party logging frameworks - particularly Logback (or) LOG4j. Note: Glassfish embedded server is used for unit testing our EJB Beans. 来源: https://stackoverflow.com/questions/21645652/configure-glassfish-embedded-server-with-logback-logging

EJB lookup from Play application

一笑奈何 提交于 2019-12-08 03:41:56
问题 I have a Play application (I am using Play 2.1.0) from which I would like to invoke EJBs running on a GlassFish server. Therefore, I have tried adding gf-client.jar as a dependency in my Play application and getting a reference to the EJBs the same way I would do in a standalone application: Hashtable<String, String> properties = new Hashtable<String, String>(); properties.put("java.naming.factory.initial", "com.sun.enterprise.naming.impl.SerialInitContextFactory"); properties.put("java

JSF 2 OpenJPA 2 Glassfish 3.1 WEB9031 Error

此生再无相见时 提交于 2019-12-08 03:30:27
I got this error which according to Apache Support is an issue relating with Glassfish rather than OpenJPA: java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [org.apache.openjpa.util.LongId], because it has not yet been started, or was already stopped The stacktrace is: Caused by: java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [org.apache.openjpa.util.LongId], because it has not yet been started, or was already stopped at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1410) at org.glassfish.web

How to serialize java.sql.Date as Long, when using web services?

孤人 提交于 2019-12-08 03:04:21
问题 I have a simple web service method that returns a simple java class as return value. @WebMethod() public SimpleClass myMethod(); @XmlRootElement() public class SimpleClass { @XmlElement(name="myDate") @XmlJavaTypeAdapter(value=MyDateAdapter.class) public java.sql.Date myDate = new java.sql.Date(new java.util.Date().getTime()); } I want that java.sql.Date will transmitted as Long value in the XML (because the client is J2ME that cannot handle complex things). For this puprpose I took the

Glassfish v3: Can't Deploy MessageDriven Bean - Missing Destination JNDI Name

陌路散爱 提交于 2019-12-08 02:39:53
问题 I am trying to deploy an ear that contains an EJB jar. The jar only contains one MDB class: package my.package; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.ObjectMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @MessageDriven(mappedName = "jms/FileUploadedQueue", activationConfig = { @ActivationConfigProperty(propertyName =