Thank you Tim. A cautious, 'Yes'!
glassfish wrote:
>
> Notice the connection error message near the top of the stack trace refers
> to programmer1 and 3700. Using an appclient command launch these values
> come from sun-acc.xml. Make sure that the <target-endpoint> setting in
> that file is correct for your set-up and that the client system can
> resolve the host name as specified there.
>
I realized from what you said that since I am trying to make contact with
the network server rather than my PC I had to set the '<target-server' to
point at my network server.
Now that I did that the appserver has been 'found'. And now I am back to
the other situation you previously commented that I needed to be sure I have
pointed to the main class name. Here is a clip of my code followed by the
stacktrace when I ran it (NOTE: I removed the two System.setProperty lines I
noted that I had previously added). I recognize this is very close to the
same stacktrace you commented on before, but I included the -mainclass
option for this run and got pretty much the same result. Now what do I look
for?
Thank you for your help in advance.
rdb
package com.company.jms;
.
.
.
public class ProducerAppClient
{
// Injects resources for a connection factory, queue, and topic:
@Resource(mappedName = "jms/AdminConnectionFactory")
private static ConnectionFactory connectionFactory;
@Resource(mappedName = "jms/Queue")
private static Queue queue;
@Resource(mappedName = "jms/Topic")
private static Topic topic;
/**
* ProducerAppClient method.
*
* @param args the queue used by the example and,
* optionally, the number of messages to send
*/
public static void main(String[] args) throws NamingException
{
final int NUM_MSGS;
Connection connection = null;
C:\AppTest\appclient\bin>appclient -client
C:\source\projects\JMS\ProducerAppClient\dist\ProducerAppClient.jar
-mainclass com.company.jms.ProducerAppClient queue 7
Jan 15, 2008 12:46:33 PM com.sun.enterprise.appclient.MainWithModuleSupport
<init>
WARNING: ACC003: Application threw an exception.
java.lang.RuntimeException: Error checking for persistence unit annotations
in the main class
at
com.sun.enterprise.appclient.StandAloneAppClientInfo.classContainsAnnotation(StandAloneAppClientInfo.java:101)
at
com.sun.enterprise.appclient.AppClientInfo.mainClassContainsPURefcAnnotations(AppClientInfo.java:413)
at
com.sun.enterprise.appclient.AppClientInfo.appClientDependsOnPersistenceUnit(AppClientInfo.java:382)
at
com.sun.enterprise.appclient.AppClientInfo.completeInit(AppClientInfo.java:175)
at
com.sun.enterprise.appclient.AppClientInfoFactory.buildAppClientInfo(AppClientInfoFactory.java:149)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:366)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.NullPointerException
at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)
at java.util.jar.JarFile.getInputStream(JarFile.java:383)
at
com.sun.enterprise.deployment.util.AnnotationDetector.containsAnnotation(AnnotationDetector.java:152)
at
com.sun.enterprise.appclient.StandAloneAppClientInfo.classContainsAnnotation(StandAloneAppClientInfo.java:99)
... 7 more
Exception in thread "main" java.lang.RuntimeException:
java.lang.RuntimeException: Error checking for persistence unit annotations
in the main class
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:454)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: java.lang.RuntimeException: Error checking for persistence unit
annotations in the main class
at
com.sun.enterprise.appclient.StandAloneAppClientInfo.classContainsAnnotation(StandAloneAppClientInfo.java:101)
at
com.sun.enterprise.appclient.AppClientInfo.mainClassContainsPURefcAnnotations(AppClientInfo.java:413)
at
com.sun.enterprise.appclient.AppClientInfo.appClientDependsOnPersistenceUnit(AppClientInfo.java:382)
at
com.sun.enterprise.appclient.AppClientInfo.completeInit(AppClientInfo.java:175)
at
com.sun.enterprise.appclient.AppClientInfoFactory.buildAppClientInfo(AppClientInfoFactory.java:149)
at
com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:366)
... 2 more
Caused by: java.lang.NullPointerException
at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)
at java.util.jar.JarFile.getInputStream(JarFile.java:383)
at
com.sun.enterprise.deployment.util.AnnotationDetector.containsAnnotation(AnnotationDetector.java:152)
at
com.sun.enterprise.appclient.StandAloneAppClientInfo.classContainsAnnotation(StandAloneAppClientInfo.java:99)
... 7 more
--
View this message in context: http://www.nabble.com/Accessing-a-JMS-Resource-on-a-Remote-Server-tp14580977p14844220.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.