<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Techspace</title>
	<atom:link href="http://parasjain01.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://parasjain01.wordpress.com</link>
	<description>Tips and tricks for common JEE issues</description>
	<pubDate>Wed, 13 Feb 2008 23:22:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Problem- java.lang.NoClassDefFoundError: javax/el/ValueExpression Tomcat</title>
		<link>http://parasjain01.wordpress.com/2008/01/31/problem-javalangnoclassdeffounderror-javaxelvalueexpression/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/31/problem-javalangnoclassdeffounderror-javaxelvalueexpression/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 16:07:35 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[JSP]]></category>

		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/31/problem-javalangnoclassdeffounderror-javaxelvalueexpression/</guid>
		<description><![CDATA[Problem- java.lang.NoClassDefFoundError: javax/el/ValueExpression
Possibly
you are using different set of jars at runtime and compile time. In
case of tomcat you  might be using some of the jars. Try adding jars
like el-api.jar, javaee.jar, jstl-1.2.jar from your development
environment to the Tomcat/common/lib folder,  one by one and it should
solve the problem
Powered by ScribeFire.
      [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Problem- java.lang.NoClassDefFoundError: javax/el/ValueExpression</p>
<p>Possibly<br />
you are using different set of jars at runtime and compile time. In<br />
case of tomcat you  might be using some of the jars. Try adding jars<br />
like el-api.jar, javaee.jar, jstl-1.2.jar from your development<br />
environment to the Tomcat/common/lib folder,  one by one and it should<br />
solve the problem</p>
<p class="poweredbyperformancing">Powered by <a href="http://scribefire.com/">ScribeFire</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=21&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/31/problem-javalangnoclassdeffounderror-javaxelvalueexpression/feed/</wfw:commentRss>
		</item>
		<item>
		<title>org.hibernate.TransientObjectException Revisited</title>
		<link>http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 21:28:04 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/</guid>
		<description><![CDATA[This is continuation of my earlier post on org.hibernate.TransientObjectException. Let me write the scenario again
&#60;class name=”com.xxx.A” table=”A” schema=”TESTSCHEMA”&#62;
&#60;id name=”aId” type=”java.lang.Long”&#62;
&#60;column name=”A_ID” precision=”29″ scale=”0″ /&#62;
&#60;/id&#62;
…………………..
some more mapping elements
…………………..
…………………..
&#60;many-to-one name=”bId” class=”com.xxx.B” fetch=”select”&#62;
&#60;column name=”B_ID” precision=”29″ scale=”0″ /&#62;
&#60;/many-to-one&#62;
…………………..
A is referring to B using a primary key column of bId of B.
In that post I have mentioned that if B [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This is continuation of my <a href="http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/">earlier post</a> on org.hibernate.TransientObjectException. Let me write the scenario again</p>
<p>&lt;class name=”com.xxx.A” table=”A” schema=”TESTSCHEMA”&gt;<br />
&lt;id name=”aId” type=”java.lang.Long”&gt;<br />
&lt;column name=”A_ID” precision=”29″ scale=”0″ /&gt;<br />
&lt;/id&gt;</p>
<p>…………………..<br />
some more mapping elements<br />
…………………..<br />
…………………..<br />
&lt;many-to-one name=”bId” class=”com.xxx.B” fetch=”select”&gt;<br />
&lt;column name=”B_ID” precision=”29″ scale=”0″ /&gt;<br />
&lt;/many-to-one&gt;</p>
<p>…………………..</p>
<p>A is referring to B using a primary key column of bId of B.</p>
<p>In that post I have mentioned that if B is a transient object and you don&#8217;t want to persist the value of B to A then just tell the hibernate to ignore that value by saying<br />
<b>update=”false” insert=”false”</b> in the many to one mapping.</p>
<p>But what if you want to persist the value of foreign key in A.</p>
<p>Then the approach is different. You have to make sure that instance B is persistent not transient.</p>
<p>That is if your code says something like</p>
<p>A a = new A();<br />
B b = new B();<br />
a.setB(b);<br />
&#8230;..<br />
&#8230;..</p>
<p>session.save(a);</p>
<p>you are in trouble. Because B is in transient state. You have to attach b to the session.<br />
There may be other ways of attaching this transient object to session. The approach  I am following is simple. I am reading the value of B from the database using Hibernate. That way, hibernate attaches B to session and it is then a persistent object.</p>
<p>That is I do something like</p>
<p>A a = new A();<br />
B b = session.get(B.class, new Long(1));<br />
a.setB(b);<br />
&#8230;..<br />
&#8230;..</p>
<p>session.save(a);</p>
<p><img src="http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/" />I won&#8217;t get any exception because this time there is no transient object to save. All the objects are persistent.</p>
<p class="poweredbyperformancing">Powered by <a href="http://scribefire.com/">ScribeFire</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=18&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/feed/</wfw:commentRss>
	
		<media:content url="http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/" medium="image" />
	</item>
		<item>
		<title>Book Review - Spring in Action</title>
		<link>http://parasjain01.wordpress.com/2008/01/25/book-review-spring-in-action/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/25/book-review-spring-in-action/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 22:50:19 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Book Reviews]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/25/book-review-spring-in-action/</guid>
		<description><![CDATA[
       ]]></description>
			<content:encoded><![CDATA[
       ]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/25/book-review-spring-in-action/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MyEclipse Hibernate Spring tutorial - Managing Hibernate transaction in Spring</title>
		<link>http://parasjain01.wordpress.com/2008/01/20/myeclipse-hibernate-spring-tutorial-managing-hibernate-transaction-in-spring/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/20/myeclipse-hibernate-spring-tutorial-managing-hibernate-transaction-in-spring/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 06:17:09 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Spring]]></category>

		<category><![CDATA[Hibernate transaction management in Spring]]></category>

		<category><![CDATA[HibernateDAOSuport in Spring]]></category>

		<category><![CDATA[Spring transaction management]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/20/myeclipse-hibernate-spring-tutorial-managing-hibernate-transaction-in-spring/</guid>
		<description><![CDATA[Spring transaction management, Hibernate transaction management in Spring
There was a problem/defect in the MyEclipse tutorial on Hibernate Spring.  It was not a major problem. The tutorial demonstrates the Spring and Hibernate functionality pretty well. The only problem was that the code does seems to work properly. Because of absence of proper transaction management in [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Spring transaction management, Hibernate transaction management in Spring</p>
<p>There was a problem/defect in the <a href="http://www.myeclipseide.com/documentation/quickstarts/hibernateandspring/" title="MyEclipse Hibernate Spring tutorial">MyEclipse tutorial on Hibernate Spring</a>.  It was not a major problem. The tutorial demonstrates the Spring and Hibernate functionality pretty well. The only problem was that the code does seems to work properly. Because of absence of proper transaction management in code the data was not getting persisted in the database.  Because of the caching in Hibernate it seems to the user that the data is being written to the database and then read back.</p>
<p>There are two solutions to the problem. One is to write the transaction management code in the java class itself. Another is to manage transaction via Spring&#8217;s transaction management. The second solution makes more sense because it shows of the Spring&#8217;s capability of managing transaction in Hibernate. You can see both the solutions <a href="http://myeclipseide.com/PNphpBB2-viewtopic-t-19832.html">here.</a></p>
<p>I am writing the Spring&#8217;s configuration for Hibernate transaction management again.</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;!DOCTYPE beans PUBLIC &#8220;-//SPRING//DTD BEAN//EN&#8221; &#8220;http://www.springframework.org/dtd/spring-beans.dtd&#8221;&gt;</p>
<p>&lt;beans&gt;<br />
&lt;bean id=&#8221;sessionFactory&#8221;<br />
class=&#8221;org.springframework.orm.hibernate3.LocalSessionFactoryBean&#8221;&gt;<br />
&lt;property name=&#8221;configLocation&#8221;<br />
value=&#8221;file:src/hibernate.cfg.xml&#8221;&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;<br />
&lt;bean id=&#8221;userDAOTarget&#8221; class=&#8221;com.myeclipse.hibernatespring.UserDAO&#8221;&gt;<br />
&lt;property name=&#8221;sessionFactory&#8221;&gt;<br />
&lt;ref bean=&#8221;sessionFactory&#8221; /&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;<br />
&lt;bean id=&#8221;userDAOService&#8221; class=&#8221;org.springframework.transaction.interceptor.TransactionProxyFactoryBean&#8221;&gt;<br />
&lt;property name=&#8221;transactionManager&#8221; ref=&#8221;transactionManager&#8221;/&gt;<br />
&lt;property name=&#8221;transactionAttributes&#8221;&gt;<br />
&lt;props&gt;<br />
&lt;prop key=&#8221;add*&#8221;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;<br />
&lt;prop key=&#8221;update*&#8221;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;<br />
&lt;prop key=&#8221;delete*&#8221;&gt;PROPAGATION_REQUIRED&lt;/prop&gt;<br />
&lt;/props&gt;<br />
&lt;/property&gt;<br />
&lt;property name=&#8221;target&#8221;&gt;&lt;ref local=&#8221;persistenceLayer&#8221;/&gt;&lt;/property&gt;<br />
&lt;/bean&gt;</p>
<p>&lt;bean id=&#8221;persistenceLayer&#8221;<br />
class=&#8221;com.myeclipse.hibernatespring.PersistenceLayer&#8221;<br />
abstract=&#8221;false&#8221; singleton=&#8221;true&#8221; lazy-init=&#8221;default&#8221;<br />
autowire=&#8221;default&#8221; dependency-check=&#8221;default&#8221;&gt;<br />
&lt;property name=&#8221;userDAO&#8221;&gt;<br />
&lt;ref bean=&#8221;userDAOTarget&#8221; /&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;<br />
&lt;bean id=&#8221;transactionManager&#8221; class=&#8221;org.springframework.orm.hibernate3.HibernateTransactionManager&#8221;&gt;<br />
&lt;property name=&#8221;sessionFactory&#8221;&gt;&lt;ref bean=&#8221;sessionFactory&#8221;/&gt;&lt;/property&gt;<br />
&lt;/bean&gt;<br />
&lt;/beans&gt;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=16&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/20/myeclipse-hibernate-spring-tutorial-managing-hibernate-transaction-in-spring/feed/</wfw:commentRss>
		</item>
		<item>
		<title>10061 error while installing MySQL on Windows Vista</title>
		<link>http://parasjain01.wordpress.com/2008/01/20/10061-error-while-installing-mysql-on-windows-vista/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/20/10061-error-while-installing-mysql-on-windows-vista/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 05:56:25 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[MySQL]]></category>

		<category><![CDATA[Windows Vista - The Crap]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/20/10061-error-while-installing-mysql-on-windows-vista/</guid>
		<description><![CDATA[I had really a very tough time today while installing MySQL on vista.  All the steps in the installation are simple and self-explanatory.  I just want to mention two things from my experience
Before starting installation
1) If you want to install MySQL after uninstall your current MySQL fuly and properly. After uninstallation you should [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I had really a very tough time today while installing MySQL on vista.  All the steps in the installation are simple and self-explanatory.  I just want to mention two things from my experience</p>
<p>Before starting installation</p>
<p>1) If you want to install MySQL after uninstall your current MySQL fuly and properly. After uninstallation you should manually delete the installation folder at c:\Program Files\MySQL or at any location your MySQL is installed.</p>
<p>2) Turn off UAC(the nasty part of Windows Vista)</p>
<p>3) Turn off Windows Firewall.</p>
<p>4) Restart your PC.</p>
<p>5) Try now. This time the installation should be smooth and easy</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=15&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/20/10061-error-while-installing-mysql-on-windows-vista/feed/</wfw:commentRss>
		</item>
		<item>
		<title>org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:</title>
		<link>http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 20:21:31 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Hibernate problem]]></category>

		<category><![CDATA[org.hibernate.TransientObjectException: object referenc]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/</guid>
		<description><![CDATA[I was getting this error today.
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:This is the problemTable A was referring to the talbe B using a foreign key
hbm.xml for A looked like this
&#60;class name=”com.xxx.A” table=”A” schema=”TESTSCHEMA”&#62;
&#60;id name=”aId” type=”java.lang.Long”&#62;
&#60;column name=”A_ID” precision=”29″ scale=”0″ /&#62;
&#60;/id&#62;…………………..
some more mapping elements
…………………..
…………………..
&#60;many-to-one name=”bId” class=”com.xxx.B” fetch=”select”&#62;
&#60;column name=”B_ID” precision=”29″ [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="snap_preview">I was getting this error today.<br />
org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:This is the problemTable A was referring to the talbe B using a foreign key</p>
<p>hbm.xml for A looked like this</p>
<p>&lt;class name=”com.xxx.A” table=”A” schema=”TESTSCHEMA”&gt;<br />
&lt;id name=”aId” type=”java.lang.Long”&gt;<br />
&lt;column name=”A_ID” precision=”29″ scale=”0″ /&gt;<br />
&lt;/id&gt;…………………..<br />
some more mapping elements<br />
…………………..<br />
…………………..<br />
&lt;many-to-one name=”bId” class=”com.xxx.B” fetch=”select”&gt;<br />
&lt;column name=”B_ID” precision=”29″ scale=”0″ /&gt;<br />
&lt;/many-to-one&gt;</p>
<p>…………………..</p>
<p>I just want to save A with some new value and A will refer to B using some foreign key. But in my transaction I am not going to change B and save the changes. Therefore the many-to-one mapping above is wrong. It does not tell hibernate that class b is immutant. That is it is not going to change. Hibernate thinks that the referred table is not saved therefore it complains and says</p>
<p>org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing:</p>
<p>Please note that in this case B is transient object. If you don’t really want to save the value of B(transient object)  in A , then to get rid of this problem change the many-to-one mapping as</p>
<p><b>update=”false” insert=”false” </b>  fetch=”select”&gt;</p>
<p>But if you want to save the value of B then see my <a href="http://parasjain01.wordpress.com/2008/01/28/orghibernatetransientobjectexception-revisited/">other post</a></p>
<p>That is, tell hibernate that you are not going to change the values of B, you are just fetching it.</p>
<p class="poweredbyperformancing">&nbsp;</p>
</div>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=14&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/14/orghibernatetransientobjectexception-object-references-an-unsaved-transient-instance-save-the-transient-instance-before-flushing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>ORA-01747: invalid user.table.column, table.column, or column specification</title>
		<link>http://parasjain01.wordpress.com/2008/01/09/ora-01747-invalid-usertablecolumn-tablecolumn-or-column-specification/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/09/ora-01747-invalid-usertablecolumn-tablecolumn-or-column-specification/#comments</comments>
		<pubDate>Wed, 09 Jan 2008 21:01:27 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[Hibernate problem]]></category>

		<category><![CDATA[ORA-01747]]></category>

		<category><![CDATA[oracle reserved word in query]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/09/ora-01747-invalid-usertablecolumn-tablecolumn-or-column-specification/</guid>
		<description><![CDATA[Today I  got this error.
ORA-01747: invalid user.table.column, table.column, or column specification.
There could be many reasons why you can get this error. But the basic reason is the query which is finally getting executed to your database is wrong in some way. In my case, I had a column with column name as DESC. I [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Today I  got this error.</p>
<p>ORA-01747: invalid user.table.column, table.column, or column specification.</p>
<p>There could be many reasons why you can get this error. But the basic reason is the query which is finally getting executed to your database is wrong in some way. In my case, I had a column with column name as DESC. I got rid of this problem by simply dropping the table and creating a new one with column name DESCRIPTION instead of DESC.  You may not be able to do that if the table is already existing with many records in it. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Other reason could be that, if you are using named query your named query is not syntactically right.</p>
<p>No matter how the you get this error or for that matter any DB error in Hibernate, the best approach is to enable the show_sql variable in hibernate configuration and get the final query which hibernate is firing against the database.</p>
<p>Get this query and try running it directly in your database client. You can easily find out the culprit part of the query from there. Once you find out root cause of the problem you can think of workarounds or solution for this problem.</p>
<p>And yes, don&#8217;t forget to turn off the show_sql parameter after you are done with it. It will unnecessarily clutter your logs.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=13&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/09/ora-01747-invalid-usertablecolumn-tablecolumn-or-column-specification/feed/</wfw:commentRss>
		</item>
		<item>
		<title>org.hibernate.QueryParameterException: could not locate named parameter</title>
		<link>http://parasjain01.wordpress.com/2008/01/08/orghibernatequeryparameterexception-could-not-locate-named-parameter/</link>
		<comments>http://parasjain01.wordpress.com/2008/01/08/orghibernatequeryparameterexception-could-not-locate-named-parameter/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 17:11:43 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Hibernate]]></category>

		<category><![CDATA[exception]]></category>

		<category><![CDATA[namedquery]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2008/01/08/orghibernatequeryparameterexception-could-not-locate-named-parameter/</guid>
		<description><![CDATA[When you query the database in Hibernate using NamedQuery you may run into this error
org.hibernate.QueryParameterException: could not locate named parameter [parm1]
Chances are that you are either trying to set a parmeter to the query which infact doesn&#8217;t exist in your query.  For example
you are trying to do
query.setParameter(&#8221;parm1&#8243;, new Long(parm1Value));
whereas, in query there is no [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When you query the database in Hibernate using NamedQuery you may run into this error</p>
<p><b>org.hibernate.QueryParameterException: could not locate named parameter [parm1]</b></p>
<p>Chances are that you are either trying to set a parmeter to the query which infact doesn&#8217;t exist in your query.  For example</p>
<p>you are trying to do</p>
<p>query.setParameter(&#8221;parm1&#8243;, new Long(parm1Value));</p>
<p>whereas, in query there is no parameter like parm1</p>
<p>i.e. query might be just &#8220;from Item item&#8221;</p>
<p>Or you might be committing some spelling mistake in your code</p>
<p>Eg.  query.setParameter(&#8221;pram1&#8243;, new Long(parm1Value));</p>
<p>and query is  &#8220;from Item item item.desc like :parm1&#8243;</p>
<p>Do note that your parameter name in Java Class is misspelt as pram1 instead of parm1.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=12&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2008/01/08/orghibernatequeryparameterexception-could-not-locate-named-parameter/feed/</wfw:commentRss>
		</item>
		<item>
		<title>synchronization in DWR</title>
		<link>http://parasjain01.wordpress.com/2007/12/28/synchronization-in-dwr/</link>
		<comments>http://parasjain01.wordpress.com/2007/12/28/synchronization-in-dwr/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 20:03:40 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Ajax using DWR]]></category>

		<category><![CDATA[Ajax synchronization]]></category>

		<category><![CDATA[synchronisation in DWR]]></category>

		<category><![CDATA[synchronization in AJAX]]></category>

		<category><![CDATA[synchronization in DWR]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2007/12/28/synchronization-in-dwr/</guid>
		<description><![CDATA[AJAX(Asynchronous JavaScript + XML)  got its name because of its ability to interact asynchronously. This makes Ajax famous for the Rich Internet Applications aka RIAs.
But sometimes you purposefully need synchronization in your code. I needed it once.  I was calling the  same business method consecutively from my ajax code for two different [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>AJAX(Asynchronous JavaScript + XML)  got its name because of its ability to interact asynchronously. This makes Ajax famous for the Rich Internet Applications aka RIAs.</p>
<p>But sometimes you purposefully need synchronization in your code. I needed it once.  I was calling the  same business method consecutively from my ajax code for two different fields.  Even after synchronizing the  business method and making it thread safe,I was not able to guarantee that the first method was fully finished before the second starts. Sometimes the first DWR call was processing the returned values and in the meantime second DWR call will return and mess with the original returned values. I had to synchronize the calls to make sure that both the calls get fired and completed in a proper order.</p>
<p>Starting from DWR1.1 you can synchronize your method calls at <a href="http://getahead.org/dwr/browser/engine/options">various levels</a>.</p>
<p>I synchronized at the method level.  My normal ajax code looked like myBusinessManagerImpl.getValues(&#8217;param1&#8242;, setValuesInDWR);</p>
<p>Where</p>
<p>myBusinessManagerImpl - business layer class</p>
<p>getValues - the method called by Ajax</p>
<p>param1 - the parameter passed to the  business method</p>
<p>setValuesInDWR - the function variable, which was defined somewhere in the code like</p>
<p>var setValuesInDWR = function(data){<br />
//&#8230;.DWR Code&#8230;..<br />
};</p>
<p>To make the method calls synchronized I modified the method call like this</p>
<p>myBusinessManagerImpl.getValues(&#8217;param1&#8242;, {callback:setValuesInDWR, async:false});</p>
<p>This way I was able to make two consecutive calls to the same method synchronously.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=10&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2007/12/28/synchronization-in-dwr/feed/</wfw:commentRss>
		</item>
		<item>
		<title>addOptions problem in DWR</title>
		<link>http://parasjain01.wordpress.com/2007/12/21/addoptions-problem-in-dwr/</link>
		<comments>http://parasjain01.wordpress.com/2007/12/21/addoptions-problem-in-dwr/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 21:27:00 +0000</pubDate>
		<dc:creator>Paras</dc:creator>
		
		<category><![CDATA[Ajax using DWR]]></category>

		<category><![CDATA[addOptions for array of objects]]></category>

		<category><![CDATA[addOptions not working in DWR]]></category>

		<category><![CDATA[addOptions problem in DWR Ajax]]></category>

		<category><![CDATA[Ajax]]></category>

		<category><![CDATA[DWR]]></category>

		<category><![CDATA[DWR API]]></category>

		<guid isPermaLink="false">http://parasjain01.wordpress.com/2007/12/21/addoptions-problem-in-dwr/</guid>
		<description><![CDATA[Have you ever wondered why the addOptions is not working in DWR even after reading the specs carefully. It happened to me recently. First, of all, the API or specs or documentation for DWR(addOptions Documentation)  are not detailed and sufficient. Especially, for the new and impatient learners like me, who don&#8217;t want to go [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Have you ever wondered why the addOptions is not working in DWR even after reading the specs carefully. It happened to me recently. First, of all, the API or specs or documentation for DWR(<a href="http://getahead.org/dwr/browser/addoptions" title="addOptions Documentation">addOptions Documentation</a>)  are not detailed and sufficient. Especially, for the new and impatient learners like me, who don&#8217;t want to go through each and every page of the spec before using the technology. Second, if you are impatient and new learner then probably you might have missed some of the part. Problem: I was trying to populate the Select box from a list of Objects using the addOptions method of DWR. I have followed the documentation fully but my drop down was not being populated. (It was my second day with DWR so I didn&#8217;t know some of the complexities which ultimately solved the problem)</p>
<p>Solution:- I will take one example to explain this Let your select field something like this</p>
<p><code><br />
<font size="2"><br />
&lt;select id=&#8221;statesList&#8221; /&gt;<br />
</font><br />
</code></p>
<p>And the class whose list of Objects you are trying to add is something like this</p>
<p><code><br />
<font size="2"><br />
package testPackage.dwr;<br />
public class State{<br />
private String stateId;<br />
private String stateName;<br />
&#8230;&#8230;&#8230;&#8230;<br />
//getter and setter methods<br />
&#8230;&#8230;&#8230;&#8230;<br />
}<br />
</font><br />
</code></p>
<p>and you want to populate this using DWR after some user action. Make sure that your callback function looks like this</p>
<p><code><br />
<font size="2"><br />
var setValuesInDWR = function(data){<br />
var fieldId = &#8217;statesList&#8217;;<br />
var valueText = &#8217;stateId&#8217;;<br />
var nameText = &#8217;stateName&#8217;;<br />
dwr.util.removeAllOptions(fieldId);// step 1<br />
dwr.util.addOptions(fieldId, data, valueText, nameText);//step 2<br />
};<br />
</font><br />
</code><br />
All the above steps are important</p>
<p>Step 1 - Actually removes the already existing values from your select list. If you don&#8217;t do this. the addOptions method will simply append the list.</p>
<p>Step 2 - This will actually add the values to the drop-down list.</p>
<p>I forgot/missed/didn&#8217;t know that you have to add the following line in dwr.xml</p>
<p>&lt;convert converter=&#8221;bean&#8221; match=&#8221;testPackage.dwr.State&#8221;/&gt;</p>
<p>Reason is, unless you don&#8217;t explicitly specify in your dwr.xml the user defined beans will not be converted in DWR. If your bean consists of supported datatypes which DWR can automatically convert then you can just add this declaration. After following all these steps carefully the problem of Dropdown not getting populated in DWR should be solved.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/parasjain01.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/parasjain01.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/parasjain01.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/parasjain01.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/parasjain01.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/parasjain01.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/parasjain01.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/parasjain01.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/parasjain01.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/parasjain01.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/parasjain01.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/parasjain01.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=parasjain01.wordpress.com&blog=1112800&post=4&subd=parasjain01&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://parasjain01.wordpress.com/2007/12/21/addoptions-problem-in-dwr/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>