help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared library error


From: Robert Heller
Subject: Re: Shared library error
Date: Tue, 28 Jun 2005 02:07:01 +0200

  "Terry" <sungard@ameritech.net>,
  In a message on Mon, 27 Jun 2005 15:33:58 -0400, wrote :

"> Hello, hope one of you can help me.
"> 
"> I have built a shared library to be used as a JNI (java native interface)
"> for an app server.  This same code works perfectly on Sun, IBM, and Windows.
"> I use the -fPIC option when compiling and -Wl,soname...
"> and -Wl,-export-dynamic on the link.  Everything seems to build the .so
"> perfectly.  However, when the app server loads the shared lib, it generates
"> the following error:
"> 
"> <Jun 20, 2005 12:09:20 PM CDT> <Error> <HTTP> <BEA-101017>
"> <[ServletContext(id=70554084,name=ExceptionEngine,context-path=/ExceptionEng
"> ine)] Root cause of ServletException.
"> java.lang.UnsatisfiedLinkError: /usr/lib/ems/libJavaReportFactory.so:
"> /usr/lib/ems/libJavaReportFactory.so: undefined symbol:  _ZTV13ArcOpcTextCmd
"> 
"> If I look at the shared library with nm, it shows that the symbol is, in
"> fact, undefined.  This symbol corresponds to a default constructor which is
"> not declared or referenced (two other constructors are specified for that
"> class).  So my question- is this normal?  Am I missing a g++ compile option

Are you *sure* that the default constructor is not being called?  What
do you get with

nm --demangle --undefined-only --print-file-name *.o

I'll bet that something shows up and you'll discover that
somewhere in one of the .cc files (maybe the generated wrapper one) is
making a reference to the default constructor.  Either you need to
change something in how the wrapper generator is invoked or what it
uses as input.  Or else you have actual code that needs the default
constructor (which might be an error).

"> somewhere?  Does this mean that every class that doesn't include a
"> specifically declared no-argument constructor will generate this error at
"> load time for a shared lib?  Or, is the possibly something that is a fault
"> of BEA weblogic, looking for all symbols and failing when one is not
"> defined, even if it is not used?
"> 
"> I understand that this might not be the correct forum, but any help would be
"> greatly appreciated.
"> 
"> 
"> 
">                                                                              
             

                                     \/
Robert Heller                        ||InterNet:   heller@cs.umass.edu
http://vis-www.cs.umass.edu/~heller  ||            heller@deepsoft.com
http://www.deepsoft.com              /\FidoNet:    1:321/153






                                                                                
           


reply via email to

[Prev in Thread] Current Thread [Next in Thread]