Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B1E872DA for ; Sun, 21 Aug 2011 17:47:52 +0000 (UTC) Received: (qmail 19655 invoked by uid 500); 21 Aug 2011 17:47:51 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 19463 invoked by uid 500); 21 Aug 2011 17:47:51 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 19455 invoked by uid 99); 21 Aug 2011 17:47:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2011 17:47:50 +0000 X-ASF-Spam-Status: No, hits=-2000.9 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Aug 2011 17:47:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 55DEFC7619 for ; Sun, 21 Aug 2011 17:47:27 +0000 (UTC) Date: Sun, 21 Aug 2011 17:47:27 +0000 (UTC) From: "David J. M. Karlsen (JIRA)" To: dev@camel.apache.org Message-ID: <64672066.56800.1313948847348.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1978236449.56752.1313946207250.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4362) Bug in parsing of JPA uri MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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 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): > > 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