[使用] Liferay5.2.3连接oracle10报错
yaran926
2009-11-03
(1)..\tomcat-5.5.27\conf\Catalina\localhost\ROOT.XML中添加了如下一段:
<Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:demo2" username="portal" password="portal" maxActive="20" /> (2)..\tomcat-5.5.27\webapps\ROOT\WEB-INF\classes目录下新增portal-ext.properties jdbc.default.jndi.name=jdbc/LiferayPool hibernate.dialect=org.hibernate.dialect.Oracle10gDialect (3)oracle驱动包ojdbc14.jar放在tomcat-5.5.27\common\lib\ext目录下. 完成这三步后启动tomcat,报错如下: 06:23:50,156 ERROR [JDBCExceptionReporter:101] ORA-01002: 提取违反顺序 06:23:50,156 ERROR [OpenSSOFilter:139] com.liferay.portal.SystemException: com.l iferay.portal.kernel.dao.orm.ORMException: could not load an entity: [com.lifera y.counter.model.Counter#com.liferay.counter.model.Counter] com.liferay.portal.SystemException: com.liferay.portal.kernel.dao.orm.ORMExcepti on: could not load an entity: [com.liferay.counter.model.Counter#com.liferay.cou nter.model.Counter] at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.proce ssException(BasePersistenceImpl.java:91) at com.liferay.counter.service.persistence.CounterPersistence.createCoun terRegister(CounterPersistence.java:334) at com.liferay.counter.service.persistence.CounterPersistence.createCoun terRegister(CounterPersistence.java:290) at com.liferay.counter.service.persistence.CounterPersistence.getCounter Register(CounterPersistence.java:279) at com.liferay.counter.service.persistence.CounterPersistence.increment( CounterPersistence.java:131) at com.liferay.counter.service.persistence.CounterPersistence.increment( CounterPersistence.java:121) at com.liferay.counter.service.persistence.CounterPersistence.increment( CounterPersistence.java:117) at com.liferay.counter.service.persistence.CounterUtil.increment(Counter Util.java:42) at com.liferay.counter.service.impl.CounterLocalServiceImpl.increment(Co unterLocalServiceImpl.java:44) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok e(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy82.increment(Unknown Source) at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.ad dPortletPreferences(PortletPreferencesLocalServiceImpl.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok e(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy52.addPortletPreferences(Unknown Source) at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.ge tPreferences(PortletPreferencesLocalServiceImpl.java:223) at com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl.ge tPreferences(PortletPreferencesLocalServiceImpl.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok e(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:204) at $Proxy52.getPreferences(Unknown Source) at com.liferay.portal.service.PortletPreferencesLocalServiceUtil.getPref erences(PortletPreferencesLocalServiceUtil.java:180) at com.liferay.portal.util.PrefsPropsUtil.getPreferences(PrefsPropsUtil. java:259) at com.liferay.portal.util.PrefsPropsUtil.getBoolean(PrefsPropsUtil.java :54) at com.liferay.portal.servlet.filters.sso.opensso.OpenSSOFilter.processF ilter(OpenSSOFilter.java:57) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java :91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter .java:154) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(Sharepoi ntFilter.java:193) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java :91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter .java:154) at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFi lter(VirtualHostFilter.java:191) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter .java:154) at com.liferay.portal.servlet.filters.threadlocalcache.ThreadLocalCacheF ilter.processFilter(ThreadLocalCacheFilter.java:55) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java :91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter .java:154) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java :94) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewrit eFilter.java:738) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:172) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:433) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p rocessConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo int.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol lowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP ool.java:689) at java.lang.Thread.run(Thread.java:595) Caused by: com.liferay.portal.kernel.dao.orm.ORMException: could not load an ent ity: [com.liferay.counter.model.Counter#com.liferay.counter.model.Counter] at com.liferay.portal.dao.orm.hibernate.ExceptionTranslator.translate(Ex ceptionTranslator.java:41) at com.liferay.portal.dao.orm.hibernate.SessionImpl.get(SessionImpl.java :143) at com.liferay.counter.service.persistence.CounterPersistence.createCoun terRegister(CounterPersistence.java:308) ... 90 more 请问, 为什么会报错呢? |
|
byf157
2009-11-30
解决了吗?我也遇到这个问题,交流一下。
|
|
hoversong
2009-12-14
这个问题我也遇见过,解决了没?
我记得portal-ext.properties 是放在webapps\ROOT\WEB-INF目录下的,我的这个文件中只有一句话jdbc.default.jndi.name=jdbc/LiferayPool,至于使用方言那句话没有写,在启动时,它会读取portal-impl.jar中的portal.properties的数据库连接,如果是使用oracle,自动就会用oracle方言。 |
|
yueyangflash
2009-12-31
怀疑是建表的语句有问题!
这应该是第一次启动在数据库中建立对象吧! |