Optional package versus shared library

I quote from the WL docs...
"Optional packages differ from Java EE libraries because optional packages can be referenced from any Java EE module (EAR, JAR, WAR, or RAR archive) or exploded archive directory. Java EE libraries can be referenced only from a valid Enterprise Application. "
Does this mean that javaee libraries can be accessed only from EAR and WAR
whereas optionalpackage can be accessed from ear,jar , war or rar.....
in otherwords javaee libraries cannot be accessed from a regular jar or rar...
if that is the case, I wish they had just said so!

Hi,
EAR Shared Library Cannot be referenced by A WAR Application...EAR Shared Library Should be referenced By An EAR Application Only.
Similarly...a WAR Shared Library cannot be referenced by EAR....So rule:
EAR Shared library--------should be reffered by EAR Applications
WAR Shared Libraries ---should be reffered by WAR Applications
I have developed a Simple TestCase to demonstrate it...Please download it from: http://www.4shared.com/file/219660365/de4e3636/SharedLibrary_TestCase.html
Thanks
Jay SenSharma
http://jaysensharma.wordpress.com/generalweblogic/ (WebLogic Wonders Are Here)

Similar Messages

  • Restart deployment (.ear) does not load optional package

    Hello everybody,
    In our 10.3.5 WLS domains, we are using optional packages for sharing libraries between applications see [http://docs.oracle.com/cd/E24329_01/web.1211/e24368/libraries.htm|Creating Shared Java EE Libraries and Optional Packages]
    The problem is that if I redeploy the library I have to redeploy the deployment. This issue only happens with the applications packaged as *.ear*. If the application has been deployed as a .war, with restarting the deployment is enough.
    Would be possible to load the referenced library from an *.ear* just restarting the deployment?
    Thanks in advance,
    Luis

    Thanks Vimala,
    I have 1 ear project and 1 web service project.
    Attached my ant output when I run the build.xml.
    C:\wivWorkSpace\wivApp>ant build -Dworkspace=C:/wivWorkSpace
    Buildfile: build.xml
    init.env:
    init.typedefs:
    init:
    build:
    [echo] project.name = wivApp
    init:
    build:
    [echo] wivWS: C:\wivWorkSpace\wivWS\build.xml
    BUILD SUCCESSFUL
    Total time: 23 seconds
    C:\wivWorkSpace\wivApp>ant build -Dworkspace=C:/wivWorkSpace archive
    Buildfile: build.xml
    init.env:
    init.typedefs:
    init:
    build:
    [echo] project.name = wivApp
    init:
    build:
    [echo] wivWS: C:\wivWorkSpace\wivWS\build.xml
    init.env:
    init.typedefs:
    init:
    stage:
    [delete] Deleting directory C:\wivWorkSpace\wivApp\.staging
    [mkdir] Created dir: C:\wivWorkSpace\wivApp\.staging
    [copy] Copying 13 files to C:\wivWorkSpace\wivApp\.staging
    BUILD FAILED
    C:\wivWorkSpace\wivApp\build.xml:192: The following error occurred while executing this line:
    jar:file:/C:/BEAPLA%7e1/WEBLOG%7e1/workshop/lib/wlw-antlib.jar!/com/bea/wlw/antlib/antlib.xml:91: The follow
    ng this line:
    C:\wivWorkSpace\wivApp\build.xml:204: The following error occurred while executing this line:
    Target `stage.to.ear' does not exist in this project.
    Total time: 15 seconds

  • [原创]在WLS9中使用J2EE Libraries 和 Optional Packages

    J2EE Libraries 和 Optional Packages
    概述
         J2EE Shared Libraries是Diablo的一个新特性。可以将一个J2EE模块共享给其他EAR类型的J2EE模块。你不能从非EAR访问J2EE Shared Library。J2EE Shared Library可以是任何类型的J2EE模块,但推荐打包成EAR。此外还有一种J2EE 1.4的标准共享库方式,称为 Optional Packages。区别在于 Optional Packages是基于标准的,而且不被当作J2EE模块使用。 Optional Packages提供和J2EE Libraries类似的方式将一个JAR文件被多个应用分享。optional packages必须通过部署对应的JAR文件方式先被注册到WLS。注册好后可以部署J2EE模块,通过manifest files来引用这些包。Optional packages和J2EE libraries的区别在于optional packages可以被任何J2EE模块(EAR, JAR, WAR, or RAR 文档)或扩展的目录结构引用。而J2EE libraries只能被EAR引用。
         本文附件exercise包括J2EE Libraries 和 Optional Packages的练习代码,可解压到任意位置。配置一个WLS Domain,记得用户名和密码要都设为weblogic,端口为7001。启动该Domain,并启动相应的Console。使用Domain/bin/setDomainEnv.cmd打开一个Prompt窗口。并把目录切换到你解压的文件的位置。然后就可以按照第五节和六节所述完成练习。如果想快速看一下练习结果,在solution中有已经配置好的两个练习的代码,部署后就可以测试。
    一。将一个应用作为J2EE Libraries或Optional Packages。
         你可以在该应用的META-INF目录下创建一个MANIFEST.MF文件,指定自己的版本。
         Extension-Name:可选。表示该库或包的名字。主调应用调用这个应用时需要匹配这个值。如果你不设置这个值,系统将自动使用部署名。
         Specification-Version:可选。定义这个库或包的规格版本。主调应用可以为共享模块随便指定一个规格版本。如果这个规格版本不可用,则主调应用不能被部署。规格参数可以有两种格式。第一种使用主从版本格式,大小版本号用点分割,如"9.0.1.1"。第二种使用文本格式,如 "9011Beta"。如果使用主从版本号格式,主调应用可以配置为共享的模块吻合一个特定版本,或者一个最小版本,或者一个最新的版本额。如果使用文本格式,主调应用必须和共享模块的版本号严格吻合。
         Implementation-Version:可选。定义这个库或包代码的执行版本号。必须在已经定义了规格版本的情况下才能定义执行版本。执行版本使用和规格版本相同的格式。
         如果你不使用MANIFEST.MF文件或者有些条目没有指定,可以在命令行中通过weblogic.Deploy进行部署的时候由参数来设置。
    二。J2EE Libraries and Optional Packages比较:
         Optional packages和J2EE Libraries有如下共同点:
         1。在部署的时候都注册到WLS上。
         2。都支持可选执行版本和特定版本字符串。
         3。引用J2EE libraries and optional packages的应用可以指定共享文件的版本。
         Optional packages和J2EE Libraries有如下区别:
         1。Optional package是普通的JAR文件,而 J2EE libraries可以是普通JAR文件,或J2EE应用,或独立的J2EE模块。J2EE libraries可以包括有效地J2EE或WLS部署描述符,而optional package JAR中的任何部署描述符都被忽略了。
         2。任何J2EE应用或模块可以通过META-INF/MANIFEST.MF引用 optional package。而只有企业应用可以通过weblogic-application.xml引用J2EE library 。
         3。Optional packages可以引用其他Optional packages,而J2EE libraries不能引用其他J2EE libraries。
    三。最佳实践:
         1。如果需要共享J2EE模块给多个企业应用。使用J2EE Libraries。
         2。如果要部署独立的J2EE模块作为共享库,应该把模块打包到企业应用中。这样可以防止潜在的URI冲突。因为独立模块库的URI来源于不署名。所以在部署时指定一个部署名,当其他应用引用它时作为URI。
         3。如果多个J2EE压缩文件需要共享一些JAVA类,则应该用optional packages。
         4。如果有一些类在本Domain中需要被其他应用调用,而你又不经常省级这些类(比如第三方类),则最好把它们放在Domain的 /lib目录下,而不是使用J2EE libraries或optional packages机制。在/lib子目录下的类会在Server启动时候自动装载到系统环境变量中。
         5。通常指定一个规范版本和一个执行版本。即使你不打算使用版本需要功能。为库指定版本可以在做测试时为共享的文件部署多个版本。
         6。通常为每个库指定一个扩展名,如果你不指定扩展名那系统会自动使用库的部署名作为扩展名。
         7。当开发了一个Web应用要部署成J2EE应用,应该使用唯一的上下文目录。如果它的上下文目录和他依赖的应用的上下文目录冲突,应该使用EAR的weblogic-application.xml中context-root元素来覆盖库的上下文目录。
    四。组装共享的J2EE Library 文件:
         几乎所有独立的J2EE模块或EA可以被部署成shareable J2EE library,但有如下限制:
         1。不能在一个J2EE library中引用另一个J2EE library.
         2。共享库不能嵌套。如果你不属一个EAR作为共享库,那整个这个EAR必须被作为一个库,而不能指定这个EAR中的某个独立J2EE模块为一个独立的库。
         3。像其他J2EE模块和企业应用一样,J2EE library必须被部署到目标Server或Cluster上去。这意味着库需要一个有效的J2EE部署描述符和WLS指定的部署描述符。
         4。推荐把J2EE libraries打包成企业应用,而不是独立的J2EE模块。因为独立模块的URI来自于部署名。默认WLS使用部署压缩文件的文件名或展开的目录名作为部署名。
         5。如果你选择把库部署成独立的J2EE模块,通常应该指定一个部署名并把这个名字作为被应用引用的URI。
    五。练习开发和部署Shared J2EE Library
         本练习在J2EEShared目录下。可以看到有两个目录,其中SharedLibraryEAR是被调用的shareable J2EE library,CallingLibraryEAR是调用该库的企业应用。通过把SharedLibraryEAR配置成共享库,CallingLibraryEAR可以访问LoanEJB就像打包在自己的EAR中。
         1.我们先来开发一个库应用。观察一下SharedLibraryEAR下面的目录结构和文件。
         目录LoanEJB是一个EJB结构。包括一个空的目录META-INF和一个包含一个JAVA文件Simple.java的目录data。LoanEJB\data目录是放EJB的源代码,Simple.java是我手写的。在LoanEJB下执行java com.bea.wls.ejbgen.EJBGen -descriptorDir META-INF data\Simple.java就会在生成SimpleHome.java,SimpleRemote.java,ejb-jar.xml,weblogic-ejb-jar.xml和ejbgen-build.xml。然后到LoanEJB编译这几个CLASS:javac data\*.java,生成根和桩文件。最后执行jar cvf ..\LoanEJB.jar *,打包我们需要的EJB LoanEJB.jar到SharedLibraryEAR目录。
         目录APP-INF是一个空的目录,可以放入当前这个应用需要的第三方包。
         目录META-INF下包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个EAR模块:LoanEJB.jar,以及这个应用的部署名。为了把这个应用做成共享库,现在我们创建一个MANIFEST.MF文件,并在里面写入如下信息:
              Extension-Name: myLib
              Specification-Version: 1.0
              Implementation-Version: 1.0
         然后在J2EEShared下执行java weblogic.appc SharedLibraryEAR,生成可部署的企业应用。
         2.配置 CallingLibraryEAR来引用SharedLibraryEAR模块。观察一下CallingLibraryEAR下面的目录结构和文件。
         目录APP-INF是放EAR内部公用的类和库的目录。在这个练习中不需要使用。
         目录LoanApproval是一个Web应用。index.jsp用于调用EJB LoanEJB的getString方法,而没有指定这个EJB是来自本企业应用还是其他库。如果调用成功,则把在LoanEJB中设置的一个字符串显示在浏览器上。
         目录META-INF中包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个Web模块LoanApproval。在weblogic-application.xml中除了编码方式,我们还要指定使用的共享库的名称。能看到在library-ref中我们指向了SharedLibraryEAR这个库myLib。同时在这个文件中我们还能指定库的规格版本和执行版本,以及是否需要严格匹配等。
         在J2EEShared目录下执行 java weblogic.appc -library SharedLibraryEAR CallingLibraryEAR来预编译JSP。执行后会看到在LoanApproval\WEB-INF\classes下面会生成一个目录jsp_servlet包含JSP被编译成的Servlet__index.class和__error.class。由于在weblogic-application.xml中指定了使用的共享库,所以appc在调用jspc来编译JSP的时候能找到调用的EJB LoanEJB的命名空间以及对应类。
         3。部署共享库和前端企业应用并测试。
         确保你的Server运行的情况下,在J2EEShared下执行下面两个命令来部署SharedLibraryEAR和CallingLibraryEAR。注意执行以前Console不能使被Look状态的。
              java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy -library SharedLibraryEAR
         执行之后在Console的Deployments部分能看到新添加了一个名为myLib(1.0)的库,状态为Installed。
              java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy CallingLibraryEAR
         执行之后在Console的Deployments部分能看到新添加了一个名为CallingLibraryEAR的应用,状态为Active。
         如果部署成功,在Console和Prompt都不会有报错。打开一个浏览器测试一下:http://localhost:7001/LoanApproval。如果一切正常,会显示在EJB中设置的那行字符串。
         注意,当需要卸载库的时候,必须先卸载引用这个包的所有应用,然后Activate Change,然后再Look,并且卸载库。
    六。练习开发和部署optional packages
         本练习在OptionalPackages目录下。可以看到两个目录,其中SimpappOptionalPackage是被调用的Optional Packages,SimpappEAR是调用该包的企业应用。通过把SimpappEAR配制成共享包,SimpappOptionalPackage可以访问Simpapp类就像打包在自己的EAR中。
         1。我们先来开发一个Optional Packages。观察一下SimpappOptionalPackage下面的目录结构和文件。
         目录META-INF中现在是空的。需要创建一个MANIFEST.MF文件,包括如下内容:
              Extension-Name: myOptionalPackage
              Specification-Version: 0.9
              Implementation-Version: 1
         目录simp下面包含一个源代码文件Simpapp.java。在OptionalPackages\SimpappOptionalPackage\下执行javac simp/Simple.java,会在simp目录下编译出Simple.class。然后执行 jar cvfm simpapp.jar META-INF/MANIFEST.MF *,把这个类打成一个名为simpapp.jar的JAR包。
         2。配置SimpappEAR来引用SimpappOptionalPackage模块。观察一下SimpappEAR下面的目录结构和文件。
         目录APP-INF和我们前面说的一样,就不赘述。
         目录META-INF下包括application.xml和weblogic-application.xml。application.xml指定了这个应用所包含的只有一个Web模块SimpappWebAp。为了把这个应用做成Optional Packages,现在我们创建一个MANIFEST.MF文件,并在里面写入如下信息:
              Extension-List: simpapp
              simpapp-Extension-Name: myOptionalPackage
              simpapp-Extension-Specification-Version: 0.9
         然后在OptionalPackages下执行java weblogic.appc -classpath SimpappOptionalPackage/simpapp.jar SimpappEAR, 生成可部署的企业应用。注意这次我们没在appc中使用-library,因为使用 optional packages的时候不需要获得它的部署描述符。但我们需要指定optional packages模块的位置放到classpath里编译JSP。
         3。部署OptionalPackages和前端企业应用并测试。
         确保你的Server运行的情况下,在OptionalPackages下执行下面两个命令来部署SimpappOptionalPackage和SimpappEAR。注意执行以前Console不能使被Look状态的。
              java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy -library SimpappOptionalPackage\simpapp.jar
              java weblogic.Deployer -adminurl t3://localhost:7001 -user weblogic -password weblogic -deploy SimpappEAR
         如果部署成功,在Console和Prompt都不会有报错。打开一个浏览器测试一下:http://localhost:7001/SimpappWebApp/。如果一切正常,会显示在Simple.java中设置的那行字符串。
    七。相关资源。
         http://e-docs.bea.com/wls/docs90/notes/new.html
    该帖由 goblinize 在 Nov 4, 2005 5:43 PM 编辑过

    另外谢谢支持征文活动,让大家先看一下,然后再考虑奖励的事情。希望大家积极参与。
    有什么问题在此积极留言,希望作者给以解答。

  • Don't have the option search shared library

    Dear All,
    I just install a NAS on my private network but can't see the shared files.
    I try on a friend network, it's fine.
    I've seen that "Search Shared Library" should be on but I've not this option on my Edition / Preference / Shared page....
    I'm using a iTunes V10.5.2.11 French.
    Thank you

    You update as always, open itunes, connect ipod.
    iOS: How to update your iPhone, iPad, or iPod touch
    Read the entire article not just the first half.

  • Retaining View Options in Shared Library

    FYI: i'm running Mac OS 10.7.3 & iTunes 10.5.3
    i have my library on a Mac Mini in the house. i use my MacBookPro for everything. My library is too large to keep on my laptop, so when i'm home, i just pop open iTunes and select the Mac Mini's library in the SHARED section to listen to tunes.
    essentially two issues...
    1) i hated that every time i created a new playlist, i had to re-select the View Options as i wanted them to be. this was just solved by using the Assimilate View Options script that i found during my investigations. it works fine for whatever i have on my local library (which isn't much), but it does not work for anything in the shared library.
    1b) sidenote issue with that: when using it on the local library, it does great with choosing all the columns that i have setup. it does not, however, deal with the column widths & order nor which view mode i want (Album List + Always Show Artwork). argh.
    2) so i continued my journey to finding the right app/plug/help/hack/whatever and ran across the Change Hidden iTunes Preferences script/app. this too works great for creating new playlists with the view options i want already in place (by checking the Changing view settings is global option). but this also only works on my local library and not the shared library views.
    2b) sidenote with this one: this has the same issue as 1b above - exactly. arghx2.
    NOTE: i realize i cannot actually change the view options on my shared libraries iTunes on the Mini - i just want the iTunes on my MBP to retain either the view options i want/set when using the shared library -or- have the view options that i actually have on the Mini's iTunes Library to display when viewing thru my MBP.
    does that all make sense?
    any thoughts would be appreciated.
    THANKS.

    This is by design. The artwork is not sent when browsing the shared library to avoid swamping the network. Sending the artwork for every track would generate a lot of network traffic.

  • Search option eliminated in iOS7 video shared library?

    Towards the end of iOS6 they added a search bar to the Shared Video tab.  If you have a home media server and click on your libarary from your phone a search bar appeared at the top of the window allowing you to search within folders of your shared library.  This now seems gone again with iOS7.  Is it still gone or does it exisit and I'm not seeing it?

    Just to inform you it still streams on AppleTV and MACs as well.

  • Optional Package - startup behavior

    Hi guys,
    Hi have an optional package (similar to a shared library) that is referenced by two different applications. This optional package is a jar file.
    When I 've a web application (WAR) I know that WebLogic will use the exploded directory in .../tmp/_WL_user to load the application, but which is the behavior when i'm using a jar file?
    Thanks

    Hi Amol,
    WebLogic jDriver for Oracle fully supports the JDBC 2.0 Optional Package API for
    distributed transactions.
    Laurent Goldsztejn
    Developer Relations Engineer
    BEA Support
    "amol desai" <[email protected]> wrote:
    >
    Do you support the optional package features? If yes , how?

  • Persistence Layer deployed as Optional Package

    Environment:
    - WebLogic 11g which consequently means EJB 3.0
    - Application has 3 modules: Web (referencing EJB and Persistence), EJB (referencing Persistence) and Persistence
    Could I deploy my persistence layer as an Optional Package or does it have to be a Shared Library?
    The reason I'm asking is that when I try to deploy my EJB module, WLS can't find the persistence unit being inject to it:
    Unable to deploy EJB: StocksBean from BLayer-1.0.0-SNAPSHOT.jar: No persistence unit named 'internalAppsPU' is available in scope BLayer-1.0.0-SNAPSHOT.jar. Available persistence units: []
    Persistence module is basically a JAR file deployed as an Optional Package with following in its Manifest:
    Extension-Name: PersistenceLayer
    Implementation-Version: 1.0.0-SNAPSHOT
    Specification-Version: 1.6
    in EJB's code I have:
    @Stateless(name="StocksBean", mappedName="StocksBean")
    public class StocksBean implements Stocks {
         @PersistenceContext(unitName = "internalAppsPU")
         private EntityManager em;
    and in EJB's JAR file I have:
    pLayer-Extension-Name: PersistenceLayer
    pLayer-Implementation-Version: 1.0.0-SNAPSHOT
    pLayer-Specification-Version: 1.6
    I'm deploying these one by one and not as an Application.

    Hi Arun,
    Thank you so much for taking time and responding. I'm still having the same issue.
    You see, I had the exact same problem when my persistence Entities were in the same Jar file as EJBs and I found out the problem was the name of the persistence.xml file (which was "Persistence.xml") and also the version of the namespace used in the XML file which conflicted with version of JPA's spi (version of JPA's spi in JEE1.6 is 1.0 and I was using version 2.0 of the namespace).
    However, I got that fixed and now I'm trying to separate the layers (just moved the files around and didn't change the content). Here is what I have so far:
    Name of Persistence Layer's JAR file: PLayer.jar
    Manifest of Persistence Layer's JAR file:
    Manifest-Version: 1.0
    Archiver-Version: Plexus Archiver
    Created-By: Apache Maven
    Built-By: bm03043
    Build-Jdk: 1.6.0_18
    Extension-Name: PersistenceLayer
    Implementation-Version: 1.0.0-SNAPSHOT
    Specification-Version: 1.6
    Name of EJB's JAR file: BLayer-1.0.0-SNAPSHOT.jar
    Manifest of EJB's JAR file:
    Manifest-Version: 1.0
    Archiver-Version: Plexus Archiver
    Created-By: Apache Maven
    Built-By: bm03043
    Build-Jdk: 1.6.0_18
    Extension-List: PLayer
    PLayer-Extension-Name: PersistenceLayer
    PLayer-Implementation-Version: 1.0.0-SNAPSHOT
    PLayer-Specification-Version: 1.6
    I didn't know that Extension-List entry in EJB's jar file should match with the name of Persistence layer's jar file.
    As for deployment, I deploy the Player and then EJB.
    Appreciate any input.
    Edited by: Keibi on Apr 26, 2012 11:30 AM

  • Linking problems compiling Lua shared library (nixio)

    I am trying to create a PKGBUILD for nixio (see http://dev.luci.freifunk-halle.net/nixio/doc/). I am using this PKGBUILD:
    pkgname=nixio
    pkgver=0.3
    pkgrel=1
    pkgdesc="System, networking and I/O library for Lua"
    arch=('i686' 'x86_64')
    url="http://luci.subsignal.org/"
    license=('APACHE')
    depends=('lua>=5.1' 'openssl')
    makedepends=()
    optdepends=()
    provides=()
    options=('docs')
    source=(http://dev.luci.freifunk-halle.net/nixio/nixio-0.3.tar.bz2)
    md5sums=('7fa6a989cd2644347d969cb6e3a5c186')
    build() {
    cd "$srcdir/$pkgname-$pkgver"
    make LUA_MODULEDIR=/usr/share/lua/5.1 LUA_LIBRARYDIR=/usr/lib/lua/5.1
    package() {
    cd "$srcdir/$pkgname-$pkgver"
    cp -R dist/* $pkgdir
    (The package contents are rather irregular.) When building, it produces this output:
    ==> Starting build()...
    mkdir -p dist/usr/share/lua/5.1
    cp -pR lua/* dist/usr/share/lua/5.1 2>/dev/null || true
    for i in $(find dist -name .svn); do rm -rf $i || true; done
    gcc -O2 --std=gnu99 -Wall -Werror -pedantic -fPIC -c -o src/nixio.o src/nixio.c
    gcc -O2 --std=gnu99 -Wall -Werror -pedantic -fPIC -c -o src/socket.o src/socket.c
    gcc -O2 --std=gnu99 -Wall -Werror -pedantic -fPIC -c -o src/sockopt.o src/sockopt.c
    # 15 more pretty much identical object code files...
    gcc -Wl,--hash-style=gnu -Wl,--as-needed -shared -lcrypt -lssl -o src/nixio.so src/nixio.o src/socket.o src/sockopt.o src/bind.o src/address.o src/poll.o src/io.o src/file.o src/splice.o src/process.o src/syslog.o src/bit.o src/binary.o src/fs.o src/user.o src/tls-crypto.o src/tls-context.o src/tls-socket.o
    mkdir -p dist/usr/lib/lua/5.1
    cp src/nixio.so dist/usr/lib/lua/5.1/nixio.so
    The package seems to build fine, although namcap produces these warnings:
    nixio W: Dependency included and not needed ('lua')
    nixio W: Dependency included and not needed ('openssl')
    But when I install it and launch Lua:
    Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
    > require 'nixio'
    error loading module 'nixio' from file '/usr/lib/lua/5.1/nixio.so':
    /usr/lib/lua/5.1/nixio.so: undefined symbol: MD5_Init
    stack traceback:
    [C]: ?
    [C]: in function 'require'
    stdin:1: in main chunk
    [C]: ?
    Doing some research, I found that MD5_Init is part of the OpenSSL library (which nixio uses for its cryptographic functions), and that "undefined symbol" errors are indicative of a program compiling and linking properly, but not being able to load a shared library at runtime. However, OpenSSL is installed properly and libssl.so is in my /usr/lib.
    What should I do to fix this error? It builds properly when installed using LuaRocks. I tried adding various flags from the rockspec (run "luarocks download nixio" and "luarocks unpack nixio-0.3-1.src.rock" to look at it) but still can't get it to work.

    You probably did not install the required C++ shared library patches on the system where you are running the compiler. On Solaris 9 for SPARC, Studio 11 requires patches 111711-12 and 111712-12. Studio 11 also requires other patches, which are in the installation image.
    You can find out what shared library version you have by running these commands:
    version /usr/lib/libCstd.so.1
    version /usr/lib/sparcv9/libCstd.so.1
    If the patch versions are not -12 or later, run the Studio 11 installer again, and this time have it install the Solaris patches (but nothing else).

  • Writing LabVIEW application on Solaris that invokes a function in a shared library

    In the "Call Library Function" Configure window I choose a Shared Library "xxx.so" file and select the Function Name "Foo" (written in C). It happens that function "Foo" calls another function "Bar" (also written in C) that resides in a different Shared Library (in /usr/dt/lib). After clicking "OK", a window comes up with the message "/xxx/xxx.so fatal relocation error ... symbol Bar: referenced symbol not found." Is there a way to get around this (such as search a list of libraries)? Combining the libraries is not an option; they are very large and belong to different software packages.

    Thanks for your quick response.
    Yes, usr/dt/lib is in the LD_LIBRARY_PATH environment variable. Is LabVIEW supposed to search LD_LIBRARY_PATH libraries in addition to the one I specify in the "Call Library Function" Configure window? That's what I would like it to do, but there still seems to be a problem. -j_b

  • Weblogic Optional Packages - Permgen Memory Space

    Hi,
    We are packaging some common jars as Optional Packages in weblogic and using them from different EAR files.We know for classes in side the EAR, each classloader creates individual clazz objects in the permgen space.
    For classes inside the Optional packages and which are referenced in multiple EAR,does weblogic create seperate clazz instances in the permgen space for each classloader? If so then it would mean that classes inside the Optional Package will be created multiple times in the permgen space (attributed to different classloaders)
    Any idea on the behaviour will be highly appreciated.Is the situation same with shared libraries ?

    Depends on where your optinal classes are located.
    If you insert them in the system (or server) classloader they will be loaded once, by the system
    classloader. You can use the ${DOMAIN_HOME}/lib directory for this purpose. The jars located in
    this directory will be picked up and added to the end of the server classpath at server startup.
    The jars will be ordered lexically in the classpath.
    If you are using shared libraries, these shared libraries will be merged at runtime with the
    applications referencing them, so they will be local to the application and to my knowledge
    loaded by the classloader of the application and not a separate shared library classloader. Thus
    if you reference the shared library from multiple applications, the shared libraries get merged
    multiple times and loaded multiple times. The reason is that WebLogic uses classloading
    isolation between the deployed applications, so that from a classloading perspective
    other applications do not bother other applications.

  • Referencing an optional package in a jar inside an ear

    UPDATE: We no longer need this as the third-party will change their shared-library ear to a jar for use on other application servers.
    We have no trouble deploying an ear containing a jar as a shared library, and then referencing the classes in it from another application by specifying the appropriate <library-ref> in weblogic-application.xml.
    In some installations, that shared library is not required, and indeed may not be present. In that case, the <library-ref> is unresolved, and the application will not deploy. We would like to avoid having two versions of our application - one with the <library-ref> and one without.
    If we add the Extension-Name property to the manifest of the jar mentioned above, and deploy the jar (not the ear) as a shared library, our application can reference classes in that jar. The problem is that the library ear (containing the jar) comes from a third party, and we cannot extract out the jar. And the "optional package" mechanism does not appear to work for jars within ears. We've specified the Extension-Name from the library ear ( the one from the library jar is not visible) in the Extension-List of the application. There is no complaint that the optional package is unresolved, but accessing the classes gives ClassNotFoundException.
    I did not find any documentation that optional package jars within an ear should be visible to other deployment units, but it seems odd that the third party would package them such that they can only be referenced with the <library-ref> (i.e. on WLS).
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/libraries.html
    http://java.sun.com/j2ee/verified/packaging.html
    Edited by: mikereiche on Nov 11, 2011 4:34 PM

    The JarInputStream class is used to read the contents of a JAR file from any input stream.
    InputStream input=getResourceAsStream("/input.xml");
    JarInputStream jis
    =new JarInputStream(input);

  • Shared Library Conflicts/HotSync/Palm

    I have had trouble opening Hot Sync Manager to sync w/Bluetooth.
    Keep getting ERROR Message:
    The application "HotSync Manager" could not be launched because of a shared library error: "O<HotSync Manager><HotSync Manager><HotSyncLib.PPC><SetConfigureConduitCallBack>
    Could Apple users please help me find these extensions so I can delete them and start clean.
    Wish Error Messages would tell me where the heck these conflicting files are??
    Thx all

    You are seeing a variant of the single most frequently encountered error condition of the Palm Desktop software package under OS X. It is usually a result of the choice to install or upgrade system software using the archive and install option.
    Whatever you do, do not arbitrarily delete rename, or move any Palm-related files or folders, as you will only aggravate the situation! Manually manipulating either the Palm software [including the HotSync Manager or the Transport Monitor] or iSync and the iSync Palm Conduit is not something you should attempt unless you understand how they operate, and are very familiar with the consequences of doing so.
    There are a number of ways to address it, though the easiest is probably by following this set of instructions from Palm:
    Macintosh 0S X 10.x: HotSync Manager could not be launched because of a shared library error
    The Mac OS X installer includes an "Archive and Install" option. When you upgrade your Mac OS to a newer version of OS X, and select the "Archive and Install" option from the installer's "Select a Destination: Options" panel, you may receive the following error upon restart or attempting to launch HotSync Manager:
    "The application "HotSync Manager" could not be launched because of a shared library error: "4"
    Explanation: The Archive and Install option in the Mac OS X installer does not copy these files from the archived System and Library folders to the new OS installation. HotSync Manager requires these files to run properly.
    Workaround: You must re-install Palm Desktop from the CD included with your handheld. After installing Palm Desktop from your CD you can install the latest web download from: http://www.palm.com/us/support/downloads
    NOTE: That file is directly accessible here:
    http://www.palm.com/us/support/macintosh/macdesk421revd.html
    (Important Note: Be sure to install from your CD first as the web version does not include all the software included on your CD)

  • Please help! Shared Library Error... no applications will open!

    Hi. Major issues!!
    My computer was unplugged for 2 weeks (renovations). When I set it up in my new office, none of my applications would open! (Microsoft, Adobe, AOL, etc...) Safari is working.
    I get this error message:
    The application "Photoshop" could not be launched because of a shared library error: "5<application><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "Word" could not be launched because of a shared library error:
    "8<Microsoft Word><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "AOL" could not be launched because of a shared library error:
    "9<AOL (Bootstrap)><CarbonLib><CFMPriv_SpeechRecognition>"
    The application "AppleWorks" could not be launched because of a shared library error: "4<AppleWorks><CarbonLib><CFMPriv_SpeechRecognition>"
    Here's what I've tried...
    I have tried to install combo update 10.3.9. .. didn't work.
    My computer was purchased in 2004... just moved to a new house... do not know where my installation dvd is... so to reboot on that is not an option.
    I tried disk repair permissions... didn't work!
    I opened my log console to view the crash logs... and it appears a lot has crashed... but I can not understand what any of it means!?!
    Can anyone help or offer some advice?
    Can anyone understand a crash log if I post it?
    Please help!?! Taking an online masters course and this is a major dilemma!
    Thanks,
    Lindsay

    Hi Lindsay,
    "Can I get one from a mac store? Does it have to be the original one I used when I purchased my mac?"
    No, you can no longer purchase 10.3 Panther disks from Apple Stores, online or otherwise. You may however, be able to purchase replacement disks for your computer (if Mac OS 10.3 were the original install disks that came with your mac) by calling Apple and explaining and having the serial number ready of the computer.
    If your installation of 10.3 was an upgrade you can purchase retail copies of 10.3 disks online from many resellers, such as on ebay or sites such as FastMac, but be sure to purchase a retail box set and not upgrade or machine specific disks.
    Did you perform all of the steps that Kappy steered you to in Dr. Smoke's FAQ first and your only option left is the Archive and Install?
    littleshoulders

  • Adding shared library to project fails

    We've created a shared library of content and look & feel updates to Portal 9.2 mp1.
    Started by creating a new web and app project. Made sure it works in a test portal.
    I followed Floyd Jones instructions on creating shared J2EE libs.
    Created a "simple project" copied the files (with exception of the webcontent folder - but all its contents). Created the Manifest file. Saved it as a .war in the modules folder.
    Create a new web and app project for testing. When I pull in the library, portal doesn't seem to work following the instructions (Can't find WebLogic J2EE Libraries option to add). So I add the J2EE libraries via the project properties. When I link to the war file, the manifest information does not appear. Instead just the name of the actual .war file.
    I can add the versions. Workshop requires me to edit the weblogic.xml file to pull in the library.
    But no luck. My suspicion is there's something wrong with the library as it can't read the manifest. When I open the manifest inside the .war file all the information is there.
    Any idea what I'm doing wrong?
    Thanks...martin

    you'll have to physically put all the songs on to the computer that doesnt have it. to do this go to start>my network places and if you are on a network his computer should show up. You'll probably need to enable sharing for your My Music folder (just assuming thats where you music is at) and just copy it over.

Maybe you are looking for