Results 1 to 2 of 2

Thread: Jms

  1. #1
    asso7 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

    Default Jms

    Hi!
    I have a problem with JMS!
    I use javax.annotation.Resource to obtain reference in this way:
    @Resource(mappedName = "jms/TopicConnectionFactory")
    private static TopicConnectionFactory connectionFactory;
    @Resource(mappedName = "jms/Topic")
    private static Topic topic;

    If i use this annotations in class MAIN... and Then I pass references to publisher and subscriber... there aren't problems !

    But if I use this annotations directly into the classes publisher and subscriber... i have this error:

    java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.glassfish.appclient.client.acc.AppClientContai ner.launch(AppClientContainer.java:424) at org.glassfish.appclient.client.AppClientFacade.mai n(AppClientFacade.java:134) Caused by: java.lang.NullPointerException at manager.Publisher.<init>(Publisher.java:35) at manager.Subscriber.<init>(Subscriber.java:42) at manager.MainManager.main(MainManager.java:35) ... 6 more Java Result: 1

    help, please!

  2. #2
    asso7 is offline Member
    Join Date
    Jan 2011
    Posts
    2
    Rep Power
    0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •