glassfish
  1. glassfish
  2. GLASSFISH-19847

JPA2.1: A PROTOCOL Data Stream Syntax Error

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b79
    • Fix Version/s: 4.0_b82_EE7MS7
    • Component/s: entity-persistence
    • Labels:
      None
    • Environment:

      RHL6.2 and JDK1.7.0

      Description

      JPA2.1: A PROTOCOL Data Stream Syntax Error

      glassfish-4.0-b79.zip

      appserver-sqe/pe/ejb/jpa20/war/schemageneration
      When load script has blank lines, ex is shown in deploy.
      Tests failed with db connection error.

      Tests passed when blank lines are removed from the load script.

        Activity

        Hide
        sherryshen added a comment -

        In appserver-sqe/pe/ejb/jpa20/war/schemageneration
        persistence.xml has
        <property name="javax.persistence.sql-load-script-source"
        value="META-INF/load.sql"/>
        load.sql is packaged into war file with a few blank lines at end
        $ cat load.sh
        INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2')

        $
        server.log has error
        http://javaweb.us.oracle.com/net/asqe-logs/export1/4.0/Results/build79/core/19840/t3/server.log

        [2013-03-12T12:27:49.657-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469657] [levelValue: 500] [[
        CREATE TABLE SG_PROJ (ID INTEGER NOT NULL, NAME VARCHAR(20), PRIMARY KEY (ID))]]

        [2013-03-12T12:27:49.816-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469816] [levelValue: 500] [[
        INSERT INTO SG_PROJ (ID , NAME) VALUES (2,myProj2)]]

        [2013-03-12T12:27:49.850-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469850] [levelValue: 500] [[
        VALUES(1)]]

        [2013-03-12T12:27:49.851-0700] [glassfish 4.0] [WARNING] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469851] [levelValue: 900] [[

        Local Exception Stack:
        Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130226-e0971b1): org.eclipse.persistence.exceptions.DatabaseException
        Internal Exception: java.sql.SQLNonTransientConnectionException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected. Reason: 0x9,236. Plaintext connection attempt to an SSL enabled server?
        Error Code: 40000
        Call:
        Query: DataModifyQuery(sql="")
        at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)

        Show
        sherryshen added a comment - In appserver-sqe/pe/ejb/jpa20/war/schemageneration persistence.xml has <property name="javax.persistence.sql-load-script-source" value="META-INF/load.sql"/> load.sql is packaged into war file with a few blank lines at end $ cat load.sh INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2') $ server.log has error http://javaweb.us.oracle.com/net/asqe-logs/export1/4.0/Results/build79/core/19840/t3/server.log [2013-03-12T12:27:49.657-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469657] [levelValue: 500] [[ CREATE TABLE SG_PROJ (ID INTEGER NOT NULL, NAME VARCHAR(20), PRIMARY KEY (ID))]] [2013-03-12T12:27:49.816-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469816] [levelValue: 500] [[ INSERT INTO SG_PROJ (ID , NAME) VALUES (2,myProj2)]] [2013-03-12T12:27:49.850-0700] [glassfish 4.0] [FINE] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1.sql] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469850] [levelValue: 500] [[ VALUES(1)]] [2013-03-12T12:27:49.851-0700] [glassfish 4.0] [WARNING] [] [org.eclipse.persistence.session.file:/root/.hudson/jobs/core-das/workspace/glassfish4/glassfish/domains/domain1/applications/schemageneration/WEB-INF/classes/_pu1] [tid: _ThreadID=76 _ThreadName=admin-listener(1)] [timeMillis: 1363116469851] [levelValue: 900] [[ Local Exception Stack: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.0.v20130226-e0971b1): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLNonTransientConnectionException: A network protocol error was encountered and the connection has been terminated: A PROTOCOL Data Stream Syntax Error was detected. Reason: 0x9,236. Plaintext connection attempt to an SSL enabled server? Error Code: 40000 Call: Query: DataModifyQuery(sql="") at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
        Hide
        sherryshen added a comment -

        Thank Mitesh for helping me to understand the blank line issue.
        Feedback from Mitesh,
        It might make sense to enhance the sql executing code to skip blank lines.

        Show
        sherryshen added a comment - Thank Mitesh for helping me to understand the blank line issue. Feedback from Mitesh, It might make sense to enhance the sql executing code to skip blank lines.
        Hide
        sherryshen added a comment -
        Show
        sherryshen added a comment - I tracked the issue with https://bugs.eclipse.org/bugs/show_bug.cgi?id=403936
        Hide
        sherryshen added a comment - - edited

        Verified the fix on
        glassfish-4.0-b82-03_22_2013.zip

        Tests passed with the script containing # and blank lines.

        appserver-sqe/pe/ejb/jpa20/war/schemageneration/descriptor/load.ddl,v
        retrieving revision 1.1
        retrieving revision 1.2
        diff -c -r1.1 -r1.2
        *** load.ddl	2013/03/13 02:57:53	1.1
        --- load.ddl	2013/03/23 02:02:24	1.2
        ***************
        *** 1,2 ****
          INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2')
        ! INSERT INTO SG_PROJ (ID , NAME) VALUES (3,'myProj3')
        \ No newline at end of file
        --- 1,5 ----
          INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2')
        ! INSERT INTO SG_PROJ (ID , NAME) VALUES (3,'myProj3')
        ! # add 2 blank lines to verify the fix for GLASSFISH-19847
        ! 
        ! 
        
        Show
        sherryshen added a comment - - edited Verified the fix on glassfish-4.0-b82-03_22_2013.zip Tests passed with the script containing # and blank lines. appserver-sqe/pe/ejb/jpa20/war/schemageneration/descriptor/load.ddl,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** load.ddl 2013/03/13 02:57:53 1.1 --- load.ddl 2013/03/23 02:02:24 1.2 *************** *** 1,2 **** INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2') ! INSERT INTO SG_PROJ (ID , NAME) VALUES (3,'myProj3') \ No newline at end of file --- 1,5 ---- INSERT INTO SG_PROJ (ID , NAME) VALUES (2,'myProj2') ! INSERT INTO SG_PROJ (ID , NAME) VALUES (3,'myProj3') ! # add 2 blank lines to verify the fix for GLASSFISH-19847 ! !

          People

          • Assignee:
            Mitesh Meswani
            Reporter:
            sherryshen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: