英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论