Fórum

Connecting with MySQL

Jan Kosecki, modificado 11 Anos atrás.

Connecting with MySQL

New Member Postagens: 16 Data de Entrada: 29/10/12 Postagens Recentes
Hi, I just wanted to connect liferay with my MySQL server according to the user guide. I've created portal-ext.properties with:

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/liferay_portal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=admin	
jdbc.default.password=admin


The connection with the database is established during startup of the server. Unfortunately, when liferay tries to populate database with data, I get following exceptions and server stops immediately.
How can I fix this problem?

21:13:10,282 INFO  [DialectDetector:69] Determining dialect for MySQL 5
21:13:10,348 INFO  [DialectDetector:49] Using dialect org.hibernate.dialect.MySQLDialect
21:13:13,382 INFO  [PortalImpl:278] Global lib directory /F:/Liferay/liferay-portal-6.0.6/tomcat-6.0.29/lib/ext/
21:13:13,384 INFO  [PortalImpl:298] Portal lib directory /F:/Liferay/liferay-portal-6.0.6/tomcat-6.0.29/webapps/ROOT/WEB-INF/lib/
Starting Liferay Portal Community Edition 6.0.6 CE (Bunyan / Build 6006 / February 17, 2011)
21:13:27,106 INFO  [BaseDB:403] Database does not support case sensitive queries
21:13:27,290 INFO  [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyProcessSuite
21:13:27,291 INFO  [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyProperties
21:13:27,293 INFO  [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyMySQL
21:13:27,295 WARN  [NewProxyPreparedStatement:1815] Exception on close of inner statement.
com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
	at com.mysql.jdbc.Connection.unsetMaxRows(Connection.java:5820)
	at com.mysql.jdbc.Statement.realClose(Statement.java:2023)
	at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:2185)
	at com.mysql.jdbc.PreparedStatement.close(PreparedStatement.java:687)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1811)
	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.closeStatement(StdJDBCDelegate.java:3609)
	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2932)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2742)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$36.execute(JobStoreSupport.java:2728)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3742)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2724)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:263)
21:13:27,299 ERROR [ErrorLogger:2166] An error occured while scanning for the next trigger to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: 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 'OPTION SQL_SELECT_LIMIT=5' at line 1 [See nested exception: com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=5' at line 1]
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2785)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$36.execute(JobStoreSupport.java:2728)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3742)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2724)
	at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:263)
Caused by: com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=5' at line 1
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
	at com.mysql.jdbc.Connection.execSQL(Connection.java:3179)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
	at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2921)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2742)
	... 4 more
