When i copied my database to another server i get this funky message all the time:

Notice: Trying to get property of non-object in DatabaseConnection_oracle->readBlob() (line 563 of ......./includes/database/oracle/database.inc).

the problem is that i did not migrate the blobs table since it was causing problems, without the blobs table everything was working fine except that i get this messages all the time.

Comments

aaaristo’s picture

Status: Active » Closed (won't fix)

you have to migrate the blobs table... or you may lose data

arrancia’s picture

But when i migrate the blobs table the whole drupal is down. Nothing is working it's jut white screen of death.Or maybe some fatal error that is impossible to track back

aaaristo’s picture

this is probably because you use db caching.. cache_* tables...

try to:

begin
   for c_cur in (select table_name from user_tables where table_name like 'CACHE_%') loop
      execute immediate 'truncate table '||c_cur.table_name;
   end loop; 
end;

this should solve your problem. remeber to reschedule the blob cleanup job from admin/settings/oracle/blob screen.

have you got some error in your apache error logs?

arrancia’s picture

After some time of using the web this errors went away but when i try to clear the blobs with the function i found in other issue:

begin
blobs_cleaner.cleanup;
end;

I get the errors back again. And after some time they go away. I'll try to figure out how to turn-off database caching if you give some more info i'll appricate it very much thanks for the help and info i'll try to migrate right now.

arrancia’s picture

Just one thing isn't the "Clear All Caches" from Configuration > Performance clearing this tables prefixed woth CACHE_

aaaristo’s picture

yes it is, i've understood that you can't access this page.

amfis’s picture

I'm still getting this error:

Notice: Trying to get property of non-object in DatabaseConnection_oracle->readBlob() (line 564 of /web/shared/drupal/includes/database/oracle/database.inc).

Drupal was installed from the start to the Oracle DB. I was able to investigate, that at some point Drupal driver does not convert data to proper datatype or what it expects.

For example it looks for object but gets array, or other inconsistencies. Using version = "7.x-1.9" of Oracle module. Drupal 7.8.

amfis’s picture

Status: Closed (won't fix) » Needs review

Any update on this?

amfis’s picture

Version: 7.x-1.6 » 7.x-1.9
amfis’s picture

Version: 7.x-1.9 » 7.x-1.12

Managed to get rid of that notice messages like this:

public function readBlob($handle) {
	// can we have a try/catch please?
	try {
		$handle = (int) substr($handle,strlen(ORACLE_BLOB_PREFIX));
		$stmt = parent::prepare("select content from blobs where blobid= ?");
		$stmt->bindParam(1, $handle, PDO::PARAM_INT, 32);
		$stmt->execute();

		// do we really have an object?
		return is_object($obj = $stmt->fetchObject()) ? $obj->content : '';

		//return $stmt->fetchObject()->content;
	} catch(PDOException $c) {
		watchdog('Oracle readBlob exception', '<pre>'.print_r($c->getMessage(), true).'</pre>');
		return '';
	}
}

The main reason for it was, that there were no blob by handle ID and it failed to check.

bohart’s picture

Version: 7.x-1.12 » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Closed (outdated)

D7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.

Everyone can apply the patches/suggestions above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.

Thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.