There is a hard-to-understand hibernate error message happens sometimes:
org.springframework.orm.hibernate3.HibernateSystemException: reassociated object has dirty collection reference (or an array); nested exception is org.hibernate.HibernateException: reassociated object has dirty collection reference (or an array)
I've seen many forum topics discussing what's the problem but none of them somehow gave a good answer.
And the answer is:
Make sure that your object is persistent before you try to lock it. If you try to call hiberante lock on a transient object you'll get this error.
Friday, December 19, 2008
Wednesday, October 15, 2008
Flex widget
For Internet Polyglot we developed a widget that does the following: it connects to the server, gets the data in JSON format over http and then presents the data to the users. The widget is developed using Flex. The widget looks like the following:
The code for this widget was:
but you can change the languages in this code. For example, if you want to show Spanish-French lessons then simply change wordLanguage and translationLanguage parameters in this code like this:
and the widget will start showing Spanish-French lessons like this:
The code for this widget was:
but you can change the languages in this code. For example, if you want to show Spanish-French lessons then simply change wordLanguage and translationLanguage parameters in this code like this:
and the widget will start showing Spanish-French lessons like this:
Tuesday, August 28, 2007
Public Speaking - Do Software Developers Need It?
Recently I had an email conversation with a guy (A) with whom I work on http://www.InternetPolyglot.com project. I was asking him if he could put more time on this project and he explained to me that he has a permanent work at a bank and also teaches at a university. Then I recommended him to keep teaching:
Me: In my opinion it's better to dump the boring bank application support employment than stop teaching. In this world (well, I can tell for sure about US) public speaking capabilities are worth not less, if not more, than engineering knowledge. If you know how to keep your students interested through the course of your lecture, if you make their eyes sparkling - it's a sure way to a more successful career, especially if you possess engineering knowledge. I understood it when I started teaching SQL - it improved my self-esteem and assertiveness.
And he was surprised:
A: Recently I was thinking about your point – public speaking. Yes, I agree that this can be useful. It can help to overcome some personal fears. But I can't understand: why could it be useful for software developer? We don't speak much on the public. Or do you mean general relation between people?
And here is my answer:
The higher seniority of software developer the more he/she speaks to other people: upper management, customers, business analysts, etc.
Consider this scenario: you and your fellow senior developer have different opinion on some architectural issue. The decision maker is stressed with time and give you both only 10 minutes to express yourself. Quite often the decision makers are not very much interested in technical details. Whose solution, do you think, will be accepted? The one that was presented professionally or the one that was mumbled?
Another thing is speaking to customers, helping your sales team to make a sale - it is always appreciated by management.
At a job interview, the higher your seniority level the fewer technical questions like "what are the input parameters of this or that method" you will get and the interview often becomes a free conversation.
All in all, it about a more successful career. Even as a software developer.
Me: In my opinion it's better to dump the boring bank application support employment than stop teaching. In this world (well, I can tell for sure about US) public speaking capabilities are worth not less, if not more, than engineering knowledge. If you know how to keep your students interested through the course of your lecture, if you make their eyes sparkling - it's a sure way to a more successful career, especially if you possess engineering knowledge. I understood it when I started teaching SQL - it improved my self-esteem and assertiveness.
And he was surprised:
A: Recently I was thinking about your point – public speaking. Yes, I agree that this can be useful. It can help to overcome some personal fears. But I can't understand: why could it be useful for software developer? We don't speak much on the public. Or do you mean general relation between people?
And here is my answer:
The higher seniority of software developer the more he/she speaks to other people: upper management, customers, business analysts, etc.
Consider this scenario: you and your fellow senior developer have different opinion on some architectural issue. The decision maker is stressed with time and give you both only 10 minutes to express yourself. Quite often the decision makers are not very much interested in technical details. Whose solution, do you think, will be accepted? The one that was presented professionally or the one that was mumbled?
Another thing is speaking to customers, helping your sales team to make a sale - it is always appreciated by management.
At a job interview, the higher your seniority level the fewer technical questions like "what are the input parameters of this or that method" you will get and the interview often becomes a free conversation.
All in all, it about a more successful career. Even as a software developer.
Saturday, August 25, 2007
Seam
Ah! Forgot to tell you who is the creator of Seam. Guess... Scroll down and check if you were correct. Hint: jBoss bought something (pretty long ago) for which I have a highest respect.
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
!!! GAVIN KING !!!
Reading a Seam book I can see that it's to a degree an ORM-driven framework. Still, I've just used it 'generate-entities' feature - generating an application from a db schema. I used my ipolyglot db schema and the app is soooo nice! Grails is far, far from it.
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
!!! GAVIN KING !!!
Reading a Seam book I can see that it's to a degree an ORM-driven framework. Still, I've just used it 'generate-entities' feature - generating an application from a db schema. I used my ipolyglot db schema and the app is soooo nice! Grails is far, far from it.
Thursday, March 08, 2007
How to run AppFuse and Tomcat in debug mode
This is what worked for me:
1. Change %CATALINA_HOME%\bin\startup.bat add the following line:
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
and run this startup.bat, you should see this line at the top of output:
Listening for transport dt_socket at address: 8000
2. In Eclipse configure it like this:

Now press Debug button. Place a breakpoint somewhere in the code and you are done!
1. Change %CATALINA_HOME%\bin\startup.bat add the following line:
SET CATALINA_OPTS=-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
and run this startup.bat, you should see this line at the top of output:
Listening for transport dt_socket at address: 8000
2. In Eclipse configure it like this:

Now press Debug button. Place a breakpoint somewhere in the code and you are done!
Tuesday, October 24, 2006
JAXB Examples and Eclipse
To use the JAXB examples in Eclipse I had to add another jar to the build paths: C:\Sun\jwsdp-2.0\sjsxp\lib\jsr173_api.jar since it contains javax.xml.stream.XMLEventReader
Monday, October 23, 2006
Playing with JAXB
I am going through JAXB tutorial http://java.sun.com/webservices/docs/1.4/tutorial/doc/index.html and there are some loopholes that I had to jump over in order to make it work.
For example, here http://java.sun.com/webservices/docs/1.4/tutorial/doc/JAXBUsing2.html#wp87865 it gives not correct commands for compiling and running the primer.
The correct commands (provided that you've installed JWSDP in C:\Sun\jwsdp-2.0) are the following (you should be able to easily rewrite them with using environment variables instead of absolute paths):
Compiling:
Running:
Note the differences from tutorials' commands:
a) putting double quotes around %JAVA_HOME%\bin\javac because JDK is by default gets installed to c:\\Program Files\Java... which has white space in it
b) providing the classpath to the JAXB libraries (I don't know yet which ones of them are truly needed for this exactly exercise, I will learn it later)
c) in compiling I removed the primer\po\impl path - I don't know why it's there now (maybe for other examples?)
d) I copied the Main.java to the root forlder for this example from src folder
The output of this exercise is what was expected:
Very good! This exercise created Java classes from po.xsd and then it read the po.xml to these classes.
So far so good. Let's see what's next in JAXB goodies chest.
For example, here http://java.sun.com/webservices/docs/1.4/tutorial/doc/JAXBUsing2.html#wp87865 it gives not correct commands for compiling and running the primer.
The correct commands (provided that you've installed JWSDP in C:\Sun\jwsdp-2.0) are the following (you should be able to easily rewrite them with using environment variables instead of absolute paths):
Compiling:
Running:
Note the differences from tutorials' commands:
a) putting double quotes around %JAVA_HOME%\bin\javac because JDK is by default gets installed to c:\\Program Files\Java... which has white space in it
b) providing the classpath to the JAXB libraries (I don't know yet which ones of them are truly needed for this exactly exercise, I will learn it later)
c) in compiling I removed the primer\po\impl path - I don't know why it's there now (maybe for other examples?)
d) I copied the Main.java to the root forlder for this example from src folder
The output of this exercise is what was expected:
Very good! This exercise created Java classes from po.xsd and then it read the po.xml to these classes.
So far so good. Let's see what's next in JAXB goodies chest.
Subscribe to:
Posts (Atom)