Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.1
    • Fix Version/s: 7.0.1
    • Component/s: doc
    • Labels:
      None
    • Environment:

      any

      Description

      The persistence functionality together with the needed database is completely missing.
      Therefore also the sample code can't be deployed because of an EclipseLink failure.

        Activity

        Hide
        jendrock added a comment -

        Could you please list the software that you are running?

        • What version of the JDK?
        • What version of the Java EE 7 SDK?
        • Did you use GlassFish 4 that came with the SDK or NetBeans IDE or standalone?

        We have never seen or heard of this error before, so I suspect it is a configuration issue that can easily be fixed once the problem has been narrowed down.

        Please read Section 1.2, "Requirements for this Tutorial: A Checklist," which you can access here: http://docs.oracle.com/javaee/7/firstcup/doc/intro002.htm#GCQZL

        Show
        jendrock added a comment - Could you please list the software that you are running? What version of the JDK? What version of the Java EE 7 SDK? Did you use GlassFish 4 that came with the SDK or NetBeans IDE or standalone? We have never seen or heard of this error before, so I suspect it is a configuration issue that can easily be fixed once the problem has been narrowed down. Please read Section 1.2, "Requirements for this Tutorial: A Checklist," which you can access here: http://docs.oracle.com/javaee/7/firstcup/doc/intro002.htm#GCQZL
        Hide
        JKitzbichler added a comment -

        Hi Jendrock,

        I have the following software versions installed:

        Netbeans:
        Product Version: NetBeans IDE 7.4 (Build 201311011758)
        Updates: NetBeans IDE wurde auf Version NetBeans 7.4 Patch 3 aktualisiert
        Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
        Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
        System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb)

        JDK: 1.7.0_45
        SDK: Java EE SDK 7 - but the detailled version I can't find out

        Glassfish: 4.0 (Build 89)

        I think, but I'm no more really sure, that I have installed Netbeans separetly from the Glassfish server,
        but I installed the Glassfish with a Windows installer under C:\Programs\...

        The Glassfish error message during the deployment process - partely in German:
        Schwerwiegend: Ausnahme beim Deployment der Anwendung [firstcup-war] : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException
        Internal Exception: java.sql.SQLException: Fehler beim Zuweisen einer Verbindung. Ursache: Connection could not be allocated because: java.net.ConnectException: Fehler beim Herstellen der Verbindung zum Server localhost am Port 1527. Nachricht: Connection refused: connect.
        Error Code: 0

        Do I need the "Java EE 7 SDK Extensions 4.0-89" and or
        the "Java EE 7 Profile Extensions 4.0-89" which I can see as available Add-Ons within the Glassfish Update Tool?

        Also "Java EE 7 SDK Full Platform" and "Java EE 7 SDK Web Profile", each with version 4.0-89,
        would be available as Add-Ons.

        Do I have to install these four packages?
        I read Section 1.2, "Requirements for this Tutorial: A Checklist". Do I miss some SDK packages?

        In the first-cup tutorial the persistence part is not really explained. The database handling,
        the involved tables, any JDBC settings (Connection Pool / JNDI) or persistence configurations are missing
        or I couldn't read it...

        Also it was not possible for me to create the projects out of the Maven Archetypes,
        see http://docs.oracle.com/javaee/7/firstcup/doc/creating-example002.htm, section 3.2.1.1
        and section 3.2.2.2.
        The "dukes-age-archetype"ArcheType is NOT listed within the known archetypes list...

        Greetings Josef

        Show
        JKitzbichler added a comment - Hi Jendrock, I have the following software versions installed: Netbeans: Product Version: NetBeans IDE 7.4 (Build 201311011758) Updates: NetBeans IDE wurde auf Version NetBeans 7.4 Patch 3 aktualisiert Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on amd64; Cp1252; de_DE (nb) JDK: 1.7.0_45 SDK: Java EE SDK 7 - but the detailled version I can't find out Glassfish: 4.0 (Build 89) I think, but I'm no more really sure, that I have installed Netbeans separetly from the Glassfish server, but I installed the Glassfish with a Windows installer under C:\Programs\... The Glassfish error message during the deployment process - partely in German: Schwerwiegend: Ausnahme beim Deployment der Anwendung [firstcup-war] : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Fehler beim Zuweisen einer Verbindung. Ursache: Connection could not be allocated because: java.net.ConnectException: Fehler beim Herstellen der Verbindung zum Server localhost am Port 1527. Nachricht: Connection refused: connect. Error Code: 0 Do I need the "Java EE 7 SDK Extensions 4.0-89" and or the "Java EE 7 Profile Extensions 4.0-89" which I can see as available Add-Ons within the Glassfish Update Tool? Also "Java EE 7 SDK Full Platform" and "Java EE 7 SDK Web Profile", each with version 4.0-89, would be available as Add-Ons. Do I have to install these four packages? I read Section 1.2, "Requirements for this Tutorial: A Checklist". Do I miss some SDK packages? In the first-cup tutorial the persistence part is not really explained. The database handling, the involved tables, any JDBC settings (Connection Pool / JNDI) or persistence configurations are missing or I couldn't read it... Also it was not possible for me to create the projects out of the Maven Archetypes, see http://docs.oracle.com/javaee/7/firstcup/doc/creating-example002.htm , section 3.2.1.1 and section 3.2.2.2. The "dukes-age-archetype"ArcheType is NOT listed within the known archetypes list... Greetings Josef
        Hide
        Kim Haase added a comment -

        Hi, Josef,

        Your software versions look fine. You do not need the extensions, and you can use either the full profile or the web profile version of the Java EE 7 SDK.

        This tutorial doesn't go into detail about the technologies – it is just a quick start to get you used to building and running an application. For information about persistence and JAX-RS you can consult the Java EE 7 Tutorial.

        When you followed step 1 in "3.2.1.1 Install the Maven Archetypes", how many projects did you see under Projects after you selected "example" and clicked Open Project? You should see six:

        archetypes
        dukes-age
        dukes-age-archetype
        firstcup
        firstcup-war
        firstcup-war-archetype

        If you saw only firstcup, it may be that the checkbox "Open Required Projects" was not selected. You need to open the required projects.

        When you follow the instructions to create a dukes-age (and firstcup-war) application, you will then see two projects with identical contents. We suggest that you close the old ones before creating the new ones. By default, the new ones are created in your NetBeansProjects directory under your home directory, but they will appear next to the existing ones in the IDE, which can be quite confusing. Alternatively, you could give the new ones slightly different names from the existing ones.

        We did encounter the same persistence error, which indicates that the database server is not running. This is because the Maven project doesn't start the database. We will need to change the project file and/or the instructions so that the database is started before you deploy the firstcup-war application.

        The workaround for now is to go to the Services tab, expand the Databases node, right-click "Java DB" and choose Start Server, then deploy the application.

        Thank you very much for pointing out this error. (We've found a few more while testing this, so thank you even more.)

        Show
        Kim Haase added a comment - Hi, Josef, Your software versions look fine. You do not need the extensions, and you can use either the full profile or the web profile version of the Java EE 7 SDK. This tutorial doesn't go into detail about the technologies – it is just a quick start to get you used to building and running an application. For information about persistence and JAX-RS you can consult the Java EE 7 Tutorial. When you followed step 1 in "3.2.1.1 Install the Maven Archetypes", how many projects did you see under Projects after you selected "example" and clicked Open Project? You should see six: archetypes dukes-age dukes-age-archetype firstcup firstcup-war firstcup-war-archetype If you saw only firstcup, it may be that the checkbox "Open Required Projects" was not selected. You need to open the required projects. When you follow the instructions to create a dukes-age (and firstcup-war) application, you will then see two projects with identical contents. We suggest that you close the old ones before creating the new ones. By default, the new ones are created in your NetBeansProjects directory under your home directory, but they will appear next to the existing ones in the IDE, which can be quite confusing. Alternatively, you could give the new ones slightly different names from the existing ones. We did encounter the same persistence error, which indicates that the database server is not running. This is because the Maven project doesn't start the database. We will need to change the project file and/or the instructions so that the database is started before you deploy the firstcup-war application. The workaround for now is to go to the Services tab, expand the Databases node, right-click "Java DB" and choose Start Server, then deploy the application. Thank you very much for pointing out this error. (We've found a few more while testing this, so thank you even more.)
        Hide
        jendrock added a comment -

        Hi, Josef.
        We made many fixes, including the ones that address the problem that you pointed out with the database not starting, in our documentation source files. We will provide an updated First Cup release in the near future.

        Show
        jendrock added a comment - Hi, Josef. We made many fixes, including the ones that address the problem that you pointed out with the database not starting, in our documentation source files. We will provide an updated First Cup release in the near future.
        Hide
        Kim Haase added a comment -

        We have released a new version of the First Cup Tutorial , 7.0.1-8, that fixes a number of issues we found. I hope you find it usable.

        The description of Persistence is still brief, but the Java EE 7 Tutorial is the place to go for more information.

        Thanks for bringing our attention to First Cup.

        Show
        Kim Haase added a comment - We have released a new version of the First Cup Tutorial , 7.0.1-8, that fixes a number of issues we found. I hope you find it usable. The description of Persistence is still brief, but the Java EE 7 Tutorial is the place to go for more information. Thanks for bringing our attention to First Cup.

          People

          • Assignee:
            Kim Haase
            Reporter:
            JKitzbichler
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: