应用程序崩溃时部署弹簧启动和角度错误代码H10 heroku

时间:2018-01-08 19:48:06

标签: java angular spring-boot heroku web-deployment

我尝试了其他答案,例如this,但对我没用。

我的代码在一个端口8080上本地工作正常,此外我还通过cmd手动检查了jar也正常工作。

Procfile:web: java -Dserver.port=$PORT -jar target/backend-0.0.1-SNAPSHOT.jar

记录尾巴

ing-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755069+00:00 app[web.1]:    at java.util.concurrent.ThreadPo
olExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_144-heroku16]
2018-01-08T19:22:30.755131+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:359) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.754999+00:00 app[web.1]:    at org.springframework.boot.load
er.JarLauncher.main(JarLauncher.java:51) [backend-0.0.1-SNAPSHOT.jar:0.0.1-SNAPS
HOT]
2018-01-08T19:22:30.755136+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutow
ireCapableBeanFactory.java:1067) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELE
ASE]
2018-01-08T19:22:30.755113+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:129) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755097+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[sprin
g-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755099+00:00 app[web.1]:    at org.springframework.beans.fac
tory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
 ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755139+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueRes
olver.java:299) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755132+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionV
alueResolver.java:108) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755139+00:00 app[web.1]:    ... 62 common frames omitted
2018-01-08T19:22:30.755100+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanF
actory.java:1138) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755015+00:00 app[web.1]:    at org.springframework.boot.cont
ext.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletCont
ainer(TomcatEmbeddedServletContainerFactory.java:179) ~[spring-boot-1.5.9.RELEAS
E.jar!/:1.5.9.RELEASE]
2018-01-08T19:22:30.755137+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:513) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755089+00:00 app[web.1]:    at org.springframework.beans.fac
tory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.injec
t(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.13.RELEASE.j
ar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755112+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueRes
olver.java:313) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755121+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-
beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755130+00:00 app[web.1]: Caused by: org.springframework.bean
s.factory.BeanCreationException: Error creating bean with name '(inner bean)#5b3
ccc17': Cannot resolve reference to bean 'entityManagerFactory' while setting co
nstructor argument; nested exception is org.springframework.beans.factory.BeanCr
eationException: Error creating bean with name 'entityManagerFactory' defined in
 class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJp
aAutoConfiguration.class]: Invocation of init method failed; nested exception is
 javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to bu
ild Hibernate SessionFactory
2018-01-08T19:22:30.755146+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[sprin
g-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755133+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver
.java:634) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755151+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueRes
olver.java:351) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755144+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spr
ing-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755102+00:00 app[web.1]:    at org.springframework.beans.fac
tory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.injec
t(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.13.RELEASE.j
ar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755016+00:00 app[web.1]:    at org.springframework.boot.cont
ext.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(Embedd
edWebApplicationContext.java:164) ~[spring-boot-1.5.9.RELEASE.jar!/:1.5.9.RELEAS
E]
2018-01-08T19:22:30.755134+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolv
er.java:448) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755094+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755135+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(Ab
stractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.13.RELEASE.jar!/:
4.3.13.RELEASE]
2018-01-08T19:22:30.755143+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755157+00:00 app[web.1]:    at org.springframework.orm.jpa.A
bstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityMa
nagerFactoryBean.java:382) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755145+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:230) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755153+00:00 app[web.1]:    at org.hibernate.jpa.boot.intern
al.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuil
derImpl.java:954) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755152+00:00 app[web.1]: Caused by: javax.persistence.Persis
tenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFact
ory
2018-01-08T19:22:30.755155+00:00 app[web.1]:    at org.springframework.orm.jpa.v
endor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(
SpringHibernateJpaPersistenceProvider.java:60) ~[spring-orm-4.3.13.RELEASE.jar!/
:4.3.13.RELEASE]
2018-01-08T19:22:30.755141+00:00 app[web.1]: Caused by: org.springframework.bean
s.factory.BeanCreationException: Error creating bean with name 'entityManagerFac
tory' defined in class path resource [org/springframework/boot/autoconfigure/orm
/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nes
ted exception is javax.persistence.PersistenceException: [PersistenceUnit: defau
lt] Unable to build Hibernate SessionFactory
2018-01-08T19:22:30.755027+00:00 app[web.1]:    at org.springframework.beans.fac
tory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.injec
t(AutowiredAnnotationBeanPostProcessor.java:588) ~[spring-beans-4.3.13.RELEASE.j
ar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755167+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowi
reCapableBeanFactory.java:1687) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEA
SE]
2018-01-08T19:22:30.755142+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1628) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]

