无法部署到基于glassfish 4.1的集群?

时间:2014-11-17 13:37:33

标签: java java-ee deployment glassfish ejb

我在为EJB异步计时器配置GlassFish 4.1集群时遇到问题。每当我尝试发布我的应用程序时,我都会遇到以下错误:

Error occurred during deployment: Exception while deploying the app [APP-EAR-1.0] :
Failed to create automatic timers for AsyncTimer -- EJB Timer Service is not available. 
Please see server.log for more details

最后我以某种方式设法让这个工作好了一段时间,但它确实是尝试和错误。我确信我知道我做了什么......现在当我试图记录服务器安装程序时,在我从头开始在单独的一组机器上安装集群后,我再次遇到了问题: 当我将相同的应用程序发布到新的glassfish 4.1集群时,我得到了同样的错误:

Failed to create automatic timers for AsyncTimer

我不知道是什么原因。我逐步复制了工作glassfish集群中的所有设置。我为计时器分配了单独的连接池。我在数据库中有额外的表

CREATE TABLE public."EJB__TIMER__TBL" (
  "CREATIONTIMERAW" BIGINT NOT NULL,
  "BLOB" BYTEA,
  "TIMERID" VARCHAR(255) NOT NULL,
  "CONTAINERID" BIGINT NOT NULL,
  "OWNERID" VARCHAR(255),
  "STATE" INTEGER NOT NULL,
  "PKHASHCODE" INTEGER NOT NULL,
  "INTERVALDURATION" BIGINT NOT NULL,
  "INITIALEXPIRATIONRAW" BIGINT NOT NULL,
  "LASTEXPIRATIONRAW" BIGINT NOT NULL,
  "SCHEDULE" VARCHAR(255),
  "APPLICATIONID" BIGINT NOT NULL,
  CONSTRAINT "PK_EJB__TIMER__TBL" PRIMARY KEY("TIMERID")
) 
WITH (oids = false);

我在日志文件中发现以下错误:

java.io.FileNotFoundException: /opt/glassfish4/glassfish/nodes/test-1-node/test-instance-1/config/noop=true (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at org.apache.felix.gogo.shell.Shell.readScript(Shell.java:218)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:82)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:469)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:395)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.felix.gogo.shell.Activator.run(Activator.java:75)
at java.lang.Thread.run(Thread.java:745)]]

有没有办法在不需要发布应用程序的情况下启动EJB计时器,因此我可以更轻松地诊断出问题的原因? 或者,您可以建议如何使此集群按原样启动EJB计时器。

希望你能帮助我,我非常感谢你的帮助。

1 个答案:

答案 0 :(得分:0)

看起来像this GlassFish 4.1错误。您可以尝试使用GlassFish 4.0或4.0.1进行相同的设置,以查看它是否正常工作。

但是,您是否确保更改了DAS上的JDBC资源jdbc/_TimerPool以引用您的群集数据库并可用于特定群集?这是必须的。