{"id":5538,"date":"2014-03-30T23:50:08","date_gmt":"2014-03-30T23:50:08","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-do-i-add-ejb-capabilities-to-an-eclipse-dynamic-web-project-collection-of-common-programming-errors\/"},"modified":"2014-03-30T23:50:08","modified_gmt":"2014-03-30T23:50:08","slug":"how-do-i-add-ejb-capabilities-to-an-eclipse-dynamic-web-project-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/how-do-i-add-ejb-capabilities-to-an-eclipse-dynamic-web-project-collection-of-common-programming-errors\/","title":{"rendered":"How do I add EJB capabilities to an Eclipse dynamic web project?-Collection of common programming errors"},"content":{"rendered":"<p>I am developing a simple application with EJB 3.0 using OpenEJB for deployment and Eclipse as an IDE.<\/p>\n<p>I created the project as a &#8216;dynamic web application&#8217; in Eclipse. When I tried creating the first stateless session bean, I realized that the @Remote annotation could not be resolved.<\/p>\n<p>What is the right way to fix this problem ?<\/p>\n<ol>\n<li>Delete the project and create a new &#8216;enterprise application project&#8217; (this seems to be pretty heavy weight, so I am not sure I want to go in this direction) ?<\/li>\n<li>Delete the project and create an EJB project (this does not seem to be right because I believe such a project will only let me bundle the EJB part of the application) ?<\/li>\n<li>Add some libraries to my existing project (is there a library pack for EJB 3.x) ?<\/li>\n<li>Add a facet to my existing project (I tried to see if I can add a facet, but I cannot see an EJB facet within the context of this project) ?<\/li>\n<\/ol>\n<p>Thanks for helping.<\/p>\n<p><strong>Update:<\/strong> I found the answer.<\/p>\n<p>TomEE&#8217;s installation has a directory containing all the jar files needed to compile and run EJB&#8217;s &#8216;apache-tomee-webprofile-1.0.0-beta-2\/webapps\/openejb\/lib&#8217;<\/p>\n<p>I created a User Library in Eclipse containing all the jars from the lib folder described above and added it to the build path.<\/p>\n<p>The EJB interfaces now compile properly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am developing a simple application with EJB 3.0 using OpenEJB for deployment and Eclipse as an IDE. I created the project as a &#8216;dynamic web application&#8217; in Eclipse. When I tried creating the first stateless session bean, I realized that the @Remote annotation could not be resolved. What is the right way to fix [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5538","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5538","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5538"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5538\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}