2018-01-08T19:22:30.755168+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1624) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]

2018-01-08T19:22:30.755154+00:00 app[web.1]:    at org.hibernate.jpa.boot.intern
al.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:88
2) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755181+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.SchemaMigratorImpl.applySqlString(SchemaMigratorImpl.java:431) ~[hibernate
-core-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755109+00:00 app[web.1]: Caused by: org.springframework.bean
s.factory.BeanCreationException: Error creating bean with name 'userRepository':
 Cannot create inner bean '(inner bean)#5b3ccc17' of type [org.springframework.o
rm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager';
nested exception is org.springframework.beans.factory.BeanCreationException: Err
or creating bean with name '(inner bean)#5b3ccc17': Cannot resolve reference to
bean 'entityManagerFactory' while setting constructor argument; nested exception
 is org.springframework.beans.factory.BeanCreationException: Error creating bean
 with name 'entityManagerFactory' defined in class path resource [org/springfram
ework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocatio
n of init method failed; nested exception is javax.persistence.PersistenceExcept
ion: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
2018-01-08T19:22:30.755184+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.SchemaMigratorImpl.doMigrationToTargets(SchemaMigratorImpl.java:167) ~[hib
ernate-core-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755166+00:00 app[web.1]:    at org.springframework.orm.jpa.L
ocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityMan
agerFactoryBean.java:336) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755169+00:00 app[web.1]:    ... 77 common frames omitted
2018-01-08T19:22:30.755117+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755152+00:00 app[web.1]:    ... 70 common frames omitted
2018-01-08T19:22:30.755185+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:60) ~[hibernate-cor
e-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755031+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCap
ableBeanFactory.java:1264) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755189+00:00 app[web.1]:    at org.hibernate.boot.internal.S
essionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) ~[hibernate-c
ore-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755165+00:00 app[web.1]:    at org.springframework.orm.jpa.A
bstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryB
ean.java:371) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755157+00:00 app[web.1]:    at org.springframework.orm.jpa.L
ocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalCont
ainerEntityManagerFactoryBean.java:360) ~[spring-orm-4.3.13.RELEASE.jar!/:4.3.13
.RELEASE]
2018-01-08T19:22:30.755186+00:00 app[web.1]:    at org.hibernate.tool.hbm2ddl.Sc
hemaUpdate.execute(SchemaUpdate.java:134) ~[hibernate-core-5.0.12.Final.jar!/:5.
0.12.Final]
2018-01-08T19:22:30.755195+00:00 app[web.1]:   Hint: No operator matches the giv
en name and argument type(s). You might need to add explicit type casts.
2018-01-08T19:22:30.755118+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spr
ing-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755037+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[sprin
g-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755199+00:00 app[web.1]:    at org.postgresql.jdbc2.Abstract
Jdbc2Statement.execute(AbstractJdbc2Statement.java:570) ~[postgresql-9.4-1201-jd
bc4.jar!/:9.4]
2018-01-08T19:22:30.755187+00:00 app[web.1]:    at org.hibernate.tool.hbm2ddl.Sc
hemaUpdate.execute(SchemaUpdate.java:101) ~[hibernate-core-5.0.12.Final.jar!/:5.
0.12.Final]
2018-01-08T19:22:30.755180+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:59) ~[hibernate-core-5.0
.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755201+00:00 app[web.1]:    at org.postgresql.jdbc2.Abstract
Jdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) ~[postgresql-9.4-1
201-jdbc4.jar!/:9.4]
2018-01-08T19:22:30.755196+00:00 app[web.1]:    at org.postgresql.core.v3.QueryE
xecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270) ~[postgresql-9.4-1
201-jdbc4.jar!/:9.4]
2018-01-08T19:22:30.755051+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-
beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755205+00:00 app[web.1]:    at java.lang.reflect.Method.invo
ke(Method.java:498) ~[na:1.8.0_144-heroku16]
2018-01-08T19:22:30.755197+00:00 app[web.1]:    at org.postgresql.core.v3.QueryE
xecutorImpl.processResults(QueryExecutorImpl.java:1998) ~[postgresql-9.4-1201-jd
bc4.jar!/:9.4]
2018-01-08T19:22:30.755188+00:00 app[web.1]:    at org.hibernate.internal.Sessio
nFactoryImpl.<init>(SessionFactoryImpl.java:472) ~[hibernate-core-5.0.12.Final.j
ar!/:5.0.12.Final]
2018-01-08T19:22:30.755208+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.TargetDatabaseImpl.accept(TargetDatabaseImpl.java:56) ~[hibernate-core-5.0
.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755190+00:00 app[web.1]:    at org.hibernate.jpa.boot.intern
al.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:87
9) ~[hibernate-entitymanager-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755209+00:00 app[web.1]:    ... 94 common frames omitted
2018-01-08T19:22:30.755210+00:00 app[web.1]:
2018-01-08T19:22:30.755093+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:553) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755119+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:230) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755203+00:00 app[web.1]:    at sun.reflect.NativeMethodAcces
sorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144-heroku16]
2018-01-08T19:22:30.755179+00:00 app[web.1]: Caused by: org.hibernate.tool.schem
a.spi.SchemaManagementException: Unable to execute schema management to JDBC tar
get [create table categories (id int4 not null, description varchar(1024) not nu
ll, disabled boolean not null, disp_order int4, name varchar(255) not null check
 (name>=3), primary key (id))]
