Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 507967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:51:31+00:00 2026-05-13T06:51:31+00:00

I am trying to persist a string object in Mysql(5.0.67) using hibernate. My entity

  • 0

I am trying to persist a string object in Mysql(5.0.67) using hibernate.

My entity is as follows:

@Entity
@Table(name = "info", schema = "DB")
public class info {
@Column(name = "InfoXml")
private String InfoXml;
}

The problem is when I persist the xml with value:

String InfoXml = "<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r\n<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">\r\n<properties>\r\n<entry key="Hello">hi</entry>\r\n</properties>";

The DB table column shows the only value as:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

being persisted.

Rest of the xml is disappearing without a trace.

Investigating little more I found that any string that is containing ‘\r\n’ (next line) is being persisted till the next line only and the rest of the string is not persisted.

What’s happening here? and what is the workaround?

Thanks in advance

Ashish

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:51:32+00:00Added an answer on May 13, 2026 at 6:51 am

    Problem solved.

    I was using Mysql GUI tools and it was not showing columns with multiple lines.

    Checked the table data in mysql terminal and everything looks fine.

    Thanks to those who responded promptly.

    Ashish

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to setup Spring using Hibernate and JPA, but when trying to persist
I have a JPA project connected to a MySQL database where my entity object
Hibernate does not allow me to persist an object that contains an null embedded
I am trying to get LINQ to SQL to persist changes to an attached
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to do this sort of thing... WHERE username LIKE '%$str%' ...but using bound
I have a Spring/JPA/Hibernate application and am trying to get it to pass my
I am trying to persist Java objects to the GAE datastore. I am not
I have a rather deep hierarchy of objects that I'm trying to persist with
Is it possible to persist a WPF Control, or any other non-trivial object to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.