<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dariusz on Software Quality &#187; oracle</title>
	<atom:link href="http://blog.aplikacja.info/tag/oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.aplikacja.info</link>
	<description>Software Engineering Process and Tools</description>
	<lastBuildDate>Tue, 31 Jan 2012 23:44:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Error: 17006, SQLState: null Invalid column name in Hibernate</title>
		<link>http://blog.aplikacja.info/2010/06/sql-error-17006-sqlstate-null-invalid-column-name-in-hibernate/</link>
		<comments>http://blog.aplikacja.info/2010/06/sql-error-17006-sqlstate-null-invalid-column-name-in-hibernate/#comments</comments>
		<pubDate>Fri, 25 Jun 2010 10:38:11 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=1223</guid>
		<description><![CDATA[Recently I&#8217;ve got the following error during SQL named query execution:
SQL Error: 17006, SQLState: null Invalid column name
In order to track the problem down I enabled SQL logging and collected SQL query issued, then run it under SQL monitor and &#8230; it was working without error! I was surprised.
In order to debug what&#8217;s going on [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve got the following error during <strong>SQL named query</strong> execution:</p>
<pre style="padding-left: 30px;">SQL Error: 17006, SQLState: null Invalid column name</pre>
<p>In order to track the problem down I enabled SQL logging and collected SQL query issued, then run it under SQL monitor and &#8230; it <strong>was working without error</strong>! I was surprised.</p>
<p>In order to debug what&#8217;s going on I enabled <strong>detailed logging in Hibernate</strong>. What was happened then?</p>
<pre style="padding-left: 30px;">[INFO] could not read column value from result set: entityKey215_0_; Invalid column name</pre>
<p>This message showed me that the problem was not related to generated SQL query but to <strong>column names expected by Hibernate</strong>. Generated recordset didn&#8217;t has entityKey215_0_ column. I added:</p>
<pre style="padding-left: 30px;">entityKey AS {list.entityKey}</pre>
<p>to named SQL query and error dissapeared.</p>
<p>This error is not-very-obvious kind of error because <strong>Oracle hides column / table names in error messages</strong> returned. Why? I don&#8217;t get this cryptic error messages idea. In order to track an error under Oracle I had to enable verbose logging (error message standalone din&#8217;t give anything useful). Much simpler database MySQL has better error reporting than &#8220;fat&#8221; Oracle.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2010/06/sql-error-17006-sqlstate-null-invalid-column-name-in-hibernate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ORA-00600: internal error code</title>
		<link>http://blog.aplikacja.info/2010/02/ora-00600-internal-error-code/</link>
		<comments>http://blog.aplikacja.info/2010/02/ora-00600-internal-error-code/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 11:38:23 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=876</guid>
		<description><![CDATA[Interesting error found on Oracle XE installed for one of projects. After a run of test case that uses JDBC to perform some operations on database all tests started to fail with this exception:
Caused by: java.sql.SQLException: ORA-00600: internal error code, arguments:\
 [kdsgrp1], [], [], [], [], [], [], []
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
 at [...]]]></description>
			<content:encoded><![CDATA[<p>Interesting error found on Oracle XE installed for one of projects. After a run of test case that uses JDBC to perform some operations on database all tests <strong>started to fail</strong> with this exception:</p>
<pre style="padding-left: 30px;">Caused by: java.sql.SQLException: ORA-00600: internal error code, arguments:\
 [kdsgrp1], [], [], [], [], [], [], []
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
 at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
 at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1062)
</pre>
<p>Restart of Oracle database did not work. Seems table space was broken. I <strong>rebuit the database</strong> (DROP, then CREATE) and error dissapeared.</p>
<p>Interesting &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2010/02/ora-00600-internal-error-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ORA-01722: invalid number</title>
		<link>http://blog.aplikacja.info/2010/02/ora-01722-invalid-number/</link>
		<comments>http://blog.aplikacja.info/2010/02/ora-01722-invalid-number/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 09:41:37 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=806</guid>
		<description><![CDATA[&#8220;ORA-01722: invalid number&#8221; is raised when a number was passed a query parameter, but another type (string) was expected.
The error message isn&#8217;t very helpful, is it?

]]></description>
			<content:encoded><![CDATA[<p>&#8220;<strong>ORA-01722: invalid number</strong>&#8221; is raised when a number was passed a query parameter, but another type (string) was expected.</p>
<p>The error message isn&#8217;t very helpful, is it?</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter" src="http://www.dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/00000/2000/300/2318/2318.strip.gif" alt="" width="640" height="189" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2010/02/ora-01722-invalid-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>org.hibernate.PropertyAccessException: exception setting property value with CGLIB</title>
		<link>http://blog.aplikacja.info/2009/11/org-hibernate-propertyaccessexception-exception-setting-property-value-with-cglib/</link>
		<comments>http://blog.aplikacja.info/2009/11/org-hibernate-propertyaccessexception-exception-setting-property-value-with-cglib/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 11:00:15 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=477</guid>
		<description><![CDATA[The error
org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of XYZ.setStatus().
Cause
Using primitive types (long) where NULL is possible or using wrong type (i.e. String if &#8220;char&#8221; is declared in HBM file).
Resolution
Change from primitive type (long) to wrappers (Long) or ensure correct type is defined in mapping files.

]]></description>
			<content:encoded><![CDATA[<h2>The error</h2>
<p>org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of XYZ.setStatus().</p>
<h2>Cause</h2>
<p>Using primitive types (long) where NULL is possible or using wrong type (i.e. String if &#8220;char&#8221; is declared in HBM file).</p>
<h2>Resolution</h2>
<p>Change from primitive type (long) to wrappers (Long) or ensure correct type is defined in mapping files.</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-339" title="hibernate_logo_a" src="http://blog.aplikacja.info/wp-content/uploads/2009/09/hibernate_logo_a.png" alt="hibernate_logo_a" width="400" height="111" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2009/11/org-hibernate-propertyaccessexception-exception-setting-property-value-with-cglib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA-00932: inconsistent datatypes: expected NUMBER got BINARY</title>
		<link>http://blog.aplikacja.info/2009/09/ora-00932-inconsistent-datatypes-expected-number-got-binary/</link>
		<comments>http://blog.aplikacja.info/2009/09/ora-00932-inconsistent-datatypes-expected-number-got-binary/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 12:46:20 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[orm]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=333</guid>
		<description><![CDATA[I was getting the following error:
ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
on line:
&#60;property name="customer" column="CustomerId" /&#62;
the fix for above error was to use many-to-many tag instead of plain &#60;property&#62;:
&#60;many-to-one name="customer" column="CustomerId" /&#62;
Note that class is not required here &#8211; it&#8217;s computed from return type of getCustomer() getter by reflection.

]]></description>
			<content:encoded><![CDATA[<p>I was getting the following error:</p>
<pre style="padding-left: 30px;">ORA-00932: inconsistent datatypes: expected NUMBER got BINARY</pre>
<p>on line:</p>
<pre style="padding-left: 30px;">&lt;property name="customer" column="CustomerId" /&gt;</pre>
<p>the fix for above error was to use <strong>many-to-many tag</strong> instead of plain &lt;property&gt;:</p>
<pre style="padding-left: 30px;">&lt;many-to-one name="customer" column="CustomerId" /&gt;</pre>
<p>Note that class is not required here &#8211; it&#8217;s <strong>computed from return type</strong> of getCustomer() getter by reflection.</p>
<p><img style=' display: block; margin-right: auto; margin-left: auto;'  class="aligncenter size-full wp-image-339" title="hibernate_logo_a" src="http://blog.aplikacja.info/wp-content/uploads/2009/09/hibernate_logo_a.png" alt="hibernate_logo_a" width="400" height="111" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2009/09/ora-00932-inconsistent-datatypes-expected-number-got-binary/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Oracle SHOW ERRORS directive</title>
		<link>http://blog.aplikacja.info/2009/09/oracle-show-errors-directive/</link>
		<comments>http://blog.aplikacja.info/2009/09/oracle-show-errors-directive/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 08:28:53 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=311</guid>
		<description><![CDATA[By default Oracle is cryptic about details of an error. Directive SHOW ERRORS is very useful during debugging of stored procedures for instance.
]]></description>
			<content:encoded><![CDATA[<p>By default Oracle is cryptic about details of an error. Directive <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12041.htm">SHOW ERRORS</a> is very useful during debugging of stored procedures for instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2009/09/oracle-show-errors-directive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle on Debian Lenny: ORA-01034: ORACLE not available</title>
		<link>http://blog.aplikacja.info/2009/09/oracle-on-debian-lenny-ora-01034-oracle-not-available/</link>
		<comments>http://blog.aplikacja.info/2009/09/oracle-on-debian-lenny-ora-01034-oracle-not-available/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:31:26 +0000</pubDate>
		<dc:creator>dariusz.cieslak</dc:creator>
				<category><![CDATA[en]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://blog.aplikacja.info/?p=264</guid>
		<description><![CDATA[Today I installed (again) Oracle XE on Debian (Lenny) and got the following error:
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
SVR4 Error: 13: Permission denied
I suspected problem was caused by errant ORACLE_HOME / ORACLE_SID values bug got the answer:
chmod 6751 $ORACLE_HOME/bin/oracle
That gives &#8220;-rwsr-s--x&#8220;. Why permissions were not set properly on installation &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Today I installed (again) <a href="http://www.oracle.com/technology/products/database/xe/index.html">Oracle XE</a> on Debian (Lenny) and got the following error:</p>
<pre style="padding-left: 30px;">ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
SVR4 Error: 13: Permission denied</pre>
<p>I suspected problem was caused by errant ORACLE_HOME / ORACLE_SID values bug got the <a href="http://sabdarsyed.blogspot.com/2009/01/ora-27123-unable-to-attach-to-shared.html">answer</a>:</p>
<pre style="padding-left: 30px;">chmod 6751 $ORACLE_HOME/bin/oracle</pre>
<p>That gives &#8220;<code>-rwsr-s--x</code>&#8220;. Why permissions were not set properly on installation &#8211; have no idea. Any clues?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.aplikacja.info/2009/09/oracle-on-debian-lenny-ora-01034-oracle-not-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

