glassfish-3

ClassCastException in JPA Entitiy after redeploy (Glassfish 3.1.2)

拜拜、爱过 提交于 2019-12-06 03:52:31
问题 I have a strange effect when undeploying and deploying a WebArchive (.war) with Glassfish 3.1.2. $ asadmin undeploy myWebApp; asadmin deploy target/myWebApp.war It deploys normally, but when I fetch an entity bean via the entity manager, it throws an Exception: [#|2012-12-11T15:26:09.772+0100|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=119;_ThreadName=Thread-2;|java.lang.ClassCastException: org.YourEntity cannot be cast to org.YourEntity The

Use Glassfish JMS from remote client

时光毁灭记忆、已成空白 提交于 2019-12-06 03:34:50
问题 I have glassfish installed on a server with a JMS ConnectionFactory set up jms/MyConnectionFactory with a resource type or javax.jms.ConnectionFactory. I now want to access this from a client application on my local machine for this I have the following: public static void main(String[] args) { try{ Properties env = new Properties(); env.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory"); env.setProperty("java.naming.factory.url.pkgs", "com.sun

How to upgrade the hibernate-validator 4.3.0.Final to the Glassfish 3.1.2?

﹥>﹥吖頭↗ 提交于 2019-12-06 03:31:25
问题 At the moment, the Hibernate Validator has released the latest version as 4.3.0.Final here. I have tried to upgrade it to my Glassfish 3.1.2 as the following step: - 1. Remove the GLASSFISH/glassfish/modules/bean-validator.jar 2. Copying the hibernate-validator-4.3.0.Final.jar to GLASSFISH/glassfish/modules 3. Restart the Glassfish 4. The Glassfish cannot start. It seems hang. After searching via the Google, I've found that the file named "bean-validator.jar" was created by the Glassfish team

Glassfish to Syslog

房东的猫 提交于 2019-12-06 03:17:42
I'm struggling to make Glassfish 3.1.1 to log to syslog, but I'm unable to. I don't know if it's a bug, but I don't even know how to debug it. First and obvious step: I checked the box on the administration console to write to system log, and after I also marked the checkbox write to system console. None of them worked. I checked the logging.properties and this line is there com.sun.enterprise.server.logging.SyslogHandler.useSystemLogging=true Googling I found a few people complaining with abandoned questions. Is there anything else I should do or I have to write a custom log handler to do

How do I bind web service to a particular glassfish port?

倾然丶 夕夏残阳落幕 提交于 2019-12-06 02:55:18
问题 I have Glassfish 3.1.1 (Metro JAX-WS stack) installation with several http listeners in my domain's virtual server. When I deploy my EAR, web application and soap services are all bound to all available http listeners whereas I want them to be held by different listeners, each having it's own performance and connection pool setup. I believed that sun-web.xml should be responsible for that sort of binding but I haven't found any options of binding service to specific port or virtual server.

Learning resource for Configuring Hibernate JPA 2.0 on Glassfish server

北慕城南 提交于 2019-12-06 00:39:44
I am trying to create a new Java EE project using hibernate and JPA 2.0 on the glass fish server. Can you guys provide me some resources to configure the above so that they work seamlessly? I have tried using netbeans and generated the persistence unit by using the hibernate provider, but I end up getting this error: javax.persistence.PersistenceException: [PersistenceUnit: DBAppPU] Unable to build EntityManagerFactory Pascal Thivent First, install Hibernate support via the update tool (or follow the manual procedure ). Second, provide a JPA 2.0 persistence.xml to use Hibernate as JPA provider

Consuming local EJB, in the same Container but different ears

自古美人都是妖i 提交于 2019-12-05 23:31:19
问题 I'm triying to consume a Local EJB in the same Glassfish, but different ears. But Glassfish can't found the local EJB or can't consume I read this: According to the JavaEE tutorial, the client of a @Local bean "must run in the same JVM as the enterprise bean it accesses." In the first ear , I have the local Interface inside a jar @Local public interface MyLocalBean { int getNumber(int num3); } In another jar, I have the implementation @Stateless @LocalBean public class MyLocalBeanImpl

“PWC3999: Cannot create a session after the response has been committed” [duplicate]

蓝咒 提交于 2019-12-05 22:13:42
This question already has answers here : Adding <h:form> causes java.lang.IllegalStateException: Cannot create a session after the response has been committed (5 answers) Closed 3 years ago . I'm having this weird problem with one of the pages of my application. It's throwing the error I mention on the title: PWC3999: Cannot create a session after the response has been committed I've checked other posts regarding this subject, but I don't see anything that applies to this situation, because no new Servlet/Filter was added to the application and the error just started after some minor changes

can I use CDI injection into quartz-scheduler jobs?

左心房为你撑大大i 提交于 2019-12-05 20:27:26
I'm using Glassfish and CDI for injection, (mostly) successfully. I can't seem to get Quartz jobs to work with injection- beans annotated with @Inject never get injected. Is Quartz using some kind of different classloader that's preventing injection from happening? I'm configuring Quartz like so in my web.xml: <context-param> <param-name>quartz:config-file</param-name> <param-value>quartz.properties</param-value> </context-param> <context-param> <param-name>quartz:shutdown-on-unload</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>quartz:wait-on

How to change domain name in Glassfish generated urls?

*爱你&永不变心* 提交于 2019-12-05 19:51:20
my Glassfish instance uses my Windows computer name as domain name in urls, as so : http://mymachine-567125f:8080/TemplateEJBService/TemplateEJB Obviously, mymachine-567125f is not known of any DNS, and as a consequence, url directly leads to the deepest void of intergalactic space. So, is there a way to tell glassfish to instead use localhost , or even my ip address, for its generated urls ? Matt Handy's answer did not work for me. However, the solution that Matt gave in his comment to his answer did the trick. I'm repeating it here to give it more weight. There are two ways to do this: Set