21:13:27,344 INFO  [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyCounter
21:13:27,396 INFO  [VerifyProcess:76] Verifying com.liferay.portal.verify.VerifyUUID
thumbnail
jelmer kuperus, modificado 11 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 1191 Data de Entrada: 10/03/10 Postagens Recentes
this link might be useful
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Which version of liferay, OS, jdbc driver, and mysql are you using? I haven't had problem using mysql on Windows, CentOS, and Ubuntu with MySQL 5.0 and 5.5.

If you are using 5.6, maybe this?
http://bugs.mysql.com/bug.php?id=66659
thumbnail
Adolfo Benedetti, modificado 11 Anos atrás.

RE: Connecting with MySQL

Junior Member Postagens: 45 Data de Entrada: 04/06/09 Postagens Recentes
If you are using mysql 5.6.x don't use this option explicitly, it is added by the jdbc driver. just update your connector at ../liferay-portal-6.xx/tomcat-xxx/lib/ext
thumbnail
Sohil Ladhani, modificado 10 Anos atrás.

RE: Connecting with MySQL

New Member Postagens: 6 Data de Entrada: 17/11/12 Postagens Recentes
Thanks a ton! You saved my final year project! emoticon
Manisha Thote, modificado 10 Anos atrás.

RE: Connecting with MySQL

New Member Postagens: 8 Data de Entrada: 13/02/12 Postagens Recentes
Setting of Mysql,
jdbc.default.driverClassName = com.mysql.jdbc.Driver
jdbc.default.url = jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username = root
jdbc.default.password = root

In Your case just update the driver,it will work
pervaiz malla, modificado 10 Anos atrás.

SQL_SELECT_LIMIT=DEFAULT'

New Member Mensagem: 1 Data de Entrada: 16/05/13 Postagens Recentes
Experts..
I am facing the same problem
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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
i cannot figure out how to update the connector ....
any handy solution will be kindness.
thumbnail
Ahmed Hasan, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 306 Data de Entrada: 13/04/07 Postagens Recentes
Update the mysql.jar inside "tomcat/lib/ext" and it will solve the problem. download the latest version of the mysql connnector for java from mysql download site. after downloading the zip, just extract the jar file inside "tomcat/lib/ext" and rename it as "mysql.jar" and restart the server.
Dayanand Chowdhary, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

New Member Postagens: 4 Data de Entrada: 19/07/13 Postagens Recentes
Hi Ahmed
i have downloaded the respective file(mysql-connector-java-5.1.25.zip) and has been put in \liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\lib\ext, but when i start the tomcat server, again mysql.jar is created and getting 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1

below are the logs,
12:10:30,917 INFO [pool-2-thread-1][JarUtil:55] Downloading http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.0.7/mysql-connector-java-5.0.7.jar
12:10:31,985 INFO [pool-2-thread-1][JarUtil:140] Writing C:\liferay\liferay-workspace\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\lib\ext\mysql.jar
12:10:33,025 INFO [pool-2-thread-1][DialectDetector:71] Determine dialect for MySQL 5
12:10:33,051 INFO [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect


12:13:41,830 WARN [PersistedQuartzSchedulerEngineInstance_QuartzSchedulerThread][NewProxyPreparedStatement:1815] Exception on close of inner statement.
com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
at com.mysql.jdbc.Connection.unsetMaxRows(Connection.java:5820)
at com.mysql.jdbc.Statement.realClose(Statement.java:2023)
at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:2185)
at com.mysql.jdbc.PreparedStatement.close(PreparedStatement.java:687)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1811)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.closeStatement(StdJDBCDelegate.java:3242)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2582)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2755)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2751)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
12:13:54,884 ERROR [liferay/scheduler_dispatch-5][JDBCExceptionReporter:76] 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
12:13:54,904 ERROR [liferay/scheduler_dispatch-5][ParallelDestination:117] Unable to process message {destinationName=liferay/scheduler_dispatch, response=null, responseDestinationName=null, responseId=null, payload=null, values={principalPassword=null, principalName=null, JOB_STATE=com.liferay.portal.kernel.scheduler.JobState@99d847, MESSAGE_LISTENER_CLASS_NAME=com.liferay.portlet.blogs.messaging.CheckEntryMessageListener, RECEIVER_KEY=com.liferay.portlet.blogs.messaging.CheckEntryMessageListener.com.liferay.portlet.blogs.messaging.CheckEntryMessageListener, MESSAGE_LISTENER_UUID=0d3890eb-b53a-4194-bd50-da8ca9d7fb2e, CONTEXT_PATH=, EXCEPTIONS_MAX_SIZE=0, JOB_NAME=com.liferay.portlet.blogs.messaging.CheckEntryMessageListener, GROUP_NAME=com.liferay.portlet.blogs.messaging.CheckEntryMessageListener, PORTLET_ID=null, DESTINATION_NAME=liferay/scheduler_dispatch, companyId=0}}
com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:31)
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 com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at $Proxy283.receive(Unknown Source)
at com.liferay.portal.kernel.scheduler.messaging.SchedulerEventMessageListenerWrapper.receive(SchedulerEventMessageListenerWrapper.java:73)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:63)
at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:114)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:671)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:582)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.SQLGrammarException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:193)


