Issue 16768 - regcomp fails registring java_uno_accessbridge.jar [Solaris/x86]
Summary: regcomp fails registring java_uno_accessbridge.jar [Solaris/x86]
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 RC
Hardware: PC Solaris
: P3 Trivial (vote)
Target Milestone: ---
Assignee: doehrm
QA Contact: issues@tools
URL:
Keywords:
: 18005 (view as issue list)
Depends on:
Blocks:
 
Reported: 2003-07-13 03:17 UTC by doehrm
Modified: 2004-06-04 10:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description doehrm 2003-07-13 03:17:59 UTC
> uname -a
SunOS plonk 5.9 Generic_112234-03 i86pc i386 i86pc

> CC -V
CC: Sun WorkShop 6 update 2 C++ 5.3 Patch 111686-15 2003/05/14

> java -version
java version "1.4.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_03-b04)
Java HotSpot(TM) Client VM (build 1.4.0_03-b04, mixed mode)


I checked out cws_srx645_ooo11rc and trying to build on Solaris/x86:

rm -
f ../unxsoli4.pro/bin/setup_services.rdb ../unxsoli4.pro/bin/regcomp.rdb ../unxs
oli4.pro/bin/setup_services.tmp
regcomp -register -r ../unxsoli4.pro/bin/setup_services.tmp -c "libi18n645si.so 
libi18npool645si.so libtk645si.so libmcnttype.so libdtransX11645si.so"
register component 'libi18n645si.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
register component 'libi18npool645si.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
register component 'libtk645si.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
register component 'libmcnttype.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
register component 'libdtransX11645si.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
regcomp -register -r ../unxsoli4.pro/bin/setup_services.tmp -c "javavm.uno.so 
javaloader.uno.so"
register component 'javavm.uno.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
register component 'javaloader.uno.so' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' succesful!
regcomp -register -r ../unxsoli4.pro/bin/regcomp.rdb -c "javavm.uno.so 
javaloader.uno.so"
register component 'javavm.uno.so' in 
registry '../unxsoli4.pro/bin/regcomp.rdb' succesful!
register component 'javaloader.uno.so' in 
registry '../unxsoli4.pro/bin/regcomp.rdb' succesful!
regmerge ../unxsoli4.pro/bin/regcomp.rdb / /home/doehrm/oocvs/solver/645/unxsoli
4.pro/bin/udkapi.rdb
merging registry "/home/doehrm/oocvs/solver/645/unxsoli4.pro/bin/udkapi.rdb" 
under key "/" in registry "../unxsoli4.pro/bin/regcomp.rdb".
setenv 
CLASSPATH /home/doehrm/oocvs/solver/645/unxsoli4.pro/bin/unoil.jar:/home/doehrm/
oocvs/solver/645/unxsoli4.pro/bin/java_uno.jar:/home/doehrm/oocvs/solver/645/unx
soli4.pro/bin/ridl.jar:/home/doehrm/oocvs/solver/645/unxsoli4.pro/bin/sandbox.ja
r:/home/doehrm/oocvs/solver/645/unxsoli4.pro/bin/jurt.jar:/home/doehrm/oocvs/sol
ver/645/unxsoli4.pro/lib:/usr/jre/lib/rt.jar:. &&        setenv 
LD_LIBRARY_PATH .:/usr/dt/lib:/usr/openwin/lib:/usr/local/lib:../lib:/usr/jre/li
b/i386:/usr/jre/lib/i386/motif21:/usr/jre/lib/i386/native_threads:/home/doehrm/o
ocvs/solver/645/unxsoli4.pro/lib: && \
                regcomp -br ../unxsoli4.pro/bin/regcomp.rdb                     
\
                        -register                                       \
                        -r ../unxsoli4.pro/bin/setup_services.tmp               
\
                        -l com.sun.star.loader.Java2                    \
                        -
env:UNO_JAVA_COMPPATH=file:///home/doehrm/oocvs/solver/645/unxsoli4.pro/bin    \
                        -c 
