You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bulent Ozhorasan <bo...@yahoo.com> on 2013/01/16 17:44:15 UTC
TFS SDK Native Library Error in a web service deployed on Axis2-Tomcat7-Ubuntu platform
I'm trying to execute TFS SDK Api commands in an axis2 web service deployed on Tomcat7.
I successfully ran my small application on windows platform.
I want to run my web service on a Tomcat deployed on Linux.
I get the UnsatisfiedLinkError (Exception):
....
Caused by: java.lang.UnsatisfiedLinkError: com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
....
I defined com.microsoft.tfs.jni.native.base-directory system property.
I modified setenv.sh to include -D"com.microsoft...=/home/user/tfsbin" line.
I can see that above system variable is defined on Tomcat Axis2 happiness page (It gives
information about VM parameters)
My linux is 32 bit intel machine so I chose linux\x86 as native library files (5 .so files)
I copied them to /home/user/tfsbin and set com.microsoft.tfs.jni.native.base-directory to this folder.
I'm using Ubuntu, Oracle jdk7, Tomcat7, Apache Axis2 1.6.2. TFS SDK 11.0.0.1211
I still get that UnsatisfiedLinkError :((
Any help is appreciated!
Re: TFS SDK Native Library Error in a web service deployed on Axis2-Tomcat7-Ubuntu platform
Posted by Bulent Ozhorasan <bo...@yahoo.com>.
Chris,
TFS has a Java SDK which can be downloaded free from MS site.
Moreover for Java Developers, there is an Eclipse plugin called
Team Explorer Everywhere for Eclipse.
There is a also a Java command line client TEE CLC: tf
It's like subversion svn executable.
Anyways,
Problem is resolved.
To improve performance, TFS SDK uses native libraries (.so files for linux)
You introduce them by defining system property in Tomcat setenv.sh
-Dcom.microsoft.tfs.jni.native.base-directory=
/home/<your user name>/native
SDK (I used 11.0.0.1212) picks up related operatings system (linux) and
architecture (32bit,64bit) and uses proper .so files for ubuntu.
What I was doing wrong was putting 32 bit linux .so files directly
under /home/<your user name>/native and expecting TFS SDK to use them.
But this didn't work although sounded logical to me :)
For windows platforms,
it's sufficient to put *.dll files corresponding to your architecture
under <TOMCAT_HOME>/bin.
Thanks
Bulent
________________________________
From: Christopher Schultz <ch...@christopherschultz.net>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Wednesday, January 16, 2013 8:01 PM
Subject: Re: TFS SDK Native Library Error in a web service deployed on Axis2-Tomcat7-Ubuntu platform
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Bulent,
On 1/16/13 11:44 AM, Bulent Ozhorasan wrote:
> I'm trying to execute TFS SDK Api commands in an axis2 web service
> deployed on Tomcat7.
For those not in the know, that's "Microsoft Team Foundation Server",
which is a sort of all-on-one source-control, reporting,
project-management thingamajig. I'm shocked it's got a JNI interface
to it.
> I successfully ran my small application on windows platform. I want
> to run my web service on a Tomcat deployed on Linux.
Okay, my level of suspected incredulity is increasing, here. If
Microsoft indeed does provide a native Java library for accessing it's
TFS SDK, I would find it hard to believe it would provide such a
library for anything but Microsoft Windows.
> I get the UnsatisfiedLinkError (Exception): .... Caused by:
> java.lang.UnsatisfiedLinkError:
> com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
>
>
....
>
> I defined com.microsoft.tfs.jni.native.base-directory system
> property. I modified setenv.sh to include
> -D"com.microsoft...=/home/user/tfsbin" line. I can see that above
> system variable is defined on Tomcat Axis2 happiness page (It
> gives information about VM parameters)
>
> My linux is 32 bit intel machine so I chose linux\x86 as native
> library files (5 .so files)
Which files? Can you list them? Also, what does this command return:
$ file /home/user/tfsbin/*
Also this:
$ java -version
> I copied them to /home/user/tfsbin and set
> com.microsoft.tfs.jni.native.base-directory to this folder.
You may have to modify your java.library.path to include the directory
which contains those files. It's possible that the
"com.microsoft.tfs.jni.native.base-directory" system property avoids
you having to modify your java.library.path.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iEYEAREIAAYFAlD26wMACgkQ9CaO5/Lv0PDotwCcDmaRHlzyqw281/gMXEIdTVTJ
94wAn3BwetbreAe9RKckOiRdj0KI2O1L
=Rwoy
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: TFS SDK Native Library Error in a web service deployed on Axis2-Tomcat7-Ubuntu
platform
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Bulent,
On 1/16/13 11:44 AM, Bulent Ozhorasan wrote:
> I'm trying to execute TFS SDK Api commands in an axis2 web service
> deployed on Tomcat7.
For those not in the know, that's "Microsoft Team Foundation Server",
which is a sort of all-on-one source-control, reporting,
project-management thingamajig. I'm shocked it's got a JNI interface
to it.
> I successfully ran my small application on windows platform. I want
> to run my web service on a Tomcat deployed on Linux.
Okay, my level of suspected incredulity is increasing, here. If
Microsoft indeed does provide a native Java library for accessing it's
TFS SDK, I would find it hard to believe it would provide such a
library for anything but Microsoft Windows.
> I get the UnsatisfiedLinkError (Exception): .... Caused by:
> java.lang.UnsatisfiedLinkError:
> com.microsoft.tfs.jni.internal.platformmisc.NativePlatformMisc.nativeGetEnvironmentVariable(Ljava/lang/String;)Ljava/lang/String;
>
>
....
>
> I defined com.microsoft.tfs.jni.native.base-directory system
> property. I modified setenv.sh to include
> -D"com.microsoft...=/home/user/tfsbin" line. I can see that above
> system variable is defined on Tomcat Axis2 happiness page (It
> gives information about VM parameters)
>
> My linux is 32 bit intel machine so I chose linux\x86 as native
> library files (5 .so files)
Which files? Can you list them? Also, what does this command return:
$ file /home/user/tfsbin/*
Also this:
$ java -version
> I copied them to /home/user/tfsbin and set
> com.microsoft.tfs.jni.native.base-directory to this folder.
You may have to modify your java.library.path to include the directory
which contains those files. It's possible that the
"com.microsoft.tfs.jni.native.base-directory" system property avoids
you having to modify your java.library.path.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/
iEYEAREIAAYFAlD26wMACgkQ9CaO5/Lv0PDotwCcDmaRHlzyqw281/gMXEIdTVTJ
94wAn3BwetbreAe9RKckOiRdj0KI2O1L
=Rwoy
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org