- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在使用 Hibernate 和 Spring 编写一个应用程序。但是我遇到了以下错误:
nov. 11, 2011 10:32:11 AM org.apache.catalina.core.AprLifecycleListener init
Infos: 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\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\apache-maven-2.2.1\bin;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\Java\jdk1.7.0\jre\bin;C:\Program Files\Java\jdk1.7.0\bin;C:\Program Files\Java\jre7\bin;C:\apache-ant-1.8.2\bin;.
nov. 11, 2011 10:32:12 AM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["http-bio-8080"]
nov. 11, 2011 10:32:12 AM org.apache.coyote.AbstractProtocol init
Infos: Initializing ProtocolHandler ["ajp-bio-8009"]
nov. 11, 2011 10:32:12 AM org.apache.catalina.startup.Catalina load
Infos: Initialization processed in 769 ms
nov. 11, 2011 10:32:12 AM org.apache.catalina.core.StandardService startInternal
Infos: Démarrage du service Catalina
nov. 11, 2011 10:32:12 AM org.apache.catalina.core.StandardEngine startInternal
Infos: Starting Servlet Engine: Apache Tomcat/7.0.21
nov. 11, 2011 10:32:12 AM org.apache.catalina.startup.HostConfig deployDescriptor
Infos: Déploiement du descripteur de configuration achrefliferay-portlet.xml
nov. 11, 2011 10:32:12 AM org.apache.catalina.startup.HostConfig deployDescriptor
Avertissement: A docBase C:\liferay-portal-6.1.0\tomcat-7.0.21\webapps\achrefliferay-portlet inside the host appBase has been specified, and will be ignored
nov. 11, 2011 10:32:12 AM org.apache.catalina.startup.SetContextPropertiesRule begin
Avertissement: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:achrefliferay-portlet' did not find a matching property.
10:32:13,318 INFO [ContextLoader:187] Root WebApplicationContext: initialization started
10:32:13,367 INFO [XmlWebApplicationContext:456] Refreshing Root WebApplicationContext: startup date [Fri Nov 11 10:32:13 GMT 2011]; root of context hierarchy
10:32:13,446 INFO [XmlBeanDefinitionReader:315] Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
10:32:13,705 INFO [XmlBeanDefinitionReader:315] Loading XML bean definitions from ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]
10:32:14,198 INFO [PropertyPlaceholderConfigurer:177] Loading properties file from ServletContext resource [/WEB-INF/jdbc.properties]
10:32:14,286 INFO [DefaultListableBeanFactory:422] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@2d726d05: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,articleDaoImp,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,sessionFactory,org.springframework.jdbc.datasource.DriverManagerDataSource#0,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,txnManager,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0]; root of factory hierarchy
10:32:14,305 ERROR [ContextLoader:220] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Lorg/springframework/jdbc/support/lob/LobHandler;
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'org.springframework.jdbc.datasource.DriverManagerDataSource#0' defined in ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: Lorg/springframework/jdbc/support/lob/LobHandler;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:372)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:320)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:398)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:99)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1439)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.support.lob.LobHandler
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
... 39 more
Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:315)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:394)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:99)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1439)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242)
... 30 more
Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'org.springframework.jdbc.datasource.DriverManagerDataSource#0' defined in ServletContext resource [/WEB-INF/hibernateDataAccessContext.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1250)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:576)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1319)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:315)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:394)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:275)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:99)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1439)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:710)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:410)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSource
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1678)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1523)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1271)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1242)
... 30 more
nov. 11, 2011 10:32:14 AM org.apache.catalina.core.StandardContext startInternal
Grave: Error listenerStart
nov. 11, 2011 10:32:14 AM org.apache.catalina.core.StandardContext startInternal
Grave: Erreur de démarrage du contexte [/achrefliferay-portlet] suite aux erreurs précédentes
nov. 11, 2011 10:32:14 AM org.apache.catalina.startup.HostConfig deployDescriptor
Infos: Déploiement du descripteur de configuration ROOT.xml
Loading jar:file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
10:32:15,617 INFO [EasyConf:122] Refreshed the configuration of all components
10:32:15,959 INFO [ConfigurationLoader:56] Properties for jar:file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/classes/portal-developer.properties, file:/C:/liferay-portal-6.1.0/portal-ide.properties, file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
Loading jar:file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
Loading file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/classes/portal-ext.properties
Loading file:/C:/liferay-portal-6.1.0/portal-ide.properties
Loading file:/C:/liferay-portal-6.1.0/tomcat-7.0.21/webapps/ROOT/WEB-INF/classes/portal-developer.properties
10:32:22,625 INFO [DialectDetector:80] Determine dialect for PostgreSQL 9
10:32:22,678 INFO [DialectDetector:145] Found dialect org.hibernate.dialect.PostgreSQLDialect
Starting Liferay Portal Community Edition 6.1.0 CE (Paton / Build 6100 / March 24, 2011)
10:32:47,529 INFO [BaseDB:406] Database supports case sensitive queries
10:32:48,000 INFO [PluginPackageUtil:1098] Reading plugin package for the root context
10:32:54,200 INFO [PluginPackageUtil:1282] Reloading repositories
10:32:59,742 INFO [AutoDeployDir:105] Auto deploy scanner started for C:\liferay-portal-6.1.0\deploy
10:33:01,108 INFO [PluginPackageUtil:1101] Reading plugin package for achrefliferay-portlet
10:33:01,109 WARN [PluginPackageUtil:1060] Plugin package on context achrefliferay-portlet cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
nov. 11, 2011 10:33:01 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
Infos: Illegal access: this web application instance has been stopped already. Could not load service.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
nov. 11, 2011 10:33:01 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
Infos: Illegal access: this web application instance has been stopped already. Could not load service.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
nov. 11, 2011 10:33:01 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
Infos: Illegal access: this web application instance has been stopped already. Could not load portlet.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
nov. 11, 2011 10:33:01 AM org.apache.catalina.loader.WebappClassLoader findResourceInternal
Infos: Illegal access: this web application instance has been stopped already. Could not load portlet.properties. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
nov. 11, 2011 10:33:01 AM org.apache.catalina.startup.HostConfig deployDirectory
Infos: Déploiement du répertoire tunnel-web de l'application web
nov. 11, 2011 10:33:08 AM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["http-bio-8080"]
nov. 11, 2011 10:33:08 AM org.apache.coyote.AbstractProtocol start
Infos: Starting ProtocolHandler ["ajp-bio-8009"]
nov. 11, 2011 10:33:08 AM org.apache.catalina.startup.Catalina start
Infos: Server startup in 55882 ms
这是我的hibernatedataaccess.xml
:
<!-- Auto-detect the DAOs -->
<context:component-scan base-package="com.bd.dao"/>
<context:property-placeholder location="WEB-INF/jdbc.properties"/>
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${database.driver}" />
<property name="url" value="${database.url}" />
<property name="username" value="${database.user}" />
<property name="password" value="${database.password}" />
</bean>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="annotatedClasses">
<list>
<value>com.bd.entity.Article</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<!-- generation base donnée <prop key="hibernate.hbm2ddl.auto">create-drop</prop> -->
<prop key="hibernate.hbm2ddl.auto">create-drop</prop>
</props>
</property>
</bean>
<tx:annotation-driven transaction-manager="txnManager"/>
<bean id="txnManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager"
p:sessionFactory-ref="sessionFactory"/>
<bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/>
</beans>
这是我的aplicationcontest.xml
:
<!-- Auto-detect components -->
<context:component-scan base-package="com.bd.entity"/>
<b:import resource="hibernateDataAccessContext.xml"/>
</b:beans>
这是我的web.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>achrefliferay-portlet</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<description>
Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet>
<servlet-name>Vaadin</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<description>
Vaadin application class to start</description>
<param-name>application</param-name>
<param-value>com.vaadin.demo.workoutlog.WorkoutLog</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Vaadin</servlet-name>
<url-pattern>/Vaadin-hibernate-portletApplicationServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Vaadin</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/portlet_2_0</taglib-uri>
<taglib-location>
/WEB-INF/tld/liferay-portlet.tld
</taglib-location>
</taglib>
</jsp-config>
</web-app>
有什么问题吗?
最佳答案
确保存档 org.springframework.jdbc_XX.jar
存在于您的类路径中。
关于java.lang.ClassNotFoundException : org. springframework.jdbc.datasource.DriverManagerDataSource 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8092872/
我一直在其 documentation 中阅读有关 DriverManagerDataSource 的内容。我遇到了这句话: NOTE: This class is not an actual con
我定义了一个数据源如下: @Bean public DataSource dataSource(){ DriverManagerDataSource dataSource = new Driv
我正在使用 spring 和 hibernate 独立应用程序。我正在使用以下配置。
我尝试在谷歌上查找该问题,但无法找到解决方案。 我想要实现的目标 请参阅下面的代码,我想做的是将加密密码传递给 MethodInvokingBean ,它使用 com.xxxxxxx.CryptoUt
在 Spring 中,使用 有什么区别? DriverManager 数据源 和 SimpleDriverDataSource 给定它的驱动程序类名、url、用户名和密码来创建一个新的数据源? 例如,
我们正在使用 Spring 框架(2.5 版)中的 DriverManagerDataSource 来汇集与 Oracle 的连接。然而,这些连接似乎没有定义任何超时——昨天,在紧急数据库重启后,我们
大家好,Java Geeks, 我在 MySQL 数据库中有很多存储过程,我可以从 .NET 中成功调用它们。但是,当从 Java Spring SimpleJdbcCall.execute() 调用
当我启动 SpringMVC 时收到以下异常... Apr 28, 2012 5:47:26 PM org.apache.catalina.core.ApplicationContext log SE
Spring DriverManagerDataSource 和 apache BasicDataSource 有什么区别?哪一个更可取,在什么情况下? 谢谢。 最佳答案 根据 Spring docu
好的,log4j 和 servlet 错误已得到修复。现在我有以下问题: 找不到类 [org.springframework.jdbc.datasource.DriverManagerDataSour
我正在尝试进行一些基本的数据库操作。我使用的是 STS 3.2.0、Apache Tomcat 7。 我的 dispatcher-servlet.xml 包括:
我正在开发 Maven spring mvc 应用程序。我已在 pom.xml 中添加了依赖项,并在 servlet-context.xml 中给出了引用。请引用以下内容: servlet-conte
我是 spring java 的新手 代码如下: pom.xml文件 4.0.0 com.shr app SpringDemoProject war 1.0.0-BUILD-SNAPSHOT
我正在使用 Hibernate 和 Spring 编写一个应用程序。但是我遇到了以下错误: nov. 11, 2011 10:32:11 AM org.apache.catalina.core.Apr
我有一个 Spring MVC 项目,我正在使用 NamedParameterJdbcTemplate 连接到 postgres 数据库。 当我尝试启动我的应用程序时,出现异常: Cannot con
我正在尝试使用以下代码获取 jdbc 连接。 我使用mysql数据库jpa2和spring 4。如何获得jdbc连接并从mysql数据库检索该值 import java.io.Serializ
I am working on a Spring MVC web app and trying to simply connect to an Oracle database (to select
我正在尝试使用 jdbc 模板将数据插入数据库。我在 mysql 数据库中使用数据库 frr,下面的问题是我编写的代码,但出现以下错误: Exception in thread "main" java
我目前在我的项目中使用此配置: 而且它运行良好,速度非常快。我碰巧在一个旧项目(spring 2.5)上看到了这个配置: oracle.jdbc.dri
Feb 20, 2012 6:30:45 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring ro
我是一名优秀的程序员,十分优秀!