glassfish-3

Accessing Hibernate Session from EJB using EntityManager

被刻印的时光 ゝ 提交于 2019-11-30 00:17:33
Is it possible to obtain the Hibernate Session object from the EntityManager? I want to access some hibernate specific API... I already tried something like: org.hibernate.Session hSession = ( (EntityManagerImpl) em.getDelegate() ).getSession(); but as soon as I invoke a method in the EJB I get "A system exception occurred during an invocation on EJB" with a NullPointerException I use glassfish 3.0.1 Sean Patrick Floyd Bozho and partenon are correct, but: In JPA 2, the preferred mechanism is entityManager.unwrap(class) HibernateEntityManager hem = em.unwrap(HibernateEntityManager.class);

“Certificate has expired” in log by starting Glassfish 3.1.2

自作多情 提交于 2019-11-29 21:30:34
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.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=Thread-2;|GlassFish Server Open Source Edition 3

Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive

送分小仙女□ 提交于 2019-11-29 18:09:10
i am working on Java project ,which is using GlassFish server.there is no error in project but when i tried to run it ,it is showing this error_ SEVERE: DPL8015: Invalid Deployment Descriptors in Deployment descriptor file WEB-INF/web.xml in archive [web]. Line 9 Column 22 -- cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point. SEVERE: DPL8005: Deployment Descriptor parsing failure : cvc-complex-type.2.4.d: Invalid content was found starting with element 'description'. No child element is expected at this point.

How Do I Use @ConversationScoped

雨燕双飞 提交于 2019-11-29 17:42:17
问题 I am writing a JSF 2.0 application, and I want to use CDI annotations instead of the "equivalent" JSF annotations. In other words, @Model or @Named instead of @ManagedBean, and @Inject instead of @ManagedProperty. The only thing I cannot get to work is @ViewScoped which is necessary for AJAX components. The only reliable work-around is to use @SessionScoped, which is not a good practice. What is the correct practice? As much as I search I just get more confused. This is on GlassFish 3.1.1,

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

微笑、不失礼 提交于 2019-11-29 16:09:59
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 running the portal I am getting FileNotFound Error, since the file is not present in glassfish domain. Is

How to configure GlassFish logging to show milliseconds in timestamps?

烈酒焚心 提交于 2019-11-29 11:54:15
I have to admit, configuring logging has me a bit baffled :(..., so I hope that someone here can help. Basically, I need to configure the logging to server.log so that the timestamps include milliseconds. The thing is, it looks like the default logging.properties is configured for that, but the actual log messages don't look anything like the format string that is the logging.properties, so I can't figure out: 1) What (file) exactly is controlling the log format messages in server.log 2) What do I need to change in, presumably the GlassFish logging.properties, to use the format that is in

Netbeans deployment fails after class rename

别说谁变了你拦得住时间么 提交于 2019-11-29 10:36:24
I am writing a test client for a webservice. It's a Netbeans 6.9.1 WebApplication using JSF framework. I have one managed bean that calls the webservice. Everything worked fine until I noticed a typo in my bean class name. It was serviceBean and I renamed it to ServiceBean with first letter upper case. I used safe rename function of Netbeans and both the filename and class signature changed as expected. But from then I had a lot of trouble running my application on Glassfish 3.0.1. I can build my application from Netbeans without error (even "Clean & Build"). But if I deploy there is the

access a Local Session Bean from another EAR?

人盡茶涼 提交于 2019-11-29 08:35:18
How can I call a Local Session Bean inside an EAR from another EAR, both deployed in the same Glassfish v3 domain? This is the structure: Glassfish v3 Domain1 EAR1 EAR1-EJB.jar class TestSessionBean <-- @Stateless common.jar interface TestSessionLocal <-- @Local EAR2 EAR2-EJB.jar class TestSessionBeanClient <-- @Singleton, @LocalBean common.jar interface TestSessionLocal <-- @Local TestSessionBean implements TestSessionLocal, boths EARs has common.jar. I need to use TestSessionBean from TestSessionBeanClient. I would like to take advantage of local session bean because of performance. I know I

How do I upgrade the JSF API in GlassFish?

时光毁灭记忆、已成空白 提交于 2019-11-29 07:29:21
I downloaded binary which has javax.faces-2.1.13 as the latest binary release. I want to upgrade my GlassFish JSF library but it has jsf-api-jar and other impl. How do I update and where do I download the jars? Just replace both jsf-api.jar and jsf-impl.jar in the Glassfish /modules folder by the single javax.faces.jar file. Since Mojarra 2.1.6 the build system has been changed to comply Java EE Maven rules, see also issue 2028 . This resulted in the API and impl being merged into a single JAR file. if you having some issues after replacing faces files in glassfish/modules folder, like non

Where should beans.xml be placed?

扶醉桌前 提交于 2019-11-29 05:18:11
问题 I've just upgraded to NetBeans 7.1 from 7.0. On opening a JSF managed bean it "helpfully" told me that it couldn't find my beans.xml file so would I like it created for me. I knew I had a beans.xml file under WEB-INF but I said yes anyway to see what happened. A new beans.xml was created under META-INF for me. Thinking I'd made a mistake I deleted the file under WEB-INF only to have my application fail at start up. Putting beans.xml back into WEB-INF fixed that problem. This page seems to