|
From: Rusty W. <rus...@gm...> - 2009-03-08 04:50:00
|
That fixed it; thanks again. Matthias Gommeringer wrote: > Hi Rusty, > > did you try to specify the "schema" in your pom.xml? > > <!-- common configurations --> > <configuration> > <driver>com.vendor.jdbc.Driver</driver> > <url>jdbc:vendor:mydatabase</url> > <username>a.username</username> > <password>a.password</password> > <schema>myschema</schema> > </configuration> > > It is undocumented but I think it should work. > > regards, > matthias > >> -----Ursprüngliche Nachricht----- >> Von: "Rusty Wright" <rus...@gm...> >> Gesendet: 07.03.09 01:54:11 >> An: dbu...@li... >> Betreff: [dbunit-user] postgres schema > > >> My postgres is set up so that all table names must include the schema name; if you don't specify the schema name then it tries to use the schema named public, which I have locked down (to prevent accidental or unknown activity in the schema named public). I'm using the jdbc driver from http://jdbc.postgresql.org/ but I don't see any way in their documentation to specify a schema name. >> >> I'm trying to do an export using the dbunit maven plugin. It works when I point it at a mysql database but I need it to work with a real database. >> >> Is there any way to do this? What if I were to use the dbunit api and code things in my unit tests? >> >> >> [DEBUG] Configuring mojo 'org.codehaus.mojo:dbunit-maven-plugin:1.0-beta-1:export' --> >> [DEBUG] (f) dataTypeFactoryName = org.dbunit.dataset.datatype.DefaultDataTypeFactory >> [DEBUG] (f) datatypeWarning = false >> [DEBUG] (f) dest = /home/rusty/java/people_locator/people_locator/target/dbunit/export.xml >> [DEBUG] (f) driver = org.postgresql.Driver >> [DEBUG] (f) format = xml >> [DEBUG] (f) password = zzz >> [DEBUG] (f) settings = org.apache.maven.settings.Settings@180b22e >> [DEBUG] (f) skip = false >> [DEBUG] (f) supportBatchStatement = false >> [DEBUG] (f) url = jdbc:postgresql://zzz/peoplelocator2 >> [DEBUG] (f) useQualifiedTableNames = true >> [DEBUG] (f) username = zzz >> [DEBUG] -- end configuration -- >> [INFO] [dbunit:export {execution: export}] >> [INFO] ------------------------------------------------------------------------ >> [ERROR] BUILD ERROR >> [INFO] ------------------------------------------------------------------------ >> [INFO] Error executing export >> >> Embedded error: org.postgresql.util.PSQLException: ERROR: permission denied for schema public >> [INFO] ------------------------------------------------------------------------ >> [DEBUG] Trace >> org.apache.maven.lifecycle.LifecycleExecutionException: Error executing export >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583) >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) >> 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:287) >> 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: Error executing export >> at org.codehaus.mojo.dbunit.ExportMojo.execute(ExportMojo.java:121) >> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) >> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) >> ... 16 more >> Caused by: org.dbunit.dataset.DataSetException: org.postgresql.util.PSQLException: ERROR: permission denied for schema public >> at org.dbunit.database.DatabaseDataSet.getTable(DatabaseDataSet.java:234) >> at org.dbunit.database.DatabaseTableIterator.getTable(DatabaseTableIterator.java:70) >> at org.dbunit.dataset.stream.DataSetProducerAdapter.produce(DataSetProducerAdapter.java:61) >> at org.dbunit.dataset.xml.XmlDataSetWriter.write(XmlDataSetWriter.java:73) >> at org.dbunit.dataset.xml.XmlDataSet.write(XmlDataSet.java:97) >> at org.dbunit.dataset.xml.XmlDataSet.write(XmlDataSet.java:87) >> at org.dbunit.dataset.xml.XmlDataSet.write(XmlDataSet.java:78) >> at org.dbunit.ant.Export.execute(Export.java:161) >> at org.codehaus.mojo.dbunit.ExportMojo.execute(ExportMojo.java:112) >> ... 18 more >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise >> -Strategies to boost innovation and cut costs with open source participation >> -Receive a $600 discount off the registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> dbunit-user mailing list >> dbu...@li... >> https://lists.sourceforge.net/lists/listinfo/dbunit-user >> > > > ____________________________________________________________________ > Psssst! Schon vom neuen WEB.DE MultiMessenger gehört? > Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123 > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > dbunit-user mailing list > dbu...@li... > https://lists.sourceforge.net/lists/listinfo/dbunit-user |