.NET核心微服务来自Docker尝试访问Oracle数据库

发布于 2025-02-12 01:46:11 字数 370 浏览 3 评论 0原文

我创建了一个微服务,该微服务是应用程序和Oracle数据库之间的中间件。该应用程序要求从服务中请求一些数据,而服务又连接到Oracle以获取并传递请求的数据。

这在当地环境上正常工作。但是...

当我在Docker容器(当前在我的机器上托管)上部署服务时,该服务不起作用。

代码在oraclecon.open()行上引发了例外。 抛出以下错误:

ORA-00604:递归SQL级别发生错误 ORA-01882:找不到时区区域

我正在使用oracle.manageddataaccess.core库,版本3.21.61

任何想法都会发生这种情况。

谢谢 :)

I created a microservice that serves as a middleware between an application and the Oracle database. The application requests some data from the service and the services in turn connects to Oracle to fetch and pass back the requested data.

This works fine on the local environment. However ...

When I deploy the service on Docker Container (which is currently hosted on my machine), then the service does not work.

The code throws an exception at the oraclecon.Open() line.
Following errors are thrown:

ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found

I am using Oracle.ManagedDataAccess.core library, version 3.21.61

Any idea why this could be happening please.

Thanks :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄人书 2025-02-19 01:46:11

我知道修复程序很简单,但是我花了一些时间才能到达那里。

我在Dockerfile和Boom中包括以下代码...一切开始按预期工作。

ENV TZ=Asia/India
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

I knew that the fix would be simple, but it took me some time to get there.

I included the following code in the Dockerfile and boom ... things started working as expected.

ENV TZ=Asia/India
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文