glassfish-4

Is @javax.annotation.ManagedBean a CDI bean defining annotation?

前提是你 提交于 2020-02-03 04:59:04
问题 The Question Given that the archive we deploy is an "implicit bean archive" (see below), using @javax.inject.Inject to inject a @javax.annotation.ManagedBean into another managed bean work in WildFly 8.1.0, but it won't work in GlassFish 4.0.1-b08 nor GlassFish 4.1-b13. GlassFish crash with this message: WELD-001408: Unsatisfied dependencies for type... Do I misunderstand the following outlined specifications or do GlassFish have a bug? CDI 1.1 Part 1 CDI 1.1 (JSR-346) section 12.1 "Bean

Proper format for log4j2.xml RollingFile configuration

一笑奈何 提交于 2020-01-25 03:07:26
问题 I am getting the following exception in my glassfish 4 application that uses log4j2: SEVERE: ERROR StatusLogger Invalid URL C:/glassfish4/glassfish/domains/domain1/config/log4j2.xml java.net.MalformedURLException: Unknown protocol: c I have the following section in my log4j2.xml: <RollingFile name="RollingFile" fileName="C:/glassfish4/glassfish/domains/domain1/logs/ucsvc.log" filePattern="C:/glassfish4/glassfish/domains/domain1/logs/$${date:yyyy-MM}/ucsvc-%d{MM-dd-yyyy}-%i.log"> I understand

Java EE 7 GlassFish 4.0 Restful Webservices using and Netbean and deploying on Glassfish 4.0

五迷三道 提交于 2020-01-21 09:10:06
问题 I have followed this Tutorial to Create simple Java EE 7 Webservices using Netbean 7.3.1. I have Glassfish 4.0 running with Netbeans. I ran project successfully without any problem. Next Step is to Deploy Webservice project on standalone version of GlassFish 4.0 webserver. So I can run it without Netbeans. Using Glassfish web interface on http://localhost:4848 , and navigating Common Taks -> Applications -> Deploy I browse using ("packaged file to be uploaded to the server") and Select the

glassfish 4 & MySQL & JSTL

丶灬走出姿态 提交于 2020-01-17 08:27:46
问题 I'm using Netbeanse 7.3.1 + Glassfish 4. I wrote simple web application using JSTL <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%> <sql:query var="txt" dataSource="jdbc/mrm_db"> SELECT * FROM T2 </sql:query> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <table> <c:forEach

Obtaining initial context from remote client

一笑奈何 提交于 2020-01-17 05:21:07
问题 Please see the code below: Context ctx = null; ctx=new InitialContext(); TestEJBRemote t = (TestEJBRemote) ctx.lookup("java:global/EJBTest/EJBTest-ejb/TestEJB"); System.out.println(t.getName("Ian")); The output is what I expect i.e. Hello Ian. The code above assumes that the client is installed on the same computer as the Glassfish instance. How do I get the same result from a remote application client. I have tried this: Context ic = new InitialContext(); TestEJBRemote t = (TestEJBRemote) ic

Java EE 7 Application not deploying on Glassfish 4 Sever after switching from Mojarra to MyFaces

こ雲淡風輕ζ 提交于 2020-01-16 07:16:08
问题 Currently we have a problem when we try to deploy our Java EE 7 application to a glassfish 4.0 server. Before we changed the JSF implementation from JSF Mojarra 2.2.0 to MyFaces 2.2.2 it worked pretty well. Heres the error log: >2014-03-24T16:05:42.356+0100|Schwerwiegend: Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI? 2014-03-24T16:05:42.357+0100|Schwerwiegend: Die Anwendung wurde bei Systemstart nicht einwandfrei

Java EE 7 Application not deploying on Glassfish 4 Sever after switching from Mojarra to MyFaces

狂风中的少年 提交于 2020-01-16 07:16:05
问题 Currently we have a problem when we try to deploy our Java EE 7 application to a glassfish 4.0 server. Before we changed the JSF implementation from JSF Mojarra 2.2.0 to MyFaces 2.2.2 it worked pretty well. Heres the error log: >2014-03-24T16:05:42.356+0100|Schwerwiegend: Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI? 2014-03-24T16:05:42.357+0100|Schwerwiegend: Die Anwendung wurde bei Systemstart nicht einwandfrei

Bug in GlassFish 4 or Tyrus: Decoder#willDecode is called twice for each ByteBuffer?

…衆ロ難τιáo~ 提交于 2020-01-15 12:25:09
问题 I wrote the most simple application that uses WebSockets. My back end is GlassFish 4 build 89, my front end is a JavaFX 2.2 application client that uses Tyrus 1.0 RC3, the reference implementation of Java API for WebSockets. GlassFish uses Tyrus too although I've been to lazy to lookup exactly what version is included in GlassFish build 89. My test of the WebSocket API sent a java.util.Date back and forth, nothing more. Well, as a binary object should be added. So I wrote my own Decoder that

Invalid URL Pattern When Deploying To Glassfish 4.1

…衆ロ難τιáo~ 提交于 2020-01-14 17:01:12
问题 I had a web filter to redirect from the login and index page if the user was already authenticated. Originally I had an invalid URL pattern. I fixed the invalid pattern and attempted to redeploy only to receive this: java.lang.IllegalArgumentException: Invalid URL Pattern: [{0}] at org.glassfish.web.deployment.node.WebResourceCollectionNode.setElementValue(WebResourceCollectionNode.java:136) I checked around in my application to see if I was missing something or had typed something else wrong

Retrieve object add in JAAS login module from JSF managedbean

那年仲夏 提交于 2020-01-07 04:51:27
问题 Our application uses JSF 2.2 and use glassfish 4 as the server. I need to add some object in the login module during authenticate user, so in the web application, the managed bean can retrieve that object. In the loginModule I did the following (if it is not the case please tell me the right way to do): _subject.getPublicCredentials().add(someObject); But how can I retrieve it in ManagedBean. Any help will be much appreciated. 回答1: This is part of the JSR-115 specification JavaTM