Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Mikael Gyth

Greenhorn
+ Follow
since Sep 30, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mikael Gyth

Thanks for reply.

I don't have any resources used only by testing, only my regular resources that are located in src/main/resources.

I guess I must have something configured wrong in that case, because my test methods can't find the resources.
Do I have to manually create the src/test/resources for maven to copy the files there when the tests run?
8 years ago
JSF
Hi.

I get an error when i try to run my unittest, because they can't find my resource files.
They are located at:
src/main/resources/Bundle.properties
As I understand it from this post I need to add this path to my test classpath so that it's avaliable to the tests too.
But I can't figure out what file, menu or property i need to edit to set it.
I am using Netbeans 7.2 and Maven for a JSF project.

Can anyone give me som decent instructions on how to add this path to the test classpath in this environment.

Br.
9 years ago
JSF
Hello and thanks for the reply.
These characters have worked before, we had the same problem early in the project but it has come back at some point, and we probably didn't notice it until the validation failed.
I think the most relevant solution would be nr. 3. But as I said earlier I have gone trough all the tables in the database and all the xhtml files and made sure they are all UTF-8, witch to my knowledge should be sufficient to make this work.
Is there anywhere else in the project config files or on the Glassfish server we can set these parameters? we have a Maven web project with JSF and PrimeFaces, also we are using hibernate(eclipselink) for out datasource.
9 years ago
JSF
Apparantly they aren't getting trough the validation because the server reads them as ÆØÅ characters. I have gone trough all my files and my database to make sure it's all UFT-8. But i'm still getting the same results.
Anyone know if there are any additional charset settings I have to set anywhere?
9 years ago
JSF
Hello.

I'm stuck trying to validate a String field in a entity class.


The regular expression should work, but every time I attempt to insert a word with æ,ø or å, Æ, Ø orÅ in it it fails validation.

Does anyone have any tips or hints on what's wrong?

Br.
9 years ago
JSF
Solution was to define the returning entity object in the namedQuery.

9 years ago
Hello. I have a problem i can't seem to figure out.

I have a set of REST Methods, this is two of them:


The first one works just fine, the second one when I try to call it, I get this error:


And in Glassfish I get:


Can anyone please help me sort this out? Let me know if you need any aditional info.

Thanks in advance.

Edit: I know the parameters and the sql query doesn't make any sense in it's current state, I'v just been removing most of the query to get something i knew worked.
9 years ago