John Ken

Ranch Hand
+ Follow
since Feb 05, 2020
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 John Ken

any updates please? as still unable to read this json file and proceed further to solve my problem.

Thanks
4 hours ago
thanks much ..

now it seems i have correctly configured java & maven both.

please refer attached screen shot for the same.
3 days ago

John Ken wrote:

John Ken wrote:looks like  after giving attache screen shots settings maven is installed but seems some errors could someone please help ?





Now my system is not recognizing java and upon executing java -version i am getting error like earlier
so i removed maven m2_home and m2 variables and updated path variable just for java still same error now even it is not recognizing java itself.
i am confused a lot now so could  someone please help to install both java and maven properly now?

please refer attached screen shot.
3 days ago

John Ken wrote:looks like  after giving attache screen shots settings maven is installed but seems some errors could someone please help ?



3 days ago
looks like  after giving attache screen shots settings maven is installed but seems some errors could someone please help ?
3 days ago

Stephan van Hulst wrote:Have you already read the JSON-B user guide?



yes, i have read but currently struggling to solve this tough problem.
3 days ago

John Ken wrote:

John Ken wrote:

Stephan van Hulst wrote:First print the PATH variable to the command line using the echo command, like we've done before. See if it contains the path to Maven's bin folder, the folder containing mvn. If it does contain a path to Maven, but it's not exactly the right folder, you need to change your variables. If it doesn't contain a path to Maven at all, you haven't set the M2_HOME and M2 variables.



PATH screen shot and M2_HOME screen shots attached and  maven location in my system:- F:\Java Training\SW\Maven\apache-maven-3.6.3

M2_HOME Variable declared in system with variable  value :-F:\Java Training\SW\Maven\apache-maven-3.6.3



maven and java_home screen shots showing their paths:-



maven error
3 days ago

John Ken wrote:

Stephan van Hulst wrote:First print the PATH variable to the command line using the echo command, like we've done before. See if it contains the path to Maven's bin folder, the folder containing mvn. If it does contain a path to Maven, but it's not exactly the right folder, you need to change your variables. If it doesn't contain a path to Maven at all, you haven't set the M2_HOME and M2 variables.



PATH screen shot and M2_HOME screen shots attached and  maven location in my system:- F:\Java Training\SW\Maven\apache-maven-3.6.3

M2_HOME Variable declared in system with variable  value :-F:\Java Training\SW\Maven\apache-maven-3.6.3



maven and java_home screen shots showing their paths:-
3 days ago

Stephan van Hulst wrote:First print the PATH variable to the command line using the echo command, like we've done before. See if it contains the path to Maven's bin folder, the folder containing mvn. If it does contain a path to Maven, but it's not exactly the right folder, you need to change your variables. If it doesn't contain a path to Maven at all, you haven't set the M2_HOME and M2 variables.



PATH screen shot and M2_HOME screen shots attached and  maven location in my system:- F:\Java Training\SW\Maven\apache-maven-3.6.3

M2_HOME Variable declared in system with variable  value :-F:\Java Training\SW\Maven\apache-maven-3.6.3

3 days ago
Experts could you please advise soon?

thanks
3 days ago
any expert on this forum who could please help step by step to achieve the solution of this problem let's say first target first point of this problem:-


1. Utility to read JSON file from file server

Validation Points:



Step 1: You have to read the file, If any Error, please correct.



3 days ago
so considering below points any idea how can we solve this problem quickly with correct data model:-

1. Utility to read JSON file from file server

2. Utility should run at scheduled time let’s say 6AM

3. Error message if JSON file is not properly formatted

4. Error message if Category is missing and ITEM need that Category to be saved.

5. Entity mapping as per the given relationship in data model

5. Documentation for the API, preferably using any tool

6. Junit Test cases using Mockito

7. Use either MySQL or Oracle for API development

8. add one point as JSON validation for not null and value range






Validation Points:



Step 1: You have to read the file, If any Error, please correct.

Step 2: IF any category/item Missing, Null Message came or Any notification.

Step 3: Add the category and save the message,

Step 4: if Order not received it 6 AM, then Not file Uploaded Message must show OR repeat the previous order.

Step 5: Must add clock in Programmer.



Introduction
Someone wants to manage their website. One of
the most important pages on their website is the “Menu” page.The menu gets updated every
night at the restaurant and Joe’s grill wants the updated menu published to their website every
morning. customer will upload their menu in a JSON formatted file (Let’s call it menu.json) to our
ftp server every night.
Requirement is to develop a program to take this menu.json file and store the data
in a relational database. The data model for the database tables is defined as follows.
Data model
items: id(pkey), name
categories: id(pkey), name
category_items: id(pkey), category_id (fkey categories), item_id(fkey items)
menu.json
{
"category”:[{
“name”: “Appetizer”,
},
{
“name”: “Entree”
}
]
],
"item”:[
{
"name":"French Fries",
"category":"Appetizer"
},
{
"name":"Onion Rings",
"category":"Appetizer"
},
{
"name":"Sandwich",
"category":"Entree"
},
{
"name":"Tacos",
"category":"Entree"
},
{
"name":"Ice Cream Sundae",
"category":"Dessert"
}
],
"restaurant":"Joe's Grill"
}
}
Existing classes:
class category:
def __init__(self, name):
self.name = name
class item:
def __init__(self, name, category_name):
self.name = name
self.category_name = category_name
Helper Functions that Already exist
// json.get_categories(file_name) -> returns array of active category objects (category.name)
// json.get_items(file_name) --> returns array of item object (item.name, item.category_name)
// db.write(table_name, <a data dict or an array of data dicts>) //db.write('categories', {'name':
'c1'})
Note:The keys of the dictionary are the table column names, the values are the row values in
the database table

3 days ago

Stephan van Hulst wrote:So, after all that we've been through in the last two pages in this topic, do you have an idea how you can debug this problem?



sorry i don't have any idea maybe separate path variable for maven ?
3 days ago

Stephan van Hulst wrote:Like I said, you need to prepend it to the existing PATH value, and I explained what prepending means:

Stephan van Hulst wrote:When I say you need to prepend something to the PATH environment variable, it means you need to add it in front of what's already configured there. Make sure to separate paths with a semi-colon.



i did same as advised please refer attached screen shot for this maven path separated with semicolon for java but after this when ran command 'mvan -v'
got error 'mvn is not recognized...'
4 days ago