java-ee – What dependencies do I need to add to Glassfish folders?


Hey guys!

I'm using the Hibernate framework in my JSF project. On the computer I'm developing everything is fine, running, however, when I try to deploy it on the glassfish server on another machine, it starts to give some errors saying that the classes don't have X and Y methods and so on. My question is, if I've already added the jars to the project's buildpath, do I need to insert them in the glassfish folder as well? In which folder would it be? Do I just add Hibernate libraries or jBoss libraries too?



It is necessary that you encapsulate all the external libs you use in your project, that is, link them in your build generation, or use an automated build manager (Maven, Ant, Gradle, etc), I personally recommend Maven by ease of use.

If you want more details:
1. Include libs in glassfish:
Copy the libs to the domain1\lib\classes directory, with this action the JARs will go directly to the classpath
2. Add the JARs to the LIB folder in your EAR
Copy the JARS to the project's LIB folder (APP-INF\lib)

For more details on how to use maven, go to the following url:

Scroll to Top