Awaiting for your kind response

Thanks,
Daya
thumbnail
Manish Yadav, modificado 10 Anos atrás.

RE: Connecting with MySQL

Expert Postagens: 493 Data de Entrada: 26/05/12 Postagens Recentes
Are you using maven ..if yes then add new jar in mvn reporsitery othewise you can disable mysql entry from aritifactes
Regards
Manish Banwari Lal Yadav
Dayanand Chowdhary, modificado 10 Anos atrás.

RE: Connecting with MySQL

New Member Postagens: 4 Data de Entrada: 19/07/13 Postagens Recentes
Thanks for your kind reply manish, i resolved it by using mysql-connector-java-5.1.22.jar instead of mysql-connector-java-5.1.25.zip(maven)
thumbnail
Juvenal Marcos Batista, modificado 10 Anos atrás.

RE: Connecting with MySQL

New Member Mensagem: 1 Data de Entrada: 22/03/13 Postagens Recentes
Yes, updated the file mysql.jar and it worked. Thanks.
Nagaraju Bandaru, modificado 10 Anos atrás.

RE: Connecting with MySQL

New Member Postagens: 12 Data de Entrada: 04/02/09 Postagens Recentes
Hi All,
I am getting similar error while installing liferay 6.1.2 on Weblogic 10.3.6. I have tried with mysql-connector-java-5.1.23-bin.jar, mysql-connector-java-5.1.22-bin.jar and mysql-connector-java-5.1.25-bin.jar. Error is given below. Can you please tell if you have done anything apart from changing mysql jar versions to resolve this issue?

... 24 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have a
n error in your SQL syntax; check the manual that corresponds to your MySQL serv
er version for the right syntax to use near 'OPTION SQL_SELECT_LIMIT=DEFAULT' at
line 1
at sun.reflect.GeneratedConstructorAccessor122.newInstance(Unknown Sourc
e)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3597)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3529)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619)
at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java
:1606)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
2265)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewPr
oxyPreparedStatement.java:76)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:
208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2542)
... 32 more


Thanks in advance

regards,
Nagaraju Bandaru
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
The option select default message is a result of using an older driver against a newer mysql.

Use the latest connector j driver. Replace the current mysql driver from the global lib dir (lib/ext in tomcat) with the newer driver and restart the container.
thumbnail
Ahmed Hasan, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 306 Data de Entrada: 13/04/07 Postagens Recentes
Hi Daya,

Hope you've renamed the new file as "mysql.jar" and replaced the old file with this one. Restart the server.


Yours truly,
Ahamed Hasan
Author, Liferay Portlet Cookbook
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Ahmed Hasan:
Hope you've renamed the new file as "mysql.jar" and replaced the old file with this one.


Rename is not necessary and frankly leads to all kinds of version confusion. As long as the old mysql.jar is taken out, the new one could be renamed to zebra-123.jar and it will work.

I understand why, from Liferay's perspective, it's easier to strip versions out of the jar filenames, but from an administration perspective it's a total pain in the a**, and I recommend not doing it unless it is absolutely necessary.
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
Can we use mysql 5.6 on LR 6.1.1....?
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
yes just update the connector-j jar.
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
David H Nebinger:
yes just update the connector-j jar.



I tried using
mysql-connector-java-5.1.26-bin
,hope this is the latest but stil i'm facing same issue.

