About Legacy Application Classes 12 to Ojdbc6 migration in jdev9.0 - java

Currently I am working with a legacy application which uses classes12 and jdevoper 9.0 and java 1.4. I wanted to upgrade java to 1.6 and OJDBC6 with Jdev 9.0 .
But Jdev use BC4 libraries which are also old one. I had changed my java version to 1.6 and updated classes12 to ojdbc6. but after that I was facing build issue as BC4j lib also have some connection with it.
after updating bcj lib with adfm jar I am getting below issue. Could any one please suggest any minimal changes to work my application to work
Currently java 1.4 oracle 11g DB and Jdev 9.0 classe12 and I want
java 1.6 oracle 12c jdev 9.0 ojdbc6
SEVERE: { type : AppBundleInfoRT, id : 'en_US-null-null', moRefName : null, appBundleName : null, writable : false, dirty : false, hasMdsConfig : false, appOverrideBundle : null}: Fail to read adf-config.xml
oracle.adf.share.ADFShareException: getMDSInstance error
at oracle.adf.share.config.FallbackConfigImpl.getMDSInstance(FallbackConfigImpl.java:104)
at oracle.javatools.resourcebundle.AppBundleInfoRT.readAdfConfig(AppBundleInfoRT.java:341)
at oracle.javatools.resourcebundle.AppBundleInfoRT.loadData(AppBundleInfoRT.java:123)
at oracle.javatools.resourcebundle.AppBundleInfoFactoryRT.createAppBundleInfo(AppBundleInfoFactoryRT.java:83)
at oracle.javatools.resourcebundle.ResourceBundleUtils.getAppBundleInfoUnlocked(ResourceBundleUtils.java:334)
at oracle.javatools.resourcebundle.ResourceBundleUtils.getAppBundleInfo(ResourceBundleUtils.java:325)
at oracle.javatools.resourcebundle.ResourceBundleCacheConfig.getCurrentAppConfig(ResourceBundleCacheConfig.java:109)
at oracle.javatools.resourcebundle.ResourceBundleManagerRT.<init>(ResourceBundleManagerRT.java:84)
at oracle.javatools.resourcebundle.ResourceBundleManager.getResourceBundleManager(ResourceBundleManager.java:183)
at oracle.javatools.resourcebundle.BundleFactory.getMap(BundleFactory.java:86)
at oracle.javatools.resourcebundle.BundleFactory.getBundle(BundleFactory.java:245)
at oracle.javatools.resourcebundle.BundleFactory.getBundle(BundleFactory.java:206)
at oracle.jbo.common.StringManager.getStringFromBundle(StringManager.java:582)
at oracle.jbo.common.StringManager.getStringInternal(StringManager.java:530)
at oracle.jbo.common.StringManager.getString(StringManager.java:477)
at oracle.jbo.common.StringManager.getLocalizedString(StringManager.java:305)

Oracle 12c does not support ojdbc6 as per What are the Oracle JDBC releases versus JDK versions? docs. Do note that Oracle 12cR2 strictly requires ojdbc8 to establish the connection, your current Java 6 setup most likely won't work.

Related

MonetDB COPY INTO java.lang.NoSuchMethodError with new JDBC 3.0 driver

I'm trying to do a MonetDB "COPY INTO" statement inside Pentaho 8.1 (JDK 1.8.0_282) with new MonetDB JDBC 3.0 driver, and I get this, error message:
java.lang.NoSuchMethodError: java.nio.CharBuffer.mark()Ljava/nio/CharBuffer;
Everything works perfectly when I use MonetDB JDBC driver 2.8 or even 2.29. Does anyone know what is happening?
Thank you!
You also fell into the Java 8 vs Java 9 API break. This issue was fixed here: https://dev.monetdb.org/hg/monetdb-java/rev/5ddfc0aa7f0e You can either use Java 9+ to get rid of the error, or download the tip of MonetDB JDBC driver source and install it or just wait for the next release.
The issue has been fixed in new release: monetdb-jdbc-3.1.jre8.jar
See ChangeLog at https://www.monetdb.org/downloads/Java/

