glassfish-4

injectionPoint.getBean() returns null if bean is an EJB bean in Java EE 7 (CDI 1.1)

扶醉桌前 提交于 2019-12-03 07:55:09
I want to get bean from producer method in order to read its properties. In some scenarios the bean is a EJB Singleton bean. I've simplified my code to focus on the problem. My simple qualifier: @Qualifier @Retention(RUNTIME) @Target({TYPE, METHOD, FIELD, PARAMETER}) public @interface InjectMe {} Simple producer: @Dependent public class SimpleProducer { @Produces @InjectMe public String getInjectMe(InjectionPoint ip) { // ip.getBean() returns null for some reason return "ip=" + ip + ", bean=" + ip.getBean(); } } EJB (Singleton): @Singleton @Startup public class SimpleSingleton { @Inject

Glassfish 4 server stops unexpectedly

落爺英雄遲暮 提交于 2019-12-03 07:38:07
I'm new to GlassFish, and to application servers in general. I have an Amazon EC2 instance running Ubuntu and have installed GlassFish 4. It starts up without problems, but after a while the GlassFish server just shuts down all by itself. I have looked through server.log, but everything seems normal, and there are no entries describing any failures or shut down. Any input on what can be the cause, or where I should look to find any clues? Hunternif I am facing the exact same situation. I suspected the reason was that JVM ran out of RAM, as the free EC2 instance has a niggard 600 MB ( cat /proc

the package javax.enterprise.context is missing after glassfish update

回眸只為那壹抹淺笑 提交于 2019-12-02 14:59:33
问题 this morning I used glassfish update tool to update the server when the process is finished I find that Eclipse can't recognize javax.enterprise.context package (CDI), how can I rollback installed updates?? http://im61.gulfup.com/uqpxlA.png 回答1: I delete the server and reinstalle it, now it works, Glassfish 4.1 Bug 回答2: javax.enterprise.context.SessionScoped is missing in Glassfish 4.1. It's a bug. 来源: https://stackoverflow.com/questions/26076613/the-package-javax-enterprise-context-is

How to deploy a war file in GlassFish 4 server Using Jenkins

不打扰是莪最后的温柔 提交于 2019-12-02 05:26:27
I am using Jenkins to deploy a war file in GlassFish 4 server.But unable to deploy war file in Glassfish 4 server. I am following below process. But it gives following error at the build time. ERROR: Build step failed with exception org.codehaus.cargo.util.CargoException: Cannot create the DeploymentManager at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.getDeploymentManager(AbstractJsr88Deployer.java:356) at org.codehaus.cargo.container.spi.deployer.AbstractJsr88Deployer.redeploy(AbstractJsr88Deployer.java:192) at hudson.plugins.deploy.CargoContainerAdapter.deploy

Unable to find or serve resource

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 04:06:56
问题 I am making a webapplication with Java EE 6 and Primefaces on a Glassfish 4 server. I keep getting the same annoying error more and more often. I have tried to Google this problem, but I hav not yet found a solution that works. Sometimes the application will perform with no problems at all, but then suddenly this same error occurs over and over again. This is my Stack trace: WARNING: JSF1064: Unable to find or serve resource, charts/charts.js, from library, primefaces. WARNING: java.io

Windows Client and Linux (Ubuntu) server

谁说我不能喝 提交于 2019-12-02 03:56:28
问题 Update The problem appears to be related to the fact that the Ubuntu Operating System is virtualized i.e. I have used Vmware Workstation to create a host Operating system (Windows) and a guest operating system (Ubuntu). When I deploy the EJB to Glassfish on the host (Windows); I can lookup the EJB using a servlet client on either the host (Windows) or the guest (Ubuntu). I can also specify the settings for either the host or the guest to find the EJB. I believe this is what the issue is i.e.

Unable to find or serve resource

跟風遠走 提交于 2019-12-02 00:44:17
I am making a webapplication with Java EE 6 and Primefaces on a Glassfish 4 server. I keep getting the same annoying error more and more often. I have tried to Google this problem, but I hav not yet found a solution that works. Sometimes the application will perform with no problems at all, but then suddenly this same error occurs over and over again. This is my Stack trace: WARNING: JSF1064: Unable to find or serve resource, charts/charts.js, from library, primefaces. WARNING: java.io.IOException: java.util.concurrent.TimeoutException at org.glassfish.grizzly.utils.Exceptions.makeIOException

Adding glassfish Server in Eclipse Kepler error

天涯浪子 提交于 2019-12-01 23:08:39
I am trying to add Glassfish-4 server to Eclipse in order to be able to run applications on this server, but at the final step in "new Server" wizard, finished or next buttons are disabled and a message says: to enable Install Server, enter a path to a new directory.. The Glassfish server is found on the given path. I can't add images because I don't have reputation, but here are the links: http://tinypic.com/view.php?pic=18yck1&s=5#.Umeq3vmnosY http://tinypic.com/view.php?pic=13yezcm&s=5#.UmeqOPmnosY Your help is apreciated. Probably a problem with your JDK... I think you have to download a

What is the correct way to get parameter from URL in JSF

纵然是瞬间 提交于 2019-12-01 20:43:40
问题 Here my JSF page: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> <f:metadata> <f:viewParam name="id" value="#{productDetailBean.id}" /> </f:metadata> <h:head> <title>Facelet Title</title> </h:head> <h:body> <h:outputText value="1=#{productDetailBean.id}" /> <br/> <h:outputText value="2=#{param['id']}" /> <br/> <h:outputText value="3=#{productDetailBean.param}" /> </h:body> </html> And bean import java.io.Serializable

How do I use Glass fish server with eclipse luna for Java EE?

馋奶兔 提交于 2019-12-01 19:21:42
I thought that Glass Fish server came with Eclipse when you install the Glass fish tools for Java EE. However, after trying to install the Glass fish tools, it said there was nothing to update. Ok, so when I try to start the server, it asks for the server root. Does the glass fish server come with Eclipse? If so, how would I locate it? Or if I need to install it on my computer, which I did, why does it not recognize the folder where I installed Glass fish server as a valid installation of Glass Fish Server? Thanks in advance for any help, Bruce Download the Glassfish4 and extract it. When