Trying JPOS 3.0.0 Next with existing 2.1.9 project

56 views
Skip to first unread message

murtuza chhil

unread,
Jun 2, 2024, 11:17:24 PMJun 2
to jPOS Users


I was just testing the waters with jpos next.

1. Built jpos 3.0.0 snapshot to get the jar.
2. Updated my working current project gradle script to use java 21.
3. Referenced the 3.0 jar in my build script and removed reference for existing 2.1.x.
implementation fileTree(dir: 'modules/jpos/lib', include: '*.jar')
4. The problem arises as the existing jposee modules reference 2.1.7
I need to find a way to exclude 2.1.7 and use 3.0.0. Both jars are present in the dependencies now.
5. JCEHandler class between 2.1.9 and 3.0.0 has changed, "next" does not have a constructor with a provider name. I will need to understand how my code that uses the existing jcehandler must change. Currently getting compile errors.

gradle dependency tree snippet.
+--- org.jpos.ee:jposee-dbsupport:2.2.8
|    +--- org.jpos.ee:jposee-core:2.2.8
|    |    +--- org.jpos:jpos:2.1.7

+--- org.jpos.ee:jposee-cryptoservice:2.2.8
|    +--- org.jpos:jpos:2.1.7 (*)

+--- org.jpos.ee:jposee-quartz:2.2.8
|    +--- org.jpos:jpos:2.1.7 (*) 

-chhil

Alejandro Revilla

unread,
Jun 3, 2024, 8:55:02 AMJun 3
to jpos-...@googlegroups.com

Hi Chhil,

It’s great to see you’re playing with jPOS next. jPOS next requires jPOS-EE next, which is work in progress.

It’s available in the ‘next’ branch in jPOS-EE, and if you take a look at the settings.gradle file (https://github.com/jpos/jPOS-EE/blob/next/settings.gradle) you’ll see that we are slowly migrating modules, but there are still a lot we need to migrate. The good thing is that most of the modules are easy to migrate and require very little time.

Migrated already:

include  ':modules:core'
include  ':modules:cmf'
include  ':modules:saf'
include  ':modules:quartz'
include  ':modules:bom'
include  ':modules:logback'
include  ':modules:qrest'
include  ':modules:dbsupport'
include  ':modules:db-postgresql'
include  ':modules:db-h2'
include  ':modules:sysconfig'
include  ':modules:db-flyway'
include  ':modules:seqno'
include  ':modules:binlog'
include  ':modules:binlog-quartz'
include  ':modules:server-simulator'

Pending migration:

// include  ':modules:freemarker-decorator'
// include  ':modules:syslog'
// include  ':modules:resultcode'
// include  ':modules:txn'
// include  ':modules:db-mysql'
// include  ':modules:db-mssql'
// include  ':modules:minigl'
// include  ':modules:eeuser'
// include  ':modules:status'
// include  ':modules:mail'
// include  ':modules:jetty'
// include  ':modules:saf-monitor'
// include  ':modules:things'
// include  ':modules:client-simulator'
// include  ':modules:visitor'
// include  ':modules:rspace'
// include  ':modules:rest-testbed'
// include  ':modules:testbed'
// include  ':modules:eerest'
// include  ':modules:eeresttest'
// include  ':modules:fsdmsgx'
// include  ':modules:groovy'
// include  ':modules:qi-core'
// include  ':modules:qi-eeuser'
// include  ':modules:qi-sysconfig'
// include  ':modules:qi-minigl'
// include  ':modules:cryptoservice'
// include  ':modules:cryptoserver'
// include  ':modules:iso-http-client'
// include  ':modules:iso-http-server'
// include  ':modules:iso-http-servlet'
// include  ':modules:http-client'
// include  ':modules:elasticsearch'

Some will not survive, for example the Vaadin based ones (qi-*) will not be migrated as we’ve moved our UI work to Next.js (couldn’t keep up with Vaadin migrations).

You can checkout the next branch and publishToMavenLocal so you can use it in your project.



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/41533337-5dc5-4dd2-8813-bb033b26ed15n%40googlegroups.com.

chhil

unread,
Jun 3, 2024, 9:17:48 AMJun 3
to jpos-...@googlegroups.com
Thanks Alejandro. I will look into the jposee next branch.

As for
"JCEHandler class between 2.1.9 and 3.0.0 has changed, "next" does not have a constructor with a provider name. I will need to understand how my code that uses the existing jcehandler must change. Currently getting compile errors."

How are you setting up the default provider to be used, since you have removed the constructor with the provider in the "next" branch.

-chhil


Andrés Alcarraz

unread,
Jun 3, 2024, 10:05:37 AMJun 3
to jpos-...@googlegroups.com

Looking at the last commit of JCEHandler it seems you need to register it in javax.security.Security via addProvider:

                    Security.addProvider(provider);
                    evt.addMessage("name", provider.getName());

I don’t know why the change, though, since the overloads of Mac and Cipher’s getInstance that receive the provider are not deprecated.

Andrés Alcarraz

murtuza chhil

unread,
Jun 4, 2024, 2:17:51 AMJun 4
to jPOS Users
Thanks Andrés
I am sure backward compatibility will break with this next release, but it would be good to be aware and make a note of it and have a migration path. 
Posting it directly via google groups as my email response got blocked :)

"The response was:

Message rejected by Google Groups. Please visit http://mail.google.com/support/answer/188131?hl=en to review our Bulk Email Senders Guidelines."

Alejandro Revilla

unread,
Jun 11, 2024, 4:42:43 PMJun 11
to jpos-...@googlegroups.com
> JCEHandler class between 2.1.9 and 3.0.0 has changed, "next" does not have a constructor with a provider name.

Can you provide an example of how you were calling that constructor ?

--
@apr

chhil

unread,
Jun 11, 2024, 9:53:42 PMJun 11
to jpos-...@googlegroups.com

We have a legacy class which is basically a JCESecurityModule from jpos.
I will need to look into the differences and why we have it.

In the master branch you can see the constructor being used.
 https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/security/jceadapter/JCESecurityModule.java#L1844

In the next branch
https://github.com/jpos/jPOS/blob/next/jpos/src/main/java/org/jpos/security/jceadapter/JCESecurityModule.java#L1842

So it looks like an exercise for me to see what's changed and get the custom class in line.


-chhil



--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.  Please support jPOS, contact: sa...@jpos.org
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages