Adding external jars to the EJB project using the EAR content folder

综合编程 2018-03-14

i have EAR and an EJB project. I noticed eclipse (sts) creates and earContent folder so I assume this is where I need to add external jars.

I added my hibernate and log4j jars on this folder but my EJB classes cannot resolve Logger class and hibernate classes.

What's the correct way of adding these jars? or should I just add them to the EJB build path?

  • Add jars to ear project EarContent folder
  • In Eclipse Right click ejb project, Properties
  • Deployment Assembly - Manifest Entries - Add
  • Choose your jars to add, OK
  • OK
  • jars now added to manifest in ejb project, should work.

I'm looking at this in a project for the first time, I'd be very surprised if there wasn't a better solution to this that doesn't require Maven. The Java EE Tools - Update EAR Libraries option looks particularly suspicious, but doesn't seem to do the above. Note I'm on Helios still.


Windup 2.6.0 will count with duplicated applicatio... A great new feature is comming in Windup 2.6.0. In real life scenarios, if a company has multiple .ear applications, it's very likely that they w...
How do I access EJB implementing a remote interfac... I am using Netbeans 6.8 and Glassfish v3.0. I created an ejb module and created entity classes from database and then created stateless session bean...
重构系列(一) 一、背景 来公司四五个月了,一直接手会员的相关项目,其实我们知道,会员属于公共模块,由于公司项目都很老了,大部分都是ejb,但是ejb现在已经不可维护,之前的代码做了各种封装,着实沉重,基本属于没办法修改的状态,所以几年前就开始慢慢去ejb,但是由于控制不好,造成了版本众多,五花八门,接口...
Coding EJB clients for JBoss EAP 7.1 Coding EJB clients for JBoss EAP 7.1 Posted on June 14, 2017 June 13, 2017 This article summarizes some new feature...
浅析“远程对象调用” 作者介绍:韩伟,1999年大学实习期加入初创期的网易,成为第30号员工,8年间从程序员开始,历任项目经理、产品总监。2007年后创业4年,开发过视频直播社区,及多款页游产品。2011年后就职于腾讯游戏研发部公共技术中心架构规划组,专注于通用游戏技术底层的研发。 要说“远程对象”,必先说“远...