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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content