vnd.sun.star.expand:\$UNO_JAVA_COMPPATH/java_uno_accessbridge.jar
register 
component 'vnd.sun.star.expand:$UNO_JAVA_COMPPATH/java_uno_accessbridge.jar' in 
registry '../unxsoli4.pro/bin/setup_services.tmp' failed!
error (CannotRegisterImplementationException): Could not create Java 
implementation loader
dmake:  Error code 1, while making '../unxsoli4.pro/bin/setup_services.rdb'
---* TG_SLO.MK *---


beta2 build correct. Any idea what's causing this? I know, Sol/x86 is no more a 
supported platfrom...

I already applied a fix from bug 14581 but this didn't help.
Comment 1 Daniel Boelzle [:dbo] 2003-07-14 11:16:18 UTC
I don't have any possibility to reproduce this scenario here inhouse.
 So sorry, I think you have to look at it on your own.
From the exception that has been thrown (cannot get java loader):
- check whether javaloader.uno.so, javavm.uno.so, libjvmaccess.so,
libjava_uno.so are built / in solver tree: do a ldd -r on them whether
all symbols can be resolved
- try to debug using dbx
Comment 2 doehrm 2003-07-22 20:50:53 UTC
I'm stuck :-(

Debugging is for me impossible since I don't have enough knowledge
about the internas of OOO and what is done how... The libraries have
no unresolved symbols everything seems fine... 

Any idea about what I can do? I can give you access to the machine if
you're interested/have time.

Thank you...
Comment 3 pavel 2003-10-25 09:16:02 UTC
Daniel,

I can see this too on FreeBSD:

                regcomp -br ../unxfbsd.pro/bin/regcomp.rdb           
         \
                        -register                                       \
                        -r ../unxfbsd.pro/bin/setup_services.tmp     
         \
                        -l com.sun.star.loader.Java2                    \
                       
-env:UNO_JAVA_COMPPATH=file:///home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/bin
    \
                        -c
vnd.sun.star.expand:\$UNO_JAVA_COMPPATH/java_uno_accessbridge.jar
register component
'vnd.sun.star.expand:$UNO_JAVA_COMPPATH/java_uno_accessbridge.jar' in
registry '../unxfbsd.pro/bin/setup_services.tmp' failed!
error (CannotRegisterImplementationException): Could not create Java
implementation loader
dmake:  Error code 1, while making '../unxfbsd.pro/bin/setup_services.rdb'
---* TG_SLO.MK *---


All libraries you mentioned are in solver and ldd correctly shows all
libraries it depends on.

I tried truss on regcomp and it reported:


access("./libcppuhelpergcc3.so.3",0)             ERR#2 'No such file
or directory'
access("/home/pavel/BuildDir/ooo_1.1.0_src/solenv/unxfbsd.pro/lib/libcppuhelpergcc3.so.3",0)
ERR#2 'No such file or directory'
access("/usr/local/jdk1.4.1/jre/lib/i386/libcppuhelpergcc3.so.3",0)
ERR#2 'No such file or directory'
access(                                                              
         register component
'vnd.sun.star.expand:$UNO_JAVA_COMPPATH/java_uno_accessbridge.jar' in
registry '../unxfbsd.pro/bin/setup_services.tmp' failed!
                                                        error
(CannotRegisterImplementationException): Could not create Java
implementation loader

pavel@irtos:~/BuildDir/ooo_1.1.0_src/setup2/util>


But libcppuhelper is in:

-rwxr-xr-x  1 pavel  users  397605 Oct 24 21:15
./solver/645/unxfbsd.pro/lib/libcppuhelpergcc3.so.3.1.0

ie .../645/...

But ldd tells me:
pavel@irtos:~/BuildDir/ooo_1.1.0_src/setup2/util> ldd `which regcomp`
/home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/bin/regcomp:
        libsal.so.3 =>
/home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/lib/libsal.so.3
(0x28074000)
        libcppu.so.3 =>
/home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/lib/libcppu.so.3
(0x28224000)
        libcppuhelpergcc3.so.3 =>
/home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/lib/libcppuhelpergcc3.so.3
(0x28247000)
        libc_r.so.5 => /usr/lib/libc_r.so.5 (0x28291000)
        libstlport_gcc.so =>
/home/pavel/BuildDir/ooo_1.1.0_src/solver/645/unxfbsd.pro/lib/libstlport_gcc.so
(0x282b5000)
        libstdc++.so.4 => /usr/lib/libstdc++.so.4 (0x2834a000)
        libm.so.2 => /usr/lib/libm.so.2 (0x283ff000)
        libc.so.5 => /usr/lib/libc.so.5 (0x2841d000)
pavel@irtos:~/BuildDir/ooo_1.1.0_src/setup2/util> 

I can provide any other info you want or tell me to do.
Comment 4 pavel 2003-10-25 09:16:51 UTC
*** Issue 18005 has been marked as a duplicate of this issue. ***
Comment 5 pavel 2003-10-25 11:39:34 UTC
regcomp is looking also for libjvm.so, but it is in
/usr/local/jdk1.4.1/jre/lib/i386/client/libjvm.so
or
/usr/local/jdk1.4.1/jre/lib/i386/server/libjvm.so

but this directory is not in LD_LIBRARY_PATH set before running regcomp!?

Thus I tried

--- makefile.mk.orig    Sat Oct 25 12:29:30 2003
+++ makefile.mk Sat Oct 25 12:31:29 2003
@@ -367,7 +367,7 @@
 .ELSE
 REGCOMP_ENV=\
        setenv CLASSPATH $(REGCOMP_CLASSPATH) && \
-       setenv LD_LIBRARY_PATH $(LD_LIBRARY_PATH):$(JDKLIB)
+       setenv LD_LIBRARY_PATH
$(LD_LIBRARY_PATH):$(JDKLIB):/usr/local/jdk1.4.1/jre/lib/i386/client
 .ENDIF
 .ELSE # "$(GUI)" != "WNT"
 .IF "$(USE_SHELL)" != "4nt"

And it fixed it! But this is not the correct patch: we should find out
why .../client was not in LD_LIBRARY_PATH aka JDKPATH for FreeBSD.
Comment 6 Daniel Boelzle [:dbo] 2003-10-27 11:06:02 UTC
Seems that your Java is not recognized/working/what_ever, so
stoc/source/javavm JavaVirtualMachine::getJavaVM() returns an empty
Any.  Either debug the above function by yourself or insert some error
output to

bool askForRetry(css::uno::Any const & rException)
{
if (rException.hasValue())
{
OUString const & msg = reinterpret_cast< css:uno::Exception const *
>(rException.getValue())->Message;
fprintf( stderr, ">>> askForRetry: %s\n", rtl::OUStringToOString(msg,
RTL_TEXTENCODING_UTF_8).getStr() );
}
...
}

hope enlightens us...
Comment 7 pavel 2003-10-27 21:10:21 UTC
This seems to be connected with the JDK identification on FreeBSD,
where additional string like -p3 is used.

It is fixed now, at least for me on FreeBSD.

Markus?
Comment 8 doehrm 2003-10-30 02:00:48 UTC
since it's long ago (*mpf*) I don't remember but I think it was fixed 
by adding "-lthread" to the link line for libcppuhelper, I'll have a 
look - the bug is fixed for me.
Comment 9 Daniel Boelzle [:dbo] 2003-10-31 10:31:41 UTC
I cannot help without feedback about your jvm startup problems.
Comment 10 Martin Hollmichel 2004-06-04 10:46:39 UTC
this issue seems to be fixed now, don't hesitate to reopen it if the problem
persists on latest 1.1.x or 680 builds.
Comment 11 Martin Hollmichel 2004-06-04 10:46:58 UTC
close issue.