Setup a Oracle JDBC provider in Websphere 8.0.0.13

We are trying to set up a JNDI (oracle database) on a Websphere Application Server version 8.0.0.13. Running Java 1.6.0:
WebSphere Platform 8.0.0.13 [BASE 8.0.0.13 cf131705.01] running with process name pandora-vmNode01Cell\Aplicacion-node\server1 and process id 5230
Host Operating System is Linux, version 3.13.0-133-generic
Java version = 1.6.0, Java Compiler = j9jit26, Java VM name = IBM J9 VM
I downloaded the ojdbc6.jar from maven and oracle servers and we created a JDBC provider that uses that jar file. And We tried to configure the Datasource with that JDBC provider. But, when we test the connection this error appears:
The test connection operation failed for data source XXXXX_oracle on server
server1 at node Aplicacion-node with the following exception:
java.sql.SQLException: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad
major version; class=oracle/jdbc/pool/OracleConnectionPoolDataSource,
offset=6. View JVM logs for further details.
What can be happening?
We are using the correct ojdbc file because the server is running the same SDK version.
Thank you in advance.
As you've said, the ojdbc6 jar should be compatible with Java 6, so maybe a different version Oracle JDBC driver is actually being used. Is there a different copy of the Oracle JDBC driver present in the app or WebSphere configuration? If so that version, which may require higher than Java 6, could be loaded rather than the ojdbc6 driver you've configured.
Check that there are no additional Oracle JDBC drivers packaged with your application.
Check if there are other Oracle JDBC Providers configured in WebSphere using a newer JDBC driver. If so either modify your configuration so all of your providers are using the same version Oracle JDBC driver or you will need to Isolate your JDBC Providers.
Also, friendly reminder that both WebSphere 8.0 and Java 6 are out of support, so if possible you should migrate to a newer version of both.

weblogic.ejbc compiler is deprecated : EJB Application deployment in WebLogic 12c

I'm using EJB 2.1, jdk 1.6 with Weblogic 11g for application development. Latest I have been process of deploying application in WebLogic 12c.
As I understood from online source, I need to have jdk 1.7 and higher to run application in weblogic 12c. I also getting below error, when I compile EJB 2.1 with JDK 1.7 or higher.
DEPRECATED: The weblogic.ejbc compiler is deprecated and will be removed in a future version of WebLogic Server. Please use weblogic.appc instead.
java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
at weblogic.ejbc20.runBody(ejbc20.java:455)
at weblogic.utils.compiler.Tool.run(Tool.java:159)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.ejbc.main(ejbc.java:36)
at BuildEjbs.main(BuildEjbs.java:97)
Exception in thread "main" java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
at weblogic.ejbc20.runBody(ejbc20.java:455)
at weblogic.utils.compiler.Tool.run(Tool.java:159)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.ejbc.main(ejbc.java:36)
at BuildEjbs.main(BuildEjbs.java:97)
Going to the <application> build directory
Deleting JAR files
*****FINISHED JAR AND EJBC FOR ALL THE EJBS*****
Is it possible to compile EJB 2.1 with JDK 1.6 or least version through deprecated way?
we are using ejb 3.0 compiled on jdk1.6 and deployed on weblogic 12c jdk 1.7.We have not faced any issue like this.It is working perfectly fine.I think you will require to do changes in your deployment descriptor.
You can try using descriptors defined in weblogic documentation.
https://docs.oracle.com/cd/E13222_01/wls/docs103/ejb/DDreference-ejb-jar.html

Hibernate and MSSQL 2016 issue

