Dariusz Cieślak's Blog on Software

21/09/2009

ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

Filed under: en — Tags: , , , — dariusz.cieslak @

I was getting the following error:

ORA-00932: inconsistent datatypes: expected NUMBER got BINARY

on line:

<property name="customer" column="CustomerId" />

the fix for above error was to use many-to-many tag instead of plain <property>:

<many-to-one name="customer" column="CustomerId" />

Note that class is not required here – it’s computed from return type of getCustomer() getter by reflection.

hibernate_logo_a

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

16/09/2009

SchemaSpy: inspect DB schema

Filed under: en — Tags: , — dariusz.cieslak @

When you are joining to an existing project you don’t have good knowledge of internal project structures. Existing documentation may be inaccurate or just missing. In this case you can rely only on clean source code structure and source code comments. Based on them you can generate API docs using Javadoc or Pydoc for instance. But what with persistent data model stored in database? SchemaSpy comes with help here!

SchemaSpy is small (~200kB) Java application that is able to render schema retrieved from JDBC connection into set of “hyperlinked” HTML pages with Java Script and (if GraphViz installed) diagrams. Below you see one page of example output of this tool:

1

(more…)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Monitor heap size in Eclipse

Filed under: en — Tags: — dariusz.cieslak @

A very useful feature introduced lately in Eclipse IDE is presentation of current environment heap size. You can check how your Eclipse usage changes memory used and this way you can optimize some processes. Monitor sits in right bottom corner of main window and additionally you have the possibility to manually run garbage collector (trash icon):

1

You can enable it on General Preference page:

2

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

15/09/2009

Oracle SHOW ERRORS directive

Filed under: en — Tags: — dariusz.cieslak @

By default Oracle is cryptic about details of an error. Directive SHOW ERRORS is very useful during debugging of stored procedures for instance.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

11/09/2009

Eclipse SQL Explorer

Filed under: en — Tags: — dariusz.cieslak @

Eclipse SQL Explorer is simple but powerfull tool to inspect Your database state. You can:

  • exec SQL commands
  • browse database objects in Eclipse (including existing indices)
  • open multiple databases at once

Installation is pretty simple:

  1. Download preferred version (select any sqlexplorer_plugin-*.zip file)
  2. Unpack this ZIP to your Eclipse directory: unzip sqlexplorer_plugin-*.zip
  3. Restart Eclipse

Usage: switch to SQLExplorer perspective and define new connection:

1

(more…)

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Older Posts »

Powered by WordPress