如何排查启动依赖错误的问题

场景

启动的时候可能会出现以下错误提示

  • 启动模块中包含jar包或者数据库中不存在的模块
  • 启动模块中包含不存在的模块
  • 启动模块互斥模块中包含已安装模块

排查项

  1. 确保启动工程的application.yml中的启动模块pamirs.boot.modules配置项内的模块在pom.xml内依赖了对应模块的jar包
    如何排查启动依赖错误的问题

  2. 确保出问题的模块的定义文件内的包扫描前缀packagePrefix方法内的路径定义正确,该路径可以是多个,但是一定要包含模块下所有子工程的路径,包括但不限于api子工程、core工程等,另外该路径也不能和其他模块的配置有重复、交集、包含关系(例如:a模块是 aa.bb.cc, b模块是aa.bb,这样b模块的路径就包含了a模块的)
    如何排查启动依赖错误的问题

  3. 启动类里spring自带的@ComponentScan.basePackages注解项需要包含所有依赖模块的路径
    如何排查启动依赖错误的问题

  4. 无代码应用创建的时候,配置了依赖模块。但这个依赖没有被本地安装,该模块就会出问题,要么删除该依赖,要么在代码里添加该依赖。

Oinone社区 作者:nation原创文章,如若转载,请注明出处:https://doc.oinone.top/install/backendinstall/14824.html

访问Oinone官网:https://www.oinone.top获取数式Oinone低代码应用平台体验

(0)
nation的头像nation数式员工
上一篇 2024年7月17日 pm6:12
下一篇 2024年7月19日 pm12:23

相关推荐

  • Oinone License 许可证使用常见问题

    如何获取许可证? 联系数式运维人员获取许可证。(以下内容全部使用表示许可证文件路径) subject:授权主体名称 license.lic:许可证文件 不同许可证类别有什么不同? 许可证类型 LicenseType 限制功能 适用环境 研发授权 DEVELOP 1.每次安装时效1天,超时后无法正常访问设计器相关功能2.限制CPU和主板序列号或限制许可证使用人数3.不能用于容器启动4.有页面水印 开发环境(开发人员本地启动业务工程时使用该授权) 伙伴授权 TRIAL 1.无安装时效限制2.无部署环境限制3.有页面水印 非生产环境(测试环境、预发环境等使用该授权) 客户授权 BUSINESS 1.无安装时效限制2.仅能部署一套生产环境3.无页面水印 生产环境 PS: 一套环境是指共用Base库的所有JVM称为一套环境。 如何配置许可证? 在yaml中配置许可证 单个许可证配置 pamirs: license: subject: <subject> path: <license.lic> 多个许可证配置 pamirs: license: subject: <subject> path: – <license1.lic> – <license2.lic> pamirs.license.path可以是相对路径、绝对路径以及URL路径。 在Program Arguments中配置许可证 java -jar -Psubject=<subject> -Plicense=<license1.lic> -Plicense=<license1.lic> <boot.jar> 如何在开发中安装许可证? 将许可证放入后端运行时工作目录中即可。(一般为idea项目根目录) 如何在物理机生产环境安装许可证? 将许可证放入与jar包平级目录中即可。 如何在docker环境中安装许可证? 在docker运行时目录添加挂载卷映射,并在yaml中配置对应的路径即可。 如何获取CPU序列号和主板序列号 在Linux环境中使用dmidecode命令 # 获取CPU序列号 dmidecode -s system-serial-number # CPU序列号 7*****1 # 获取主板序列号 dmidecode -s baseboard-serial-number # 主板序列号 ..CN*******V01Y7. # 获取系统UUID dmidecode -s system-uuid # 系统UUID 4c4xxxxx-xxxx-xxxx-xxxx-xxxxxxxx5831 在Mac环境中使用system_profiler命令 # 获取CPU序列号 system_profiler SPHardwareDataType | grep 'Serial Number' | awk -F ':' '{print $2}' # CPU序列号 C02******03Y # 获取主板序列号 system_profiler SPHardwareDataType | grep 'Hardware UUID' | awk -F ':' '{print $2}' # 主板序列号 1AAxxxxx-xxxx-xxxx-xxxx-xxxxxxxxF0FC 在Windows环境中使用wmic命令 # 获取CPU序列号 wmic cpu get processorid # CPU序列号 BFExxxxxxxxxx6A3 # 获取主板序列号 wmic baseboard get serialnumber # 主板序列号 PFxxxxBY # 获取系统UUID wmic csproduct get uuid # 系统UUID D0Exxxxx-xxxx-xxxx-xxxx-xxxxxxxx78B8 在Linux环境出现dmidecode命令执行失败该如何处理? 1. 命令未找到,可使用如下方式尝试安装 # debian (eg: Ubuntu) apt-get install dmidecode # rpm (eg: Fedora/CentOS/RedHat) yum install dmidecode 2. 无权限执行命令,尝试切换当前执行用户或为当前用户提高执行权限 在docker环境出现证书安装失败该如何处理? 1. 由于docke环境非物理环境,不支持CPU序列号和主板序列号校验,尝试更换许可证。 2. 检查许可证在镜像中的位置是否与配置文件中一致。 许可证安装失败该如何处理? 1. 日志出现License installation failed.信息 PS:对JDK版本依赖的问题已在5.0.0版本以上得到完整解决,此问题仅会出现在低版本的平台版本中。 请检查jdk版本是否高于1.8_221以上。 如无法升级jdk版本的环境下,请点击下载 jce_policy-8.zip 并按照如下步骤进行操作:…

    2024年6月19日
    3.9K00
  • 【界面设计器】组件开发常见问题

    如何获取当前页面中的全部可用字段? 在Class Component(ts)中使用以下代码获取当前设计组件实例 “` tsimport { WidgetInstance } from &#039;@kunlun/ui-designer-dependencies&#039;; @Widget.Reactive()@Widget.Inject()protected currentInstance: WidgetInstance | undefined;“` PS:这里使用了@kunlun/ui-designer-dependencies依赖包中的类型定义,但没有使用函数,因此这个导入是可以正常执行的。 在Vue组件中使用以下代码获取可选字段列表 “` tsimport { WidgetInstance } from &#039;@kunlun/ui-designer-dependencies&#039;; // props add currentInstance defineprops: { currentInstance: { type: Object as PropType<WidgetInstance> }} // setup using currentInstance get fieldsconst fields = computed(() => { return Array.from(props.currentInstance?.root?.fieldCollection.values() || []).map((v) => { return { label: v.element?.widgetData?.displayName, value: v.element?.name }; });});“` PS:这里的v.element?.widgetData?.displayName获取的是字段的元数据显示名称,如果需要获取字段输入的标题可以使用v.element?.properties?.label。 为什么需要选择当前页面中的字段? 页面在发起请求时,会根据当前视图中的字段查询最小结果集,不在页面中的字段无法被正确获取。可以将用到的字段拖放至视图中,并使用【隐藏】属性进行隐藏即可。 列内容超过当前表格行高该怎么办? 在界面设计器中选中表格组件,可以为表格设置指定的行高。 在界面设计器的属性面板组件中,如何获取当前字段所在模型的模型编码? “` tsinterface InternalMetadata { model?: string;} @Widget.Reactive()protected get currentModel(): string | undefined { return (this.formData._metadata as InternalMetadata)?.model;}“` 在界面设计器的属性面板组件中,如何获取关联关系字段的关联模型的模型编码? “` tsinterface InternalMetadata { modelReferences?: { model?: string; };} @Widget.Reactive()protected get referenceModel(): string | undefined { return (this.formData._metadata as InternalMetadata)?.modelReferences?.model;}“` 如何理解关联关系字段中的【透出字段(选项字段列表)】属性? 正如我们现在已知的,页面发起查询请求时,将根据页面中的元数据获取最小结果集,不在页面中的字段并不包含在结果集中。这样虽然使得我们可以最小化的控制结果集的大小。 但对于关联关系类型的字段来说,我们也面临了一个无法回避的问题:对于【表格】、【表单】等这些组件,我们可以通过拖放字段的方式直接将字段展示在页面中,因此对于这些可被设计的组件而言无需其他过多的配置即可正常使用。但对于【下拉单选】、【下拉多选】等这些组件而言,我们无法在页面中直接定义关联关系字段的元数据。 我们在解决这一问题上也同样做了很多,比如当你在【下拉单选】中设置【选项标题】时,选项标题中的字段会被自动透出到页面中,在发起请求时也就能正常获取这些字段了。 特殊的是,如果某些字段只是在逻辑上被使用的,但又不能将其通过【选项标题】展示给用户的时候,我们必须使用一个属性来定义这些字段,使得我们的业务逻辑可以正常运行。因此,我们设计了【透出字段】来解决这一问题。 为什么在属性面板中的【选项字段列表】是【透出字段】呢? 正如我们在业务开发过程中,服务端的模型定义的显示名称和在界面设计器中的字段标题可以是不一致的。由于服务端模型定义的字段API名称为optionFields,其中文直译是【选项字段列表】,但我们在产品设计时,希望这一属性可以被用户理解,因此在页面上展示的时候使用了【透出字段】作为标题呈现给用户。 在界面设计器中如何配置【透出字段(选项字段列表)】? optionFields在配置时使用的是字段的API名称,在关联关系属性定义时,允许使用.分隔的方式定义关联关系字段的关联属性。 如:[‘code’, ‘name’, ‘user.code’, ‘user.name’]。其中user字段为多对一(M2O)的关联关系字段,其中有两个字段code和name。 与之对应的GQL响应结构为: query { xxxxxxQuery { queryPage(xxxxxx) { content { code name user { code name } } } } } 在界面设计器的属性面板组件中,如何通过代码方式设置【透出字段(选项字段列表)】? @Widget.Method() public setOptionFields(optionFields: string[]) { this.formData.optionFields = optionFields; } 如何在字段中使用mountedCallChaining提供mountedProcess方法? @Widget.Reactive() @Widget.Inject() protected mountedCallChaining: CallChaining | undefined; protected mountedProcess() {} protected mounted() { super.mounted(); this.mountedCallChaining?.hook(this.path, async () => { await this.mountedProcess(); }); } protected unmounted() { super.unmounted(); this.mountedCallChaining?.unhook(this.path); }

    2023年11月1日
    1.5K00
  • 协同开发常见问题

    一、协同开发支持 https://doc.oinone.top/backend/4821.html 二、协同开发手册 https://doc.oinone.top/backend/14878.html 三、协同开发常见问题 1、启动报错:公共环境开启了元数据保护模式,本地开发环境需配置https://doc.oinone.top/faq/17045.html 2.协同开发配置一定要注意事项https://doc.oinone.top/faq/18249.html 3.Onione协同开发源码分析https://doc.oinone.top/backend/17209.html 4、Oinone环境保护(v5.2.3以上)https://doc.oinone.top/backend/18451.html 5.协同模式下,本地开发的模型在设计器里找不到https://doc.oinone.top/faq/17110.html

    2024年10月24日
    84800
  • 低代码示例工程oinone-example启动说明

    运行低代码后端示例工程 1. 前置准备 1.1. 解压(部署.zip),找到后端工程oinone-example 1.2.下载idea以及安装平台的idea插件 1.2.1 jdk安装(已安装请忽略) 如本机环境没有安装jdk8(jdk1.8.221+),需先安装:mac:https://doc.oinone.top/oio4/9225.htmlwindow:https://doc.oinone.top/oio4/9226.html 1.2.2 idea的插件安装教程: mac:https://doc.oinone.top/oio4/9225.htmlwindows:https://doc.oinone.top/oio4/9226.html 1.2.3 maven下载安装(已安装请忽略) mvn下载地址,推荐安装3.6.3https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/mac:https://doc.oinone.top/oio4/9225.htmlwindows:https://doc.oinone.top/oio4/9226.html 2. 修改bootstrap.yml中运行环境配置 修改其中zk的IP:192.168.0.121->改成docker安装的宿主机IP默认profiles设置是dev,注意对应生效的yml文件为applicaiton-dev.yml spring: profiles: active: dev application: name: pamirs-project cloud: service-registry: auto-registration: enabled: false pamirs: default: environment-check: true tenant-check: true — spring: profiles: dev cloud: service-registry: auto-registration: enabled: false config: enabled: false uri: http://127.0.0.1:7001 label: master profile: dev nacos: server-addr: http://127.0.0.1:8848 discovery: enabled: false namespace: prefix: application file-extension: yml config: enabled: false namespace: prefix: application file-extension: yml dubbo: application: name: pamirs-project version: 1.0.0 registry: address: zookeeper://192.168.0.121:2182 protocol: name: dubbo port: 20880 serialization: pamirs consumer: timeout: 5000 provider: timeout: 5000 scan: base-packages: pro.shushi cloud: subscribed-services: 3. 修改application-dev.yml中对应中间件的IP和端口 3.1 redis 修改对应redis的IP端口以及密码 spring: redis: database: 0 host: 192.168.0.121 #改成docker安装的宿主机IP port: 6378 timeout: 5000 password: Abc@1234 3.2 mysql 如自行安装mysql,直接改成mysql的IP和账号信息如直接使用docker提供的mysql,则修改对应的IP为docker安装的宿主机IP biz: driverClassName: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://192.168.0.121:3307/demo_biz?useSSL=false&allowPublicKeyRetrieval=true&useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true username: root password: Abc@1234 initialSize: 5 maxActive: 200 minIdle: 5 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true asyncInit: true pamirs: driverClassName: com.mysql.cj.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource url: jdbc:mysql://192.168.0.121:3307/demo_pamirs?useSSL=false&allowPublicKeyRetrieval=true&useServerPrepStmts=true&cachePrepStmts=true&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&autoReconnect=true&allowMultiQueries=true username: root password: Abc@1234 initialSize: 5 maxActive: 200 minIdle: 5 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements:…

    2023年11月11日
    3.4K00
  • Docker部署常见问题

    问题1:容器启动出现library initialization failed – unable to allocate file descriptor table – out of memory异常如何处理? 原因 不同操作系统安装Docker后,容器运行环境并不一致,需要对Docker运行参数进行调整。 解决方案 编辑/etc/systemd/system/docker.service文件, 有些系统该文件位置:/lib/systemd/system/docker.service 查看docker的systemd(docker.service)配置位置 systemctl status docker 查看docker的systemd配置位置 将下列参数进行修改 LimitNOFILE=65535 LimitNPROC=65535 LimitCORE=65535 执行以下脚本 systemctl daemon-reload systemctl restart docker 问题2:容器启动出现library initialization failed – unable to allocate file descriptor table – out of memorypanic: signal: aborted (core dumped)异常如何处理? 问题现象 1、 按照【问题1】的设置进行配置后,仍然不生效; 2、 尝试修改宿主机系统内核的ulimits,重启docker仍报错。修改docker.service(文件位置:/etc/systemd/system/docker.service文件, 有些系统该文件位置:/lib/systemd/system/docker.service) 解决方案 查看docker的systemd(docker.service)配置位置【问题1】中的办法 在ExecStart命令后加上创建容器的默认ulimit配置,如下,设置容器启动时的ulimit为65535:65535 –default-ulimit nofile=65535:65535 配置好后: ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock –default-ulimit nofile=65535:65535 执行以下脚本 systemctl daemon-reload systemctl restart docker 资料参考:https://blog.csdn.net/weixin_42241322/article/details/137122868 问题3:拉取设计器镜像报错 报错信息,拉取镜像harbor.oinone.top连不上。 docker login –username=schhsw_oinone harbor.oinone.top i Info → A Personal Access Token (PAT) can be used instead. To create a PAT, visit https://app.docker.com/settings Password: time="2025-02-27T11:24:58+08:00" level=info msg="Error logging in to endpoint, trying next endpoint" error="Get \"https://harbor.oinone.top/v2/\": dial tcp 0.0.0.0:443: connect: connection refused" Get "https://harbor.oinone.top/v2/": dial tcp 0.0.0.0:443: connect: connection refused kfpt@kfpt-virtual-machine:~$ sudo -i root@kfpt-virtual-machine:~# docker login –username=schhsw_oinone harbor.oinone.top i Info → A Personal Access Token (PAT) can be used instead. To create a PAT, visit https://app.docker.com/settings Password: Error response from daemon: Get "https://harbor.oinone.top/v2/": dial tcp 0.0.0.0:443: connect: connection refused 排查过程: 排除到后面发现原因是DNS配置的问题,换了一个阿里云的IP就可以了

    2025年3月13日
    1.1K00

Leave a Reply

登录后才能评论