我刚刚创建了一个全新的SQL Server Liferay数据库。数据库是空的,我正在尝试让Liferay在Tomcat的启动时使用正确的表填充它。
我在portal-ext.properties中添加了属性以自动创建这些表:
schema.run.enabled =真
但是,没有创建表格,我遇到以下例外情况:
1dex IX_C1A01806 on Users_Roles (userId);_ [Sanitized]
213:04:23,941 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "U
3sers_Teams" because it does not exist or you do not have permissions.: create in
4dex IX_4D06AD51 on Users_Teams (teamId);_ [Sanitized]
513:04:23,948 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "U
6sers_Teams" because it does not exist or you do not have permissions.: create in
7dex IX_A098EFBF on Users_Teams (userId);_ [Sanitized]
813:04:23,955 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "U
9sers_UserGroups" because it does not exist or you do not have permissions.: crea
10te index IX_66FF2503 on Users_UserGroups (userGroupId);_ [Sanitized]
1113:04:23,962 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "U
12sers_UserGroups" because it does not exist or you do not have permissions.: crea
13te index IX_BE8102D6 on Users_UserGroups (userId);_ [Sanitized]
1413:04:23,970 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "V
15irtualHost" because it does not exist or you do not have permissions.: create un
16ique index IX_A083D394 on VirtualHost (companyId, layoutSetId);_ [Sanitized]
1713:04:23,978 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "V
18irtualHost" because it does not exist or you do not have permissions.: create un
19ique index IX_431A3960 on VirtualHost (hostname);_ [Sanitized]
2013:04:23,985 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
21ebDAVProps" because it does not exist or you do not have permissions.: create un
22ique index IX_97DFA146 on WebDAVProps (classNameId, classPK);_ [Sanitized]
2313:04:23,995 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
24ebsite" because it does not exist or you do not have permissions.: create index
25IX_96F07007 on Website (companyId);_ [Sanitized]
2613:04:24,003 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
27ebsite" because it does not exist or you do not have permissions.: create index
28IX_4F0F0CA7 on Website (companyId, classNameId);_ [Sanitized]
2913:04:24,010 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
30ebsite" because it does not exist or you do not have permissions.: create index
31IX_F960131C on Website (companyId, classNameId, classPK);_ [Sanitized]
3213:04:24,017 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
33ebsite" because it does not exist or you do not have permissions.: create index
34IX_1AA07A6D on Website (companyId, classNameId, classPK, primary_);_ [Sanitized]
35
3613:04:24,024 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
37ebsite" because it does not exist or you do not have permissions.: create index
38IX_F75690BB on Website (userId);_ [Sanitized]
3913:04:24,034 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
40ebsite" because it does not exist or you do not have permissions.: create index
41IX_76F15D13 on Website (uuid_);_ [Sanitized]
4213:04:24,041 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
43ebsite" because it does not exist or you do not have permissions.: create index
44IX_712BCD35 on Website (uuid_, companyId);_ [Sanitized]
4513:04:24,051 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
46ikiNode" because it does not exist or you do not have permissions.: create index
47 IX_5D6FE3F0 on WikiNode (companyId);_ [Sanitized]
4813:04:24,073 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
49ikiNode" because it does not exist or you do not have permissions.: create index
50 IX_B54332D6 on WikiNode (companyId, status);_ [Sanitized]
5113:04:24,082 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
52ikiNode" because it does not exist or you do not have permissions.: create index
53 IX_B480A672 on WikiNode (groupId);_ [Sanitized]
5413:04:24,090 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
55ikiNode" because it does not exist or you do not have permissions.: create uniqu
56e index IX_920CD8B1 on WikiNode (groupId, name);_ [Sanitized]
5713:04:24,105 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
58ikiNode" because it does not exist or you do not have permissions.: create index
59 IX_23325358 on WikiNode (groupId, status);_ [Sanitized]
6013:04:24,123 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
61ikiNode" because it does not exist or you do not have permissions.: create index
62 IX_6C112D7C on WikiNode (uuid_);_ [Sanitized]
6313:04:24,135 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
64ikiNode" because it does not exist or you do not have permissions.: create index
65 IX_E0E6D12C on WikiNode (uuid_, companyId);_ [Sanitized]
6613:04:24,143 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
67ikiNode" because it does not exist or you do not have permissions.: create uniqu
68e index IX_7609B2AE on WikiNode (uuid_, groupId);_ [Sanitized]
6913:04:24,150 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
70ikiPage" because it does not exist or you do not have permissions.: create index
71 IX_A2001730 on WikiPage (format);_ [Sanitized]
7213:04:24,157 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
73ikiPage" because it does not exist or you do not have permissions.: create index
74 IX_16E99B0A on WikiPage (groupId, nodeId, head);_ [Sanitized]
7513:04:24,164 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
76ikiPage" because it does not exist or you do not have permissions.: create index
77 IX_BA72B89A on WikiPage (groupId, nodeId, head, parentTitle, status);_ [Sanitiz
78ed]
7913:04:24,170 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
80ikiPage" because it does not exist or you do not have permissions.: create index
81 IX_E0092FF0 on WikiPage (groupId, nodeId, head, status);_ [Sanitized]
8213:04:24,176 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
83ikiPage" because it does not exist or you do not have permissions.: create index
84 IX_941E429C on WikiPage (groupId, nodeId, status);_ [Sanitized]
8513:04:24,183 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
86ikiPage" because it does not exist or you do not have permissions.: create index
87 IX_5FF21CE6 on WikiPage (groupId, nodeId, title, head);_ [Sanitized]
8813:04:24,189 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
89ikiPage" because it does not exist or you do not have permissions.: create index
90 IX_CAA451D6 on WikiPage (groupId, userId, nodeId, status);_ [Sanitized]
9113:04:24,195 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
92ikiPage" because it does not exist or you do not have permissions.: create index
93 IX_C8A9C476 on WikiPage (nodeId);_ [Sanitized]
9413:04:24,200 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
95ikiPage" because it does not exist or you do not have permissions.: create index
96 IX_E7F635CA on WikiPage (nodeId, head);_ [Sanitized]
9713:04:24,206 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
98ikiPage" because it does not exist or you do not have permissions.: create index
99 IX_65E84AF4 on WikiPage (nodeId, head, parentTitle);_ [Sanitized]
10013:04:24,214 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
101ikiPage" because it does not exist or you do not have permissions.: create index
102 IX_9F7655DA on WikiPage (nodeId, head, parentTitle, status);_ [Sanitized]
10313:04:24,220 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
104ikiPage" because it does not exist or you do not have permissions.: create index
105 IX_40F94F68 on WikiPage (nodeId, head, redirectTitle, status);_ [Sanitized]
10613:04:24,226 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
107ikiPage" because it does not exist or you do not have permissions.: create index
108 IX_432F0AB0 on WikiPage (nodeId, head, status);_ [Sanitized]
10913:04:24,232 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
110ikiPage" because it does not exist or you do not have permissions.: create index
111 IX_46EEF3C8 on WikiPage (nodeId, parentTitle);_ [Sanitized]
11213:04:24,238 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
113ikiPage" because it does not exist or you do not have permissions.: create index
114 IX_1ECC7656 on WikiPage (nodeId, redirectTitle);_ [Sanitized]
11513:04:24,244 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
116ikiPage" because it does not exist or you do not have permissions.: create index
117 IX_546F2D5C on WikiPage (nodeId, status);_ [Sanitized]
11813:04:24,257 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
119ikiPage" because it does not exist or you do not have permissions.: create index
120 IX_997EEDD2 on WikiPage (nodeId, title);_ [Sanitized]
12113:04:24,272 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
122ikiPage" because it does not exist or you do not have permissions.: create index
123 IX_E745EA26 on WikiPage (nodeId, title, head);_ [Sanitized]
12413:04:24,290 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
125ikiPage" because it does not exist or you do not have permissions.: create index
126 IX_BEA33AB8 on WikiPage (nodeId, title, status);_ [Sanitized]
12713:04:24,315 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
128ikiPage" because it does not exist or you do not have permissions.: create uniqu
129e index IX_3D4AF476 on WikiPage (nodeId, title, version);_ [Sanitized]
13013:04:24,343 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
131ikiPage" because it does not exist or you do not have permissions.: create index
132 IX_85E7CC76 on WikiPage (resourcePrimKey);_ [Sanitized]
13313:04:24,586 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
134ikiPage" because it does not exist or you do not have permissions.: create index
135 IX_B771D67 on WikiPage (resourcePrimKey, nodeId);_ [Sanitized]
13613:04:24,957 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
137ikiPage" because it does not exist or you do not have permissions.: create index
138 IX_E1F55FB on WikiPage (resourcePrimKey, nodeId, head);_ [Sanitized]
13913:04:25,069 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
140ikiPage" because it does not exist or you do not have permissions.: create index
141 IX_94D1054D on WikiPage (resourcePrimKey, nodeId, status);_ [Sanitized]
14213:04:25,084 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
143ikiPage" because it does not exist or you do not have permissions.: create uniqu
144e index IX_2CD67C81 on WikiPage (resourcePrimKey, nodeId, version);_ [Sanitized]
145
14613:04:25,091 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
147ikiPage" because it does not exist or you do not have permissions.: create index
148 IX_1725355C on WikiPage (resourcePrimKey, status);_ [Sanitized]
14913:04:25,113 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
150ikiPage" because it does not exist or you do not have permissions.: create index
151 IX_FBBE7C96 on WikiPage (userId, nodeId, status);_ [Sanitized]
15213:04:25,119 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
153ikiPage" because it does not exist or you do not have permissions.: create index
154 IX_9C0E478F on WikiPage (uuid_);_ [Sanitized]
15513:04:25,126 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
156ikiPage" because it does not exist or you do not have permissions.: create index
157 IX_5DC4BD39 on WikiPage (uuid_, companyId);_ [Sanitized]
15813:04:25,139 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
159ikiPage" because it does not exist or you do not have permissions.: create uniqu
160e index IX_899D3DFB on WikiPage (uuid_, groupId);_ [Sanitized]
16113:04:25,147 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
162ikiPageResource" because it does not exist or you do not have permissions.: crea
163te unique index IX_21277664 on WikiPageResource (nodeId, title);_ [Sanitized]
16413:04:25,166 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
165ikiPageResource" because it does not exist or you do not have permissions.: crea
166te index IX_BE898221 on WikiPageResource (uuid_);_ [Sanitized]
16713:04:25,174 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
168orkflowDefinitionLink" because it does not exist or you do not have permissions.
169: create index IX_A8B0D276 on WorkflowDefinitionLink (companyId);_ [Sanitized]
17013:04:25,180 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
171orkflowDefinitionLink" because it does not exist or you do not have permissions.
172: create index IX_A4DB1F0F on WorkflowDefinitionLink (companyId, workflowDefinit
173ionName, workflowDefinitionVersion);_ [Sanitized]
17413:04:25,196 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
175orkflowDefinitionLink" because it does not exist or you do not have permissions.
176: create index IX_B6EE8C9E on WorkflowDefinitionLink (groupId, companyId, classN
177ameId);_ [Sanitized]
17813:04:25,205 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
179orkflowDefinitionLink" because it does not exist or you do not have permissions.
180: create index IX_1E5B9905 on WorkflowDefinitionLink (groupId, companyId, classN
181ameId, classPK);_ [Sanitized]
18213:04:25,215 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
183orkflowDefinitionLink" because it does not exist or you do not have permissions.
184: create index IX_705B40EE on WorkflowDefinitionLink (groupId, companyId, classN
185ameId, classPK, typePK);_ [Sanitized]
18613:04:25,223 WARN [localhost-startStop-1][BaseDB:457] Cannot find the object "W
187orkflowInstanceLink" because it does not exist or you do not have permissions.:
188create index IX_415A7007 on WorkflowInstanceLink (groupId, companyId, classNameI
189d, classPK);_ [Sanitized]
19013:04:25,291 WARN [localhost-startStop-1][ReleaseLocalServiceImpl:288] Invalid
191object name 'Release_'.
19213:04:25,311 WARN [localhost-startStop-1][ReleaseLocalServiceImpl:288] Invalid
193object name 'Release_'.
19413:04:25,314 ERROR [localhost-startStop-1][MainServlet:209] com.liferay.portal.k
195ernel.events.ActionException: com.liferay.portal.kernel.exception.SystemExceptio
196n: Release_ table was not initialized properly
197com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.exce
198ption.SystemException: Release_ table was not initialized properly
199 at com.liferay.portal.events.StartupAction.run(StartupAction.java:74)
200 at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.ja
201va:1238)
202 at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:206)
203 at javax.servlet.GenericServlet.init(GenericServlet.java:160)
204 at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:
2051266)
206 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.ja
207va:1185)
208 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080
209)
210 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
211ava:5027)
212 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.ja
213va:5314)
214 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
215 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:9
21601)
217 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
218
219 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
220 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
221
222 at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
2231655)
224 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
225 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
226 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
227 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
228r.java:886)
229 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:
230908)
231 at java.lang.Thread.run(Thread.java:662)
232Caused by: com.liferay.portal.kernel.exception.SystemException: Release_ table w
233as not initialized properly
234 at com.liferay.portal.service.impl.ReleaseLocalServiceImpl.testSupportsStri
235ngCaseSensitiveQuery(ReleaseLocalServiceImpl.java:250)
236 at com.liferay.portal.service.impl.ReleaseLocalServiceImpl.getBuildNumber
237OrCreate(ReleaseLocalServiceImpl.java:185)
238 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
239 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
2409)
241 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
242sorImpl.java:25)
243 at java.lang.reflect.Method.invoke(Method.java:597)
244 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Servic
245eBeanMethodInvocation.java:115)
246 at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execut
247e(DefaultTransactionExecutor.java:62)
248 at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(Transact
249ionInterceptor.java:51)
250 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBe
251anMethodInvocation.java:111)
252 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
253hodAdvice.java:56)
254 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
255BeanMethodInvocation.java:111)
256 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
257hodAdvice.java:56)
258 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
259BeanMethodInvocation.java:111)
260 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
261hodAdvice.java:56)
262 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
263BeanMethodInvocation.java:111)
264 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
265hodAdvice.java:56)
266 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
267BeanMethodInvocation.java:111)
268 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
269hodAdvice.java:56)
270 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
271BeanMethodInvocation.java:111)
272 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
273hodAdvice.java:56)
274 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
275BeanMethodInvocation.java:111)
276 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
277hodAdvice.java:56)
278 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
279BeanMethodInvocation.java:111)
280 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
281hodAdvice.java:56)
282 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
283BeanMethodInvocation.java:111)
284 at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMet
285hodAdvice.java:56)
286 at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(Service
287BeanMethodInvocation.java:111)
288 at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAop
289Proxy.java:175)
290 at $Proxy77.getBuildNumberOrCreate(Unknown Source)
291 at com.liferay.portal.service.ReleaseLocalServiceUtil.getBuildNumberOrCrea
292te(ReleaseLocalServiceUtil.java:290)
293 at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:102)
294 at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:160)
295 at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
296 at com.liferay.portal.events.StartupAction.run(StartupAction.java:68)
297 ... 20 more
298Stopping the server due to unexpected startup errors
Liferay应该自动生成这些表格。有任何想法吗?
答案 0 :(得分:0)
原来这是我没有的DDL许可。一旦我获得了这个,我就能创建表没问题。
有关DDL的更多信息:http://en.wikipedia.org/wiki/Data_definition_language
答案 1 :(得分:0)
在我的情况下,我不得不重启MySQL服务来解决错误。
sudo launchctl unload -w /Library/LaunchDaemons/com.mysql.mysql.plist
sudo pkill mysqld
之后,我只是去了系统偏好设置并从那里启动了MySQL服务。一旦它开始,我运行服务器,它工作。