问题标签 [glassfish-4.1]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
windows - Glassfish 4.1 jar 锁定在窗口中
我最近将 Glassfish 从 4.0 升级到 4.1,并且我使用的是 Windows 8.1。
现在,当我尝试取消部署/重新部署我的应用程序 (WAR) 时,asadmin 会无限期挂起。
问题是内部的所有 JARdomain1\applications\myapp\WEB-INF\lib
都被锁定,在 Glassfish 停止或杀死之前无法删除。
需要解决方法!
更新
该问题已归档GLASSFISH-21283。如您所见,解决它没有兴趣...
Glassfish-4.1.1 仍然不允许取消部署/重新部署......
也测试了 Payara,同样的问题......我放弃了。
但是还有一个问题:有多少人使用 glassfish 在 windows 上进行开发/生产?全世界十几个?
因为这是一个关键问题,一年多没有解决。
jakarta-ee - java.lang.NoSuchMethodError:com.google.common.collect.FluentIterable.toList()Lcom/google/common/collect/ImmutableList;
我将 Google Guava 库用于java.util.List<T>
Java EE 7 应用程序中的排序和过滤等任务。
下面给出了一个java.util.List<T>
基于 CDI bean 中的过滤器列表过滤 a 的示例。
嵌套类可用于java.util.List<T>
从 CDI bean 中过滤 a,如下所示。
保存过滤器列表的位置filters
在哪里。java.util.Map<String, Object>
以前在带有JSF Managed Beans的 Java EE 应用程序中(在 GlassFish 4.0 上)运行良好。
我将此应用程序迁移到带有CDI 托管 Bean的 GlassFish 4.1并发生以下异常。
我在两个应用程序上都使用 Guava 17.0(仔细检查)。
为什么番石榴不喜欢 CDI 豆。解决方案/解决方法可能是什么?
更新 :
我尝试将版本更改为 18.0,但没有发生任何新情况。
eclipse-luna - Glassfish 4.1 glassfish 工具 Eclipse Luna 部署错误
我最近升级了,即全新安装了 Eclipse Luna 和 Glassfish 4.1。这两个应用程序都是最新的。通过 Eclipse 部署 Java EE 应用程序失败,如果我通过 Glassfish-admin-console 进行标准部署,它可以工作。错误日志是:
堆栈跟踪:
jakarta-ee - javax.resource.ResourceException: MQRA:EC:Invalid connectionFactoryLookup xxx 在 MDB 的 ActivationSpec 中配置,找不到 JNDI 名称
我正在使用以下MessageDriven
bean 使用 GlassFish Server 4.1 将文本消息发送到 EJB(通过消息队列,而不是主题)。
内部web.xml
:
内部sun-web.xml
(IDE 坚持生成sun-web.xml
而不是生成glassfish-web.xml
。因此,我假设 GlassFish 4.1 喜欢sun-web.xml
文件):
尝试从例如 a 中引用这些资源@WebFilter
:
部署过程终止,但出现以下异常:
一个稍微修改过的bean,如下所示,
在具有相同配置的 GlassFish Server 4.0 上运行良好(不像它使用glassfish-web.xml
,而不是sun-web.xml
)。
需要进行哪些更改才能使其在 GlassFish Server 4.1 上运行?
cargo - 货物远程部署 Glassfish 4.1 失败 GlassFish 使用 100% CPU
GlassFih 4.1 和 Cargo 存在以下问题。
我尝试在远程 GlassFish 4.1 服务器上部署耳朵。没有成功... Maven 命令: mvn cargo:redeploy Glassfish 服务器占用 100% 的 CPU,仅此而已。Maven 进程仍然被阻止......我已经在远程 ubuntu 和远程 Windows 服务器上尝试过。
在具有 Glassfish 3.1.2.2 的同一远程服务器上,远程部署可以完美运行。
有没有人遇到同样的问题,并找到了解决方案?
我猜下面的货物配置没问题,因为它适用于 GF 3.1.2.2(部署客户端版本为 3.1.2.2,containerId 为 glassfish3x)。
hibernate - 休眠 4.3.6 + Glassfish 4.1 + JPA 2.1
我正在尝试在我的 Java EE 7 应用程序中从 EclipseLink 迁移到 Hibernate,并遇到了一些我无法弄清楚的问题。
这是我的环境:
- 玻璃鱼 4.1
- 休眠 4.3.6
- Java 1.8.0_20
我也在使用:
- EE 7
- CDI
- JPA 2.1
最终我们的目标是能够使用 Java 8 Streams 和 Lambdas,因为我们的应用程序有很多集合操作,而 EclipseLink 目前不支持 Streams。我们有另一个使用 Hibernate(在 Wildfly 上)运行的项目可以做到这一点,但希望我们可以迁移到 Hibernate 而不是交换整个 Java EE 应用程序服务器堆栈。
到目前为止,这是我所做的,但主要遵循这里的指导:https ://coderwall.com/p/e5fxrw
我已将所需的实体管理器 Hibernate jar 安装到我的 /glassfish/lib 目录中。
我在 persistence.xml 中修改了我的持久化单元,如下所示:
/li>
现在我得到的第一个异常是“java.lang.IllegalArgumentException:不是实体:......”但是我的类都用@Entity注释,并且在EclipseLink下工作。我认为我不应该用 exclude-unlisted-classes = false 列出我的类,并且真的很想避免这种情况。
编辑:根据 unwichtich 的建议,我尝试添加:
并在persistence.xml中单独指定PU中的类,没有任何改进。
感谢您的任何帮助。
jsf - Pages being processed are merely left blank half way through on errors/exceptions instead of forwarding to the error page specified in web.xml
In web.xml, I have the following configurations for a global error page.
When any exception occurs (that result in 500 internal server error), the request is expected to be dispatched to the error page specified but when an exception occurs, the page which is being processed is just left blank in half way through. It does not forward to the error page.
Configuring java.lang.Throwable
or java.lang.Exception
as follows,
also did not help anymore.
The full contents of web.xml :
Also tried on a blank project with only a single XHTML page and nothing other than error page configurations in web.xml. Pages are merely left blank half way through instead of forwarding to the error page, when an exception occurs (among other HTTP status, only 404 works).
How to dispatch to a specified error page, when any exception/error occurs?
Update 1 :
According to this question/answer, I added the context parameter javax.faces.FACELETS_BUFFER_SIZE
to web.xml to have 64KB buffer size but nothing new happened. It still does not forward to the error page, if an exception occurs. Pages are just partially processed and left blank in half way through, if an exception/error occurs. The exception stacktrace is only found on the server terminal and not on the web page (in case 500 internal server error). I deliberately make the application throw an exception to see, if it forwards to the error page.
Update 2 :
After setting the buffer size as mentioned in edit 1, I got the following exception at a certain time (when a request is redirected to a secured area after a successful login). So, I removed that parameter for now.
Update 3 :
I tried to increase the buffer size (100002400
that's too much) until the error java.lang.OutOfMemoryError: Java heap space
is issued. Therefore, the output buffer size should not be the problem.
In Ajaxical things, error pages by the way, are correctly rendered on errors during asynchronous requests by means of OmniFaces - org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory
configured in faces-config.xml
.
Perhaps, it could have been possible to see the cause of the problem, if I had configured error pages in the beginning - when I started the application and the application consequently had no much extra overhead that it currently has with many XHTML pages, CDI managed beans, EJB session beans etc but anyway I overwhelmed it.
Update 4:
I am now running the same application on WildFly 9.0.2 final. The problem remains unchanged.
java - Java Flight Recorder / Java Mission Control 中 GlassFish 的自定义事件
我读过 GlassFish 为 Java Flight Recorder (JFR) / Java Mission Control (JMC) 提供了自定义事件。
我尝试在 JMC 5.4 中查看从在 Java 7u67 中运行的 GlassFish 4.1 获得的 JFR 5.3 记录。录制是从命令行使用jcmd
. 我没有使用 JMX 或 MBean。
我看到了标准的 JFR 事件,但没有看到 GlassFish 的自定义事件。
GlassFish 是否真的有自定义 JFR 事件?如果是这样,它们是什么,我如何记录它们,以及如何查看它们?
谢谢。
这是一篇提到 GlassFish JFR 事件的文章:
http://www.infoq.com/news/2013/10/misson-control-flight-recorder
jakarta-ee - 访问 JAX-WS 服务时 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:272) 处的 java.lang.NullPointerException
在 Java EE 7 应用程序中实现 JAX-WS 服务时出现以下异常。
异常消息似乎非常特定于 GlassFish Server(我使用的是 4.1)。
测试场景:
CDI 托管 bean:
成员变量test
是没用的。它仅用于测试目的。
在 XHTML 页面中,只需test
像这样访问此字段,
以便@PostConstruct
可以调用标记为 的 bean 的方法。
在浏览器的地址栏中输入适当的 URL 时会发生异常。
这testBean.getSum(int, int)
是一个成功调用的远程 EJB 方法,当 bean 更改为单例 EJB 只是为了像这样的测试原因,
在这种情况下,getSum(int, int)
在关联的远程 EJB 中实际可用的代理方法被成功调用,并返回通过它提供的两个参数的总和。
java.lang.NullPointerException
当通过 XHTML 页面访问服务时,是什么让 GlassFish 想到?
glassfish - 命令启动域失败 glassfish 4.1
我通过 ssh 在我的 centos 服务器上成功安装了 glassfish 4.1,但我无法启动服务器。当我键入时,./asadmin start-domain
我在下面收到此错误。
有人可以帮忙吗?
谢谢。