2018-01-08T19:22:30.755183+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.SchemaMigratorImpl.applySqlStrings(SchemaMigratorImpl.java:420) ~[hibernat
e-core-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755198+00:00 app[web.1]:    at org.postgresql.core.v3.QueryE
xecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.4-1201-jdbc4.jar!
/:9.4]
2018-01-08T19:22:30.755122+00:00 app[web.1]:    at org.springframework.beans.fac
tory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
 ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755204+00:00 app[web.1]:    at sun.reflect.DelegatingMethodA
ccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144-heroku16
]
2018-01-08T19:22:30.755191+00:00 app[web.1]:    ... 84 common frames omitted
2018-01-08T19:22:30.755200+00:00 app[web.1]:    at org.postgresql.jdbc2.Abstract
Jdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:406) ~[postgresql-9.
4-1201-jdbc4.jar!/:9.4]
2018-01-08T19:22:30.755123+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanF
actory.java:1138) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755202+00:00 app[web.1]:    at sun.reflect.NativeMethodAcces
sorImpl.invoke0(Native Method) ~[na:1.8.0_144-heroku16]
2018-01-08T19:22:30.755207+00:00 app[web.1]:    at com.sun.proxy.$Proxy122.execu
teUpdate(Unknown Source) ~[na:na]
2018-01-08T19:22:30.755125+00:00 app[web.1]:    at org.springframework.beans.fac
tory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.injec
t(AutowiredAnnotationBeanPostProcessor.java:585) ~[spring-beans-4.3.13.RELEASE.j
ar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755126+00:00 app[web.1]:    ... 49 common frames omitted
2018-01-08T19:22:30.755138+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755143+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:555) ~[spring-beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755147+00:00 app[web.1]:    at org.springframework.beans.fac
tory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-
beans-4.3.13.RELEASE.jar!/:4.3.13.RELEASE]
2018-01-08T19:22:30.755184+00:00 app[web.1]:    at org.hibernate.tool.schema.int
ernal.SchemaMigratorImpl.createTable(SchemaMigratorImpl.java:236) ~[hibernate-co
re-5.0.12.Final.jar!/:5.0.12.Final]
2018-01-08T19:22:30.755194+00:00 app[web.1]: Caused by: org.postgresql.util.PSQL
Exception: ERROR: operator does not exist: character varying >= integer
2018-01-08T19:22:30.755206+00:00 app[web.1]:    at org.apache.tomcat.jdbc.pool.S
tatementFacade$StatementProxy.invoke(StatementFacade.java:114) ~[tomcat-jdbc-8.5
.23.jar!/:na]
2018-01-08T19:22:30.893204+00:00 heroku[web.1]: State changed from starting to c
rashed
2018-01-08T19:23:04.852234+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/" host=obscure-cliffs-33789.herokuapp.com request_id=e6c
c6222-5629-4a33-b92b-7a8623eccafa fwd="119.160.119.29" dyno= connect= service= s
tatus=503 bytes= protocol=https
2018-01-08T19:23:04.880142+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/robots.txt" host=obscure-cliffs-33789.herokuapp.com requ
est_id=fdf144c1-4410-4580-a62d-374751097793 fwd="119.160.119.29" dyno= connect=
service= status=503 bytes= protocol=https
2018-01-08T19:23:05.789573+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/favicon.ico" host=obscure-cliffs-33789.herokuapp.com req
uest_id=f1073fc5-615c-43f4-8a7e-51671a75a809 fwd="119.160.119.29" dyno= connect=
 service= status=503 bytes= protocol=https
