glassfish

GlassFish 4.1.1 Spring 4.0.9, EclipseLink, PostgreSQL - transaction marked for rollback with no information

China☆狼群 提交于 2020-01-06 20:54:14
问题 I want to set up an application running on GlassFish 4.1.1 with EclipseLink and Spring. My database is PostgreSQL. Below is my configuration. When I try to invoke /facebookDebug method I get "javax.transaction.RollbackException: Transaction marked for rollback" which is not very descriptive. Please look at my configuration. Is there everything ok? I can add a log from the server start, maybe you will find something there. persistence.xml <?xml version="1.0" encoding="UTF-8"?> <persistence

Glassfish suddenly complaining of bogus port

╄→尐↘猪︶ㄣ 提交于 2020-01-06 19:36:50
问题 I've been running a Glassfish server under Eclipse Indigo. It had been working just fine, but it suddenly refused to start, throwing this error: An internal error occurred during: "Starting GlassFish 3.1.2 at localhost". port out of range:1118080 I didn't (knowingly) change anything about the server, so I'm guessing something got corrupted. (I like Eclipse, but for as long as I've used it, occasional moments where it corrupts itself into uselessness have just been part of the experience.)

Enable TLS1.2 on glassfish 3.1.2.2

给你一囗甜甜゛ 提交于 2020-01-06 15:50:09
问题 I want to enable TLS1.2 on glassfish 3.1.2.2 (build 5) with JDK7, I know JDK7 enables TLSv1.2, TLSv1.1, TLSv1 (default) and SSLv3. I have upgraded the JDK version to JDK7 from JDK6, i'm connecting to glassfish server via SOAPUI client ( SOAPUI enabled TLS1.2 by setting -Dsoapui.https.protocols=TLSv1.2) to test a webservice application. Following error is returning from server. ERROR:javax.net.ssl.SSLHandshakeException: Server chose TLSv1, but that protocol version is not enabled or not

Enable TLS1.2 on glassfish 3.1.2.2

情到浓时终转凉″ 提交于 2020-01-06 15:49:08
问题 I want to enable TLS1.2 on glassfish 3.1.2.2 (build 5) with JDK7, I know JDK7 enables TLSv1.2, TLSv1.1, TLSv1 (default) and SSLv3. I have upgraded the JDK version to JDK7 from JDK6, i'm connecting to glassfish server via SOAPUI client ( SOAPUI enabled TLS1.2 by setting -Dsoapui.https.protocols=TLSv1.2) to test a webservice application. Following error is returning from server. ERROR:javax.net.ssl.SSLHandshakeException: Server chose TLSv1, but that protocol version is not enabled or not

How to change response before send

末鹿安然 提交于 2020-01-06 14:26:11
问题 Is it possible to intercept sending response to client, and send modified response in final ? I want to remove "WWW-Authenticate" header from Basic Auth response or change error code from 401 to 403 in wrong authentication case. P.S. I have the same problem: http://www.java.net/forum/topic/glassfish/glassfish/suppress-www-authenticate-header-if-basic-auth-fails 回答1: I tried use Filter with HttpServletResponseWrapper but my Filter was never called before JAAS Basic HTTP Authentication. I

How to change response before send

折月煮酒 提交于 2020-01-06 14:26:11
问题 Is it possible to intercept sending response to client, and send modified response in final ? I want to remove "WWW-Authenticate" header from Basic Auth response or change error code from 401 to 403 in wrong authentication case. P.S. I have the same problem: http://www.java.net/forum/topic/glassfish/glassfish/suppress-www-authenticate-header-if-basic-auth-fails 回答1: I tried use Filter with HttpServletResponseWrapper but my Filter was never called before JAAS Basic HTTP Authentication. I

glassfish/tomcat Java Server load class once

人走茶凉 提交于 2020-01-06 14:05:03
问题 I am using glassfish v2 but I've had the same problem in tomcat. Once the server starts, I see: sudo jmap -histo:live 14127 | grep KVStore 6222: 1 24 xxx.xxx.KVStore After a while of usage, I get: sudo jmap -histo:live 14127 | grep KVStore 7240: 1 24 xxx.xxx.KVStore 7360: 1 24 xxx.xxx.KVStore While I'm guessing this has something to do with how glassfish scales out, this is really problematic because I use the KVStore as an in memory storage class. It is a singleton class with a static

glassfish/tomcat Java Server load class once

笑着哭i 提交于 2020-01-06 14:01:45
问题 I am using glassfish v2 but I've had the same problem in tomcat. Once the server starts, I see: sudo jmap -histo:live 14127 | grep KVStore 6222: 1 24 xxx.xxx.KVStore After a while of usage, I get: sudo jmap -histo:live 14127 | grep KVStore 7240: 1 24 xxx.xxx.KVStore 7360: 1 24 xxx.xxx.KVStore While I'm guessing this has something to do with how glassfish scales out, this is really problematic because I use the KVStore as an in memory storage class. It is a singleton class with a static

Best way to schedule a job in glassfish/centos

喜你入骨 提交于 2020-01-06 08:24:09
问题 I need to run a daily job which will run once a day and get some data from a different database. The task is developed as an EJB. I tried the @Schedule with EJB, and it is working fine. But the issue is if there is a change in the schedule, the code has to be changed and the app to be redeployed. Is there a way to avoid this? May be by using configuration files etc. I am using JSF 2.2, glassfish3.4.2 in CentOS. 回答1: You can do this by creating your timer programmatically something like this .

Is it possible to have EJBs in domain1/lib using GlassFish?

…衆ロ難τιáo~ 提交于 2020-01-06 08:17:11
问题 I use GlassFish 4 web profile and I have the following interface and class. @Local public interface SomeService { ... } @Singleton public class SomeServiceBean implements SomeService { ... } When I put interface and class in .war archive (that is in domain1/autodeplay) everything works fine. However, when I put interface and class in separate .jar archive (that is in domain1/lib) then deploying war application I get: java.lang.RuntimeException: Cannot resolve reference Local ejb-ref name=com