在GlassFish Server上创建和运行应用程序客户端

时间:2014-09-26 18:05:22

标签: java java-ee netbeans glassfish ejb

由于this example of Creating and Running an Application Client on the GlassFish Server无法启动,我使用Netbeans和Glassfish提交了错误:

https://netbeans.org/bugzilla/show_bug.cgi?id=247484

https://java.net/jira/browse/GLASSFISH-21215

如何运行appclient?

我按照tutorial建立了EAR。它按预期部署:

thufir@dur:~$ 
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin list-applications
Nothing to list.
No applications are deployed to this target server.
Command list-applications executed successfully.
thufir@dur:~$       
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin deploy NetBeansProjects/EntAppEJB/dist/EntAppEJB.ear 
Application deployed with name EntAppEJB.
Command deploy executed successfully.
thufir@dur:~$ 
thufir@dur:~$ glassfish-4.1/glassfish/bin/asadmin list-applications
EntAppEJB  <ear, appclient, ejb>  
Command list-applications executed successfully.
thufir@dur:~$  
Java Web Start(JWS)的

The JNLP file按照文档的说明启动和下载:

enter image description here

点击&#34;启动&#34;下载the JNLP

thufir@dur:~$  
thufir@dur:~$ ll Downloads/EntAppClient 
-rw-r--r-- 1 thufir thufir 40314 Sep 26 10:20 Downloads/EntAppClient
thufir@dur:~$ 
thufir@dur:~$ mv Downloads/EntAppClient Downloads/EntAppClient.jnlp
thufir@dur:~$ 

根据Glassfish文档:

  

Java Web Start

     

Java Web Start允许您的应用程序客户端   轻松启动并自动下载和更新。它是   默认情况下为所有应用程序客户端启欲获得更多信息,   请参阅使用Java Web Start。

GlassFish Server开源版 应用程序开发指南4.0版 第172页

  

下载并启动应用程序客户端

     

如果是Java Web Start   为已部署的应用程序客户端启用,您可以为其启动它   测试。只需单击应用程序旁边的“启动”按钮即可   客户端或应用程序在“应用程序客户端模块”页面上的列表   管理控制台。

GlassFish Server开源版 应用程序开发指南4.0版 第176页

然而,the JNLP fails to execute

UserError: ACC007

错误:

org.glassfish.appclient.client.acc.UserError: ACC007: The app client file /___JWSappclient/___app/EntAppEJB/EntAppEJBClient/EntAppClientClient.jar does not contain a manifest; the app client container cannot process it.  Embedded programs should pass URIs with scheme "jar:" for JAR files and scheme "file:" for directories.

请注意,该错误与EntAppClientClient.jar有关,而与EntAppClient.jar无关。

我可以在错误报告中提供哪些其他信息?我至少会链接到此问题并添加the JNLP和运行它的log of javaws。还有什么有用的呢?

Glassfish日志,或至少一部分:

[2014-09-26T10:25:29.424-0700] [glassfish 4.1] [SEVERE] [] [javax.enterprise.system.container.appclient] [tid: _ThreadID=27 _ThreadName=http-listener-1(4)] [timeMillis: 1411752329424] [levelValue: 1000] [[
  Adapter[/___JWSappclient/___app/EntAppEJB] EntAppEJBClient/EntAppClientClient.jar
java.lang.NullPointerException
    at org.glassfish.appclient.server.core.jws.servedcontent.StreamedAutoSignedStaticContent.process(StreamedAutoSignedStaticContent.java:119)
    at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.processContent(RestrictedContentAdapter.java:264)
    at org.glassfish.appclient.server.core.jws.RestrictedContentAdapter.serviceContent(RestrictedContentAdapter.java:228)
    at org.glassfish.appclient.server.core.jws.AppClientHTTPAdapter.service(AppClientHTTPAdapter.java:190)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:744)
]]

[2014-09-26T10:25:29.709-0700] [glassfish 4.1] [WARNING] [NCLS-CORE-00091] [javax.enterprise.system.core] [tid: _ThreadID=24 _ThreadName=http-listener-1(1)] [timeMillis: 1411752329709] [levelValue: 900] [[
  Unable to set customized error page
java.lang.NullPointerException
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:171)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:744)
]]

1 个答案:

答案 0 :(得分:1)

我建议使用glassfish 3.1和jdk 1.7_10这不需要签署您的应用程序。 我推荐这个或签署您的应用程序以在jdk 1.7 update 45或更高版本中工作。 来自墨西哥的问候