Jelastic Glassfish Mysql Character Setting - java

I have an application running on Jelastic. The Java based web application is running on Glassfish and the database server is MySql.
I developed the project on Netbeans and there was no character problem when running the project on the local machine (Turkish Windows 8).
When running on Jelastic, there is no character problem related to the web pages. However, there is problem when form based interactions are called.
Some Turkish characters are not processed when a search query or customer registration tasks are executed. Those characters missing (recorded to the MySql as ?)are the ones differing from the Latin. For example "ö", which is also used in German is not the problem.
Problematic characters: http://en.wikipedia.org/wiki/Wikipedia:Turkish_characters
As I said previously, I dont have such problem when working on local Glassfish rolled in Netbeans.
I checked out the phpMyAdmin server, and I think that some values (that are set by default such as latin1_swedish_ci) might be the cause for loss of Turkish characters.
I tried to change the values on , but those are reset to the defaults when the server is restarted. Could this be the source of my problem? If so, how could I set them permentantly?
Your kind support will be greatly appreciated.☺

where exactly you are applied changes?
As I know these settings can be changed at etc/my.cnf via Jelastic Dashboard in MySQL.
Concerning Character Setting you will help this link:
Change MySQL default character set to UTF-8 in my.cnf?
If the problem persists ask your hosting provider for help with this issue.

Related

Problems with UTF-8 encoding - web-project

I'm aware that this question was already asked a couple of times, but I didn't get the problem solved even with the hints mentioned in other posts.
For a small webproject I created some html/jsp pages that are calling links to two servlets. The servlets themselves are talking to a PostgreSQL database. Everything is working instead of the encoding. When I'm typing in special characters (UTF-8) like "ü", "ä" or "ö", I can see them:
correctly inserted into the web page
correctly listed inside of the java objects (Debug mode) correctly inserted into the database
Since the web tool reloads the data with every change (a simultaneously work should be provided), I can also see the following steps working:
after the tool was re-loading the data from the database, the special characters are listed inside of the java objects (Debug mode)
the attribute inside of the request-object has the correct value
Nevertheless, after reload the data is not shown correctly anymore inside the web page - just cryptic signs.
Can you please support? I already checked the following points:
encoding of Eclipse
encoding of database
encoding of servlets
encoding of the application server (Wildfly)
encoding of the JSP files
encoding inside of Chrome
Best greetings,
Jesfreric

Getting "Unable to check for available memory." on Oracle DB 18c

I am trying to create a database in order to complete my self learning, but unfortunately I got unexpected error "Unable to check for available memory.", I am doing it using Database Configuration Assistant (DBCA).
My Oracle Database Version
Add the following parameter to bypass the error:
dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false &
This error as it says, indicate that the "DBCA" can not check for available memory. This happens when "DBCA" does not have permission to check.
To bypass this error, run your Command Prompt as Administrator before lunching "DBCA".
Bypass via advanced setup
Run DBCA as admin and work your way through the advanced setup. I think this issue is avoided because it lets you manually enter, or use recommended defaults, for the memory section.
If anyone reading is running into the above issue and find that
dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false &
didn't fix it for them, consider launching the advanced configuration setup for a database. (There's a radio button listed on the "Creation Mode" step). Its pretty straight forward and avoids the validation steps. That's how I got around the issue
On Windows 10, Oracle 19 setup. I installed Oracle without creating a database, because of this memory error.
Then
I ran cmd as administrator
I added "dbca -J-Doracle.assistants.dbca.validate.ConfigurationParams=false &" to the dbca.bat first if statement at the bottom of the file
I switched off all options.
I had the same problem, but when on the second stage of creating a database I select option "pluggable" and enter the name, it works correctly.
Steps:
Rename your PC Name
Restart and again start installation
I also had this problem. I had previously installed Java 18.0.1.1 X64 bits
By removing it and restarting the system, the problem was solved.
Apparently, Java should not be installed on the machine before creating the database.
For Me i was facing this issue while doing normal setup for Oracle Database 19c , and renaming your PC name did work for me . the issue can be understand as below -
In my case this was a permissions issue on the Oracle Home directory. If your Windows PC name is >= 16 characters in length, the name of the administrators group is affected, because only the first 15 characters are included. The mismatch between that first part of the name and the full name is what was causing the issue. DESKTOP-ASUS-ROG vs. DESKTOP-ASUS-RO in my case (notice the missing G). I renamed the PC to DESKTOPASUS, restarted the machine, and it worked without issue. The name discrepancy was apparent when looking at the security configuration of the folder when my system name was over max.
You can get your PC name by running hostname from the command line. If it's >= 16 characters, rename the PC to be <= 15 characters, and restart.
The underlying issue is indirectly discussed here in a different context: https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/naming-conventions-for-computer-domain-site-ou
Maximum name length: 15 characters.

java program with special characters and database

First of all i know that this problem is known, and have a lot of answers, but mine is little bit different or unusual.
So, i'm using Eclipse SDK Version: 3.7.1, and i'm developing java app (JRE 1.7) which will work with database.
Since application is in Croatian language I have problems with special characters - č,ć,đ and their insert into DB (mysql dbms, embedded with xampp).
However, i know little about encoding stuff, and i tried to set DB to cp1250_croatian_ci, UTF8_unicode_ci, UTF8_general_ci, latin2_croatian_ci, but sadly I had same problem with each of those. (is it mandatory to SET NAMES utf8 (or something like that) after each connection to DB?)
Also, i want to point it out, that inserting (č,ć,đ) inside phpMyAdmin works fine.
So if i want to insert into DB characters č,ć,đ they are represented as ?. So basicly that means that encoding or charset or something else is problem.
Also I'm using JDBC driver: mysql-connector-java-5.1.18-bin
From: docs
I want to mention that I didn't have problems, while DB was hosted on godaddy.com server
In addition project text encoding (in Eclipse) is set to "Inherited from container (CP1250)", also I tried with UTF-8 but that didn't help me.
I think you can do as follow
1 first you should set the mysql encodding to utf-8;
2 second when you connection db you should set the connection properties as follow
you can try this
jdbc:mysql://ip:3306/yourDBName?useUnicode=true&characterEncode=UTF-8
I think when you use the jdbc connection may be you lost the useUnicode=true&characterEncode=UTF-8

Issue with Chinese characters in Linux environment with SQL Server 2005

I am trying to get Chinese characters from a SQL Server 2005 database server with my web application hosted with Jboss server on a Linux box (RHEL). The issue is that the Chinese characters never get returned from the database, showing some square boxes instead. I have tried both the JTDS drivers as well as the SqlJdbc drivers from Microsoft for this. Interestingly the same combination of database and drivers works fine in a Windows environment with the Chinese characters returned in a string from the result set.
Any help on the issue would be greatly appreciated.
There's not really enough info about what you're doing with the data between the time it comes out of the database, and the time it gets displayed in the view. It might be a good idea to print some debug information in both Linux and Windows to see what the differences are for certain System properties, like if you output System.getProperty("file.encoding") in both scenarios, what do you get?
You might want to try using JAVA_OPTS=-Dfile.encoding=UTF-8.
Perhaps the discussion at the link below might help.
https://community.jboss.org/thread/155260?_sscc=t
It doesn't sound like this is a database/driver related problem.

The unicode character from a rails app appears as ??? in the mysql database ,

The unicode character from a rails app appears as ??? in the mysql database (ie when I view through putty or linux console), but my rails app reads it properly and shows as intended.I have another java application which reads from the rails database and stores the values in its own database. and try to show in from its database. But in the webpage, it appears like ??? instead of the unicode characters.
How is that the rails application is able to show it properly and not the java application. Do I need to specify any encoding within the java application?
You really need to find out whether it's the Java app that's wrong, the Rails app that's wrong, or both. Use PuTTY or a Linux console isn't a great way of checking this, as they may well not support the relevant Unicode characters. Ideally, you should find a GUI which you can connect to the database, and use that to check the values. Alternatively, find some MySQL functions which will return the Unicode code points directly.
It's quite possible that the Rails app is doing the wrong thing, but in a reversible way (possibly not always reversible - you may just be lucky at the moment). I've seen this before, where a developer has consistently used the same incorrect code page when both encoding and decoding text, and managed to get the right results out without actually storing the correct data. Obviously that screws up any other system trying to get at the same data.
You may want to check the connection parameters: http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
I guess your Java application may use wrong encoding when reading from rails' database, wrong encoding of its own database or in connection with it.

Categories

Resources