Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

EJB and JMs cannot be resolved

843829Jun 10 2003 — edited Jun 10 2003
hello,

I was running an example of message bean driven and it worked.
I am on Windows XP, j2sdk 1.4.1_02, and jonas 3.1 and eclipse 2.1. all my classpath seem to be set correctly.
I use a ant script to compile it but when I run on the concole this is the same error.
But today nothing works when I am compiling the code I 've got the following error:

[javac] ----------
[javac] 1. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 34)
[javac] import javax.ejb.MessageDrivenBean;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.ejb cannot be resolved
[javac] ----------
[javac] 2. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 35)
[javac] import javax.ejb.MessageDrivenContext;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.ejb cannot be resolved
[javac] ----------
[javac] 3. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 36)
[javac] import javax.jms.JMSException;
[javac] ^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 4. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 37)
[javac] import javax.jms.Message;
[javac] ^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 5. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 38)
[javac] import javax.jms.MessageListener;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 6. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 39)
[javac] import javax.jms.TextMessage;
[javac] ^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 7. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 49)
[javac] public class MdbBean implements MessageDrivenBean, MessageListener {
[javac] ^^^^^^^^^^^^^^^^^
[javac] MessageDrivenBean cannot be resolved or is not a valid superinterface
[javac] ----------
[javac] 8. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 49)
[javac] public class MdbBean implements MessageDrivenBean, MessageListener {
[javac] ^^^^^^^^^^^^^^^
[javac] MessageListener cannot be resolved or is not a valid superinterface
[javac] ----------
[javac] 9. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 51)
[javac] private transient MessageDrivenContext mdbContext;
[javac] ^^^^^^^^^^^^^^^^^^^^
[javac] MessageDrivenContext cannot be resolved (or is not a valid type) for the field MdbBean.mdbContext
[javac] ----------
[javac] 10. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 78)
[javac] public void setMessageDrivenContext(MessageDrivenContext ctx) {
[javac] ^^^^^^^^^^^^^^^^^^^^
[javac] MessageDrivenContext cannot be resolved (or is not a valid type) for the argument ctx of the method setMessageDrivenContext
[javac] ----------
[javac] 11. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 80)
[javac] mdbContext = ctx;
[javac] ^^^^^^^^^^
[javac] mdbContext cannot be resolved
[javac] ----------
[javac] 12. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 107)
[javac] public void onMessage(Message message) {
[javac] ^^^^^^^
[javac] Message cannot be resolved (or is not a valid type) for the argument message of the method onMessage
[javac] ----------
[javac] 13. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 110)
[javac] TextMessage mess = (TextMessage)message;
[javac] ^^^^^^^^^^^
[javac] TextMessage cannot be resolved or is not a type
[javac] ----------
[javac] 14. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 110)
[javac] TextMessage mess = (TextMessage)message;
[javac] ^^^^^^^^^^^
[javac] TextMessage cannot be resolved or is not a type
[javac] ----------
[javac] 15. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbBean.java (at line 112)
[javac] }catch(JMSException ex){
[javac] ^^^^^^^^^^^^
[javac] JMSException cannot be resolved or is not a type
[javac] ----------
[javac] ----------
[javac] 16. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 34)
[javac] import javax.jms.Session;
[javac] ^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 17. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 35)
[javac] import javax.jms.TextMessage;
[javac] ^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 18. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 36)
[javac] import javax.jms.Topic;
[javac] ^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 19. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 37)
[javac] import javax.jms.TopicConnection;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 20. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 38)
[javac] import javax.jms.TopicConnectionFactory;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 21. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 39)
[javac] import javax.jms.TopicPublisher;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 22. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 40)
[javac] import javax.jms.TopicSession;
[javac] ^^^^^^^^^^^^^^^^^^^^^^
[javac] The import javax.jms cannot be resolved
[javac] ----------
[javac] 23. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 53)
[javac] static TopicConnectionFactory tcf = null;
[javac] ^^^^^^^^^^^^^^^^^^^^^^
[javac] TopicConnectionFactory cannot be resolved (or is not a valid type) for the field MdbClient.tcf
[javac] ----------
[javac] 24. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 54)
[javac] static TopicPublisher tp = null;
[javac] ^^^^^^^^^^^^^^
[javac] TopicPublisher cannot be resolved (or is not a valid type) for the field MdbClient.tp
[javac] ----------
[javac] 25. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 55)
[javac] static Topic topic = null;
[javac] ^^^^^
[javac] Topic cannot be resolved (or is not a valid type) for the field MdbClient.topic
[javac] ----------
[javac] 26. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 66)
[javac] tcf = (TopicConnectionFactory) ictx.lookup(conFactName );
[javac] ^^^
[javac] tcf cannot be resolved
[javac] ----------
[javac] 27. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 66)
[javac] tcf = (TopicConnectionFactory) ictx.lookup(conFactName );
[javac] ^^^^^^^^^^^^^^^^^^^^^^
[javac] TopicConnectionFactory cannot be resolved or is not a type
[javac] ----------
[javac] 28. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 67)
[javac] System.out.println("JMS client: tcf = " + tcf.toString());
[javac] ^^^
[javac] tcf cannot be resolved
[javac] ----------
[javac] 29. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 69)
[javac] topic = (Topic) ictx.lookup(topicName);
[javac] ^^^^^
[javac] topic cannot be resolved
[javac] ----------
[javac] 30. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 69)
[javac] topic = (Topic) ictx.lookup(topicName);
[javac] ^^^^^
[javac] Topic cannot be resolved or is not a type
[javac] ----------
[javac] 31. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 75)
[javac] TopicConnection tc = null;
[javac] ^^^^^^^^^^^^^^^
[javac] TopicConnection cannot be resolved or is not a type
[javac] ----------
[javac] 32. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 76)
[javac] TopicSession session = null;
[javac] ^^^^^^^^^^^^
[javac] TopicSession cannot be resolved or is not a type
[javac] ----------
[javac] 33. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 78)
[javac] tc = tcf.createTopicConnection();
[javac] ^^^
[javac] tcf cannot be resolved
[javac] ----------
[javac] 34. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 80)
[javac] session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^
[javac] Session cannot be resolved
[javac] ----------
[javac] 35. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 81)
[javac] tp = session.createPublisher(topic);
[javac] ^^
[javac] tp cannot be resolved
[javac] ----------
[javac] 36. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 81)
[javac] tp = session.createPublisher(topic);
[javac] ^^^^^
[javac] topic cannot be resolved
[javac] ----------
[javac] 37. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 90)
[javac] TextMessage message;
[javac] ^^^^^^^^^^^
[javac] TextMessage cannot be resolved or is not a type
[javac] ----------
[javac] 38. ERROR in C:\Java\Workspace\MDBTest\com\iratensolutions\test\MdbClient.java (at line 94)
[javac] tp.publish(message);
[javac] ^^
[javac] tp cannot be resolved
[javac] ----------
[javac] 38 problems (38 errors)
[javac] BUILD FAILED: file:C:/Java/Workspace/MDBTest/com/iratensolutions/test/build.xml:107: Compile failed; see the compiler error output for details.
Total time: 610 milliseconds

Thank you for your help
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 8 2003
Added on Jun 10 2003
1 comment
630 views