- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 openshift 上创建了应用程序。 Tomcat 7 + maven + spring + hibernate + postgresql。当我部署 war 时,我得到一个没有信息的空白页面。
----------
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<context:annotation-config/>
<context:component-scan base-package="ru.marketirs.model"/>
<tx:annotation-driven transaction-manager="transactionManager"/>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver"/>
<!-- <property name="url" value="jdbc:postgresql://127.11.140.130:5432/test"/>
<property name="username" value="admingsrszvi"/>
<property name="password" value="pGCU-r-_raI2"/>-->
<!-- <property name="url" value="jdbc:postgresql://localhost:5433/marketirs"/>
<property name="username" value="postgres"/>
<property name="password" value="123"/>-->
<property name="url" value="jdbc:postgresql://${env.OPENSHIFT_POSTGRESQL_DB_HOST}:${env.OPENSHIFT_POSTGRESQL_DB_PORT}/${env.OPENSHIFT_APP_NAME}"/>
<property name="password" value="${env.OPENSHIFT_POSTGRESQL_DB_PASSWORD}"/>
<property name="username" value="${env.OPENSHIFT_POSTGRESQL_DB_USERNAME}"/>
</bean>
<bean id="jpaDialect" class="org.springframework.orm.jpa.vendor.HibernateJpaDialect"/>
<bean id="jpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="POSTGRESQL"/>
<property name="databasePlatform" value="org.hibernate.dialect.PostgreSQL9Dialect"/>
</bean>
<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
id="entityManagerFactory">
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml"/>
<property name="persistenceUnitName" value="ru.marketirs.model.persistence.unit"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter" ref="jpaVendorAdapter"/>
<property name="jpaDialect" ref="jpaDialect"/>
</bean>
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
<property name="dataSource" ref="dataSource"/>
<property name="jpaDialect" ref="jpaDialect"/>
</bean>
</bean
----------
坚持
<?xml version="1.0" encoding="utf-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
<persistence-unit name="ru.marketirs.model.persistence.unit">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create"/>
</properties>
</persistence-unit>
</persistence>
mvc - dispather-servlet
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:annotation-driven/>
<context:component-scan base-package="ru.marketirs.controllers"/>
<!--<mvc:resources mapping="/resources/**" location="/" />-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/pages/"/>
<property name="suffix" value=".jsp"/>
</bean>
<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
<property name="messageConverters">
<list>
<ref bean="jsonMessageConverter" />
</list>
</property>
</bean>
<bean id="jsonMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"/>
</beans>
logs:
SEVERE: Error getConfigured
Feb 14, 2015 3:48:55 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ma] startup failed due to previous errors
Feb 14, 2015 3:48:55 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/54dfa48c4382ec78800000dc/app-root/runtime/dependencies/jbossews/webapps/ma.war has finished in 3,411 ms
Feb 14, 2015 3:48:55 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:48:55 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3635 ms
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:56:54 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:57:11 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
"jbossews.log" 1236L, 107911C 832,1 67%
Feb 14, 2015 3:48:53 PM org.apache.catalina.startup.ContextConfig parseWebXml
SEVERE: Occurred at line 12 column 15
Feb 14, 2015 3:48:54 PM org.apache.catalina.startup.ContextConfig configureStart
SEVERE: Marking this application unavailable due to previous error(s)
Feb 14, 2015 3:48:55 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=DataSource,context=/ma,host=localhost,class=javax.sql.DataSource,name="jdbc/PostgreSQLDS"
Feb 14, 2015 3:48:55 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=DataSource,context=/ma,host=localhost,class=javax.sql.DataSource,name="jdbc/MySQLDS"
Feb 14, 2015 3:48:55 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Feb 14, 2015 3:48:55 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ma] startup failed due to previous errors
Feb 14, 2015 3:48:55 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/54dfa48c4382ec78800000dc/app-root/runtime/dependencies/jbossews/webapps/ma.war has finished in 3,411 ms
Feb 14, 2015 3:48:55 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:48:55 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3635 ms
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:56:54 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:56:54 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:57:11 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Feb 14, 2015 3:57:11 PM org.apache.catalina.startup.Catalina addClusterRuleSet
INFO: Cluster RuleSet not found due to [java.lang.ClassNotFoundException: org.apache.catalina.ha.ClusterRuleSet]. Cluster configuration disabled.
Feb 14, 2015 3:57:12 PM 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: /opt/rh/postgresql92/root/usr/lib64:/usr/java/packages/lib/i386:/lib:/usr/lib
Feb 14, 2015 3:57:12 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 3:57:12 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1754 ms
Feb 14, 2015 3:57:12 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 14, 2015 3:57:12 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.54
Feb 14, 2015 3:57:13 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/openshift/54dfa48c4382ec78800000dc/app-root/runtime/dependencies/jbossews/webapps/ma.war
Feb 14, 2015 3:57:14 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
@
832,1 68%
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1812)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1250)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1880)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:849)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1063)
... 29 more
Feb 14, 2015 4:11:59 PM org.apache.catalina.startup.ContextConfig parseWebXml
SEVERE: Occurred at line 12 column 15
Feb 14, 2015 4:11:59 PM org.apache.catalina.startup.ContextConfig configureStart
SEVERE: Marking this application unavailable due to previous error(s)
Feb 14, 2015 4:12:01 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=DataSource,context=/ma,host=localhost,class=javax.sql.DataSource,name="jdbc/PostgreSQLDS"
Feb 14, 2015 4:12:01 PM org.apache.tomcat.util.modeler.Registry registerComponent
SEVERE: Null component Catalina:type=DataSource,context=/ma,host=localhost,class=javax.sql.DataSource,name="jdbc/MySQLDS"
Feb 14, 2015 4:12:01 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Feb 14, 2015 4:12:01 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/ma] startup failed due to previous errors
Feb 14, 2015 4:12:02 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deployment of web application archive /var/lib/openshift/54dfa48c4382ec78800000dc/app-root/runtime/dependencies/jbossews/webapps/ma.war has finished in 4,571 ms
Feb 14, 2015 4:12:02 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.2.136.129-8080"]
Feb 14, 2015 4:12:02 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4829 ms
我看到了什么 - http://main-marketirs.rhcloud.com/
已更新 - 我从 maven dep 中删除了 catalina.jar 和 servlet-api。
war 已部署,但我收到 502 代理错误:代理服务器收到来自上游服务器的无效响应。代理服务器无法处理请求 GET/。
原因:从远程服务器读取错误
日志:
INFO: Starting service Catalina
1,1 Наверху
ssivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
2015-02-15 11:39:36 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1ca4644: startup date [Sun Feb 15 11:39:36 EST 2015]; root of context hierarchy
2015-02-15 11:39:44 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path resource [META-INF/beans.xml]
2015-02-15 11:40:29 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2015-02-15 11:40:36 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:40:36 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityManagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:40:36 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:41:14 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect
2015-02-15 11:41:14 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:42:20 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
2663,1 Внизу
2015-02-15 11:39:29 WARN EntityManagerFactoryRegistry:80 - HHH000436: Entity manager factory name (ru.marketirs.model.persistence.unit) is already registered. If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
2015-02-15 11:39:36 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1ca4644: startup date [Sun Feb 15 11:39:36 EST 2015]; root of context hierarchy
2015-02-15 11:39:44 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path resource [META-INF/beans.xml]
2015-02-15 11:40:29 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2015-02-15 11:40:36 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:40:36 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityManagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:40:36 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:41:14 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect
2015-02-15 11:41:14 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:42:20 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
2663,1 Внизу
2015-02-15 11:38:07 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.contextt
.support.ClassPathXmlApplicationContext@19aec75: startup date [Sun Feb 15 11:38:07 EST 2015]; root off
context hierarchy
2015-02-15 11:38:07 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path
resource [META-INF/beans.xml]
2015-02-15 11:38:13 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' ann
notation found and supported for autowiring
2015-02-15 11:38:14 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:38:14 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityMM
anagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:38:14 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:38:18 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dii
alect
2015-02-15 11:38:18 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as cree
ateClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:38:23 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
2015-02-15 11:39:12 INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export
2015-02-15 11:39:13 ERROR SchemaExport:425 - HHH000389: Unsuccessful: alter table Product add constraa
int FK_4pyli7u3k5igu1skcb1g7x5xe foreign key (type_id) references Categorpr
2015-02-15 11:39:13 ERROR SchemaExport:426 - ERROR: constraint "fk_4pyli7u3k5igu1skcb1g7x5xe" for rell
ation "product" already exists
2015-02-15 11:39:13 INFO SchemaExport:405 - HHH000230: Schema export complete
2015-02-15 11:39:29 WARN EntityManagerFactoryRegistry:80 - HHH000436: Entity manager factory name (rr
u.marketirs.model.persistence.unit) is already registered. If entity manager will be clustered or paa
ssivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
2015-02-15 11:39:36 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.contextt
.support.ClassPathXmlApplicationContext@1ca4644: startup date [Sun Feb 15 11:39:36 EST 2015]; root off
context hierarchy
2015-02-15 11:39:44 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path
resource [META-INF/beans.xml]
2015-02-15 11:40:29 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' ann
notation found and supported for autowiring
2015-02-15 11:40:36 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:40:36 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityMM
anagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:40:36 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:41:14 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dii
alect
2015-02-15 11:41:14 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as cree
ateClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:42:20 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
2663,1 Внизу
2015-02-15 11:38:07 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@19aec75: startup date [Sun Feb 15 11:38:07 EST 2015]; root of context hierarchy
2015-02-15 11:38:07 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path resource [META-INF/beans.xml]
2015-02-15 11:38:13 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2015-02-15 11:38:14 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:38:14 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityManagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:38:14 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:38:18 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect
2015-02-15 11:38:18 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:38:23 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
2015-02-15 11:39:12 INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export
2015-02-15 11:39:13 ERROR SchemaExport:425 - HHH000389: Unsuccessful: alter table Product add constraint FK_4pyli7u3k5igu1skcb1g7x5xe foreign key (type_id) references Categorpr
2015-02-15 11:39:13 ERROR SchemaExport:426 - ERROR: constraint "fk_4pyli7u3k5igu1skcb1g7x5xe" for relation "product" already exists
2015-02-15 11:39:13 INFO SchemaExport:405 - HHH000230: Schema export complete
2015-02-15 11:39:29 WARN EntityManagerFactoryRegistry:80 - HHH000436: Entity manager factory name (ru.marketirs.model.persistence.unit) is already registered. If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name'
2015-02-15 11:39:36 INFO ClassPathXmlApplicationContext:513 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1ca4644: startup date [Sun Feb 15 11:39:36 EST 2015]; root of context hierarchy
2015-02-15 11:39:44 INFO XmlBeanDefinitionReader:316 - Loading XML bean definitions from class path resource [META-INF/beans.xml]
2015-02-15 11:40:29 INFO AutowiredAnnotationBeanPostProcessor:141 - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2015-02-15 11:40:36 INFO DriverManagerDataSource:133 - Loaded JDBC driver: org.postgresql.Driver
2015-02-15 11:40:36 INFO LocalContainerEntityManagerFactoryBean:332 - Building JPA container EntityManagerFactory for persistence unit 'ru.marketirs.model.persistence.unit'
2015-02-15 11:40:36 INFO LogHelper:46 - HHH000204: Processing PersistenceUnitInfo [
name: ru.marketirs.model.persistence.unit
...]
2015-02-15 11:41:14 INFO Dialect:145 - HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL9Dialect
2015-02-15 11:41:14 INFO LobCreatorBuilder:123 - HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
2015-02-15 11:42:20 INFO ASTQueryTranslatorFactory:47 - HHH000397: Using ASTQueryTranslatorFactory
更新 3
https://github.com/tigraboris/MarketirsFull.git
可能是 web 或 pom 文件的问题?日志: 2015-02-15 15:24:31 信息 LocalContainerEntityManagerFactoryBean:332 - 为持久性单元 'ru.marketirs.model.persistence.unit' 构建 JPA 容器 EntityManagerFactory 2015-02-15 15:24:31 信息 LogHelper:46 - HHH000204:处理 PersistenceUnitInfo [ 名称:ru.marketirs.model.persistence.unit ...] 2015-02-15 15:26:00 INFO 方言:145 - HHH000400:使用方言:org.hibernate.dialect.PostgreSQL9Dialect 2015-02-15 15:26:00 信息 LobCreatorBuilder:123 - HHH000424:禁用上下文 LOB 创建作为 createClob() 方法抛出错误:java.lang.reflect.InvocationTargetException
最佳答案
您在 Category
到 Product
的映射中存在错误,或者数据库状态不一致
2015-02-15 11:39:12 INFO SchemaExport:343 - HHH000227: Running hbm2ddl schema export
2015-02-15 11:39:13 ERROR SchemaExport:425 - HHH000389: Unsuccessful: alter table Product add constraint FK_4pyli7u3k5igu1skcb1g7x5xe foreign key (type_id) references Categorpr
2015-02-15 11:39:13 ERROR SchemaExport:426 - ERROR: constraint "fk_4pyli7u3k5igu1skcb1g7x5xe" for relation "product" already exists
Hibernate 尝试创建一个新的外键约束但失败了,因为另一个已经存在。检查有关约束 fk_4pyli7u3k5igu1skcb1g7x5xe
的数据库。您可以尝试删除它并使用 hbm2ddl = update
让 hibernate 添加约束。另一个步骤可能是尝试 hbm2ddl = verify
。这样,hibernate 会告诉您模型与数据库表关系相比有什么问题。
无论如何,您已经解决了最初的问题,但现在面临另一个/下一个问题。
关于java - 开类。不部署 WAR,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28520626/
我在 *.sql 文件中得到了我的数据库转储(表、函数、触发器等)。此时我正在通过 jenkins 部署它们,通过传递执行 shell 命令: sudo -u postgres psql -d my_
我正在使用网络部署 API 来部署网络包(.zip 文件,由 MSDeploy.exe 创建)以编程方式将包发布到服务器(在发布包之前我们需要做一些其他事情这就是为什么我们不使用 MSDeploy.e
我们正在使用 Web Deploy 3 的(几乎完全未记录的)“公共(public) API”来创建我们网站的 .zip 包,然后将其同步到服务器: DeploymentBaseOptions des
将 clojure 应用程序制作成可执行文件的最简单方法是什么,例如 http://rawr.rubyforge.org/ ruby 吗? (exe 和 app 文件也是) 最佳答案 使用 leini
是否可以下载 Android 源代码并针对任何设备进行编译? 我想做的是尝试 GSM 代码部分并编译操作系统并将其部署到我的摩托罗拉手机上。 谢谢! 最佳答案 是的,但这很难,因为大多数手机不共享驱动
我正在考虑用 c/c++ 编写需要在大多数个人计算机上运行的 nbody 样式模拟。本质上是一个 O(n^2) 粒子模拟器。 因为这需要相当用户友好,所以我希望有 1 个不需要用户安装任何东西的 Wi
需要了解 kubernetes 部署中 kube_deployment_status_replicas 和 kube_deployment_spec_replicas 指标的区别 最佳答案 简而言之,
我正在尝试使用分类器部署 Maven Artifact 。由于我需要源代码和 JAR(我从 GWT 使用它),我想获得 artifact-version-classifier.jar 和 artifa
我设置部署以将我的项目代码与存储我的网站的 FTP 服务器上的项目同步。 但是,每次尝试同步时,我总是必须登录。 我什至检查了记住,但它不起作用! 我正在使用最新的 PhpStorm 2017.1.4
我在 Visual Studio 2008 中开发了一个 ASP.NET 网站。现在我想在其他机器上部署它。我怎样才能做到这一点??就像我们为 Windows 应用程序制作安装包一样,我们可以为 AS
将 QT 框架添加到我的 .app 包中 我正在关注 Qt 站点上关于部署的文档。 我创建了一个名为 HTTPClient.app 的应用程序 我在 Contents 下创建了 Framework 文
这个问题不太可能对任何 future 的访客有帮助;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况相关,通常不适用于互联网的全局受众。如需帮助使这个问题更广泛适用,visit the h
我正在研究改变我目前创建营销网站的策略。目前,我完全用 PHP 从头开始构建网站,使用一个简单的包含系统。所有代码(以及内容)都存储在文件(而不是数据库)中,允许我使用 Subversion 进行
我有一个长期运行的服务(在 while 1 循环中)并通过 GCloud pub/sub 处理有效负载,之后它将结果写入数据库。 该服务不需要监听任何端口。 Kind=Deployment 的声明性
似乎部署已停滞不前。我该如何进一步诊断? kubectl rollout status deployment/wordpress Waiting for rollout to finish: 2 ou
我正在Dart中使用前端的Angular和后端的Shelf构建一个客户端/服务器应用程序。当我执行pub build时,它会按预期生成Dart文件的javascript,但不会替换HTML文件中的Da
我在 Azure 部署中心的下拉列表中看不到我的所有 Github 组织存储库。 Azure 很久以前就已经被授权了,下拉列表正确地显示了所有的存储库,直到上周我在 DevOps 中玩游戏时,不得不再
我认为标题几乎说明了一切...对于 Deployd 来说是全新的,所以任何关于如何最好地实现这一点的指示都值得赞赏。 最佳答案 要获取用户创建的集合中的对象(我假设您使用的是 javascript 库
我有一个试图用于CD服务器的部署脚本,但是在编写bash脚本以完成一些所需的步骤(例如运行npm和迁移命令)时遇到了问题。 我将如何从该脚本进入容器bash,运行下面的命令,然后退出以完成对更改的提取
我想在使用 kubectl 时将参数传递给 Kubernetes 部署命令应用部署文件。 示例:在我的部署 .yaml 中,我有如下参数,我想在使用 kubectl apply - f .yaml 运
我是一名优秀的程序员,十分优秀!