European Character Encoding Issue: Java + Jetty - java

I've Spring JDK8 code(REST service) deployed over Jetty 9.4.44 version {the same issue with JDK7 & lower version of jetty } where I'm facing issue with European characters.Those are showing incorrect over server.
Data has saving correctly over DB(sql server).but when we see it over server its not correct.
Everything works fine locally but as soon we deploy the code to server its not working.
We have tried every other solution which converts data explicitly into UTF-8 technically,Also over server we've updated everywhere encoding standard to 'UTF-8'. But nothing helping out and it continue to show wrong data over server.
Actual character: ø |
Over server: ø |
at the receiving end: �
I guess something wrong with server settings but not getting what causing this exactly. Can someone please help out with this?
Thank you!!

Related

Consistent 2 minute delay for multipart/form-data POSTs using Tomcat 8

I'm trying to get a server up and running on EC2 using Amazon Linux AMI 2017.09.0.2017. I've been able to set up a reverse proxy using Nginx at first and then just now Apache, and everything has been working fine except that something is causing a consistent 2-minute delay when I try to POST a multipart form. Everything goes through and works after 2 minutes, but it always takes 2 minutes for the server to do SOMETHING, what it is I don't know:
https://i.stack.imgur.com/YCpjV.png
I'm willing to be proven wrong, but I'm fairly certain that neither my nginx configuration nor my apache httpd configuration is at fault because I tested both of them individually and it happened under both of them, pointing to a problem with my Tomcat 8, SSL certificate, or possibly AWS configuration. I'm also confident that there isn't a problem with my javascript code that does the POST, because it works fine on an elastic beanstalk environment tomcat build.
This only seems to occur with multi-part form data POSTs, but that's not to say I know that nothing else is affected. I've tried monitoring TCP traffic and looking at error logs and nothing seems out of place, there's just a 2 minute delay that occurs before my java controller receives the form and I'm baffled.
Anyone have any idea what might be happening? Any ideas, vague or not, about leads or suggestions of things to do would be greatly appreciated.

RestAPI in Java with MySQL DB: issue on storing data with diacritics

I am building an app and I can't seem to handle the data that contain diacritics or other type of UTF-8 characters. In my case I'm in need of this chars: ă-Ă-â-Â-î-Î-ş-Ş-ţ-Ţ.
Now, first, there is a input on the front-end that gathers some info from the users, sends it via AngularJS http module to the API. The headers are all good, the data goes to the API all good. Then, on the server side, if I log the info, it outputs: ?-?-â-Â-î-Î-?-?-?-?, and of course, the same info is put in the db (checked with phpmyadmin).
The weird thing is, as my app pulls the data from the db to print it to my app, all goes well, it prints as it should be ă-Ă-â-Â-î-Î-ş-Ş-ţ-Ţ, until I restart the server, after which it prints as it is shown in the db.
I want to point out that it isn't the cache, I'm testing the app in cache-free environment. I even tried to access from different end-points just to be sure it is not from some local issue.
Anyone has any ideas ?
I solved it myself: the problem was from JPA persistence level from Java. It didn't interpret the UTF-8 right because I was giving it inside the url. Actually what I needed to do was to create a parameter in glassfish jdbc.

Is it possible to look at the Java console of a Tomcat 7 server?

I have a Tomcat 7 server on top of Windows 08 Enterprise. One of my servlets is not returning anything when I deployed it -while it was working fine in the development server.
I talked to the old sysadm and it seems that logging was NOT enabled anywhere, and since this is the first time I have to debug a server problem -because there is no new sysadm- my first reaction was to check the server log to see if there was any problems, in special, the Java Console log.
I Googled around, and was even able to turn the Tomcat manager on, but it was pointless, there's no console over there either.
Is it even possible to look at the console?
The console log files are usually in TOMCAT_HOME/logs/

Tomcat + Jboss encoding error

I have a cluster with different os(windows and gnu/linux) running an app with JBOSS(with javabeans made by my team) and the "front-end" with Tomcat.
Every time that the app is running in a gnu/linux the system broke all the encode(ã,é,õ,á). The chartset of the html is utf-8.
I saw a solution for this using getBytes(utf-8) to convert and force the String to be on utf-8 of the os. But there is a lot of Strings and the code will be "polluted" if i use this for every string.
There is any other solution?
This was happening because all data coming from the sybase(database) was with wrong encoding. To resolve we added a flag on connection url( CHARSET=iso_1 ).

RAD - Websphere Application server won't start

I am having issues with RAD7.
My server will not start for me today. I am working from home and connected to the VPN. Everything works except my server in RAD. It worked fine yesterday in work and had previously worked when I was at home but that was a few weeks ago.
Are there any settings that I should look out for? I have disabled my proxy settings in RAD and turned off everything in my firewall. I can ping all the DBs that the server is connecting to.
I have even removed all the projects from the server and it will still not start. It keeps trying and then times out after 300s.
Any suggestions?
I got a similar error while Starting WebSphere Commerce server v7. This error in my case was caused by me increasing the Maximum Heap size to 2096. I reduced the heap size to 1536 and it worked. None of the errors/trace files indicated this problem.
I had this problem too. Double-click on the server to open the server 'OVERVIEW' tab/view. Scroll down to the section under 'Optimize server start for development:'; uncheck 'Start server with a generated script'. This worked for me. good luck.
I have had this problem once before. I wasn't able to figure out what went wrong, but deleting that server and creating a new one (under Window -> Preferences -> Server -> WebSphere Application Server) fixed the problem.
Re the file not found exception. Make sure the directory path in Windows is of the CoRRectCase, e.g., GALFTGA342130Node01Cell-> galftga342130Node01Cell. I've encountered this on various RAD installations.
With reference to your following comment -
I looked at startserver.log and I saw a file not found exception for this file C:\IBM\SDP70\runtimes\base_v61\profiles\AppSrv01\config\cells\GALFTGA342130Node0‌​1Cell\nodes\GALFTGA342130Node01\serverindex.xml. I checked and the file exists but when I try to open it, I get told access denied.
this link may help you in understanding the problem. it says -
This is a permissions issue caused by the automatic port detection routine. If any profiles already exist and were created as a different user, the port detection routine will try to open the serverindex.xml file in each profile and will fail.
You should set appropriate permissions for your user.
after working several hours in my case I found the solution I hope it works for you ; change my JDK to alternate JRE

Categories