Having issue with SAP Java connectors - java

I'm trying to put SAP JCO3 libraries to my work server that has an OS "Win 2003 Server". The SAP JCO3 libraries worked fine on my localhost which has an OS "Windows 7". However when I performed the same procedure for installation on my work server and tried to use the libraries, I've been getting this error,
> java.lang.ExceptionInInitializerError: Error getting the version of
> the native layer:
> java.lang.UnsatisfiedLinkError:***********\sapjco3.dll: This
> application has failed to start because the application configuration
> is incorrect. Reinstalling the application may fix this problem
Can anyone help me with this issue. Thanks in advance.

The issue is because of Visual 2005 C++ runtime redistributable. The version require by sapjco3.dll should be minimum of 8.0.50727.4053 to work, but however the version on my work server is much lower than this one and lead to this issue. Then I asked my system admin to update it. And now it works.

The sapjco jar depends on the sapjco3.dll native library.
Your local workstation must have that .dll somewhere where java can get at it.
I'd see where the dll is located on your local workstation, and figure out how it's being referenced, then see if you can replicate that on the server.
There are different versions of the .dll for 32-bit and 64-bit windows, so it's possible that you may need a different version on the server than you need on your local workstation.

Related

Java Hosting APR based Apache Tomcat Error

I think this is a 2 part question.
My versions:
I developed using Java jdk1.8.0_144,
Server JVM jdk1.8.0_77,
Server Tomcat apache-tomcat-8.5.23
Error:
16-Apr-2018 11:57:31.041 SEVERE [http-nio-13571-exec-1] org.apache.catalina.core.AprLifecycleListener.init An incompatible version [1.1.32] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]
I tried different Java version, including Java 9 and Java 7. On these version my app does not even start up. I tried 2 different Java 8 versions supplied by the hosting company and still get the same error.
Any ideas please?
Then I got the error above and did nothing else on the website. Did not even browse it. Hours later I get this error:
java.lang.OutOfMemoryError: Metaspace
The hosting company says I musttake a better hosting option for more Memory and then the errors will go away?
What do you think?
I think problem is conflicting your tomcat version, it may be older version.
Download the native library of required version and replace this file tcnative-1.dll(locate at your tomcat bin folder) with new downloaded file.
Download from this link https://archive.apache.org/dist/tomcat/tomcat-connectors/native/.
It will work.

Java Application Correctly Referencing 3rd Party Libraries in Windows 7 But Not In Windows 2008 Server

I have developed a Java application that references a third party library. Let's call it SW_Lib and the sub folder containing relevant DLL and Lib files SW_Lib\lib.
The application works fine on Windows 7 Professional. I have used Windows 7 Professional for development and testing.
I wish to run the application in production on a Windows 2008 Server Standard (64 bit) operating system. And this is where I am encountering problems. While the application compiles fine, it complains at run time due to its inability to dynamically link the SW_Lib libraries.
In Windows 7 workstations, I have set the Path environment variable correctly to reference SW_Lib libraries. For my example, it simply says C:\Java\SW_Lib\lib. This works perfectly in the Windows 7 workstations.
In the Windows 2008 Server, I set the Path environment variable in exactly the same way and made sure that all directory structures are the same in both Windows 7 and Windows 2008 Server.
But my application simply cannot reference a particular DLL in SW_Lib\lib folder at run time in the server. I have looked at the internet for clues and it seems that setting the Path environment variable correctly should prevent me from having this issue, except that this is currently not working in Windows 2008 server.
I am using JDK 1.8 and am wondering if there are any backward compatibility issues with that and Windows 2008 Server. Many thanks.
Are you talking about native libraries or jars?
If native libraries, have you checked java.library.path System property in both environments?
Are both environments running same 32/64 bit architecture?

java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\IBM\Lotus\Notes\nlsxbe.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

