glassfish-4.1

Glassfish uses internal module libarry instead of application library

♀尐吖头ヾ 提交于 2020-07-09 16:08:35
问题 I am trying to deploy a Spring boot application on Glassfish 4.1.21. At startup I get an error that that the entityManagerFactory cannot pe created due to the fact that a method does not exist. It doas not exist because, for some reason, when the applicaiton is started on glassfish, instead of using jakarta.validation-api-2.0.2.jar, it is used a library form inside glassfish/module bean-validator.jar. Everything works fine with embeded Tomcat. log file [2020-05-08T15:57:04.360+0300]

Error trying to perform CRUD from JAVA webApp to MySQL DB

限于喜欢 提交于 2020-03-04 23:04:38
问题 I hope you can help me with this question. There are other posts that have questions about the same error, but it's not the same thing as they talk about different things. I'm currently developing a basic Java web app implementing MVC pattern, which performs CRUD operations to a MySQL 8.0 DB, the web server is GlassFish 4.1.1, and the MySQL connector is 8.0.17 and NetBeans IDE 8.2. All views are created and they are working fine, but when I try to insert or query some information into the DB

JPA EclipseLink uses a non-entity as target entity in the relationship attribute

*爱你&永不变心* 提交于 2020-02-05 14:06:41
问题 I get the following error when i try to deploy my application on glassfish 4.1: [class com.sample.model.Profile] uses a non-entity [class com.sample.model.ProfileEventMapping] as target entity in the relationship attribute [field events]. The tables for both entities are getting created in the database. Profile: @Entity public class Profile ... @OneToMany(mappedBy = "profile", orphanRemoval = true) private Set<ProfileEventMapping> events = new HashSet<>(); ProfileEventMapping: @Entity public

JPA EclipseLink uses a non-entity as target entity in the relationship attribute

依然范特西╮ 提交于 2020-02-05 14:01:40
问题 I get the following error when i try to deploy my application on glassfish 4.1: [class com.sample.model.Profile] uses a non-entity [class com.sample.model.ProfileEventMapping] as target entity in the relationship attribute [field events]. The tables for both entities are getting created in the database. Profile: @Entity public class Profile ... @OneToMany(mappedBy = "profile", orphanRemoval = true) private Set<ProfileEventMapping> events = new HashSet<>(); ProfileEventMapping: @Entity public

JPA EclipseLink uses a non-entity as target entity in the relationship attribute

自闭症网瘾萝莉.ら 提交于 2020-02-05 13:58:02
问题 I get the following error when i try to deploy my application on glassfish 4.1: [class com.sample.model.Profile] uses a non-entity [class com.sample.model.ProfileEventMapping] as target entity in the relationship attribute [field events]. The tables for both entities are getting created in the database. Profile: @Entity public class Profile ... @OneToMany(mappedBy = "profile", orphanRemoval = true) private Set<ProfileEventMapping> events = new HashSet<>(); ProfileEventMapping: @Entity public

JPA EclipseLink uses a non-entity as target entity in the relationship attribute

♀尐吖头ヾ 提交于 2020-02-05 13:54:26
问题 I get the following error when i try to deploy my application on glassfish 4.1: [class com.sample.model.Profile] uses a non-entity [class com.sample.model.ProfileEventMapping] as target entity in the relationship attribute [field events]. The tables for both entities are getting created in the database. Profile: @Entity public class Profile ... @OneToMany(mappedBy = "profile", orphanRemoval = true) private Set<ProfileEventMapping> events = new HashSet<>(); ProfileEventMapping: @Entity public

Glassfish/Wildfly not failing if @Resource cannot be resolved?

吃可爱长大的小学妹 提交于 2020-01-15 04:50:12
问题 I am experimenting with @Resource in a servlet to see if we can use it to inject configuration parameters easily (this is servlet 3.0 webapp in Glassfish 4.1.1). I was told in https://stackoverflow.com/a/45715196/53897 that the behavior I saw of a @Resource String userName being null when used if it could not be resolved if the env-entries in web.xml were not present, to be wrong according to the specification, but that the behavior of WildFly was the same. Question is: Is this a known bug?

What are “Java EE 7 API Library” and “Java EE Web 7 API Library” and when to use them?

笑着哭i 提交于 2020-01-03 19:31:25
问题 I have a full-fledged Java EE project running on GlassFish 4.1 / Java EE 7 (NetBeans 8.0.2) not using Apache Maven. Depending upon the project functionality, the CDI dependency has to be added to both the projects/modules namely the EE module and the Web module (and a class library, if any). I have been confusing for a long time seeing people recommending to add either "Java EE 7 API Library" or "Java EE Web 7 API Library" to the compile-time class-path as a CDI dependency (these libraries

Java EE 7 Portable solution for Integration and Unit testing

谁说胖子不能爱 提交于 2019-12-31 04:23:05
问题 I am trying to find a portable solution to test my Java EE 7 application. It is especially tricky when to test the EJB and their injections. For example: @org.junit.Test public void testIsValidCredentials() throws Exception { System.out.println("isValidCredentials"); String username = ""; String password = ""; Map properties = new HashMap(); properties.put(EJBContainer.MODULES, new File[] {new File("target/classes")}); EJBContainer container = javax.ejb.embeddable.EJBContainer

Pages being processed are merely left blank half way through on errors/exceptions instead of forwarding to the error page specified in web.xml

那年仲夏 提交于 2019-12-22 04:55:34
问题 In web.xml, I have the following configurations for a global error page. <error-page> <error-code>401</error-code> <location>/WEB-INF/error_pages/GeneralError.xhtml</location> </error-page> <error-page> <error-code>403</error-code> <location>/WEB-INF/error_pages/GeneralError.xhtml</location> </error-page> <error-page> <error-code>404</error-code> <location>/WEB-INF/error_pages/GeneralError.xhtml</location> </error-page> <error-page> <error-code>500</error-code> <location>/WEB-INF/error_pages