Failed to use the Glassfish server’s appclient to run the producer program

huangapple go评论70阅读模式
英文:

Failed to use the Glassfish server's appclient to run the producer program

问题

我正在使用NetBeans和Glassfish编写简单的Jakarta消息应用程序。我逐步按照教程"Jakarta EE 7教程"进行操作。在成功构建了所有"简单"示例之后,我在Windows终端中使用appclient -client target/producer.jar queue 3命令。然而无法发送消息。我正在使用Glassfish-5.0.1。似乎我不能使用appclient。有人能帮助我吗?

Jakarta EE 7/ 46.2编写简单的JMS应用程序

jakartaee-tutorial-examples-master\jakartaee-tutorial-examples-master\jms\simple\producer>appclient -client target/producer.jar queue 3
java.io.FileNotFoundException: C:\Users\?????ó\AppData\Local\Temp\acc7678140812900140496.dat (System cannot find the specified path)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileReader.<init>(FileReader.java:72)
        at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.optionsValue(AppClientContainerAgent.java:104)
        at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
        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:498)
        at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
        at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
英文:

I am writing simple jakarta messaging applications with NetBeans and Glassfish. I followed the tutorial "The Jakarta EE 7 Tutorial" step by step. After successfully building all the "simple" Examples, I use the appclient -client target/producer.jar queue 3 in my windows terminal. While Can't send the message.
I'm using Glassfish-5.0.1 . It looks like I can't use the appclient. Can anyone give me some help?

The Jakarta EE 7/ 46.2 Writing Simple JMS Applications

jakartaee-tutorial-examples-master\jakartaee-tutorial-examples-master\jms\simple\producer>appclient -client target/producer.jar queue 3
java.io.FileNotFoundException: C:\Users\?????ó\AppData\Local\Temp\acc7678140812900140496.dat (System cannot find the specified path。)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileReader.<init>(FileReader.java:72)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.optionsValue(AppClientContainerAgent.java:104)
at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
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:498)
at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)

答案1

得分: 1

文件未找到异常表示您要么没有指定正确的路径,要么提供了一个没有文件的路径供输入流读取。

英文:

File not found exception means you either did not have a correct specified path or you gave a path with no file for the inputstream to read.

huangapple
  • 本文由 发表于 2020年9月6日 11:56:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/63760569.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定