I am trying to connect Lotus Notes Domino (8.5.1) objects from a java web application which uses eclipse (indigo, jdk1.7). this is what I did:
1. add notes.jar to Librairies of Java Build Path in eclipse,
2. add path variable of "C:\Program Files (x86)\IBM\Lotus\Notes" to path of Envrionment variable of my local computer.
then I created this simple java codes in eclipse as below:
import lotus.domino.*;
public class platform3
{
public static void main(String argv[])
{
try
{
NotesThread.sinitThread();
Session s = NotesFactory.createSession();
String p = s.getPlatform();
System.out.println("Platform = " + p);
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
NotesThread.stermThread();
}
}
}
The above codes are compiled without any problem, but when I run it, I got this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files (x86)\IBM\Lotus\Notes\nlsxbe.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
I searched from the internet, it seems the Lotus Domino 8.5.1 is 32 bit, and my java project (jdk1.7) is 64bits, so they are not compatible. but I can not change my java (eclipse) to 32bit since I need it to develop 64 bit web projects.
Does anybody know how to make it work without changing my java from 64bits to 32bits?
As #maksimov noted in the comments, a 64 bit JVM cannot load the 32 bit Notes DLLs. There is, howver, a 64 bit version of the DLLs, but you will have to install and configure the Lotus Domino Server (64 bit Windows version) on your machine - and on any machine(s) where the web application will run. You will only have to run the Domino server once per machine in order to get it fully configured. It will not have to be running all the time in order for your code to access the DLLs, but you will have to leave it installed. You will have to, however, check with whomever manages your IBM relationship, and possibly with IBM, in order to determine whether there are any licensing and cost implications before installing the Domino server code this way. (One further note: in order to get the 64 bit Domino Server code cleanly installed on the machine and insure that that particular version of nlsxbe.dll is the one that your code loads, you will be best off if you uninstall and completely clean the existing 32 bit Notes client installation. And by cleaning, I'd get rid of the lotus.ini file, and any notes.ini files and Notes-related registry entries that might be left over after the uninstallation.)
There is also another option. Your code is using the "local" version of the Notes Java API in notes.jar. There is also a CORBA/IIOP version of the API, which does not use any Notes or Dominbo DLLs. In fact, it doesn't require any installation of any Lotus code, and it has no licensing implications either. All you need for this is a copy of the NCSO.jar added to your project. You do need to be aware that the capabilities of the NCSO.jar version of the API are slightly different from the local version, code to set up a session is slightly different, authentication does not rely on Notes ID files, and the Domino servers that you connect to must be running the IIOP task - which will not be the case by default, so you may have to negotiate that with the people who manage those servers.
Note - Removed an update that was suggesting the OpenNTF API as an alternative. That was a bit of temporary confusion. It could not have helped.

Netbeans 8.0 and networks project are too slow

I have a VMware Virtual Machine running on my PC because I use it as a development environment. I'm running on the VM CentOS 6.5. I have a Samba shared folder on that VM and I connect through "host-only" connection from Windows 7 to CentOS without any problem.
Now I create a project using a shared folder as project sources and opening Netbeans and wait for the project to be opened takes sometimes 15 min or more.
I disable "background scanning" following instructions on this post but still to slow, any advice on this one? What is the best approach? Use remote project sources through SFTP connection?
The real fix would be a fix of your samba. There is very likely some locking due to some network timeout in it. Most likely it is some WINS/DNS configuration problem. Only you can debug it (tcpdump/strace the samba process).
However, the best approach is not the fix of your samba, but using a different version for deployment. Your question makes likely that you have your development environment on your Windows host machine, and you deploy your code to your CentOS.
Use a native filesystem on your host, typically bound it into a versioning system (most likely, git), and make the deployment a part of your build scripts. For example, you could install a cygwin, and then upload your compiled code (or even the source) to your VM by an rsync. This rsync can already be called from your build script (like maven-exec-plugin in a pom.xml, if you use maven).

Informix CSDK install failing

I'm trying to install the Informix CSDK to get the drivers for an ODBC connection using Perl and DBD::ODBC. When running the ./installclientsdk, I'm getting the following error:
Initializing InstallShield Wizard........
Launching InstallShield Wizard........erified.
The wizard cannot continue because of the following error: could not load wizard specified in /wizard.inf (104)
I've read that only open-jdk is available on Ubuntu 11.10 so I went and installed the java version, which is where I'm at now. If I debug, I get:
QJMLException: (error code = 3002; message="java.lang.ClassNotFoundException: sun.beans.editors.BoolEditor")
I've been following this post:
http://ubuntuforums.org/showthread.php?t=1483193
But so far no luck on getting JRE running or the CSDK installed. Any suggestions on this one?
Thanks!
There should be a JVM included with the software, and the installer should use it if it cannot find an appropriate alternative. The question then is whether the JVM bundled with CSDK can run on Ubuntu 11.10. It is certified for Redhat and SuSE, I believe.
Which version of CSDK are you trying to install? Which kernel version and GNU C Library version are in Ubuntu 11.10?
I'm not keen on the '...erified' (as opposed to ...verified) part of the message; it is ominous when such simple messages are not displaying correctly.
I've not installed Informix on Ubuntu sufficiently recently to have any useful recollections of how well it worked. I don't remember any problems, but that could just mean I'm old and forgetful.

Categories