Forums de discussion
(RESOLVED)added column does not exist after build-service.
Sam Wan, modifié il y a 14 années.
(RESOLVED)added column does not exist after build-service.
Liferay Master Publications: 660 Date d'inscription: 03/03/09 Publications récentes
Dear all,
Had anyone seen the following problem before?
I have added a field "serviceType" in a service.xml file
But after build-service from Eclipse, started liferay, I got the following error when it tried to call a method from my project:
Your suggestion is highly appreciated.
Thanks
Sam
Had anyone seen the following problem before?
I have added a field "serviceType" in a service.xml file
<entity name="MyService" local-service="true" remote-service="true">
<!-- PK fields -->
<column name="myServiceId" type="long" primary="true" />
<!-- other fields -->
<column name="serviceName" type="String" />
<column name="description" type="String" />
<column name="dateCreated" type="Date" />
<column name="serviceType" type="String" />
<!-- finder methods -->
<finder name="N_D" return-type="Collection">
<finder-column name="serviceName" />
<finder-column name="description" />
</finder>
<reference package-path="com.liferay.portal" entity="UserGroupRole" />
<reference package-path="com.liferay.portal" entity="Group" />
<reference package-path="com.liferay.portal" entity="Company" />
<reference package-path="com.liferay.counter" entity="Counter" />
</entity>
But after build-service from Eclipse, started liferay, I got the following error when it tried to call a method from my project:
09:35:21,097 ERROR [JDBCExceptionReporter:101] ERROR: column ip6service0_.servicetype does not exist
com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: could not execute query
at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.processException(BasePersistenceImpl.java:91)
at au.com.ip6.ext.portlet.servicepackage.service.persistence.IP6ServicePackagePersistenceImpl.findAll(IP6ServicePackagePersistenceImpl.java:657)
at au.com.ip6.ext.portlet.servicepackage.service.persistence.IP6ServicePackagePersistenceImpl.findAll(IP6ServicePackagePersistenceImpl.java:612)
at au.com.ip6.ext.portlet.servicepackage.service.impl.IP6ServicePackageLocalServiceImpl.getServicePackageNamefromIndex(IP6ServicePackageLocalServiceImpl.java:56)
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:585)
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 $Proxy210.getServicePackageNamefromIndex(Unknown Source)
at au.com.ip6.ext.portlet.servicepackage.service.IP6ServicePackageLocalServiceUtil.getServicePackageNamefromIndex(IP6ServicePackageLocalServiceUtil.java:101)
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:585)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
....
...
at java.lang.Thread.run(Thread.java:595)
Caused by: com.liferay.portal.kernel.dao.orm.ORMException: could not execute query
at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(ExceptionTranslator.java:41)
at com.liferay.portal.dao.orm.hibernate.QueryImpl.list(QueryImpl.java:89)
at com.liferay.portal.kernel.dao.orm.QueryUtil.list(QueryUtil.java:69)
at au.com.ip6.ext.portlet.servicepackage.service.persistence.IP6ServicePackagePersistenceImpl.findAll(IP6ServicePackagePersistenceImpl.java:648)
... 155 more
Your suggestion is highly appreciated.
Thanks
Sam
Sam Wan, modifié il y a 14 années.
RE: added column does not exist after build-service.
Liferay Master Publications: 660 Date d'inscription: 03/03/09 Publications récentes
got this solved...
I carelessly typed a new field in the database table in upper case
I carelessly typed a new field in the database table in upper case