Arif Rakhman

+ Follow
since Jul 31, 2018
Arif likes ...
Hibernate Spring Redhat
Merit badge: grant badges
For More
Bandung, Indonesia
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 Arif Rakhman

pavan gatt wrote:I am planning to take OCA Certification in next Two Months, about the preparedness of i am  now is at the basic level but i want few suggestion of some books and websites that would really help me, so that i would not be in the state of confusion to answer the question at the time of taking the exam... ( it should also be helpful to reach out of out in the exam)
Any kind of help would help me a lot.
THANK YOU( this is in advance but i would really be very grateful after the reply too )

You can refer from this book, i had already use this book for OCA Java SE programmer 1 exam.
5 years ago

Jack Tauson wrote:I have the following setup working fine and it's printing the following JSON as expected:


Following code works fine and prints above JSON:


But I have few more things involved like Hibernate 4.3.5 from where I am getting some details so I have modified the above code as follows:

I am getting following JSON response for the above :


In case if someone is wondering what's the output of `empList`. from the below line of code of the controller, I tried printing it like this :


and it's getting printed like this :

Could anyone tell me what am I doing wriong above? I mean how can I print all the ID and Name in the JSON using `empList` from the above code?

Hi jack, are you want to create a RESTfull APIs using spring?
5 years ago

Melody Putri wrote:Hi,

I'm receiving data in form of JSON Array. Here's the JSON Array that i've received :
[{"FOODID":"Jus Alpukat","PRICE":"7000","NUM":"1","RES":"7000.0","ORDERID_FK":""},{"FOODID":"Ice Cream","PRICE":"5000","NUM":"10","RES":"50000.0","ORDERID_FK":""}]

i need it to be converted into arraylist that will be inserted into JTable into java. I've read about GSON and a few article to do this but i still don't understand. Can you give me example how to do this? thanks.

Hi Melody,

You can use jackson library to convert json object to arraylist,

first, you need to create a POJO

second , create a method that convert to ArrayList Object, let say a convert method.

Hope it helps
5 years ago

xin yi wrote:In mybatis, if I need java.util.List for result type, and I  don't know what kind of the  type in the list should I use.  I don't know list's type correspond witch JAVA Bean.
What should I do?

Hi Xin, what do you expect the result of your query? please attach a snippet of your custom mapper xml file..
5 years ago

Tim Holloway wrote:My best guess is that the userid that Glassfish runs under lacks the necessary filesystem privileges to write that logfile.

That's something that I think should be reported in the Glassfish server log, though.

Hi Tim, thanks for respond, i didn't find any error related filesystem, such as permission denied or something like that in server.log file and I had already granted the user "payara" (operating system user) to work with a directory that i mention in the xml file.
5 years ago
Hi guys,

I have a rest application in java, previously it deploy in tomcat but currently in glassfish.
The application implement log4j before and its work in tomcat,

Here is the config xml log4j

But in glassfish didn't work, it didn't produce any log file. How to work with log4j in glassfish env?

Many thanks.
5 years ago