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

  • SEARCH
  • Home
  • 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 6664585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:37:38+00:00 2026-05-26T02:37:38+00:00

I have an existing application using a DB called EXAMPLE, which uses a kind-of-old

  • 0

I have an existing application using a DB called EXAMPLE, which uses a kind-of-old version of hibernate.

Users’ passwords are stored as org.jasypt.hibernate.type.EncryptedStringType

<typedef name="encryptedString" class="org.jasypt.hibernate.type.EncryptedStringType">
    <param name="encryptorRegisteredName">jasyptHibernateEncryptor</param>
</typedef>

    <property name="password" type="encryptedString">
        <column name="pwd" length="254" not-null="true" />
    </property>

I don’t know if it’s always like this but basically, when querying for a user, it automatically decrypts their password so it is in clear text.

Now, on the very same database, there is a new web application running (call it webapp2). This one encrypts passwords differently and in an undecryptable way.

What I was asked to do is migrate the old users to “the new way”, and what I did was to create a maven project with 3 modules:

  • module1 (aka oldie) should just be able to query the database in the
    old way (so that for every query on the user table I can have the
    user’s password in clear text)
  • module2 (aka newie) should just query the database in the new way.
  • module3 should have one dummy class (for now it’s a junit thingy)
    that uses UserService from module1 and UserService from module2
    respectively for read users password (clear text) and set it back the
    new way.

THE ISSUE:
What I’m facing is a whole lot of issues with module3 having to deal with different versions of hibernate libs and what not.

On my configuration of module3 (they’re all spring applications) I’m autowiring services and daos from both module1 and module2 making a lot of mess which ends up in trouble.

What appears to be happening is that there’s a mix of dependencies that makes instantiations of sessionFactories or daos (for now) impossible.

Any help will be appreciated.

  • 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-26T02:37:38+00:00Added an answer on May 26, 2026 at 2:37 am

    I wouldn’t try to use both versions of Hibernate at the same time. You could

    • extract both encryption/decryption parts in a small utility class, and just use JDBC to decrypt using the old way and encrypt using the new way.
    • or just run a first pass with the first module to extract all the passwords in clear text and put them in a file or in a dedicated database table, then run a second pass with the second module to extract the clear text passwords and store them in the entities to encrypt them using the new method.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing application which does all of its logging against log4j. We
We have an existing application that relies heavily on stored procedures and untyped DataSets.
Let's say I have an existing application written in Java which I wish to
I have an existing iPhone application which starts from a UIViewController. What I want
I have a .Net application which renders graphics using GDI+ and/or XNA and I
I have an existing java/scala application using a global thread pool. I would like
I have an existing application using Core Data on the iPhone. Occasionally there would
I have existing Java application that is using Acegi for authentication/authorization. Our new web
I have an existing application that is written in C++ for Windows. This application
I'm supporting an existing application written by another developer and I have a question

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.