This week's giveaway is in the Java/Jakarta EE forum.
We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line!
See welcome thread
Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

Max Bogdanov

+ Follow
since Mar 12, 2011
Max likes ...
C++ Java Oracle
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Max Bogdanov

I am using Resin AS (4.18), MSSQL Server(2005) and Hibernate as JPA provider. How to configure connection autocommit=false? By default it's true.
Datasource configuration from resin.xml:

Test code from a servlet:

[12-09-10 13:04:01.516] [WARNING] [] [#22] > autocommit=true

As a result I cannot use transactions in my application, then I try to rollback the transaction I receive exception:
Caused by: Cannot invoke a rollback operation when the AutoCommit mode is set to "true".

I can't use conn.setAutoCommit(false); method directly as I use hibernate as JPA provider.


N Sahni wrote:Can you try modifying DocumentBuilderFactory instance like this:

I tried executing your code and replicating the issue. By setting builder.setNamespaceAware(true); it worked properly.

Thank you so much! Now it works. I didn't know that default value is false.
6 years ago

N Sahni wrote:Hi,

Everything looks good here except the namespace.
The namespace declared in xml is whereas namaspace set in namaspacecontext is Both does not match.

It was my copy-paste mistake. I edited my post, the namespaces are same, I checked everything 1000 times))). Thanks.
6 years ago
I have no idea why this simple example does not work. Please give me same advice:
(if I remove namespace it works perfect)

Example output:

NamespaceContext implementation class:

Thanks, Max
6 years ago

Paul Anilprem wrote:
Hi Max,
Congratulations on passing!! It is indeed a tough exam.
Could you please provide some feedback regarding the topics on which you got really tough questions?

thank you,

I can try)) The main problem that there no mock exams for. I didn't have problem with some special topic from exam, but questions were very deep into details(sorry for my English) So if you only read the book and don't have enough practice it is very difficult to pass the exam. There were a lot of practice question.
I think the book cover all exam topics, but you have not only read, but code all examples by yourself.

p.s. for 80% from exam's questions I didn't have 100% correct answer, I mean it was 50-50% or this or this, it wasn't like OCE-EJBD exam there were a lot of simple theoretical questions with clear answers.
today pass OCP-JPAD. - totally useless, didn't help me.
I used this book for preparation - and spec:JSR-000317 JavaTM Persistence 2.0 (Final Release)
The exam was very difficult, there were a lot of question with very-very close answers. Without good mock exams it's very difficult to make high score, I pass with 76%, all my previous certs was >90%.

Jukka Nevalainen wrote:Hi there

I've also come across that certification. As for now, I haven't really found any 'official' preparation material.. There is one page I found with an unofficial (apparently) software to prepare for the certification: I actually read about it on this board.. So does anybody have experience with that software? Has anybody in this world ever taken that exam at all? ;-)

As for books, this one doesn't look too bad:

I tried this stuff. Very bad, there are lot of mistakes.

James Sutherland wrote:Please log a bug on EclipseLink for this, it does seem to be ignored.

As a workaround you could use a DescriptorCustomizer and amend the DirectCollectionMapping's DirectReadQuery with the order by Expression.

You could also use an OrderColumn instead.

Thank you James. Yes I think it's bug too, I will log it. I tried hibernate 3.6.5 fully JPA 2.0 compliant and it works perfect. I prepare my self for JPA 2.0 certification, so the workaround isn't suitable at this time(I made example with OrderBy), but many thanks.

I try to use OrderBy with ElementCollection:

Entity class:

Main class


Program's output:
[EL Info]: 2011-06-17 09:41:11.338--ServerSession(1068896286)--EclipseLink, version: Eclipse Persistence Services - 2.2.0.v20110202-r8913
[EL Info]: 2011-06-17 09:41:11.662--ServerSession(1068896286)--file:/C:/Users/max/workspace/netbeans/OCE-JPAD/TestOrderBy/src/_mySqlJPA login successful
[EL Fine]: 2011-06-17 09:41:11.696--ServerSession(1068896286)--Connection(649045642)--CREATE TABLE PERSON (ID INTEGER NOT NULL, name VARCHAR(255), PRIMARY KEY (ID))
[EL Fine]: 2011-06-17 09:41:11.758--ServerSession(1068896286)--Connection(649045642)--CREATE TABLE Person_PHONENUMBERS (Person_ID INTEGER, PHONENUMBERS VARCHAR(255))
[EL Fine]: 2011-06-17 09:41:11.765--ServerSession(1068896286)--Connection(649045642)--ALTER TABLE Person_PHONENUMBERS ADD CONSTRAINT FK_Person_PHONENUMBERS_Person_ID FOREIGN KEY (Person_ID) REFERENCES PERSON (ID)
[EL Fine]: 2011-06-17 09:41:11.856--ClientSession(1741587908)--Connection(649045642)--INSERT INTO PERSON (ID, name) VALUES (?, ?)
bind => [2 parameters bound]
[EL Fine]: 2011-06-17 09:41:11.88--ClientSession(1741587908)--Connection(649045642)--INSERT INTO Person_PHONENUMBERS (Person_ID, PHONENUMBERS) VALUES (?, ?)
bind => [2 parameters bound]
[EL Fine]: 2011-06-17 09:41:11.881--ClientSession(1741587908)--Connection(649045642)--INSERT INTO Person_PHONENUMBERS (Person_ID, PHONENUMBERS) VALUES (?, ?)
bind => [2 parameters bound]
[EL Fine]: 2011-06-17 09:41:11.882--ClientSession(1741587908)--Connection(649045642)--INSERT INTO Person_PHONENUMBERS (Person_ID, PHONENUMBERS) VALUES (?, ?)
bind => [2 parameters bound]
[EL Fine]: 2011-06-17 09:41:11.883--ClientSession(1741587908)--Connection(649045642)--INSERT INTO Person_PHONENUMBERS (Person_ID, PHONENUMBERS) VALUES (?, ?)
bind => [2 parameters bound]
[EL Fine]: 2011-06-17 09:41:11.893--ServerSession(1068896286)--Connection(649045642)--SELECT ID, name FROM PERSON WHERE (ID = ?)
bind => [1 parameter bound]
[EL Fine]: 2011-06-17 09:41:11.901--ServerSession(1068896286)--Connection(649045642)--SELECT t0.PHONENUMBERS FROM Person_PHONENUMBERS t0 WHERE (t0.Person_ID = ?)
bind => [1 parameter bound]
Person{id=1, personName=Max, phoneNumbers={[1111111, 3333333, 5555555, 2222222]}}
[EL Info]: 2011-06-17 09:41:11.905--ServerSession(1068896286)--file:/C:/Users/max/workspace/netbeans/OCE-JPAD/TestOrderBy/src/_mySqlJPA logout successful

Please, give me same advise why OrderBy does not work? I think the output should be like:
Person{id=1, personName=Max, phoneNumbers={[5555555, 3333333, 2222222, 1111111]}}
As I understand the problem in the query:
SELECT t0.PHONENUMBERS FROM Person_PHONENUMBERS t0 WHERE (t0.Person_ID = ?) EclipseLink doesn't use order by clause, but I don't understand why.

Thanks a lot
Hi Guys!
today I have passed SCJA)) Thank you very much for everybody in the forum.
I am preparing for SCJP. Does anybody have experience with whizlabs Exams Voucher? They sale them 249.95$, but prometrics price is 300$.
Will I be able use this voucher?

p.s. it is my first post here, I apologize that my English isn't perfect