Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13553

Node failure with ClassNotFoundException when indexed field of QueryEntity differs from type used in put operation

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.9, 2.8.1, 2.10
    • Fix Version/s: 2.9
    • Component/s: sql, thin client
    • Labels:
      None

      Description

      Failures occur under these conditions:

      1. Data classes are not present in server classpaths, peer-classloading is not used because thin client is used.
      2. Manual construction of QueryEntity via #setFields, #setIndexes etc. is used instead of constructor of QueryEntity in conjunction with @QuerySqlField for data clases.
      3. One of the indexed fields of QueryEntity has type different from type of corresponding field of data object instance, eg:
        QueryEntity
        fields.put("name", "java.lang.String");
        fields.put("wrongTypeEmbeddable", "java.lang.String"); /* This is wrong type */
        
        QueryEntity qryEntity = new QueryEntity()
        	.setKeyType("java.lang.Integer")
        	.setValueType("org.apache.ignite.wrongtype.WrongTypeEntity") /* FQDN should be used */
        	.setFields(fields)
        	.setIndexes(Collections.singleton(
        		new QueryIndex("wrongTypeEmbeddable") /* Wrong type field is indexed */));
        
        Embedded field type in put operation is different
        cache.put(0, new WrongTypeEntity("name",
        	new WrongTypeEmbeddable(256, "testField") /* wrongTypeEmbeddable field */));
        

      How to reproduce:

      1. Start server nodes with default config via ignite.sh
      2. Run reproducer.

      For Apache Ignite 2.8.1 failures are identical for atomic and transactional caches:

      [17:45:23,108][SEVERE][sys-stripe-0-#1][] JVM will be halted immediately due to the failure: [failureCtx=FailureContext [type=CRITICAL_ERROR, err=class o.a.i.binary.BinaryInvalidTypeException: o.a.i.wrongtype.WrongTypeEmbeddable]]
      

      For AI, built and assemblied from master, failure is supressed for atomic and occur only for transactional caches:

      [17:39:09,305][SEVERE][sys-stripe-10-#11][] JVM will be halted immediately due to the failure: [failureCtx=FailureContext [type=CRITICAL_ERROR, err=class o.a.i.i.transactions.IgniteTxHeuristicCheckedException: Committing a transaction has produced runtime exception]]
      

      Root cause for all failures is:

      Caused by: java.lang.ClassNotFoundException: org.apache.ignite.wrongtype.WrongTypeEmbeddable
      

        Attachments

          Activity

            People

            • Assignee:
              nizhikov Nikolay Izhikov
              Reporter:
              shishkovilja Ilya Shishkov

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                  Issue deployment