Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 24536 invoked from network); 28 Aug 2006 16:58:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Aug 2006 16:58:06 -0000 Received: (qmail 33601 invoked by uid 500); 28 Aug 2006 16:57:59 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 33558 invoked by uid 500); 28 Aug 2006 16:57:59 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 33547 invoked by uid 99); 28 Aug 2006 16:57:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 09:57:59 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Aug 2006 09:57:58 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E70A27142D4 for ; Mon, 28 Aug 2006 16:54:22 +0000 (GMT) Message-ID: <2227702.1156784062943.JavaMail.jira@brutus> Date: Mon, 28 Aug 2006 09:54:22 -0700 (PDT) From: "Donald Woods (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Updated: (GERONIMO-2314) Can not create a datasource with the name "jdbc/EmployeeDatasource" from console In-Reply-To: <17918191.1155268093828.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/GERONIMO-2314?page=all ] Donald Woods updated GERONIMO-2314: ----------------------------------- Fix Version/s: 1.1.2 Affects Version/s: 1.1.1 1.1.2 1.2 Users should be allowed to create/recreate datasources with the same names that they can through deployment plans. That way, if they need to upgrade or move a DB to another server, they can do so through the console without needing access to the original/updated db plan and remote deployer access (which they may not have in hosting environments....) > Can not create a datasource with the name "jdbc/EmployeeDatasource" from console > -------------------------------------------------------------------------------- > > Key: GERONIMO-2314 > URL: http://issues.apache.org/jira/browse/GERONIMO-2314 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues) > Components: console > Affects Versions: 1.2, 1.1, 1.1.1, 1.1.2 > Reporter: Yunfeng Ma > Assigned To: Donald Woods > Fix For: 1.1.2 > > > Follow the database pool wizard, create a datasource with the name "jdbc/EmployeeDatasource", the connection test is successful, but when click on the button "deploy", see the following stacktrace in the server output window: > org.apache.geronimo.common.DeploymentException: java.lang.IllegalArgumentException: Invalid id: console.dbpool/jdbc/EmployeeDatasource/1.0/rar > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:364) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:124) > at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke() > at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:53) > at org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethodInvoker.java:38) > at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:122) > at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:852) > at org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239) > at org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:106) > at org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:60) > at java.lang.Thread.run(Thread.java:797) > Caused by: > java.lang.IllegalArgumentException: Invalid id: console.dbpool/jdbc/EmployeeDatasource/1.0/rar > at org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:49) > at org.apache.geronimo.deployment.Deployer.notifyWatchers(Deployer.java:376) > at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:325) > ... 10 more > This error just happens in the condition of the database pool name includes the character "/", such as "jdbc/EmployeeDatasource". If database pool name is "EmployeeDatasource", then everything is OK. > Have a look at the souce codes of Artifact.java, the snippet of create method as following: > public static Artifact create(String id) { > String[] parts = id.split("/", -1); > if (parts.length != 4) { > throw new IllegalArgumentException("Invalid id: " + id); > } > for (int i = 0; i < parts.length; i++) { > if (parts[i].equals("")) { > parts[i] = null; > } > } > return new Artifact(parts[0], parts[1], parts[2], parts[3]); > } > If database pool name is "jdbc/EmployeeDatasource", the parts.length would be 5 and IllegalArgumentException would be throwed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira