Return-Path: Delivered-To: apmail-maven-users-archive@www.apache.org Received: (qmail 18101 invoked from network); 23 Apr 2009 09:10:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Apr 2009 09:10:55 -0000 Received: (qmail 91110 invoked by uid 500); 23 Apr 2009 09:10:53 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 90996 invoked by uid 500); 23 Apr 2009 09:10:53 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 90986 invoked by uid 99); 23 Apr 2009 09:10:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Apr 2009 09:10:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of khmarbaise@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 23 Apr 2009 09:10:44 +0000 Received: (qmail invoked by alias); 23 Apr 2009 09:08:16 -0000 Received: from unknown (EHLO mac.local) [80.187.146.106] by mail.gmx.net (mp011) with SMTP; 23 Apr 2009 11:08:16 +0200 X-Authenticated: #3658064 X-Provags-ID: V01U2FsdGVkX18W/UAe3xcWwX5mnP5X59VWgDfyWuNp52kwzXC9sd QOfdpim9iaQrZF Message-ID: <49F02FF6.2060005@gmx.de> Date: Thu, 23 Apr 2009 11:08:06 +0200 From: Karl Heinz Marbaise Reply-To: info@soebes.de User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: Maven Users List Subject: Re: sql-maven-plugin execution problem with Integration-test References: <49F02B2A.7010001@gmx.de> <4c6e24990904230154o31bee508w5fe6be8e525d97d4@mail.gmail.com> In-Reply-To: <4c6e24990904230154o31bee508w5fe6be8e525d97d4@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.43 X-Virus-Checked: Checked by ClamAV on apache.org Hi, > You are missing a space in your sql query after the *. I changed it..."SELECT * FROM table", but the reaction was the same and i excepted nothing else, cause the syntax does not require a space... On the other hand the problem seemed to more located into the area of the lifecycle cause the error message is giving me such a hint... But thanks for you response... Kind regards Karl Heinz Marbaise > > -ketil > > On Thu, Apr 23, 2009 at 10:47 AM, Karl Heinz Marbaise wrote: >> Hi there, >> >> I have a large multi module project which is working well. >> Now i'm trying to enhance this with a things which is in relationship with >> the database... >> >> Ok i decided to take a look at the sql-maven-plugin to execute some SQL >> statements before an integration test is run (simply delete the contents of >> the databases as a first step)... >> >> But no i ran into the following problem: >> >> I have taken the configuration of the plugin from the examples page: >> >> http://mojo.codehaus.org/sql-maven-plugin/examples/execute.html >> >> I'm using Maven 2.0.10 (tested the problem with 2.0.9 with the same result). >> >> Here is the snipped from the POM.xml file: >> >> >> org.codehaus.mojo >> sql-maven-plugin >> 1.3 >> >> >> ${database.pom.groupId} >> ${database.pom.artifactId} >> ${database.pom.version} >> >> >> >> ${database.driverClassName} >> ${database.url} >> ${database.username} >> ${database.password} >> >> >> >> drop-db-before-test-if-any >> process-test-resources >> >> execute >> >> >> SELECT *FROM table >> >> >> >> >> >> May be i'm completely blind and oversight things... >> >> >> The following is printed out: >> >> C:\DEV\workspace\.....\it>mvn clean integration-test >> Using User setting from T:/System/.m2/settings.xml >> Using Memory settings: -Xms256m -Xmx1024m >> [INFO] Scanning for projects... >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Building XXX XXXXXXXXX :: Integration Test >> [INFO] task-segment: [clean, integration-test] >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] [clean:clean] >> [INFO] Deleting file-set: C:\DEV\workspace\.... (included: [], excluded: []) >> [INFO] [cobertura:clean {execution: clean}] >> [INFO] [antrun:run {execution: default}] >> [INFO] Executed tasks >> [INFO] [sql:execute {execution: drop-db-before-test-if-any}] >> [INFO] >> ------------------------------------------------------------------------ >> [ERROR] BUILD ERROR >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Ung�ltige Argumente in Aufruf >> >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] For more information, run Maven with the -e switch >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Total time: 5 seconds >> [INFO] Finished at: Thu Apr 23 10:29:18 CEST 2009 >> [INFO] Final Memory: 19M/254M >> [INFO] >> ------------------------------------------------------------------------ >> >> So i have called Maven with -X >> >> [DEBUG] Configuring mojo 'org.codehaus.mojo:sql-maven-plugin:1.3:execute' >> --> >> [DEBUG] (f) autocommit = false >> [DEBUG] (s) delimiter = ; >> [DEBUG] (s) delimiterType = normal >> [DEBUG] (s) driver = oracle.jdbc.driver.OracleDriver >> [DEBUG] (s) keepFormat = false >> [DEBUG] (s) onError = abort >> [DEBUG] (s) password = XXXXXXXXX >> [DEBUG] (f) settings = org.apache.maven.settings.Settings@7b1641 >> [DEBUG] (f) skip = false >> [DEBUG] (f) skipOnConnectionError = false >> [DEBUG] (s) sqlCommand = SELECT *FROM XXXXXXXXXXXXXX >> [DEBUG] (s) url = jdbc:oracle:thin:@DATABASESIDXXXXX >> [DEBUG] -- end configuration -- >> [INFO] [sql:execute {execution: drop-db-before-test-if-any}] >> [DEBUG] connecting to jdbc:oracle:thin:@DATABASIDXXXXX >> [INFO] >> ------------------------------------------------------------------------ >> [ERROR] BUILD ERROR >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Ung�ltige Argumente in Aufruf >> >> [INFO] >> ------------------------------------------------------------------------ >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: Ung�ltige Argumente >> in Aufruf >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:584) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) >> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) >> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) >> at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at >> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >> at >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >> Caused by: org.apache.maven.plugin.MojoExecutionException: Ung�ltige >> Argumente in Aufruf >> at org.codehaus.mojo.sql.SqlExecMojo.execute(SqlExecMojo.java:434) >> at >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) >> at >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) >> ... 16 more >> Caused by: java.sql.SQLException: Ung�ltige Argumente in Aufruf >> at >> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) >> at >> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) >> at >> oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208) >> at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:236) >> at >> oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:420) >> at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:165) >> at >> oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35) >> at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801) >> at >> org.codehaus.mojo.sql.SqlExecMojo.getConnection(SqlExecMojo.java:670) >> at org.codehaus.mojo.sql.SqlExecMojo.execute(SqlExecMojo.java:428) >> ... 18 more >> [INFO] >> ------------------------------------------------------------------------ >> [INFO] Total time: 7 seconds >> [INFO] Finished at: Thu Apr 23 10:27:46 CEST 2009 >> [INFO] Final Memory: 19M/254M >> [INFO] >> ------------------------------------------------------------------------ >> >> Does anyone a hint ? >> >> Many thanks in advance... >> >> Kind regards >> Karl Heinz Marbaise >> -- >> SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893 >> Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029 >> Hauptstrasse 177 USt.IdNr: DE191347579 >> 52146 W�rselen http://www.soebes.de >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org >> For additional commands, e-mail: users-help@maven.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org > For additional commands, e-mail: users-help@maven.apache.org > -- SoftwareEntwicklung Beratung Schulung Tel.: +49 (0) 2405 / 415 893 Dipl.Ing.(FH) Karl Heinz Marbaise ICQ#: 135949029 Hauptstrasse 177 USt.IdNr: DE191347579 52146 W�rselen http://www.soebes.de --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org