[opencms-dev] Unit Testing on 6.2 Beta

Georgi Naplatanov gosho at oles.biz
Mon Mar 6 17:25:45 CET 2006


Ivan Codarin wrote:

> Dears,
> I'm trying to run unit tests on the 6.2 beta based on a Postgresql DBMS.
> I'm running then by hand (without ant) from Eclipse 3.1.2.
> I'm running the suite org.opencms.test.AllTests.
>
> I've the first error on a query:
>
>
>
> SELECT DISTINCT 
> CMS_OFFLINE_STRUCTURE.STRUCTURE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_ID,CMS_OFFLINE_STRUCTURE.RESOURCE_PATH, 
>
> CMS_OFFLINE_STRUCTURE.STRUCTURE_STATE,CMS_OFFLINE_STRUCTURE.DATE_RELEASED,CMS_OFFLINE_STRUCTURE.DATE_EXPIRED,CMS_OFFLINE_RESOURCES.RESOURCE_ID, 
>
> CMS_OFFLINE_RESOURCES.RESOURCE_TYPE,CMS_OFFLINE_RESOURCES.RESOURCE_FLAGS,CMS_OFFLINE_RESOURCES.RESOURCE_STATE,CMS_OFFLINE_RESOURCES.DATE_CREATED, 
>
> CMS_OFFLINE_RESOURCES.DATE_LASTMODIFIED,CMS_OFFLINE_RESOURCES.USER_CREATED,CMS_OFFLINE_RESOURCES.USER_LASTMODIFIED,CMS_OFFLINE_RESOURCES.PROJECT_LASTMODIFIED 
> *AS* LOCKED_IN_PROJECT,
> CMS_OFFLINE_RESOURCES.RESOURCE_SIZE,CMS_OFFLINE_RESOURCES.SIBLING_COUNT 
> FROM CMS_OFFLINE_ACCESSCONTROL, 
> CMS_OFFLINE_STRUCTURE,CMS_OFFLINE_RESOURCES
> WHERE 
> CMS_OFFLINE_ACCESSCONTROL.PRINCIPAL_ID='7c54fbe9-ad1a-11da-905d-4b60ca370499' 
> AND 
> CMS_OFFLINE_ACCESSCONTROL.RESOURCE_ID=CMS_OFFLINE_RESOURCES.RESOURCE_ID
> AND 
> CMS_OFFLINE_STRUCTURE.RESOURCE_ID=CMS_OFFLINE_RESOURCES.RESOURCE_ID 
> ORDER BY CMS_OFFLINE_STRUCTURE.RESOURCE_PATH ASC
>
>
> where for postgresql there are 2 errors:
> 1. the alias of the column 'LOCKED_IN_PROJECT' have to be declared 
> with AS
> 2. the PRICINPAL_ID is something like a string so it should be 
> enclosed in quotes.
>
> But the real strange thing is that in this case Opencms is running 
> over a GenericSQL, the queries are taken form
>
> org.opencms.db.generic (query.properties)... and not from 
> org.opencms.db.postgresql.
>
> In all the previous steps the system was running correcly against my 
> posqgresql database...
>
> Is this a correct behavior, can exist shared queries between different 
> dbms?
>
> Thanks
> I.
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please 
> visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

It's looks like bug #1010 which was introduced in v. 6.0.3.
Bug #878 was closed in 6.0.4 but still exists in 6.2beta.

I installed 6.2beta on PostgreSQL 8.1.3 with 
postgresql-8.1-405.jdbc3.jar. I created database with utf-8 encoding and 
during the installation there was exceptions :

Caused by: org.opencms.db.CmsDbSqlException: An SQL error occurred when 
executing the following query: INSERT INTO CMS_PROJECTS 
(PROJECT_ID,USER_ID,GROUP_ID,MANAGERGROUP_ID,TASK_ID,PROJECT_NAME,PROJECT_DESCRIPTION,PROJECT_FLAGS,DATE_CREATED,PROJECT_TYPE)VALUES 
(39,c300ba5c-01e8-3727-b305-5dcc9ccae1ee,5f81f1a1-1f7d-3af6-b188-3bac3da54580,5f81f1a1-1f7d-3af6-b188-3bac3da54580,39,Import 
of module com.alkacon.documentation.howto_httpd_tomcat_modproxy,System 
generated project to import module 
"com.alkacon.documentation.howto_httpd_tomcat_modproxy".,0,1141650558971,1). 


Do you have similar exceptions during installation ?
<http://www.opencms.org/bugzilla/show_bug.cgi?id=1010>



More information about the opencms-dev mailing list