Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup with JPA PostgreSQL fails #24

Closed
pStrudthoff opened this issue Apr 5, 2012 · 2 comments
Closed

Setup with JPA PostgreSQL fails #24

pStrudthoff opened this issue Apr 5, 2012 · 2 comments

Comments

@pStrudthoff
Copy link
Contributor

OpenCms 8.0.3 / Tomcat 7.0.23 / PostgreSQL 9.1.2

The setup with JPA PostgreSQL fails. The setup with the "normal" PostgreSQL
driver works. The problem occurs on both Linux and Windows systems.

Log below:

78:
77: Shutdown completed, total uptime was 00:09:12.
76: Shutting down OpenCms, version 8.0.3 in web application "opencms"
75:
74:
73: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:202)
72: at
org.opencms.setup.CmsSetupWorkplaceImportThread.kill(CmsSetupWorkplaceImportThread.java:110)
71: at org.opencms.main.CmsShell.exit(CmsShell.java:571)
70: java.lang.NullPointerException
69: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:187)
68: at org.opencms.main.CmsShell.start(CmsShell.java:663)
67: at org.opencms.main.CmsShell.executeCommands(CmsShell.java:835)
66: at org.opencms.main.CmsShell.executeCommand(CmsShell.java:760)
65: ${user}@${project}>java.lang.NullPointerException
64: ${user}@${project}># Turn echo on
63: ... 18 more
62: at
org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34)
61: at
org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.open(QueryImpl.java:2070)
60: at
org.apache.openjpa.datacache.QueryCacheStoreQuery$CachingResultObjectProvider.open(QueryCacheStoreQuery.java:644)
59: at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94)
58: at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220)
57: at
org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230)
56: at
org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427)
55: at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391)
54: at
org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:424)
53: at
org.apache.openjpa.jdbc.sql.SelectImpl.executeQuery(SelectImpl.java:499)
52: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:274)
51: at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1785)
50: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
49: at
org.apache.openjpa.jdbc.sql.PostgresDictionary$PostgresPreparedStatement.executeQuery(PostgresDictionary.java:1004)
48: at
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:284)
47: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeQuery(LoggingConnectionDecorator.java:1183)
46: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)
45: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)
44: at
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)
43: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
42: Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: FEHLER:
ungültige ESCAPE-Zeichenkette
41: ... 6 more
40: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:537)
39: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:513)
38: at
org.opencms.db.CmsSecurityManager.hasRole(CmsSecurityManager.java:2745)
37: at
org.opencms.db.CmsDriverManager.getGroupsOfUser(CmsDriverManager.java:3842)
36: at
org.opencms.db.jpa.CmsUserDriver.readGroupsOfUser(CmsUserDriver.java:1304)
35: at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:319)
34: at
org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
33: at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
32: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
31: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
30: at
org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
29: at
org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
28: at
org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:40)
27: at
org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.handleCheckedException(QueryImpl.java:2111)
26: at
org.apache.openjpa.datacache.QueryCacheStoreQuery$CachingResultObjectProvider.handleCheckedException(QueryCacheStoreQuery.java:701)
25: at
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
24: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:70)
23: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:118)
22: at
org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)
21: at
org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4829)
20: at
org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4869)
19: FailedObject: SELECT T_CmsDAOGroups, T_CmsDAOGroupUsers FROM
CmsDAOGroups T_CmsDAOGroups, CmsDAOGroupUsers T_CmsDAOGroupUsers WHERE
T_CmsDAOGroupUsers.m_userId=?1 AND
T_CmsDAOGroups.m_groupId=T_CmsDAOGroupUsers.m_groupId AND
T_CmsDAOGroups.m_groupOu LIKE ?2 AND T_CmsDAOGroups.m_groupFlags >= ?3 ORDER BY
T_CmsDAOGroups.m_groupOu, T_CmsDAOGroups.m_groupName [java.lang.String]
18: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
17: Caused by: <openjpa-2.1.0-r422266:1071316 fatal general error>
org.apache.openjpa.persistence.PersistenceException: FEHLER: ungültige
ESCAPE-Zeichenkette
16: at
org.opencms.setup.CmsSetupWorkplaceImportThread.run(CmsSetupWorkplaceImportThread.java:148)
15: at org.opencms.main.CmsShell.(CmsShell.java:447)
14: at
org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:1816)
13: at
org.opencms.main.OpenCmsCore.initConfiguration(OpenCmsCore.java:1196)
12: at
org.opencms.scheduler.CmsScheduleManager.initialize(CmsScheduleManager.java:235)
11: at
org.opencms.security.CmsRoleManager.checkRole(CmsRoleManager.java:110)
10: at
org.opencms.db.CmsSecurityManager.checkRole(CmsSecurityManager.java:539)
9: at org.opencms.db.jpa.CmsDbContext.clear(CmsDbContext.java:80)
8: at
org.opencms.db.jpa.CmsDbContext.commitAndClose(CmsDbContext.java:146)
7: at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:585)
6: FailedObject: SELECT T_CmsDAOGroups, T_CmsDAOGroupUsers FROM
CmsDAOGroups T_CmsDAOGroups, CmsDAOGroupUsers T_CmsDAOGroupUsers WHERE
T_CmsDAOGroupUsers.m_userId=?1 AND
T_CmsDAOGroups.m_groupId=T_CmsDAOGroupUsers.m_groupId AND
T_CmsDAOGroups.m_groupOu LIKE ?2 AND T_CmsDAOGroups.m_groupFlags >= ?3 ORDER BY
T_CmsDAOGroups.m_groupOu, T_CmsDAOGroups.m_groupName [java.lang.String]
5: Hint: ESCAPE-Zeichenkette muss null oder ein Zeichen lang sein
{prepstmnt 24024212 SELECT t1.group_id, t0.group_id, t0.user_id, t1.group_ou,
t1.group_name FROM public.cms_groupusers t0, public.cms_groups t1 WHERE
(t0.user_id = ? AND t1.group_id = t0.group_id AND t1.group_ou LIKE ? ESCAPE
'' AND t1.group_flags >= ?) ORDER BY t1.group_ou ASC, t1.group_name ASC
[params=?, ?, ?]} [code=0, state=22025]
4: <openjpa-2.1.0-r422266:1071316 fatal store error>
org.apache.openjpa.persistence.RollbackException: FEHLER: ungültige
ESCAPE-Zeichenkette
3:
2: OpenCms property file: "C:\Programme\Apache Software Foundation\Tomcat
7.0\webapps\opencms\WEB-INF\config\opencms.properties".
1: OpenCms WEB-INF path: "C:\Programme\Apache Software Foundation\Tomcat
7.0\webapps\opencms\WEB-INF".

@goshoo
Copy link
Contributor

goshoo commented Apr 8, 2012

Hi. This is a known problem with PostgreSQL 9.1 and OpenJPA < 2.2.0
https://issues.apache.org/jira/browse/OPENJPA-2056
You can upgrade to OpenJPA 2.2.0 and if you do so do not forget to add asm.jar to the WEB-INF/lib folder.

@tHerrmann
Copy link

With the update to OpenJPA 2.2.0 this issue should be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants