How to load native library in an EJB in JBoss EAP?

Solution Verified - Updated -

Issue

  • We have a set of MDB and stateless EJB components that use a library mylib.jar which uses a shared library (mylib.dll). When the EJB components are invoked and mylib API are executed, we see following error:

    Caused by: java.lang.UnsatisfiedLinkError: new_MyLib
            at com.jboss.examples.mylibJNI.new_MyLib(Native Method)
            at com.jboss.examples.MyLib.<init>(MyLib.java:37)
            ,,,
    

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.