Puspender Tanwar

Ranch Hand
+ Follow
since Apr 21, 2015
Puspender likes ...
Java
Cows and Likes
Cows
Total received
2
In last 30 days
0
Total given
0
Likes
Total received
27
Received in last 30 days
0
Total given
21
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Puspender Tanwar

I have a social media web application whose backend(REST api) is written in Spring and MySQL is used as DB. Now, I want to use Neo4j along with MySQL so that I can get the user's relation is an easy and good way. Since graph DBs are best for this use case, I want to know how can I architect my REST api to use both the Databases.
Thanks
6 days ago
My form gets out of the background image if the size of the screen is reduced. I know it's because of .form{   width: 600px; }. But I don't want my background to shrink when window size reduces, like the way Facebook and Quora have their signup form. They don't get shrink on window size.

Rob Spoor wrote:Remove server.address. That line tells Spring Boot to only listen on the local interface, which means that any request from any other machine will be rejected (connection refused).

Earlier was not using these parameters, I wrote them after googling the issue
Anyway, I would need to get the local IP address of my system on the network. Now I can access that IP from other systems.
2 weeks ago
Hi Ranchers,
Is there any way I can access a REST api developed using spring-boot and deployed on embedded Tomcat, from a different system(mobile/pc) on the same network?
I tried below application.properties options, but they didn't help
2 weeks ago

Rob Spoor wrote:Try casting it to ServletWebRequest (that should work unless it's a FacesWebRequest - only possible if you're using JSF), then call its getRequest method.

This worked.
1 month ago
I am handling REST exceptions using @ControllerAdvice and ResponseEntityExceptionHandler in a spring Rest webservice. So far everything was working fine until I decided to add the URI path(for which exception has occurred) into the BAD_REQUEST response.

ApiError is just a Pojo class:
But WebRequest has not given any api to get the path for which the request failed. I tried:
request.toString() returns -> ServletWebRequest: uri=/signup;client=0:0:0:0:0:0:0:1
request.getDescription(false) returns -> uri=/signup
getDescription is pretty close to the requirement, but doesn't meet it. Is there any way to get only the uri part?
1 month ago
I changed the mysql root privileges - didn't help
created a my.cnf file under /etc/mysql folder - didn't help (/data/ directory error)
in my.conf file, give the path of /data directory - didn't help

And since it was taking a lot of time to debug the issue, and nothing was under my Database, I decided to delete the MYSQL and reinstall it. Reinstalling it resolved the issue.
I don't remember exact files of previous installation but I noticed some difference is ..../mysql/ directory this time.
Installation created /data/ directory from root user this time.

Pete Letkeman wrote:You may want to clear out temp files and make sure that you do have enough storage space on your system.
Have you rebooted the system in question?


When the server was not starting, after that I rebooted the system but the issue is still there

You may have to supply the configuration/options file to mysqld which you can read about at https://dev.mysql.com/doc/refman/8.0/en/option-files.html
You may want to double check this https://dev.mysql.com/doc/refman/8.0/en/postinstallation.html out to see if everything mention is covered.
I know it's rare, but what if you run "fsck" or whatever the MacOS version is to see if you have any hard drive issues?

I will try these out.

Since one log said the this is a permission issue, I changed the permission of mysql root folder and now the error is changed when started from terminal:
A quote from the link.

mysqlcheck must be used when the mysqld server is running, which means that you do not have to stop the server to perform table maintenance.


In my case the server is down, I cannot run the above suggested command. I get an error
Everything was working fine from last few weeks, but today suddenly Mysql server stopped. Now when I am trying to restart it, different errors are coming with respect to the way I am starting the server.   
If starting from Terminal using `mysqld`, the command get stuck and nothing happens:


If start MySQL server from MacOs system preference, on clicking the start button nothing happens.   
I checked for the error logs and I think found the stack where the server suddenly got crashed.

   
I gone through the links suggested in the logs, and found that
1. either this could be caused by a bug
2. or it could be some corrupted data error.

But the data in tables is hardly 5-6 rows and that is text and number. So what is "corrupted data" means here?   
I am newbie to MYSQL, how can I be sure that whether it's a bug or something else.   
**MYSQL version - 8.0.11**   

Bear Bibeault wrote:Why a chrome extension rather than a web app?


I am not sure what this would be called

Bear Bibeault wrote:If you want to write an extension, this isn't the right place for the question, but we don't have a forum for writing browser extensions, so not sure where would be better.


Since this comes under the front end technology, wouldn't be this the correct forum.
My need is to filter the content of my fb feeds, I want to see the posts from specific people/pages. How can I code this kind of extension?
Is it at all possible? If yes, what tools I require for getting the job done?

Paul Clapham wrote:That gives you some leverage for when they change that XML format. When they do, you can say "Look, if you guys had been sending well-formed XML in the first place then the changes I have to make would be very simple. But because you didn't, I had to write an ugly work-around. It's going to take me a while to make the changes because I have to produce a completely new ugly work-around. Or: you could start sending well-formed XML and taking responsibility when you don't."

Thanks.
I warned them about the future bug this 'ugly workaround' could create. Informed that workaround can never be the solution.
1 month ago
The reason I can't use XML parser - the mentioned XML is a response from Ariba service. Ideally the response should be a proper valid XML. But sometimes the Ariba sends a invalid XML like below(removed some parts for better readability)Notice the characters in-between Doctype and <cXML> tags. response in not following the XML standards so cannot be parsed using parser. I asked my client to handle this issue from target application only because that's the right place to handle this, but they asked to handle it in java client-app only(typical client, or the stupid one  ).
The only purpose to parse this XML is to fetch the InternalID. And that's why I used the regex(though wrong tool for the job).
1 month ago
Your question makes sense. But the XML I will be working on will not contain comments. Or <cXML> declarated in similar manner.
1 month ago