[opencms-dev] New Database Table?

Oliver Berse oliver.berse at snsconsulting.de
Wed Aug 19 13:21:19 CEST 2009


Hi all,

I am using OpenCMS 7.5 with Tomcat/Mysql and want to add a new table for 
some customer data to my project-database. I use this code to access the 
table (modified from opencms-wiki):

CmsSqlManager sqlManager = OpenCms.getSqlManager();
CmsModuleManager moduleManager = OpenCms.getModuleManager();
CmsModule modul = moduleManager.getModule("my_module");
  
Connection connection = null;
Statement st = null;
ResultSet rs = null;
String sql;
  
try {
connection = sqlManager.getConnection("opencms_my_project");
st = connection.createStatement();
sql = "SELECT * FROM my_new_table";
rs = st.executeQuery(sql);
...

The table opencms_my_project is created by OpenCMS and contains the 
CMS-tables.

I get this exception:
java.sql.SQLException: Configuration file not found

So, which configuration file ist meant here? And how can I access my new 
table?


best regards,
Oliver





More information about the opencms-dev mailing list