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.

Hello, buddy!

责编内容by:Hello, buddy!阅读原文】。感谢您的支持!

您可能感兴趣的

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 ...
Load balancing problem on cluster EJB calls in Web... Our Application has 2 Clusters running in Weblogic 12 C. Each Cluster 4 Manage...
Coding EJB clients for JBoss EAP 7.1 Coding EJB clients for JBoss EAP 7.1 Posted byfmarchio@redhat.com on Ju...
EJB Vs Web Service? Performance View Well We have situation to decide now. I thought stackoverflow is best place t...
EJB基础知识 什么是EJB 可移植的, 可重用的, 可伸缩的业务应用程序的平台 为什么选择EJB 1. 易用性, 由EJB容器提供许多的服务, 开发人员只需...