Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.4, 2.9.0
    • Component/s: camel-jpa
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      According to http://camel.apache.org/jpa.html entityName is optional.
      When configuring with the following uri (e.g. w/o entityName):
      <camel:endpoint id="jpaEndpoint" uri="jpa:?persistenceUnit=journalPersistenceUnit&usePersist=true" />
      the following warning will be displayed
      2011-08-21 18:57:11,381 [main][][][][][][][] WARN org.apache.camel.util.ObjectHelper - Cannot find class: persistenceUnitjournalPersistenceUnitusePersisttruepersistenceUnitjournalPersistenceUnitusePersisttrue
      due to the incorrect if test in the JpaComponent:

      // lets interpret the next string as a class
              if (path != null) {
                  // provide the class loader of this component to work in OSGi environments as camel-jpa must be able
                  // to resolve the entity classes
                  Class<?> type = getCamelContext().getClassResolver().resolveClass(path, JpaComponent.class.getClassLoader());
                  if (type != null) {
                      endpoint.setEntityType(type);
                  }
              }
      

      path is not null, but it is the rest of the string and not the entityname. e.g it should not start with ? if it is an entityname - else it is the options.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        3h 40m 1 Christian Müller 21/Aug/11 21:42
        Resolved Resolved Reopened Reopened
        93d 2h 14m 1 Christian Müller 22/Nov/11 22:57
        Reopened Reopened Closed Closed
        25m 1s 1 Christian Müller 22/Nov/11 23:22
        Hide
        Christian Müller added a comment -

        fixed for Camel 2.8.4 and 2.9.0

        Show
        Christian Müller added a comment - fixed for Camel 2.8.4 and 2.9.0
        Christian Müller made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Christian Müller made changes -
        Fix Version/s 2.8.4 [ 12319072 ]
        Fix Version/s 2.8.2 [ 12317866 ]
        Christian Müller made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Christian Müller [ muellerc ]
        Hide
        David J. M. Karlsen added a comment -

        I still see this message.
        WARN org.apache.camel.util.ObjectHelper - Cannot find class: persistenceUnitjournalPersistenceUnitusePersisttruepersistenceUnitjournalPersistenceUnitusePersisttrue

        even with camel 2.8.3

        Show
        David J. M. Karlsen added a comment - I still see this message. WARN org.apache.camel.util.ObjectHelper - Cannot find class: persistenceUnitjournalPersistenceUnitusePersisttruepersistenceUnitjournalPersistenceUnitusePersisttrue even with camel 2.8.3
        Daniel Kulp made changes -
        Fix Version/s 2.8.2 [ 12317866 ]
        Christian Müller made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.9.0 [ 12316374 ]
        Resolution Fixed [ 1 ]
        Hide
        Christian Müller added a comment -

        Already fixed with commit 1159596: http://svn.apache.org/viewvc?rev=1159596&view=rev

        Show
        Christian Müller added a comment - Already fixed with commit 1159596: http://svn.apache.org/viewvc?rev=1159596&view=rev
        Hide
        David J. M. Karlsen added a comment -

        I now see:

        commit ad352d2328a4dd398a334f24b6d03944a3bcfc59
        Author: Claus Ibsen <davsclaus@apache.org>
        Date: Fri Aug 19 11:27:59 2011 +0000

        Jpa component should only try to load EntityClass if the path is not empty string.

        git-svn-id: https://svn.apache.org/repos/asf/camel/trunk@1159596 13f79535-47bb-0310-9956-ffa450edef68

        So this issue can be closed and the changelog updated.

        Show
        David J. M. Karlsen added a comment - I now see: commit ad352d2328a4dd398a334f24b6d03944a3bcfc59 Author: Claus Ibsen <davsclaus@apache.org> Date: Fri Aug 19 11:27:59 2011 +0000 Jpa component should only try to load EntityClass if the path is not empty string. git-svn-id: https://svn.apache.org/repos/asf/camel/trunk@1159596 13f79535-47bb-0310-9956-ffa450edef68 So this issue can be closed and the changelog updated.
        David J. M. Karlsen created issue -

          People

          • Assignee:
            Christian Müller
            Reporter:
            David J. M. Karlsen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development