【发布时间】:2012-11-01 16:45:41
【问题描述】:
我正在尝试与 Google 日历交谈。我有身份验证问题。我写下下面的代码。
create or replace function authenticate_service(
p_email in varchar2,
p_password in varchar2) return varchar2 is
l_request utl_http.req;
l_response utl_http.resp;
l_params varchar2(255);
l_resp_data varchar2(4000);
l_auth_token varchar2(4000); begin
-- access the oracle wallet to allow us to make an https request
utl_http.set_wallet(
path => 'file: ***',
password => '***');
-- set up the request body with our credentials
l_params := 'Email=' || p_email || '&Passwd=' || p_password ||
'&service=cl' || '&source=e-DBA-test-1.0';
l_request := utl_http.begin_request(
'https://www.google.com/accounts/ClientLogin',
'POST',
'HTTP/1.1');
-- set the request headers
utl_http.set_header(
l_request,
'Content-Type',
'application/x-www-form-urlencoded');
utl_http.set_header(
l_request,
'Content-Length',
length(l_params));
-- write out the request body
utl_http.write_text( l_request, l_params );
-- get the response
l_response := utl_http.get_response( r => l_request );
dbms_output.put_line('Status Code: '||l_response.status_code);
begin
loop
utl_http.read_line( r => l_response, data => l_resp_data,remove_crlf => TRUE);
if substr(l_resp_data, 1, 5) = 'Auth=' then
l_auth_token := substr(l_resp_data, 6);
end if;
end loop;
exception
when utl_http.end_of_body then
null;
end;
utl_http.end_response ( l_response );
dbms_output.put_line(l_auth_token); return l_auth_token;
end authenticate_service;
一切正常,但是...当我尝试连续调用几次身份验证时,有时我发现此错误 Oracle ORA-03113: end-of-file on communication channel 然后 ORA-03114: not connected to ORACLE .我不知道它为什么会发生以及如何解决这个问题。
【问题讨论】:
-
如果有任何错误消息,您应该(要求您的 DBA)检查警报日志/跟踪文件中的服务器端。问题的原因可能是服务器端错误。
-
ORA-03114 基本上意味着客户端和服务器之间的连接断开。这通常意味着服务器上的客户端进程或服务器上的 SQL*Net 连接死亡。
-
在 log.xml 中我发现了这个
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0xAE0BE38] [PC:0x7FEBB33A7F8A, nzos_Create_Ctx()+264] [flags: 0x0, count: 1]和ORA-07445: napotkano wyj±tek: zrzut pamięci [nzos_Create_Ctx()+264] [SIGSEGV] [ADDR:0xAE0BE38] [PC:0x7FEBB33A7F8A] [Address not mapped to object] [] -
恐怕这是一个我们无法帮助您解决的错误。它是波兰语 ;-) 对于这些类型的错误,您应该向 Oracle 技术支持部门记录 SR,这是 Oracle 源代码中的一个例外。 blogs.oracle.com/db/entry/ora-7445_troubleshooting
标签: sql web-services oracle plsql google-calendar-api