I'm facing a problem with a Java application (JVM 1.6) that is using Hibernate 3.6 to access a Microsoft SQL Server via Microsoft JDBC Driver for SQL Server.
When working with SQL JDBC driver 3.0 and MSSQL 2008 - 2014 all is working just fine.
But when I'm trying to use MSSQL 2016, the latest "Microsoft JDBC Driver 6.0" (sqljdbc4.jar) - I get a bunch of those errors:
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
It happens on different entities, and can happen on a get or update operations.
My question: is this an issue with Hibernate that also needs to be updated to a newer version?
I wasn't able to find any information about compatibility issues when accessing MSSQL 2016 via Java/Hibernate.
Thanks!
If possible can you try to use JVM 1.7 and sqljdbc41.jar? Better if you able to use JVM 1.8 and sqljdbc42.jar.
Microsoft recently Open Source their driver on GitHub. You can raise issue on their github project.
As per my understanding for SQL Server 2016 you need either sqljdbc41.jar or sqljdbc42.jar
Further you can found more official documentation on MSDN.
Microsoft JDBC Driver 6.0 and 4.2 for SQL Server:
To support backward compatibility and possible upgrade scenarios, the JDBC Drivers 6.0 and 4.2 include four JAR class libraries in each installation package: sqljdbc.jar, sqljdbc4.jar, sqljdbc41.jar, and sqljdbc42.jar. Note: sqljdbc.jar, sqljdbc4.jar are provided only for backwards compatibility, and do not contain new features included with driver versions 6.0, 4.2, and 4.1.

an issue with compatibility: old jboss/hibernate vs Oracle 12c

i'm Oracle-DBA trying to upgrade our Oracle-11g databases onto Oracle-12c. Our web-developers tell me, there is a big problem to work our old applications (a lot of them were developed with old JBOSS 4.2.2 and old Hibernate 3.4.0/3.1.0) to the new the Oracle-database(12c)
Our developers send me this information:
**Application:
seam-version -> 2.2.2.Final
hibernate-annotations-version -> 3.4.0.GA
hibernate-validator-version -> 3.1.0.GA
jsf-facelets-version -> 1.1.14
rich-faces-version -> 3.3.3.Final
als Dependency: hibernate-core version 3.3.0.SP1 for Compilieren.
OracleDialect: org.hibernate.dialect.Oracle10gDialect
JBOSS 4.2.2.GA
Hibernate-Version: 3.2.4.sp1
Hibernate Annotations Version: 3.2.1.GA
Hibernate EntityManager Version: 3.2.1.GA
Oracle JDBC Driver for 11g - ojdbc14
Oracle JDBC Driver for 12c - ojdbc6
so, if you call a PROCEDURE XXXXXXXXX (o_res out sys_refcursor, p_yyyyy IN NUMBER, .... )
it throws this problem:
....
INFO | Caused by: org.hibernate.HibernateException: Problem while trying to load or access OracleTypes.CURSOR value
.....................
INFO | Caused by: java.lang.IllegalAccessException: Class org.hibernate.dialect.Oracle9Dialect can not access a member of class oracle.jdbc.driver.OracleTypes with modifiers ""
Bug: https://hibernate.atlassian.net/browse/HHH-3159
although, according this link we should had get a problem even with Oracle-11g, not while trying to upgrade to 12c! ( "With Oracle 11g, the deprecated package oracle.jdbc.driver no longer exists and this causes issues with all OracleDialect classes making it impossible to use Hibernate."(с) )
here one can read:
"Try to use org.hibernate.dialect.Oracle10gDialect, seems to be the highest possible version in Hibernate 4.3.9.
A dialect for 12c seems to be present in later versions, see this."
(we have even an older version of Hibernate - 3.2.4 ! )
a newer Hibernate (> 3.2.4 ), if i've got it right, is not compatibe with the old Jboss 4.2.2. (is it?! Please disagree with me (=with my colleagues) if you can)
what could be a right decision or workaround to make the 12c-Oracle-upgrade?
Thank you very much in advance!

Categories