2018-01-08T19:23:05.505559+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/robots.txt" host=obscure-cliffs-33789.herokuapp.com requ
est_id=e726abf4-ba12-474b-b49d-0b9a212ffc3f fwd="119.160.119.29" dyno= connect=
service= status=503 bytes= protocol=https
2018-01-08T19:23:06.303339+00:00 heroku[router]: at=error code=H10 desc="App cra
shed" method=GET path="/robots.txt" host=obscure-cliffs-33789.herokuapp.com requ
est_id=8a5abbb5-a814-4f89-989f-762bcf5cbe9b fwd="119.160.119.29" dyno= connect=
service= status=503 bytes= protocol=https

我已经重新启动了很多次,但没有工作。

任何建议都将不胜感激。

3 个答案:

答案 0 :(得分:0)

您的查询或ORM mappigs看起来有错误:

  

引起:org.postgresql.util.PSQL   例外:错误:运算符不存在:字符变化&gt; =整数

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: 
    Unable to execute schema management to JDBC tar
    get [create table categories (id int4 not null, 
         description varchar(1024) not null, 
         disabled boolean not null, 
         disp_order int4, 
        name varchar(255) not null check(name>=3), primary key (id))]

检查名称&gt; = 3似乎没有意义,因为name是varchar。

答案 1 :(得分:0)

您的堆栈跟踪似乎指向正确的方向:

  

引起:org.postgresql.util.PSQL异常:错误:运算符确实   不存在:字符变化&gt; =整数

您的Spring应用程序似乎正在启动并执行一些失败的SQL语句。根据以下问题PostgreSQL: ERROR: operator does not exist: integer = character varying,似乎发生了某种类型转换。您可能希望验证SQL语句。

答案 2 :(得分:0)

通过更改application.properties

解决了问题

来自

spring.jpa.hibernate.ddl-auto=update

spring.jpa.hibernate.ddl-auto=create-drop
  

注意:强烈建议在制作中使用'none'代替'create-drop'

所以我在第一次创建表后更改为spring.jpa.hibernate.ddl-auto=none