cancel
Showing results for 
Search instead for 
Did you mean: 

SQLGrammarException Error on Alfresco Ent. 2.2 WAR

akeb0n0
Champ in-the-making
Champ in-the-making
I had downloaded WAR file yesterday. There is one Tomcat instance, both Liferay and Alfresco must work together. Liferay working properly, there is no any problem.
I did extract WAR file into Tomcat /webapps/alfresco directory ( just WAR file, excep ZIP contents).
When I start the Tomcat, the following error message exception throwing. I can't find base SQL create files, so I can figure out myself. Thanks for your responce right now.

OS : Windows 2003 Standard
Java : JDK 1.6.0_10
Application Server : Tomcat 6.0

Apache Libs :
Directory of E:\Apache\Tomcat\lib

annotations-api.jar
catalina-ant.jar
catalina-ha.jar
catalina-tribes.jar
catalina.jar
el-api.jar
jasper-el.jar
jasper-jdt.jar
jasper.jar
jsp-api.jar
servlet-api.jar
tomcat-coyote.jar
tomcat-dbcp.jar
tomcat-i18n-es.jar
tomcat-i18n-fr.jar
tomcat-i18n-ja.jar


Directory of E:\Apache\Tomcat\lib\ext

activation.jar
ccpp.jar
container.jar
hsql.jar
jms.jar
jta.jar
jutf7.jar
mail.jar
mysql.jar
portal-kernel.jar
portal-service.jar
portlet-container.jar
portlet.jar
postgresql.jar
serializer.jar
support-tomcat.jar
xalan.jar
xercesImpl.jar
xml-apis.jar



ERROR MESSAGES :
*********************************************************************************
12:51:30,679 INFO  [domain.schema.SchemaBootstrap] Executing database script E:\Apache\Tomcat\temp\Alfresco\AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-36157.sql (Copied from classpath:alfresco/dbscripts/create/2
lect.MySQLInnoDBDialect/AlfrescoPostCreate-2.2-Extra.sql).
12:51:30,695 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX fk_alf_na_qn ON alf_node_aspects (qname_id)
12:51:30,851 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  ALTER TABLE alf_node_aspects ADD CONSTRAINT fk_alf_na_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id)
12:51:31,023 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX fk_alf_np_qn ON alf_node_properties (qname_id)
12:51:31,195 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  ALTER TABLE alf_node_properties ADD CONSTRAINT fk_alf_np_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id)
12:51:31,382 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX fk_avm_na_qn ON avm_aspects_new (qname_id)
12:51:31,539 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  ALTER TABLE avm_aspects_new ADD CONSTRAINT fk_avm_na_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id)
12:51:31,711 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX fk_avm_np_qn ON avm_node_properties_new (qname_id)
12:51:31,898 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  ALTER TABLE avm_node_properties_new ADD CONSTRAINT fk_avm_np_qn FOREIGN KEY (qname_id) REFERENCES alf_qname (id)
12:51:32,054 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX idx_avm_hl_revpk ON avm_history_links (descendent, ancestor)
12:51:32,226 DEBUG [domain.schema.SchemaBootstrap] Executing statement:  CREATE INDEX idx_avm_vr_revuq ON avm_version_roots (avm_store_id, version_id)
12:51:32,445 INFO  [domain.schema.SchemaBootstrap] All executed statements written to file E:\Apache\Tomcat\temp\Alfresco\AlfrescoSchemaUpdate-All_Statements-36158.sql.
12:51:32,523 ERROR [web.context.ContextLoader] Context initialization failed
org.hibernate.exception.SQLGrammarException: could not load an entity: [org.alfresco.repo.avm.IssuerIDImpl#node]
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:1865)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
        at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
        at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2992)
        at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:395)
        at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
        at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
        at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:195)
        at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:103)
        at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
        at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
        at org.alfresco.repo.avm.hibernate.IssuerIDDAOHibernate.get(IssuerIDDAOHibernate.java:22)
        at org.alfresco.repo.avm.Issuer$1.execute(Issuer.java:89)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:241)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:171)
        at org.alfresco.repo.avm.Issuer.init(Issuer.java:84)
        at org.alfresco.repo.avm.AvmBootstrap.onBootstrap(AvmBootstrap.java:92)
        at org.alfresco.util.AbstractLifecycleBean.onApplicationEvent(AbstractLifecycleBean.java:62)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:77)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:75)
        at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:241)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:349)
        at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:924)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?ssuer?d?m0_.issuer as is
m0_.version as version33_0_, ?ssuer' at line 1
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
        at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
        at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
        at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
        at org.hibernate.loader.Loader.doQuery(Loader.java:662)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
        at org.hibernate.loader.Loader.loadEntity(Loader.java:1851)
        … 51 more
23.Eyl.2008 12:51:32 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
23.Eyl.2008 12:51:32 org.apache.catalina.core.StandardContext start
SEVERE: Context [/alfresco] startup failed due to previous errors
23.Eyl.2008 12:51:39 org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
23.Eyl.2008 12:51:39 org.apache.catalina.core.StandardContext start
SEVERE: Context [/share] startup failed due to previous errors
23.Eyl.2008 12:51:53 org.apache.coyote.http11.Http11AprProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
23.Eyl.2008 12:51:53 org.apache.coyote.ajp.AjpAprProtocol start
INFO: Starting Coyote AJP/1.3 on ajp-8009
23.Eyl.2008 12:51:53 org.apache.catalina.startup.Catalina start
INFO: Server startup in 106473 ms
1 REPLY 1

akeb0n0
Champ in-the-making
Champ in-the-making
Just want add a small note. The operatings system default language is Turkish. I tried also English language, but didn't resolve the problem. I know the problem but I can't find sql files.

The error is wrong character mismatch, capitalization problem:
"MySQL server version for the right syntax to use near '?ssuer?d?m0_.issuer as is
m0_.version as version33_0_, ?ssuer' at line 1"

I think, should be below:
'ISSUERIDM0_.ISSUER as is m0_.version as version33_0_, ISSUER'