ESB 产品在部署时必须确保所有组件连接的是同一个数据库,该章节详细说明了各个组件的数据库配置。
数据库SQL脚本文件所在位置如下,任选其一,只需初始化一次即可
介质 Primeton_ESB_9.0.0_Governor/db-scripts 或者 Primeton_ESB_9.0.0_Governor_Standalone/db-scripts
步骤一:手工初始化数据库,以 独立安装 Mysql数据库 为例。
创建数据库 esb,编码格式为 UTF8。且密码为复杂密码,即:字母、数字组合,诸如000000之类的简单密码会出现数据库连接不上的问题。
在 Primeton_ESB_9.0.0_Governor_Standalone/db-scripts 目录下,按照如下顺序执行数据库脚本,具体如下:
eos/Mysql/eos_all.sql
afcenter/Mysql/afc_all.sql
esb/Mysql/1-esb-afc-data.sql
esb/Mysql/2-schema-esb-mysql.sql
esb/Mysql/3-data-esb-mysql.sql
步骤二:修改相关配置文件:ESB Server、ESB Governor、ESB Studio。
修改ESB Server数据库配置,用文本编辑器编辑{ESB Server目录}/server/conf/application.yml文件。
server:
port: 6200
app-server:
min-spare-threads: 100
max-threads: 500
max-connections: 1000
accept-count: 200
basedir: ${user.dir}
accesslog:
enabled: true
pattern: "%t [%a] [%b] [%m] [%s] [%D] [%S] [%I][%H://%v%U%q]"
file-date-format: .yyyy-MM-dd
directory: ../logs
prefix: pas_access_log
suffix: .log
spring:
autoconfigure:
exclude: org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration
jpa:
hibernate:
ddl-auto: none
properties:
database: MYSQL
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
enable_lazy_load_no_trans: true
datasource:
druid:
username: root
password: 123456
url: jdbc:mysql://127.0.0.1:3306/APIGateway?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
driver-class-name: com.mysql.jdbc.Driver
max-active: 20
min-idle: 10
query-timeout: 5
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
validationQuery: select 1 from eos_unique_table
max-wait: 5000
max-wait-thread-count: 10
validation-query-timeout: 3
transaction-query-timeout: 5
redis:
enable: true
timeout: 5000
host: 127.0.0.1
port: 6379
password: 123456
pool:
max-wait: 10000
max-active: 500
min-idle: 50
max-idle: 250
esb:
path:
ignored:
- /favicon.ico #默认配置,不可删除
jms:
timeout: 300 #单位秒
policy-data-init-time:
#分别可以按天,小时,分钟,秒为单位,设置每次执行同步程序相隔的时间。
#例如,设置间隔时间为一天,Days=1,Hours=24,Minutes=60,Seconds=60
days: 1
hours: 24
minutes: 60
seconds: 60
#以下hour,min,sec为设置同步程序的启动时间。
#例如,16:30:00启动程序,hour=16,min=30,sec=00
hour: 12
min: 0
sec: 0
collector:
global:
intervalTime: 10000 #单位ms
sys:
resource:
enabled: true
thread:
enabled: true
module:
state:
enabled: true
thread:
enabled: true
endpoint:
enabled: true
mq:
state:
enabled: true
database:
init: false
#强制初始化
enforceInit: false
elasticsearch:
enabled: true
ioThreadCount: 50
connectTimeout: 60000 #单位ms
maxTotal: 10000
maxPerRoute: 1000
numberOfShards: 1
numberOfReplicas: 0
refreshInterval: 10s
username: elastic
password: primeton000000
certificate: /usr/local/elasticsearch/elasticsearch-8.1.2/config/certs/http_ca.crt
hosts:
- ip: 127.0.0.1
port: 9200
protocol: https
eos:
application:
sys-code: EOS-DEMO-SYS
sys-key: dc6baaed30e541d78bb91274803d9432
sms:
#service-url: http://unify1.gx.cmcc:10024/SmsMonitor/jsonsms
service-url: http://10.185.22.187:10024/SmsMonitor/jsonsms
修改ESB Governor端口配置,用文本编辑器编辑{ESB Governor目录}/config/application.properties文件。
server.port=8080
server.app-server.min-spare-threads=100
server.app-server.max-threads=500
server.app-server.max-connections=1000
server.app-server.accept-count=200
spring.application.name=ESB
spring.jmx.default-domain=${spring.application.name}
spring.cloud.inetutils.preferred-networks=192.168
spring.pid.file=pid
#spring.profiles.active=eureka
spring.profiles.active=nacos
management.endpoints.web.exposure.include=hystrix.stream,health,info,loggers,eos,mappings
out.config.folder=config
spring.main.allow-bean-definition-overriding=true
eos.application.sys-code=EOS-DEMO-SYS
eos.application.sys-key=dc6baaed30e541d78bb91274803d9432
# eos environment: dev prod test
eos.profiles.active=dev
# eos cache config
eos.cache.mode=redis
# redis
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=123456
spring.redis.lettuce.pool.max-active=100
spring.redis.lettuce.pool.max-idle=100
spring.redis.lettuce.pool.max-wait=5000
# hibernate
spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true
spring.jpa.properties.hibernate.connection.handling_mode=IMMEDIATE_ACQUISITION_AND_HOLD
spring.jpa.properties.hibernate.new_generator_mappings=false
spring.jpa.properties.hibernate.ddl-auto=none
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DmDialect
spring.jpa.properties.database=Other
spring.jpa.open-in-view=false
# afcenter
afc.application.name=127.0.0.1:30333
afc.application.tenant=sys_tenant
afc.application.appCode=AFC
afc.application.appSecret=secret
# datasource entity
# eos.datasource.default.enity-name-includes=com.primeton.gocom.afcenter.model.*
# eos.datasource.default.enity-name-excludes=com.primeton.gocom.lowcode.model.*,com.primeton.gocom.bfp.model.*
esb.business=true
esb.database.init=false
esb.database.enforceInit=false
esb.rest.client.socket.timeout=20000
esb.rest.client.connect.timeout=10000
esb.rest.client.connectionRequest.timeout=10000
esb.rest.client.evictIdleConnections=60
esb.rest.client.ConnectionTimeToLive=60
elasticsearch.enabled=true
elasticsearch.ioThreadCount=50
elasticsearch.connectTimeout=60000
elasticsearch.maxTotal=10000
elasticsearch.maxPerRoute=1000
elasticsearch.numberOfShards=1
elasticsearch.numberOfReplicas=0
elasticsearch.refreshInterval=10s
elasticsearch.username=elastic
elasticsearch.password=primeton000000
elasticsearch.certificate=/home/esb86/http_ca.crt
elasticsearch.hosts[0].ip=127.0.0.1
elasticsearch.hosts[0].port=9200
elasticsearch.hosts[0].protocol=https
spring.mvc.dateFormat = yyyy-MM-dd HH:mm:ss
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
spring.jackson.serialization.write-dates-as-timestamps=false
# feign
feign.client.config.default.connectTimeout =2000
feign.client.config.default.readTimeout =1000
修改ESB Governor数据库配置,用文本编辑器编辑{ESB Governor目录}/config/ESB/config/user-config.xml文件。
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<application xmlns="http://www.primeton.com/xmlns/eos/1.0">
<!-- Datasource config -->
<!--
there can be multiplse DataSource, and the datasouce with name being "default"
as the system default datasource.
two types of DataSource are supported:
1) jndi DataSource
2) c3p0 DataSource
Transaction_Isolation as:
1)ISOLATION_READ_UNCOMMITTED
2)ISOLATION_READ_COMMITTED
3)ISOLATION_REPEATABLE_READ
4)ISOLATION_SERIALIZABLE
-->
<module name="DataSource">
<!--system default datasouce -->
<!--
C3p0-DriverClass[required],C3p0-Url[required]:
1、DB2
2、Oracle
3、Informix
4、MySql
5、SqlServer
6、Sybase
-->
<!--UDDI storeage datasouce.UDDI of all applications are stored in the same datasouce.-->
<!--
<group name="UddiServiceDS">
<configValue key="Jndi-Name">EOSDefaultDataSource</configValue>
<configValue key="Transaction-Isolation">ISOLATION_READ_COMMITTED</configValue>
<configValue key="Test-Connect-Sql">SELECT count(*) from EOS_SERVICE_ENDPOINT</configValue>
<configValue key="Retry-Connect-Count">-1</configValue>
</group>
-->
<!-- data source for EOS_UNIQUE_TABLE -->
<group name="default">
<configValue key="Database-Type">MySql</configValue>
<configValue key="Jdbc-Type"/>
<configValue key="C3p0-DriverClass">com.mysql.jdbc.Driver</configValue>
<configValue key="C3p0-Url">jdbc:mysql://127.0.0.1:3306/APIGateway?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false</configValue>
<configValue key="C3p0-UserName">root</configValue>
<configValue key="C3p0-Password">root</configValue>
<configValue key="C3p0-PoolSize">10</configValue>
<configValue key="C3p0-MaxPoolSize">50</configValue>
<configValue key="C3p0-MinPoolSize">10</configValue>
<!-- //seconds, 0 means connections never expire -->
<configValue key="C3p0-MaxIdleTime">600</configValue>
<!-- //idle connections never tested -->
<configValue key="C3p0-IdleConnectionTestPeriod">900</configValue>
<configValue key="C3p0-MaxStatements">0</configValue>
<configValue key="C3p0-NumHelperThreads">1</configValue>
<configValue key="Transaction-Isolation">ISOLATION_DEFAULT</configValue>
<configValue key="Test-Connect-Sql">SELECT count(*) from EOS_UNIQUE_TABLE</configValue>
<configValue key="Retry-Connect-Count">-1</configValue>
</group>
</module>
<!--System default Mail configuration -->
<module name="Email">
<group name="Default">
<!-- Mail server[required] -->
<configValue key="Host">mail.primeton.com</configValue>
<!-- Mail port[optional] -->
<!-- configValue key="Port">1002</configValue-->
<!-- user name[optional] -->
<configValue key="UserName">test</configValue>
<!-- password [optional] -->
<configValue key="Password">test</configValue>
</group>
</module>
<!-- Cache configuration -->
<!--
CacheProvider: cache provider[optional]
CacheLoader: cacheLoader implementation[optional]
IsClustered: cache mode[optional], True(cluster mode)
IsolationLevel: transaction isolation level[optional](none,serializable,repeatable_read,read_committed,read_uncommitted)
configuration needed when IsClustered is true:
McastAddr: multi cast IP address[optional](range: 224.0.0.0 to 239.255.255.255)
McastPort: multi cast port[optional]
-->
<module name="Cache">
<!-- Cache used by business dictionary -->
<!--
note: must not change this group.
-->
<group name="CacheForDict">
<configValue key="IsSystemCache">true</configValue>
<configValue key="CacheLoader">com.eos.server.dict.impl.EosDictCacheLoaderImpl</configValue>
</group>
<!-- Cache for uddi-->
<!--
Note: must not change the name of this group, only the McastAddr and McastPort can be changed.
-->
<group name="CacheForAccess">
<configValue key="IsSystemCache">true</configValue>
<configValue key="CacheLoader">com.primeton.access.client.impl.uddi.ServiceCacheLoader</configValue>
<configValue key="ClusterName">CacheForAccessGroup</configValue>
</group>
<!-- cache for online users -->
<group name="CacheForUserObject">
<configValue key="IsSystemCache">true</configValue>
<configValue key="CacheMode">REPL_ASYNC</configValue>
<configValue key="IsSystemShare">true</configValue>
</group>
</module>
<!--
timer's configuration.default to not start timer.
-->
<module name="Schedule">
<group name="Default">
<!-- IsSchedulerStart[optional,default to "true"], whether to start timer when application starts up -->
<configValue key="IsSchedulerStart">false</configValue>
<!-- DataSouceName[optional,default to "default"], datasouce name(must be the same as DataSource's Group name) -->
<!-- configValue key="DataSouceName">default</configValue-->
</group>
</module>
<!--webui's configuration-->
<!--EOSBusinDictFactory: can be configed-->
<module name="Dict">
<group name="Dict-Factory">
<configValue key="EOSBusinDictFactory">com.eos.server.dict.impl.EOSBusinDictFactory</configValue>
</group>
<group name="Cache">
<configValue key="CacheName">CacheForDict</configValue>
<configValue key="UseCache">true</configValue>
</group>
</module>
<!-- http access configuration-->
<module name="Access-Http">
<group name="FileUpload">
<configValue key="TempDir">upload</configValue>
<configValue key="MaxSize">104857600</configValue>
<configValue key="InMemorySize">10240</configValue>
<!--files with specified ext names are not accespted when uploading -->
<configValue key="Exclude">exe,java,jsp,html,htm,class,jar</configValue>
</group>
<group name="Encoding">
<!-- the charset of the incoming HttpServletRequest-->
<configValue key="Request">UTF-8</configValue>
</group>
<group name="Suspend">
<!-- the time to suspend, waiting for the xsd loading,in seconds.-->
<configValue key="TimeOut">60</configValue>
</group>
<group name="Login-Filter">
<!-- pages that can be accessed by any one including those not login -->
<configValue
key="Exclude">/,/afc/api/afc/oauth2/*,/afc/api/afc/login/third-party/auth,/afc/api/afc/login/third-party/qrConnect,/afc/afc-proxy/*,/afc/api/afc/validation-code,/swagger-ui.html,/v2/api-docs,/webjars/*,/swagger-resources/*,/afc,/afc/,/afc/api/afc/login,/afc/api/afc/login/password/key,/actuator/*,/om/*,/common.remote,
/jmxDefault.jmx,/common.download,/index.html,/assets/*,/static/*,*.js,*.json,*.css,/esb/*</configValue>
<!-- <configValue key="Include">*.flow,*.flowx,*.jsp,*.html,*.ajax,*.ext,*.action,*.beanx</configValue> -->
<configValue key="Include">/*</configValue>
<!-- the page to display when user not login -->
<configValue key="LoginPage"></configValue>
</group>
<group name="Accessed-Mode">
<configValue key="Portal">false</configValue>
</group>
<group name="Http-Security">
<configValue key="isOpenSecurity">false</configValue>
<configValue key="Exclude">**/common.download</configValue>
<configValue key="regexs">eval\s*?\([^\)]+?\),alert\s*?\([^\)]+?\),new\s+?Function\s*?\([^\)]+?\),window\[[^\]]+?\]\s*?=</configValue>
</group>
</module>
<!-- configuraiton of user's access statistics to a resource -->
<module name="Accessed-Resource-Checked">
<group name="Provider">
<!-- user defined resouce access check handler -->
<configValue key="CheckedHandler"/>
<!-- user defined resource access check factory -->
<configValue key="ResourceFactory">com.primeton.ext.access.authorization.DefaultAccessedResourceFactory</configValue>
</group>
</module>
<!--engine configuration-->
<module name="Engine">
<!--the listeners to the lifecycle of page flow instance -->
<group name="Pageflow-InstanceListeners">
<!--
<configValue key="ListenerA">com.primeton.engine.pageflow.web.CountListener</configValue>
-->
</group>
<!--the time out of pageflow intance, in minutes-->
<group name="Pageflow-InstanceTimeout">
<configValue key="Timeout">10</configValue>
</group>
<!-- web pages when error occured-->
<group name="Pageflow-ErrorPage">
<configValue key="Page">/common/error.jsp</configValue>
<!--default page when there are validation errors on action parameters-->
<configValue key="ValidateErrorPage">/common/validateErrors.jsp</configValue>
</group>
<!--the default page when pageflow is finished and no page defined on the end node of this pageflow-->
<group name="Pageflow-End">
<configValue key="DefaultPage">/common/defaultEnd.jsp</configValue>
</group>
<!--asynchronus method call mode:JMS or Thread-->
<!--if AutoChange is set to true,the engine will decide to user JMS or thread by the type of the application server,if Tomcat use Thread, ohters use JMS-->
<!--if AutoChangeis set to false,Thread mode is used-->
<group name="Asynchronous-Invoke">
<configValue key="AutoChange">true</configValue>
</group>
</module>
<!--business statistic module, all statistics data are stored in memory-->
<module name="Statistic">
<!--logic flow execution statistics-->
<group name="Bizflow">
<!--possible values :openore close, statistics is enabled only when is open-->
<configValue key="Status">open</configValue>
<!--the statistics data queue length,range (0,1000],default to 50-->
<configValue key="Queue-Length">50</configValue>
</group>
<!--pageflow execution statistics-->
<group name="Pageflow">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
<!--sql execution statistics-->
<group name="Sql">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
<!--the service call statistics-->
<group name="Service">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
<!--the webService call statistics-->
<group name="InvokeWebService">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
<group name="SpringBean">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
<group name="EOSService">
<!--open|close-->
<configValue key="Status">open</configValue>
<configValue key="Queue-Length">50</configValue>
</group>
</module>
<module name="Session-Manage">
<group name="Managed-User-Object">
<!--specify the attributes' name and type of MUO object in Session-->
</group>
<group name="UserLoginCallback">
<configValue key="Impl-Class"/>
</group>
</module>
<module name="Virtual-UserObject">
<group name="server">
<configValue key="User-Id">0</configValue>
<configValue key="User-Name">server</configValue>
<configValue key="User-Email"/>
<configValue key="User-Org-Id"/>
<configValue key="User-Org-Name"/>
<configValue key="User-Real-Name"/>
<configValue key="User-Remote-Ip">127.0.0.1</configValue>
</group>
<group name="workflow">
<configValue key="User-Id">1</configValue>
<configValue key="User-Name">workflow</configValue>
<configValue key="User-Email"/>
<configValue key="User-Org-Id"/>
<configValue key="User-Org-Name"/>
<configValue key="User-Real-Name"/>
<configValue key="User-Remote-Ip">127.0.0.1</configValue>
</group>
<group name="portal">
<configValue key="User-Id">guest</configValue>
<configValue key="User-Name">guest</configValue>
<configValue key="User-Email"/>
<configValue key="User-Org-Id"/>
<configValue key="User-Org-Name"/>
<configValue key="User-Real-Name"/>
<configValue key="User-Remote-Ip"/>
</group>
</module>
<!-- values for variables in wsdl location -->
<module name="WsLocation">
<group name="Property">
<!--<configValue key="variableName">value</configValue>-->
</group>
</module>
<!-- values for wsdl targetnamespace -->
<module name="WebService">
<group name="WSDL">
<!--<configValue key="DefultNameSpace">http://www.primeton.com/</configValue>-->
</group>
</module>
</application>
修改ESB Governor ES配置,用文本编辑器编辑{ESB Governor目录}/config/application-esb.properties文件。
#esb restTemplate
esb.business=true
esb.database.init=false
esb.database.enforceInit=false
esb.rest.client.socket.timeout=20000
esb.rest.client.connect.timeout=10000
esb.rest.client.connectionRequest.timeout=10000
esb.rest.client.evictIdleConnections=60
esb.rest.client.ConnectionTimeToLive=60
elasticsearch.enabled=true
elasticsearch.ioThreadCount=50
elasticsearch.connectTimeout=60000
elasticsearch.maxTotal=10000
elasticsearch.maxPerRoute=1000
elasticsearch.numberOfShards=1
elasticsearch.numberOfReplicas=0
elasticsearch.refreshInterval=10s
elasticsearch.username=elastic
elasticsearch.password=ryOKQ7c1oq6EWwazcF6AvQ==
elasticsearch.certificate=/home/zhangzz/esb/config/http_ca.crt
elasticsearch.hosts[0].ip=192.168.16.22
elasticsearch.hosts[0].port=9200
elasticsearch.hosts[0].protocol=https
elasticsearch.version=
修改ESB Studio数据库配置,用文本编辑器编辑{ESB Studio目录}/studio/server/conf/application.yml文件。
server:
port: 6200
app-server:
min-spare-threads: 100
max-threads: 500
max-connections: 1000
accept-count: 200
basedir: ${user.dir}
accesslog:
enabled: true
pattern: "%t [%a] [%b] [%m] [%s] [%D] [%S] [%I][%H://%v%U%q]"
file-date-format: .yyyy-MM-dd
directory: ../logs
prefix: pas_access_log
suffix: .log
spring:
autoconfigure:
exclude: org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientAutoConfiguration
jpa:
hibernate:
ddl-auto: none
properties:
database: MYSQL
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
enable_lazy_load_no_trans: true
datasource:
druid:
username: root
password: 123456
url: jdbc:mysql://127.0.0.1:3306/esb?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&useSSL=false
driver-class-name: com.mysql.jdbc.Driver
max-active: 20
min-idle: 10
query-timeout: 5
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
validationQuery: select 1 from eos_unique_table
max-wait: 5000
max-wait-thread-count: 10
validation-query-timeout: 3
transaction-query-timeout: 5
redis:
enable: true
timeout: 5000
host: 127.0.0.1
port: 6379
password: 123456
pool:
max-wait: 10000
max-active: 500
min-idle: 50
max-idle: 250
esb:
path:
ignored:
- /favicon.ico #默认配置,不可删除
jms:
timeout: 300 #单位秒
policy-data-init-time:
#分别可以按天,小时,分钟,秒为单位,设置每次执行同步程序相隔的时间。
#例如,设置间隔时间为一天,Days=1,Hours=24,Minutes=60,Seconds=60
days: 1
hours: 24
minutes: 60
seconds: 60
#以下hour,min,sec为设置同步程序的启动时间。
#例如,16:30:00启动程序,hour=16,min=30,sec=00
hour: 12
min: 0
sec: 0
collector:
global:
intervalTime: 10000 #单位ms
sys:
resource:
enabled: true
thread:
enabled: true
module:
state:
enabled: true
thread:
enabled: true
endpoint:
enabled: true
mq:
state:
enabled: true
database:
init: false
#强制初始化
enforceInit: false
elasticsearch:
enabled: true
ioThreadCount: 50
connectTimeout: 60000 #单位ms
maxTotal: 10000
maxPerRoute: 1000
numberOfShards: 1
numberOfReplicas: 0
refreshInterval: 10s
username: elastic
password: primeton000000
certificate: /usr/local/elasticsearch/elasticsearch-8.1.2/config/certs/http_ca.crt
hosts:
- ip: 127.0.0.1
port: 9200
protocol: https
eos:
application:
sys-code: EOS-DEMO-SYS
sys-key: dc6baaed30e541d78bb91274803d9432
sms:
#service-url: http://unify1.gx.cmcc:10024/SmsMonitor/jsonsms
service-url: http://10.185.22.187:10024/SmsMonitor/jsonsms
数据库方言、连接URL、驱动类全限定类名、等信息可参考: 1.1 安装须知
若使用Postgresql数据库或内核为Postgresql,Governor启动可能会有如下报错:
[governor][2022-10-31 10:09:56,911][ERROR][org.quartz.core.ErrorLogger][Line:2425] An error occurred while scanning for the next triggers to fire.
org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: 不良的类型值 long : \x [See nested exception: org.quartz.JobPersistenceException: Couldn't retrieve trigger: 不良的类型值 long : \x [See nested exception: org.postgresql.util.PSQLException: 不良的类型值 long : \x]]at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2848)at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759)at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757)at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787)at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756)at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272)
Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: 不良的类型值 long : \x [See nested exception: org.postgresql.util.PSQLException: 不良的类型值 long : \x]at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533)at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808)... 5 more
Caused by: org.postgresql.util.PSQLException: 不良的类型值 long : \xat org.postgresql.jdbc.PgResultSet.toLong(PgResultSet.java:2864)at org.postgresql.jdbc.PgResultSet.getLong(PgResultSet.java:2078)at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:415)at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:402)at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBlob(NewProxyResultSet.java:285)at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.getObjectFromBlob(StdJDBCDelegate.java:3190)at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1780)at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1531)... 6 more
十月 31, 2022 10:09:57 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
[governor][2022-10-31 10:10:06,896][ERROR][org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler][Line:3940] MisfireHandler: Error handling misfires: Couldn't retrieve trigger: Cannot convert the column of type BYTEA to requested type long.
org.quartz.JobPersistenceException: Couldn't retrieve trigger: Cannot convert the column of type BYTEA to requested type long. [See nested exception: org.postgresql.util.PSQLException: Cannot convert the column of type BYTEA to requested type long.]at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533)at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:979)at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3187)at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3935)at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3956)
Caused by: org.postgresql.util.PSQLException: Cannot convert the column of type BYTEA to requested type long.at org.postgresql.jdbc.PgResultSet.readLongValue(PgResultSet.java:3048)at org.postgresql.jdbc.PgResultSet.getLong(PgResultSet.java:2068)at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:415)at org.postgresql.jdbc.PgResultSet.getBlob(PgResultSet.java:402)at com.mchange.v2.c3p0.impl.NewProxyResultSet.getBlob(NewProxyResultSet.java:285)at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.getObjectFromBlob(StdJDBCDelegate.java:3190)at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1780)at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1531)... 4 more
解决办法:修改{Governor部署目录}/config/quartz.properties文件,打开配置#org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate,即删除该行的#,如下图: