Error running examples: read setup.xml

52 views
Skip to first unread message

IBM

unread,
Sep 10, 2009, 10:46:29 AM9/10/09
to pococapsule
Hi,

I am using RedHat Enterprise 5 and the tool with Eclipse 3.4, did all
necessary configuration to build the demos and got the following error
message.

Example hello: failure: ./foo.so: cannot open shared object file: No
such file or directory

Sample movie-lister: failure: [E011] fail to resolve the dynamic
proxy of factory-method "new MovieLister()" at the <bean ...
id="MovieLister" ...>

Can help? Thank you.

Ke Jin

unread,
Sep 10, 2009, 11:04:32 AM9/10/09
to pococapsule
You need set the LD_LIBRARY_PATH to include local (i.e. ".")
directory. If this doesn't work, do a strace as:

% strace -o log main

The log file will be able to tell you where the executable (i.e. the
"main" in above command line) attempted to look for the library foo.so
(and then, you should include that directory in the LD_LIBRARY_PATH).

Ke

Ke Jin

unread,
Sep 10, 2009, 11:36:57 AM9/10/09
to pococapsule
The second error, i.e. movie-lister example failed to resolve the
factory method, should be caused by a different reason. Your
environment setup may not be correct. For instance, the
POCOCAPSULE_DIR was not pointing to the right directory or even not
set. Therefore, the pxgenproxy failed to generate required dynamic
proxies. Are you able to see the setup_reflx.cc generated inside the
directory of this movie-lister example?

Ke

On Sep 10, 7:46 am, IBM <brancoisr...@gmail.com> wrote:

IBM

unread,
Sep 10, 2009, 12:33:06 PM9/10/09
to pococapsule

Hi Ke Jin, Thanks for the reply.

I had already exported library_path the shell. I ran the hello program
using the command strace and got the following log. Do I have any
problem installing the pococapsule?


execve("./hello", ["./hello"], [/* 69 vars */]) = 0
brk(0) = 0x8e7e000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fcc000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
directory)
open("/home/israel/Ferramentas/POCO/Install/lib/tls/i686/sse2/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/tls/i686/sse2",
0xbfa90528) = -1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/tls/i686/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/tls/i686",
0xbfa90528) = -1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/tls/sse2/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/tls/sse2",
0xbfa90528) = -1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/tls/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/tls", 0xbfa90528) =
-1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/i686/sse2/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/i686/sse2",
0xbfa90528) = -1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/i686/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/i686", 0xbfa90528) =
-1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/sse2/
libpococapsule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/home/israel/Ferramentas/POCO/Install/lib/sse2", 0xbfa90528) =
-1 ENOENT (No such file or directory)
open("/home/israel/Ferramentas/POCO/Install/lib/libpococapsule.so",
O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360U
\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=73384, ...}) = 0
mmap2(NULL, 71456, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0x757000
mmap2(0x768000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x11) = 0x768000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libpocoxml.so",
O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\3204\0\0004\0\0\0"..., 512) =
512
fstat64(3, {st_mode=S_IFREG|0755, st_size=25048, ...}) = 0
mmap2(NULL, 27536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xa6f000
mmap2(0xa75000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x5) = 0xa75000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libstdc++.so.6",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=66456, ...}) = 0
mmap2(NULL, 66456, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fbb000
close(3) = 0
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P
\2145\0074\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=936908, ...}) = 0
mmap2(0x7319000, 961720, PROT_READ|PROT_EXEC, MAP_PRIVATE|
MAP_DENYWRITE, 3, 0) = 0x7319000
mmap2(0x73f9000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0xdf) = 0x73f9000
mmap2(0x73fe000, 23736, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0x73fe000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libm.so.6", O_RDONLY)
= -1 ENOENT (No such file or directory)
open("/lib/libm.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\204r
\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=208352, ...}) = 0
mmap2(0x725000, 155760, PROT_READ|PROT_EXEC, MAP_PRIVATE|
MAP_DENYWRITE, 3, 0) = 0x725000
mmap2(0x74a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x24) = 0x74a000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libgcc_s.so.1",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`&0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=46476, ...}) = 0
mmap2(0x301000, 48036, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x301000
mmap2(0x30c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0xa) = 0x30c000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libc.so.6", O_RDONLY)
= -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320O_
\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1606808, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fba000
mmap2(0x5df000, 1324452, PROT_READ|PROT_EXEC, MAP_PRIVATE|
MAP_DENYWRITE, 3, 0) = 0x5df000
mmap2(0x71d000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x13e) = 0x71d000
mmap2(0x720000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0x720000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libdl.so.2", O_RDONLY)
= -1 ENOENT (No such file or directory)
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\352t
\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=16428, ...}) = 0
mmap2(0x74e000, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x74e000
mmap2(0x750000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x1) = 0x750000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libxerces-c.so.27",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/dialogic/lib/libxerces-c.so.27", O_RDONLY) = 3
read(3, "\177ELF
\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0004\337\21\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0444, st_size=4880196, ...}) = 0
mmap2(NULL, 3932028, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xd22000
mmap2(0x10af000, 208896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x38d) = 0x10af000
close(3) = 0
open("/home/israel/Ferramentas/POCO/Install/lib/libpthread.so.0",
O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\210u
\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=125612, ...}) = 0
mmap2(0x754000, 90592, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0x110000
mmap2(0x123000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_DENYWRITE, 3, 0x12) = 0x123000
mmap2(0x125000, 4576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|
MAP_ANONYMOUS, -1, 0) = 0x125000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fb9000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fb8000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7fb86d0, limit:
1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
mprotect(0x123000, 4096, PROT_READ) = 0
mprotect(0x750000, 4096, PROT_READ) = 0
mprotect(0x71d000, 8192, PROT_READ) = 0
mprotect(0x74a000, 4096, PROT_READ) = 0
mprotect(0x73f9000, 16384, PROT_READ) = 0
mprotect(0x5db000, 4096, PROT_READ) = 0
munmap(0xb7fbb000, 66456) = 0
set_tid_address(0xb7fb8718) = 29639
set_robust_list(0xb7fb8720, 0xc) = 0
futex(0xbfa90dc4, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigaction(SIGRTMIN, {0x1143d0, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x1142e0, [], SA_RESTART|SA_SIGINFO}, NULL, 8)
= 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=10240*1024, rlim_max=RLIM_INFINITY})
= 0
uname({sys="Linux", node="deop13.telemikro.local", ...}) = 0
futex(0x73ffadc, FUTEX_WAKE_PRIVATE, 2147483647) = 0
brk(0) = 0x8e7e000
brk(0x8e9f000) = 0x8e9f000
open("setup.xml", O_RDONLY) = -1 ENOENT (No such file or
directory)
fstat64(1, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7fcb000
write(1, "failure: [E043] fail to open the"..., 59) = 59
exit_group(-1) = ?



failure: [E043] fail to open the descriptor file setup.xml

Ke Jin

unread,
Sep 10, 2009, 1:34:07 PM9/10/09
to pococapsule
This time, it is a different error (i.e. not able to find the
setup.xml itself in the directory) and the program failed even before
it reached the point of shared library loading. Hence, it doesn't tell
whether your LD_LIBRARY_PATH setting is right or not. Does your
LD_LIBRARY_PATH include the "."?

I also noticed that you changed the executable name from "main" to
"hello". Although this name change itself is fine, it prompts that you
might not be playing with the original example code but a customized
version which might not be correct. For instance, you might forget to
copy the setup.xml into your customized example directory?

Pls check the following four things:

1. whether the LD_LIBRARY_PATH includes the local directory (i.e.
".")?
2. whether the POCOCAPSULE_DIR points to the pococapsule's
installation directory?
3. whether the setup.xml of the hello example (and other examples as
well) is available in the example directory?
4. whether the setup_reflx.cc of these examples are generated after
the build?

Ke

IBM

unread,
Sep 10, 2009, 2:10:08 PM9/10/09
to pococapsule
Hi Ke Jin, Thanks for the reply.

I made a new installation that is in /usr/local/pococapsule/.

Open the Samples folder and added the file stdmk line POCOCAPSULE_DIR=/
usr/local/pococapsule. In the shell ran export LD_LIBRARY_PATH=/usr/
local/ pococapsule/lib. Open the folder ~/samples/hello ran the make
command that had the following output:

gcc -Os -I. -I/usr/local/pococapsule/include -o main.o -c main.C
gcc -o main main.o -L/usr/local/pococapsule/lib -lpococapsule
gcc -Os -I. -I/usr/local/pococapsule/include -fpic -c foo.C
gcc -shared -o foo.so foo.o
/usr/local/pococapsule/bin/pxgenproxy -r=gather -s=_reflx.cc -h=foo.h -
H=stdio.h -H=iostream setup.xml
/usr/local/pococapsule/bin/pxgenproxy: undefined symbol:
JNI_CreateJavaVM
make: *** [setup_reflx.cc] Error 255

Can't generate the file setup_reflx.cc after compilation. When I run
file main (./main) the program display this message: failure: (null)


Thanks for your help...
> ...
>
> read more »

IBM

unread,
Sep 10, 2009, 3:37:17 PM9/10/09
to pococapsule
Hi Ke Jin,

I managed to run the examples, I added the line export
POCOCAPSULE_DIR=/usr/local/pococapsule
in bash_profile. I compiled the examples and ran successfully. Thanks
again for your help.

regards,

Israel Branco
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages