-
1. Re: howto change projects' database connection?
maxandersen Mar 9, 2008 12:50 PM (in response to daveyx)sounds like the only thing you are missing is to put a postgresql jdbc driver in JBoss's lib directory.
-
2. Re: howto change projects' database connection?
daveyx Mar 9, 2008 1:37 PM (in response to daveyx)hi, thanks for your reply
i installd the correct jdbc driver. this is sure, because i can build a new sem web project and configure it for a postgresql connection. this works, i can see the correct datatables via pgadmin.
i only want to change the settings for my hsqldb configured project.
i built a new project with postgresql connection and had a look into the folder structure.
in myproj/.settings are two files:org.jboss.tools.seam.core.prefs org.jboss.tools.jst.web.xml
i think that the databaseconnection is defined here, because the first file references a "seam.project.connection.profile=mypostgres" in mypostgresproject and "seam.project.connection.profile=myhsqldb" in myhsqldbproject
but changing this value does not result in a correct database connection,nothing happens.
the second file includes thousands of<FILESYSTEM ENTITY="FileSystemJar" ...
but different in the two projects.
and one contains the jdbc path (in configfile of myhsqldbproj)LOCATION="/.../jboss-4.2.2.GA/server/default/lib/postgresql-8.3-603.jdbc3.jar" NAME="lib-postgresql-8.3-603.jdbc3.jar"/>
i am wondering why jboss tools does not provide a gui to switch to another databaseprofile?
i dont want to copy all the sources from hsqldbproject to postgresproject, because of the packingstructure...
any other ideas still welcome
davey -
3. Re: howto change projects' database connection?
daveyx Mar 9, 2008 1:48 PM (in response to daveyx)oops,
the correct postgresql jdbc path is in postgresproject, not hsqldb project
i found no possibility to edit a submitted post
davey -
4. Re: howto change projects' database connection?
maxandersen Mar 10, 2008 6:43 AM (in response to daveyx)looking again on your stacktrace it looks like you have some additional characters in the driver classname - any chance you mistyped or have some weird encoding enabled on that file with the class name ?
-
5. Re: howto change projects' database connection?
daveyx Mar 10, 2008 1:03 PM (in response to daveyx)oh my lord,
thanks max, now i can see it too :-(
my fault:
i copied the hibernate.dialect-propertyline from a internetpage in my browser to jboss tools, but eclipse showed the right syntax without any weird characters
i copied the line to a console an that gave me the following:org.hibernat-e.dialect.PostgreSQL-Dialect
thus hibernate told me the right exception, because such a dialect is not available
i only was to blind, because the console ouput did not dispay the weird chars, but when creating my question here i copied the weird chars too :-)
anyway, it would be nice if jboss tools would provide a gui to change the databaseconnection like building a new seam project
properties->project facets->modify project... i went this way thousand times, this would be the right place
once again, thanks a lot max
davey