フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
patrice Louis VERIN
Custom SQL file declaration ERROR
2010/08/12 2:43
答え

patrice Louis VERIN

ランク: New Member

投稿数: 22

参加年月日: 2009/12/23

最近の投稿

HI,

I'm working on project using lifera 5.2.3 and a Sybase v 12.1 database.
We develop in the ext environement.
I't works properly when I use service builder's service but when i try to declare a new custom-sql file as describe in the wiki I have an com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException

Here is my portal-ext.property file :
jdbc.default.driverClassName=com.sybase.jdbc3.jdbc.SybDataSource
jdbc.default.url=jdbc:sybase:Tds:SERV-DEV:47000
jdbc.default.username=lportal
jdbc.default.password=lportal

hibernate.dialect=org.hibernate.dialect.Sybase11Dialect
hibernate.jdbc.batch_size=0
custom.sql.configs=custom-sql/lbpam.xml
custom.sql.function.isnull=ISNULL(?, '1') = '1'
custom.sql.function.isnotnull=ISNULL(?, '1') = '0'


everything works fine if I don't put the line :custom.sql.configs=custom-sql/lbpam.xml

From the moment that i add this line, the portal starts but says i don't have to see the portlets that are one my first portal page.


Has someone got a suggestion ???
Are there other good alternative to use customSQL in liferay ??


Thanks in advance for you help


below is the exception stack trace :

Starting Liferay Portal Standard Edition 5.2.3 (Augustine / Build 5203 / May 20, 2009)
15:13:11,369 INFO [DBUtil:498] Database supports case sensitive queries
15:13:19,259 INFO [HotDeployUtil:64] Initializing hot deploy manager 13594028
15:13:19,415 INFO [AutoDeployDir:108] Auto deploy scanner started for C:\liferay-portal\deploy
15:13:19,540 ERROR [PortalInstances:300] com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException
com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException
at com.liferay.portal.service.persistence.RoleFinderImpl.findBySystem(RoleFinderImpl.java:235)
at com.liferay.portal.service.impl.RoleLocalServiceImpl.checkSystemRoles(RoleLocalServiceImpl.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy63.checkSystemRoles(Unknown Source)
at com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy15.checkCompany(Unknown Source)
at com.liferay.portal.service.impl.CompanyLocalServiceImpl.checkCompany(CompanyLocalServiceImpl.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy15.checkCompany(Unknown Source)
at com.liferay.portal.service.CompanyLocalServiceUtil.checkCompany(CompanyLocalServiceUtil.java:121)
at com.liferay.portal.util.PortalInstances._initCompany(PortalInstances.java:295)
at com.liferay.portal.util.PortalInstances.initCompany(PortalInstances.java:89)
at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:561)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4350)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4659)
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:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: com.liferay.portal.kernel.dao.orm.ORMException
at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:41)
at com.liferay.portal.dao.orm.hibernate.SessionImpl.createSQLQuery(SessionImpl.java:95)
at com.liferay.portal.service.persistence.RoleFinderImpl.findBySystem(RoleFinderImpl.java:224)
... 73 more
Shagul Khajamohideen
RE: Custom SQL file declaration ERROR
2010/08/11 15:26
答え

Shagul Khajamohideen

ランク: Liferay Master

投稿数: 759

参加年月日: 2007/09/27

最近の投稿

When you override the custom.sql.configs you will always keep the original value in portal.properties and add yours separated by comma.
Ahmed Hasan
RE: Custom SQL file declaration ERROR
2010/08/11 18:53
答え

Ahmed Hasan

ランク: Regular Member

投稿数: 132

参加年月日: 2007/04/13

最近の投稿

Hi Patrice,

Looks like you have not properly over ridden the portal.properties file. The custom.sql.config entry is given wrongly.

Please check this link for the correct usage of custom sql. I have clearly explained the process of using custom sql.

Please revert back to me for any help.

Wonder why you are still using 5.2.3 and extension envt. Have you tried porting your application to the latest version of liferay.

Ahmed Hasan
CTO, mPower Global Inc.
patrice Louis VERIN
RE: Custom SQL file declaration ERROR
2010/08/12 4:49
答え

patrice Louis VERIN

ランク: New Member

投稿数: 22

参加年月日: 2009/12/23

最近の投稿

Hi,

thanks very much to both of you.
I had overwridden the values of portal.properties effectively

problem solved