Questions tagged [glassfish-4]

Fourth version of the popular Java EE open source application server and the reference implementation of the Java EE 7.

Java EE 7 brings the new versions of the many Java enterprise and Web technologies, such as EJB 3.2, JMS 2.0, JPA 2.1, Servlet 3.1 etc. GlassFish is an open source server that represents a reference implementation of Java EE standard. In its fourth version, GlassFish offers the complete Java EE 7 (JSR-342) platform. It is a first certified application server that fully supports Java EE 7.

This tag is for questions specific to version 4. For generall questions to GlassFish see:

908 questions
3
votes
1 answer

Get current web folder in Java with Jersey JAX RS.WS

This is seems easy enough, but seems like I can't find the answer at Google. I need to send a list of files at my webroot folder, kind like directory browsing. I am using Glassfish, and JAX-RS.WS, and genson for POJO writer. App structure like…
Magician
  • 1,944
  • 6
  • 24
  • 38
3
votes
0 answers

EclipseLink JPA does not create link table for ManyToMany relationship on mysql

I have created @ManyToMany relationship between two entities Level and Area. I'm quite new with JPA but my understanding is that I don't need to create a entity model for link table but JPA should take care of it. When reading the documentation this…
3
votes
1 answer

save ZonedDateTime in MySQL and Glassfish

This is my first question on this forum, please be patient with me. Oracle says "ZonedDateTime is a date and time with a fully qualified time zone. This can resolve an offset at any point in time. The rule of thumb is that if you want to represent a…
FreedomRings
  • 181
  • 1
  • 9
3
votes
2 answers

Content of a dockerfile to run glassfish server and deploy specific application from a git repository

I am trying to deploy my Java EE application using a Glassfish 4.1 server and I would like to deploy it as a Docker container. I'd like writing the correct Docker command to download/start a Glassfish server and then deploy my application on it,…
Julien
  • 31
  • 1
  • 5
3
votes
2 answers

Database creation not working in eclipselink with glassfish 4 and Postgres

I want to create the database based on Entities. Configuration: Glassfish: GlassFish Server Open Source Edition 4.1 (build 13) Eclipselink: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd (delivered with glassfish) Database: PostgreSQL …
Marble
  • 31
  • 3
3
votes
1 answer

GlassFish 4 server not starting

I am unable to start glassfish server 4 though when I had installed it worked smoothly and in the console following error comes up Launching GlassFish on Felix platform ERROR: Error creating bundle cache. (java.lang.Exception: Unable to create…
panky070
  • 35
  • 1
  • 5
3
votes
2 answers

Glassfish 4 returns 400 Bad Request for GET with payload

The application I am working on has a Rest web service that expects a GET request with a payload. I know it's not the way to go but for backward compatibility we have to keep it at least for a while longer. This was working fine in Glassfish 3 but…
Cristi C
  • 35
  • 5
3
votes
1 answer

JDBC Connection Pool SSL Error PKIX building failed

This is using the latest Glassfish (4.1), the latest Postgres Driver (9.3-1102 JDBC 41) against Postgres 9.4, and the latest Java (1.8.0_31-b13). This is also using a commercial CA certificate, I have checked the CA root is present in…
Little Code
  • 1,315
  • 2
  • 16
  • 37
3
votes
1 answer

ValidationException Exception Description: uses a non-entity as target entity in the relationship attribute

I am getting the following exception and have done all this 1000 times before but now I am getting errors: ValidationException Exception Description: [class com.smartphonedev.rsvplaw.entities.Staff] uses a non-entity [class…
Damien Cooke
  • 599
  • 10
  • 20
3
votes
2 answers

Invalid URL Pattern When Deploying To Glassfish 4.1

I had a web filter to redirect from the login and index page if the user was already authenticated. Originally I had an invalid URL pattern. I fixed the invalid pattern and attempted to redeploy only to receive…
Dagnarus
  • 65
  • 2
  • 7
3
votes
1 answer

Setting non-serializable attribute value into HttpSession

I get an error sometimes when I deployed project, but does not it every time. Localbean does not work when the error error message Warning: JSF1063: WARNING! Setting non-serializable attribute value into HttpSession (key: localBean, value class:…
SerefSEVEN
  • 45
  • 3
  • 11
3
votes
1 answer

Hibernate 4.3.6 and Glassfish 4.0 JPA 2.1 object is not an instance of declaring class

I'm using Hibernate 4.3.6 and Glassfish 4.0 for my ejb project. My test Dao class : @PersistenceContext private EntityManager entityManager; public void saveTest(){ Foo testFoo = new Foo(); testFoo.setSomething("test"); …
3
votes
6 answers

How to debug everything that goes over the wire (http)

I'm trying to debug some Rest service in Glassfish 4 and I want to see exactly what is being sent over the wire (HTTP connection). Is there a way to make Glassfish print that out? My project uses Apache HTTP Client and I know is it possible to…
Roland
  • 7,525
  • 13
  • 61
  • 124
3
votes
0 answers

Glassfish 4.1 high CPU usage

I have an issue running GlassFish 4.1 (Java 8 update 20, Windows server 2008). As soon as application usage goes up, one of the cores goes to maximum load and stays that way even after all clients are gone. Only GlassFish restart helps. It seems to…
3
votes
2 answers

What might cause this Glassfish / JDBC error "No database selected"

I'm using Glassfish 4 with Java EE 7 and MySQL 5.6.2. Here is the error: org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: No database selected Error Code: 1046 Here is the…
vt97john
  • 579
  • 3
  • 10
  • 25