JRE System Library 1.3.1_20 notify an error on OracleDataSource Usage - unix

Java -version (Sco Openserver 5)
Java(TM) 2 Runtime Environment, Standard Edition (build SCO-UNIX-J2SE-1.3.1_22:*
FCS*:20080305)
Classic VM (build SCO-UNIX-J2SE-1.3.1_22:*FCS*:20080305, green threads, sunwjit)
Problem :
OracleDataSource ods = OracleDatasource();
It occurs error :
The type javax.sql.DataSource cannot be resolved. It is indirectly referenced from required .
class files
How to solve this problem?

You are using a wrong driver. Your driver requires java 1.4.
The javax.sql.DataSource has been added with java 1.4.
http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html
Make sure that you are using a JDBC driver that supports java 1.3.
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html the classes12.jar should work for you.

This means that your program is missing a library on the class path.
You must make sure that, for example, when you export a compiled jar file, that you export the libraries along with it ...
Of course.... I'm assuming you were able to compile your program correctly.

Related

URLClassLoader and Multi-release jar

I use the URLClassLoader to dynamically load JDBC drivers into my application.
My application is compiled under OpenJDK15. I cannot upgrade since some drivers would get issues under higher versions.
One of the drivers is using truffle-api-22.2.0.jar, which has support for two Java versions:
truffle-api-22.2.0.jar\META-INF\versions\11 and 17
When the jar is loaded, I get this exception:
java.lang.UnsupportedClassVersionError: META-INF/versions/17/module-info has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 59.0
java.lang.UnsupportedClassVersionError: META-INF/versions/17/module-info has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 59.0
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:825)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:723)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:646)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:604)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:576)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at com.wisecoders.dbs.dbms.driver.model.a.a(DriverClassLoader.java:132)
at com.wisecoders.dbs.dbms.driver.model.a.b(DriverClassLoader.java:110)
at com.wisecoders.dbs.dbms.driver.model.a.a(DriverClassLoader.java:88)
at com.wisecoders.dbs.dbms.driver.model.a.a(DriverClassLoader.java:66)
at com.wisecoders.dbs.dbms.driver.model.a.<init>(DriverClassLoader.java:34)
I used:
urlClassLoader = new URLClassLoader( urlsArray, OneClassFromMyCode.class.getClassLoader() );
urlClassLoader.loadClass( className );
The URLClassLoader documentation states that this should work with multi-version jars.
Which could be the issue?

Groovie Gorilla and GPIO

I want to use RaspberryIO library with dotnet core version 3.1 on Ubuntu 20.10.
When it comes to use
Pi.Init<BootstrapWiringPi>();
I got error:
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'libwiringPi.so.2.52' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibwiringPi.so.2.52: cannot open shared object file: No such file or directory
The same code works perfectly on Raspbian.
I use:
Raspberry Pi 4
In my case (Rpi3 + Ubuntu 20.04 x64 + dotnet core 3.1):
clone https://github.com/WiringPi/WiringPi
build
copy libwiringPi.so.2.60 and gpio to app folder
rename libwiringPi.so.2.60 to libwiringPi.so.2.52
and Pi.Init < BootstrapWiringPi >( );
with TestLedBlinking() is work.

CAPSULE EXCEPTION while deployNodes task

I am trying to deploy IRS demo application on windows server, I have installed java already:
C:\Users\Administrator>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) Client VM (build 25.181-b13, mixed mode)
I am getting following exception for node:
CAPSULE EXCEPTION: Could not find Java installation for requested version [Min. Java version: 1.8.0 JavaVersion: null Min. update version: {1.8=171}] (JDK required: false). You can override the used Java version with the -Dcapsule.java.home flag. (for stack trace, run with -Dcapsule.log=verbose)
can you help with whats going wrong? In the same machine environment, I have previously developed and deployed many corDapps.
This was caused by forgetting to update the Windows environment variable after installing Java 1.8.181.
Forgetting to update the Windows environment variable has also been known to cause errors of the type:
CAPSULE EXCEPTION: Illegal char <"> at index 0: "C:\WINDOWS while
processing system property java.library.path: C:\Program
Files\Java\jdk1.8.0_191\bin;

RAD 8.5 unable to run standalone java app that calls EJB and MQ

I used to be able to run my standalone java app that calls EJB and MQ using JNDI on RAD 7.5.5. I upgraded to RAD 8.5 and when I tried to run it, I received the error Failed to create InitialContext using factory specified in hashtable. I'm also using the same WAS 7.0.0.9 for both RAD version so I'm not sure why it's not working now.
Is there anything special that I need to do in RAD 8.5?
This is my bootstrap classpath entries: WAS v7.0 JRE, %WAS_RUNTIME%\com.ibm.ws.ejb.thinclient_7.0.0.jar, WAS v7.0 lib.
Below are the lines where I set up the environment (the second line seems to be needed for RAD 8.5):
System.setProperty(Context.PROVIDER_URL, "iiop://localhost:2809");
System.setProperty("com.ibm.ws.naming.wsn.factory.initial", "com.ibm.websphere.naming.WsnInitialContextFactory");
Below is the stack trace from my code:
2012-11-30 16:50:14,945 main FATAL ram.hs.edi.EDIDaemon(line 183) - Unable to get running status: javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hashtable. Root exception is java.lang.NullPointerException
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:243)
at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:327)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:357)
at javax.naming.InitialContext.internalInit(InitialContext.java:295)
at javax.naming.InitialContext.<init>(InitialContext.java:212)
at ram.hs.edi.utils.MQReader.open(MQReader.java:85)
at ram.hs.edi.EDIDaemon.isRunning(EDIDaemon.java:406)
at ram.hs.edi.EDIDaemon.run(EDIDaemon.java:168)
at ram.hs.edi.EDIDaemon.main(EDIDaemon.java:898)
Caused by: java.lang.NullPointerException
at com.ibm.ws.naming.util.CommonHelpers$2.run(CommonHelpers.java:268)
at com.ibm.ws.naming.util.CommonHelpers$2.run(CommonHelpers.java:264)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.ws.naming.util.CommonHelpers.mergeJndiProviderProperties(CommonHelpers.java:263)
at com.ibm.ws.naming.util.CommonHelpers.mergeWsnJndiProperties(CommonHelpers.java:159)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:186)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:235)
... 8 more
Thanks
This may be little late answering it but please try to do the following:
1) Add the jar "com.ibm.ws.orb_7.0.0.jar" or equivalent jar on the Bootstrap path of your standalone Java Class.
2) Add the jar "com.ibm.ws.webservices.thinclient_7.0.0" or equivalent jar on the JVM Class path.
After doing the above I was able to get the InitalContext successfully. Hope this helps.

Can't co-create object

i made a dll in .net and call that from java program using jacob.since yesterday i have windows 7 32 bit os so program run successfully.now i formated and install windows 7 64 bit os.so following error encounter:
com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstance(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java)
at product.Control_product.main(Control_product.java:21)
Register all the dll files but the error is occured.
Use a 32bit JVM to execute your code.
The DLL of the COM object you are trying to use needs to be registered. The jacob dll's do not provided they are available in the library path.
Error is solved.put the same jacob.dll and jacob.jar in the server \lib folder,jdk bin and lib folder
see here http://netheadaches.wordpress.com/2012/04/22/jacob-cant-co-create-object/
You need to register your dll file using the 64bit version of regasm.exe

Resources