[opencms-dev] Cannot create a new resource (M$SQL Server 2005)
Jonne Zutt
jonne.zutt.ml at gmail.com
Fri Aug 8 16:38:33 CEST 2008
I saw that the same change was made for Postgresql. The
query.properties file included the comment that
Postgresql doesn't have a CONCAT function but uses || instead.
I could easily make the same change for MS SQL, compile the project
and try it out, and it worked.
Jonne.
Index: src/org/opencms/db/mssql/query.properties
===================================================================
RCS file: /usr/local/cvs/opencms/src/org/opencms/db/mssql/query.properties,v
retrieving revision 1.4
diff -r1.4 query.properties
25a26,37
>
> # MS SQL specific because of missing concat function: use concat operator +
> C_READ_RESOURCE_OUS=\
> SELECT DISTINCT \
> ${C_RELATIONS_SELECT_ATTRIBS} \
> FROM \
> CMS_${PROJECT}_RESOURCE_RELATIONS \
> WHERE \
> CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TYPE = ? \
> AND ? LIKE (CMS_${PROJECT}_RESOURCE_RELATIONS.RELATION_TARGET_PATH + '%')
>
-----
In the meantime, I downloaded the source code and tried to figure this
out myself.
I found an interesting error in my log file:
ERROR [explorer.CmsExplorerTypeAccess: 235] Error reading groups of user Admin
org.opencms.db.CmsDbSqlException: Error reading all roles for user
"Admin" over resource "/".
Caused by: java.sql.SQLException: 'CONCAT' is not a recognized
built-in function name.
That should be the '+' symbol for M$SQL Server 2005.
in query.properties:
C_READ_RESOURCE_OUS contains CONCAT function
which is used from src/org/opencms/db/generic/CmsVfsDriver.java
This seems to be the problem?
But I cannot find the query.properties file in my binary installation anywhere.
So, how can I fix this? (preferably in my binary installation)
Maybe I can add a CONCAT function to the database, I'll try to search
whether such a thing is possible.
Thanks,
Jonne.
---
Hi all,
Today I've installed OpenCMS and am curious to try out all of its features.
Unfortunately, I've got stuck just after installing and configuring it.
I downloaded the most recent version and let the installer create a
M$SQL Server 2005 database.
It all seems to work well, but my problem is that, if I select the 'New
resource'
icon, my book says it should display a list of resource types, such as
File / Folder / etc.
In my case I only see a message something like "No entries found".
Is this a known problem and is there a way to fix this?
Thanks in advance,
Jonne.
More information about the opencms-dev
mailing list