Console just shows upto this line 11:23:33,189 INFO [pool-2-thread-1][ReleaseLocalServiceImpl:84] Create tables and populate with default data
Oct 21, 2013 11:21:46 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: F
:\azhar\CIS\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32
;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Samsung\AllShare Fr
amework DMS\1.3.15\;C:\Program Files\Samsung\AllShare Framework DMS\1.3.15\64bit\;C:\Program Files\Java\jdk1.7.0/bin;F:\SOFTWARE\apache-ant-1.9.0/bin
Oct 21, 2013 11:21:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Oct 21, 2013 11:21:47 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Oct 21, 2013 11:21:47 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 730 ms
Oct 21, 2013 11:21:47 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Oct 21, 2013 11:21:47 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Oct 21, 2013 11:21:47 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor F:\azhar\CIS\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\conf\Catalina\localhost\ROOT.xml
Loading jar:file:/F:/azhar/CIS/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/F:/azhar/CIS/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/F:/azhar/CIS/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Oct 21, 2013 11:21:51 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
11:21:59,675 INFO [pool-2-thread-1][DialectDetector:71] Determine dialect for MySQL 5
11:21:59,737 INFO [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
Starting Liferay Portal Community Edition 6.1.1 CE GA2 (Paton / Build 6101 / July 31, 2012)
11:23:31,242 ERROR [pool-2-thread-1][JDBCExceptionReporter:76] Table 'testing2.lock_' doesn't exist
11:23:33,186 WARN [pool-2-thread-1][ReleaseLocalServiceImpl:151] Table 'testing2.release_' doesn't exist
11:23:33,189 INFO [pool-2-thread-1][ReleaseLocalServiceImpl:84] Create tables and populate with default data
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Get rid of all of the Liferay tables that you currently have in the testing2 schema and try again.

Looks like there may be some tables out there, but not all, so Liferay cannot determine what state the database is in.
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
hi
Each time i tried with new tomcat bundle and new database schema. and i'm on windows8 machine
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
I had to uninstal mysql 5.6 and go for mysql 5.5.29.and it is woking fine emoticonemoticonemoticonemoticon

and i became expert emoticonemoticonemoticonemoticon
thumbnail
David H Nebinger, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
but do you feel like an expert? emoticon

I'm running Liferay on win7 & mysql 5.6, so i'm not sure why your config wasn't working.
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
David H Nebinger:
but do you feel like an expert? emoticon


just joking and actually i was talking about liferay forum rank(>250) that u might not notice emoticon
Shreyas Kamthe, modificado 9 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Junior Member Postagens: 58 Data de Entrada: 09/06/14 Postagens Recentes
Hi,
This is shreyas
I am trying to connect liferay to mysql database
i have created the portal-ext.properties file and i have also got the latest connector jar file.
And i am using test as my database
But when i try to connect i get an error saying that
test.lock_ table does no exist create table and populate it with default values.
Is this because i am using default database test instead of lportal ?

Please help
thumbnail
mohammad azaruddin, modificado 9 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
This is quite normal when you start the server for the very first time...Wait till the server is started
suneel kumar, modificado 8 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

New Member Postagens: 15 Data de Entrada: 15/09/15 Postagens Recentes
While starting the server i got this msg pls help me...


Sep 17, 2015 3:49:40 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\RSA Security\RSA SecurID Software Token\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.4 & MySQL Utilities 1.5.4 1.5\Doctrine extensions for PHP\;C:\Program Files\Java\jdk1.6.0_26\bin;.
Sep 17, 2015 3:49:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 17, 2015 3:49:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 17, 2015 3:49:41 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1253 ms
Sep 17, 2015 3:49:41 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 17, 2015 3:49:41 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Sep 17, 2015 3:49:41 AM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor D:\suneel_temp\LRDS61\liferay-portal-6.1.20-ee-ga2\tomcat-7.0.27\conf\Catalina\localhost\ROOT.xml
Loading jar:file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
Loading jar:file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/portal-ide.properties
Loading file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-developer.properties
Loading file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/portal-setup-wizard.properties
Loading file:/D:/suneel_temp/LRDS61/liferay-portal-6.1.20-ee-ga2/portal-ext.properties
Sep 17, 2015 3:49:45 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
03:49:53,128 INFO [pool-2-thread-1][DialectDetector:71] Determine dialect for MySQL 5
03:49:53,190 INFO [pool-2-thread-1][DialectDetector:136] Found dialect org.hibernate.dialect.MySQLDialect
Starting Liferay Portal Enterprise Edition 6.1.20 EE (Paton / Build 6120 / July 31, 2012)
03:50:25,015 INFO [pool-2-thread-1][BaseDB:455] Database does not support case sensitive queries
03:50:25,857 INFO [pool-2-thread-1][LicenseManager:?] Portal Non-Production license validation passed
03:50:25,873 INFO [pool-2-thread-1][ServerDetector:154] Server supports hot deploy
03:50:25,873 INFO [pool-2-thread-1][PluginPackageUtil:1030] Reading plugin package for the root context
03:50:33,424 INFO [pool-2-thread-1][AutoDeployDir:106] Auto deploy scanner started for D:\suneel_temp\LRDS61\liferay-portal-6.1.20-ee-ga2\deploy
03:50:35,703 WARN [PersistedQuartzSchedulerEngineInstance_QuartzSchedulerThread][NewProxyPreparedStatement:1815] Exception on close of inner statement.
com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
at com.mysql.jdbc.Connection.unsetMaxRows(Connection.java:5820)
at com.mysql.jdbc.Statement.realClose(Statement.java:2023)
at com.mysql.jdbc.PreparedStatement.realClose(PreparedStatement.java:2185)
at com.mysql.jdbc.PreparedStatement.close(PreparedStatement.java:687)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1811)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.closeStatement(StdJDBCDelegate.java:3241)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2581)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2752)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3807)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2748)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
03:50:35,734 ERROR [PersistedQuartzSchedulerEngineInstance_QuartzSchedulerThread][ErrorLogger:110] An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: 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 'OPTION SQL_SELECT_LIMIT=1' at line 1 [See nested exception: com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=1' at line 1]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2837)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$41.execute(JobStoreSupport.java:2752)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3807)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2748)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
Caused by: com.mysql.jdbc.exceptions.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 'OPTION SQL_SELECT_LIMIT=1' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3179)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1428)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggerToAcquire(StdJDBCDelegate.java:2570)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2778)
... 4 more
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
IIRC this is due to an out of date mysql connector j jar. Use the latest jar replacing the one in the global lib dir (tomcat's lib/ext directory).
thumbnail
mohammad azaruddin, modificado 10 Anos atrás.

RE: SQL_SELECT_LIMIT=DEFAULT'

Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
Hi david

When i use old database schema(created long ago ),server started succesfully with mysql 5.6 ......but when i create new schema in mysql 5.6 and try running server i got issue expained above...So i think it was not version problem but might be because of corrupted mysql....Even i was not able to set environmental variable,when i try mysql command in cmd i was getting error like mysql is not recognised as internal or external command...


If above statement is correct then we can conclude that,mysql 5.6 is compatible with LR 6.1.1 with latest connector jar on lib folder
Piyush Shukla, modificado 8 Anos atrás.

Add user to organization, programmatically? can you provide information abo

Junior Member Postagens: 46 Data de Entrada: 18/09/15 Postagens Recentes
Hi Sir


// i'm calling like this method regularOrg and OrgUser method inside updateInstance
Organization org = null;
org = CreateRegularOrg(companyName, company.getCompanyId());

addOrgUser(org, tenantAdminName,tenantAdminEmailId);


//this method for create regularOrganization(this is woking fine for me (regular organization is creating))
SuppressWarnings({ "unused", "deprecation" })
private Organization CreateRegularOrg(String tenant, long companyId) {

ServiceContext serviceContext = ServiceContextThreadLocal
.getServiceContext();
serviceContext.setCompanyId(companyId);
Organization org = null;
try {
org = OrganizationServiceUtil.addOrganization(0, tenant,"regular-organization", true, 19014, 19, 12017,StringPool.BLANK, true, serviceContext);
org.setCompanyId(companyId);

org = OrganizationLocalServiceUtil.updateOrganization(org);
org.getExpandoBridge().setAttribute("tenant ", tenant);
} catch (PortalException e) {
e.printStackTrace();
} catch (SystemException e) {
e.printStackTrace();
}
return org;
}

Now i want to create user with below field but user shoud show inside regular organization(this user code is not working for me user is not creating inside organization)user is not created in bd as well as insdie regular organization Sir pls help me out what to do()

private void addOrgUser(Organization org, String tenantAdminName,String tenantAdminEmailId)
throws PortalException {

System.out.println("inside addOrgUser method========================================"+org.getUserName());
try {

User newUser = UserLocalServiceUtil.createUser(CounterLocalServiceUtil.increment());
System.out.println("inside addOrgUser for User obj========================================"+newUser);
newUser.setFirstName(tenantAdminName);
System.out.println("tenantAdminName obj========================================"+newUser);

newUser.setEmailAddress(tenantAdminEmailId);
System.out.println("tenantAdminName obj========================================"+newUser);

newUser.setCompanyId(org.getCompanyId());
System.out.println("tenantAdminName obj========================================"+org.getCompanyId());
newUser.setScreenName(tenantAdminEmailId);
System.out.println("tenantAdminEmailId for screen name========================================"+newUser);
UserLocalServiceUtil.updateUser(newUser);

UserLocalServiceUtil.addOrganizationUser(org.getOrganizationId(),newUser);

} catch (SystemException e) {
e.printStackTrace();
}
=======================================
this errow is sowing on console
06:02:51,825 ERROR [http-bio-8080-exec-6][render_portlet_jsp:132] null
java.lang.IllegalStateException: Screen name is null
at com.liferay.portal.model.impl.UserImpl.getDigest(UserImpl.java:147)
at com.liferay.portal.model.impl.UserImpl.getDigest(UserImpl.java:138)
at com.liferay.portal.model.impl.UserModelImpl.toString(UserModelImpl.java:1744)
at com.liferay.portlet.admin.action.EditInstanceAction.addOrgUser(EditInstanceAction.java:275)
at com.liferay.portlet.admin.action.EditInstanceAction.updateInstance(EditInstanceAction.java:228)
at com.liferay.portlet.admin.action.EditInstanceAction.processAction(EditInstanceAction.java:101)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:166)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:216)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:71)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:618)
at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:649)
at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:312)
at com.liferay.portlet.PortletContainerImpl._doProcessAction(PortletContainerImpl.java:402)
at com.liferay.portlet.PortletContainerImpl.processAction(PortletContainerImpl.java:110)
at com.liferay.portlet.SecurityPortletContainerWrapper.processAction(SecurityPortletContainerWrapper.java:109)
at com.liferay.portlet.RestrictPortletContainerWrapper.processAction(RestrictPortletContainerWrapper.java:75)
at com.liferay.portal.kernel.portlet.PortletContainerUtil.processAction(PortletContainerUtil.java:115)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:356)
at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:178)

Regards
piyush
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Quick rules about forums:

1. you don't take over someone elses thread with a completely unrelated topic.
2. you don't revive "dead" threads (ones that have been inactive for many months or years).
suneel kumar, modificado 8 Anos atrás.

youtube portlet

New Member Postagens: 15 Data de Entrada: 15/09/15 Postagens Recentes
Hi ,

while configure the youtube portlet i got this exception. how to solve this

... 141 more
Caused by: java.sql.BatchUpdateException: Duplicate entry '10180-0-/youtube' for key 'IX_BC2C4231'
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2056)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 147 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '10180-0-/youtube' for key 'IX_BC2C4231'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1041)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2570)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2731)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2818)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2157)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2460)
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2008)
... 151 more
thumbnail
David H Nebinger, modificado 8 Anos atrás.

RE: Connecting with MySQL

Liferay Legend Postagens: 14914 Data de Entrada: 02/09/06 Postagens Recentes
Seriously? You couldn't read the post just one before your addition, the one that tells you not to tack on to another thread?