cancel
Showing results for 
Search instead for 
Did you mean: 

Usage jconn42.jar with Java application server (wildfly (JBoss))

06-08-2022 11:48 AM
2101 views 2 comments
SAP Managed Tags
Subscribe

We are using SA 17 (before 12,16) with our product Application Server based on Java Application Server wildfly-23.0.0(formerly known as JBoss)

Trying update jconnect jar-files from jconn3(4).jar to new one jconn42.jar. We download jconn42,jar from SAP portal as part of 'SDK for SAP ASE 20.0'

But encounter with problem use jconn42.jar due clash in usage Logger class in jconn42.jar and wildfly-23.0.0.

Problem in jconn42.jar LogUtil.class - createLoggerInstance method is using Logger setParent() method which clash Logger.java setParent() method in wildfly caused SecurityException - "setParent() disallowed"

Have anyone encountred with problem?

How this problem can be solved - required open issue on jconn42.jar ?!?
Thanks in advance , Hanan Brener

Accepted Solutions (0)

Answers (1)

Answers (1)

tborgato
Discoverer
0 Likes

The problem persists in WildFly 35:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sybase.jdbc42.jdbc.SybConnection
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.SecurityException: setParent() disallowed

and we believe it's an issue with the jconn42.jar driver because https://docs.oracle.com/javase/8/docs/api/java/util/logging/Logger.html#setParent-java.util.logging.... explicitly states:

setParent
public void setParent(Logger parent)
Set the parent for this Logger. This method is used by the LogManager to update a Logger when the namespace changes.
It should not be called from application code.

 

tborgato
Discoverer
0 Likes

Here is a more detailed description of the issue in the JDBC Driver bundled with the SAP ASE 16.1 database.

Basically it invokes an API which shouldn't be used by application code: https://docs.oracle.com/en/java/javase/17/docs/api/java.logging/java/util/logging/Logger.html#setPar...);

EAP is smart enough to realize it and throws an exception: https://github.com/jboss-logging/jboss-logmanager/blob/main/src/main/java/org/jboss/logmanager/Logge...;

We would like to report a bug to SAP but we don't know how