You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "David J. M. Karlsen (JIRA)" <ji...@apache.org> on 2011/08/21 19:03:27 UTC

[jira] [Created] (CAMEL-4362) Bug in parsing of JPA uri

Bug in parsing of JPA uri
-------------------------

                 Key: CAMEL-4362
                 URL: https://issues.apache.org/jira/browse/CAMEL-4362
             Project: Camel
          Issue Type: Bug
          Components: camel-jpa
    Affects Versions: 2.8.0
            Reporter: David J. M. Karlsen


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&amp;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:

{noformat}
// 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);
            }
        }
{noformat}

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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-4362) Bug in parsing of JPA uri

Posted by "David J. M. Karlsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13088416#comment-13088416 ] 

David J. M. Karlsen commented on CAMEL-4362:
--------------------------------------------

I now see:

commit ad352d2328a4dd398a334f24b6d03944a3bcfc59
Author: Claus Ibsen <da...@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.

> Bug in parsing of JPA uri
> -------------------------
>
>                 Key: CAMEL-4362
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4362
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jpa
>    Affects Versions: 2.8.0
>            Reporter: David J. M. Karlsen
>
> 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&amp;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:
> {noformat}
> // 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);
>             }
>         }
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-4362) Bug in parsing of JPA uri

Posted by "Christian Müller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christian Müller resolved CAMEL-4362.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0

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

> Bug in parsing of JPA uri
> -------------------------
>
>                 Key: CAMEL-4362
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4362
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jpa
>    Affects Versions: 2.8.0
>            Reporter: David J. M. Karlsen
>             Fix For: 2.9.0
>
>
> 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&amp;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:
> {noformat}
> // 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);
>             }
>         }
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Updated] (CAMEL-4362) Bug in parsing of JPA uri

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-4362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CAMEL-4362:
-------------------------------

    Fix Version/s: 2.8.2

> Bug in parsing of JPA uri
> -------------------------
>
>                 Key: CAMEL-4362
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4362
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jpa
>    Affects Versions: 2.8.0
>            Reporter: David J. M. Karlsen
>             Fix For: 2.8.2, 2.9.0
>
>
> 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&amp;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:
> {noformat}
> // 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);
>             }
>         }
> {noformat}
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira