Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Luis Parente

Ranch Hand
+ Follow
since Jan 17, 2012
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 Luis Parente


I have hibernate ORM with the implementation JPA, I have registered some functions like that:

The class extends of org.hibernate.dialect.MySQL5Dialect and it's work perfectly.

But now I want to register de function LIMIT, and I do the following:

but when I use it in my JPQL, exemple : Select From ProductEntity pte LIMIT 1, Hibernate trows an exception....

Could you help me with this stuff.

Thanks in advance.

Best regards.

I have the following configuration:

But I have the following exception

7 years ago
Hi thanks for your response,

Well I need to configure

How I can configure the dataSource if I have already configured a bean dataSource, I don't repeat again the configuration of URL and etc....

Thanks in advance!

7 years ago

In a project I need to make a planner tasks, they must be persistent in BDD, ie it can be modified beings, you can delete, pause them, create jobs in runtilme etc. ....

I am looking for an example with spring and hibernate which allows it to ...

Thank you in advance.
7 years ago

In an application I'm trying to make a report for each item in a list that I get from a BDD.

Each page must contain a logo .....

I tried to put the image in the beginning of all the pages .....
As in my jrxml the relative path is not appreciated. EX:

After a little google I pass the image in the map like this:

then in the jrxml I reporting this parameter:

then for display:

I don't know why, but <image> need to have onErrorType attribute set to "Blank", otherwise it does not work - throws exception

If I try to print multiple times this parameter (logo) does not work and I do not understand why? It is display only one time.

Thanks in advance.

I have modified the getMessage

catch(EmptyResultDataAccessException msgErr){
throw new BadCredentialsException(messages.getMessage("DigestAuthenticationFilter.usernameNotFound",
new Object[]{username}, "Utilisateur {0} non paramétré en base", LocaleContextHolder.getLocale()));

and LocaleContextHolder.getLocale() is equal 'fr_FR', but the problem continue.

Thanks in advance.
7 years ago
Thanks for your response, but about the local, I think the default local is used or I make a mistake?
7 years ago
Hi all,

I have a problem with my resource bundle. For retrieve my messages I do the following:

and I use it in an exception like that:

In the method getMessage I have defined a string default

In mode debug I can see that username(args to substitute in string ) is not null and in my the value of code DigestAuthenticationFilter.usernameNotFound it's ok.

But, when the exception is throw, in my jsp the text in not correctly written: , the args is not replace the argument.

If I spell a wrong code String, the default string is used and the message is correctly written in my JSP. if username equals to TOTO.

Any idea please?

Thanks in advance.

7 years ago
I don't have saw before, but in my file webmvc-config.xml

I have added the definition for my custom access denied page and now it's work

Thanks for your response!
8 years ago
Hi All,

Before all, I want to apologize for my bad English.

Well I'm trying to handle the @PreAuthorize exeception and redirect to my access denied page.

I have two things:

My custom access denied page that is configured and it's work fine. I have add and the jspx, works perfectly except with de PreAuthorize.

I have put in a controller, on top of the method and it's throw an exception if I have another ROLE.

This is my full configuration:

in webmvc-config.xml:

in applicationContext.xml

and it's ok.... in my class SkipMethodCallAccessDecisionManager with a breakpoint in

the exception is caught in InvocableHandlerMethod.class:

And in the browser I have the default error page.....

When and how I do redirect to my custom access denied page?

I need some help please

Thanks in advance.

Best regards.
8 years ago

It's doesn't work for me.....

I have read this explanation:, but I think is a little complicated.

Thanks in advance.
8 years ago
Hi thanks one again more

well, at the moment I have the following:

In webmvc_config.xml

In applicationContext-security.xml


and in

and views.xml I have added

Its 'do anything... and the

throws the exeption: this is the full stack trace:


8 years ago

I forgot

But now I do handle the exception:

8 years ago
Hi all,

After read some documentation, I have put <global-method-security> tag in the webmvc-config.xml, but I think is better in applicationContext.xml, no?

I have an amazing side effect if I put the @ PreAuthorized in a method of my controller (createFrom), while the css disappears.

If you have ever had this problem thank you kindly tell me how to solve.

(sorry for my bad English)


8 years ago
I see, it' better to put the annotations in the interfaces.

Just one more thing..... If I want to block an url like that: .

The url is mapped with this method in my controller

The solution is the

Thanks a lot!!

8 years ago