google-code-export / alfresco-metadbconnector

Automatically exported from code.google.com/p/alfresco-metadbconnector
0 stars 0 forks source link

MetaDBConnectors Config List is empty #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Install and create connector(attached file) as a result - MetaDBConnectors 
Config List is empty

alfresco 4.2c, debian 6 x64

Original issue reported on code.google.com by AKuru...@gmail.com on 26 Jun 2013 at 8:10

Attachments:

GoogleCodeExporter commented 9 years ago
Looked at the source code, seems to be the 'WHERE' clause in the connector 
setting can not be empty. I added <where>id>0</where>, but config list still is 
empty...

Original comment by AKuru...@gmail.com on 26 Jun 2013 at 8:41

GoogleCodeExporter commented 9 years ago
Are you tested to add <where>true</where> in this config option?. I think the 
main problem is the ">" symbol that you are using inside the where property at 
the XML config file.

Original comment by venzia.spain@gmail.com on 26 Jun 2013 at 9:31

GoogleCodeExporter commented 9 years ago
Nothing has changed.

catalina.out:
 2013-06-26 15:08:10,239  ERROR [mdbc.service.MDBCServiceImpl] [localhost-startStop-1] java.net.MalformedURLException
 2013-06-26 15:09:43,860  INFO  [repo.module.ModuleServiceImpl] [localhost-startStop-1] Starting module 'mdbc' version 1.0.1.

Iam trying to debug but cant adjust log for mdbc module

Original comment by AKuru...@gmail.com on 26 Jun 2013 at 11:31

GoogleCodeExporter commented 9 years ago
To debug the module actions you should to include :
log4j.logger.org.venzia.mdbc.MDBCComponent=debug
to the log4j.properties file.
Anyway I think that you need to include '{0}' element in the <where></where> 
property like this :
<where>whatever_column_from_db like '%{0}%' or true</where> (note that you need 
to change 'whatever_column_from_db' with an existing column from the DB table 
or view).

Let us know if it is working after that change (yo need to restart Alfresco).
Regards!.

Original comment by venzia.spain@gmail.com on 26 Jun 2013 at 12:36

GoogleCodeExporter commented 9 years ago
Returned the old name of the connector and part of the old data(attached file) 
and the connector is in the list, but now i cant select data from a table, 
because the "Select" button is inactive(select_button.jpg - attached).

p.s.As I understand it, except for the connector it requires new aspect in 
mdbc-model.xml

Original comment by AKuru...@gmail.com on 26 Jun 2013 at 1:38

Attachments:

GoogleCodeExporter commented 9 years ago
Are you using Chrome?, If yes, Can you try with Mozilla Firefox?. Seems to be a 
bug with non-mozilla browsers for this "Community" version of the module.
Regards.

Original comment by venzia.spain@gmail.com on 26 Jun 2013 at 1:57

GoogleCodeExporter commented 9 years ago
In firefox it works, but you have a flaw in the method of search:
GenericDAO.java
public List <Map <String, Object>> search (String filter) throws IOException
   {
     String sql = this.query;
     List <Map <String, Object>> result = new ArrayList <Map <String, Object>> ();
     if ((filter! = null) && (! filter.trim (). equals (""))) {
       sql = sql + "" + this.where.replace ("{0}", filter);
     }
     result = getSimpleJdbcTemplate (). query (sql, new ConnectorRowMapper (), new Object [0]);

     return result;
   }

>> Sql = sql + "" + this.where.replace ("{0}", filter);

And if the filter was the other, and there was no {0}? In this case, nothing 
will be replaced and the search will return all records.

Original comment by AKuru...@gmail.com on 28 Jun 2013 at 6:10

GoogleCodeExporter commented 9 years ago
Ok, we will review the code of the "free add-on" to made that it works with IE 
and Chrome too. About your specific need, you are free to download, change and 
compile the new "approach" based in your requirements.

Good luck and regards!!.

Original comment by venzia.spain@gmail.com on 28 Jun 2013 at 7:14