'Native Library Path Suffix' is for 'shared libaries written in native
language , f.e. C. which are used via JNI by java classes.
you may put your JSTAF.jar in <domaindir>lib/applibs directory and use
'--libraries JSTAF.jar' option when deploying your app.
-Bernhard
On Tue, Nov 22, 2011 at 4:52 PM, <forums_at_java.net> wrote:
> I am developing an app against a Java API for a product called STAF; I have
> put the library, JSTAF.jar, in /usr/local/staf/lib and included this
> directory in the "Native Library Path Suffix" textbox under JVM settings on
> the server. However, when I try to call the following constructor:
>
> @ManagedBean public class StafSession { public StafSession() { try {
> Handle=new STAFHandle("session"); }
> catch (STAFException ex) {
> Logger.getLogger(StafSession.**class.getName()).log(Level.**SEVERE, null,
> ex);
> } name=""; cmd=""; }
> - it fails with:
>
> ======== AN ERROR OCCURRED: ==============================**
> ====================
>
> Could not initialize class com.ibm.staf.STAFHandle
> -------- +- STACK TRACE [1] ------------------------------**
> --------------------
>
> java.lang.**NoClassDefFoundError: Could not initialize class
> com.ibm.staf.STAFHandle
> at newpackage.StafSession.<init>(**StafSession.java:13)
> at sun.reflect.**NativeConstructorAccessorImpl.**newInstance0(Native
> Method)
> at
> sun.reflect.**NativeConstructorAccessorImpl.**newInstance(**
> NativeConstructorAccessorImpl.**java:39)
> at
> sun.reflect.**DelegatingConstructorAccessorI**mpl.newInstance(**
> DelegatingConstructorAccessorI**mpl.java:27)
> at java.lang.reflect.Constructor.**newInstance(Constructor.java:**513)
> at java.lang.Class.newInstance0(**Class.java:355)
> at java.lang.Class.newInstance(**Class.java:308)
> at com.sun.faces.mgbean.**BeanBuilder.newBeanInstance(**
> BeanBuilder.java:188)
> at com.sun.faces.mgbean.**BeanBuilder.build(BeanBuilder.**java:102)
> at com.sun.faces.mgbean.**BeanManager.createAndPush(**
> BeanManager.java:409)
> at com.sun.faces.mgbean.**BeanManager.create(**BeanManager.java:269)
> at
> com.sun.faces.el.**ManagedBeanELResolver.**resolveBean(**
> ManagedBeanELResolver.java:**244)
> at
> com.sun.faces.el.**ManagedBeanELResolver.**getValue(**
> ManagedBeanELResolver.java:**116)
> at
> com.sun.faces.el.**DemuxCompositeELResolver._**getValue(**
> DemuxCompositeELResolver.java:**176)
> at
> com.sun.faces.el.**DemuxCompositeELResolver.**getValue(**
> DemuxCompositeELResolver.java:**203)
> at com.sun.el.parser.**AstIdentifier.getValue(**AstIdentifier.java:99)
> at com.sun.el.parser.AstValue.**getValue(AstValue.java:158)
> at com.sun.el.**ValueExpressionImpl.getValue(**
> ValueExpressionImpl.java:219)
> at
> com.sun.faces.facelets.el.**TagValueExpression.getValue(**
> TagValueExpression.java:109)
> at
> javax.faces.component.**ComponentStateHelper.eval(**
> ComponentStateHelper.java:194)
> at
> javax.faces.component.**ComponentStateHelper.eval(**
> ComponentStateHelper.java:182)
> at javax.faces.component.**UIOutput.getValue(UIOutput.**java:169)
> at
> com.sun.faces.renderkit.html_**basic.HtmlBasicInputRenderer.**getValue(**
> HtmlBasicInputRenderer.java:**205)
> at
> com.sun.faces.renderkit.html_**basic.HtmlBasicRenderer.**getCurrentValue(*
> *HtmlBasicRenderer.java:355)
> at
> com.sun.faces.renderkit.html_**basic.HtmlBasicRenderer.**
> encodeEnd(HtmlBasicRenderer.**java:164)
> at javax.faces.component.**UIComponentBase.encodeEnd(**
> UIComponentBase.java:875)
> at javax.faces.component.**UIComponent.encodeAll(**UIComponent.java:1763)
> at javax.faces.render.Renderer.**encodeChildren(Renderer.java:**168)
> at
> javax.faces.component.**UIComponentBase.**encodeChildren(**
> UIComponentBase.java:845)
> at javax.faces.component.**UIComponent.encodeAll(**UIComponent.java:1756)
> at javax.faces.component.**UIComponent.encodeAll(**UIComponent.java:1759)
> at javax.faces.component.**UIComponent.encodeAll(**UIComponent.java:1759)
> at
> com.sun.faces.application.**view.**FaceletViewHandlingStrategy.**
> renderView(**FaceletViewHandlingStrategy.**java:401)
> at
> com.sun.faces.application.**view.MultiViewHandler.**
> renderView(MultiViewHandler.**java:131)
> at
> com.sun.faces.lifecycle.**RenderResponsePhase.execute(**
> RenderResponsePhase.java:121)
> at com.sun.faces.lifecycle.Phase.**doPhase(Phase.java:101)
> at com.sun.faces.lifecycle.**LifecycleImpl.render(**
> LifecycleImpl.java:139)
> at javax.faces.webapp.**FacesServlet.service(**FacesServlet.java:594)
> at
> org.apache.catalina.core.**StandardWrapper.service(**
> StandardWrapper.java:1539)
> at
> org.apache.catalina.core.**StandardWrapperValve.invoke(**
> StandardWrapperValve.java:281)
> at
> org.apache.catalina.core.**StandardContextValve.invoke(**
> StandardContextValve.java:175)
> at
> org.apache.catalina.core.**StandardPipeline.doInvoke(**
> StandardPipeline.java:655)
> at
> org.apache.catalina.core.**StandardPipeline.invoke(**
> StandardPipeline.java:595)
> at com.sun.enterprise.web.**WebPipeline.invoke(**WebPipeline.java:98)
> at
> com.sun.enterprise.web.**PESessionLockingStandardPipeli**ne.invoke(**
> PESessionLockingStandardPipeli**ne.java:91)
> at
> org.apache.catalina.core.**StandardHostValve.invoke(**
> StandardHostValve.java:162)
> at
> org.apache.catalina.connector.**CoyoteAdapter.doService(**
> CoyoteAdapter.java:330)
> at
> org.apache.catalina.connector.**CoyoteAdapter.service(**
> CoyoteAdapter.java:231)
> at
> com.sun.enterprise.v3.**services.impl.ContainerMapper.**
> service(ContainerMapper.java:**174)
> at com.sun.grizzly.http.**ProcessorTask.invokeAdapter(**
> ProcessorTask.java:828)
> at com.sun.grizzly.http.**ProcessorTask.doProcess(**
> ProcessorTask.java:725)
> at com.sun.grizzly.http.**ProcessorTask.process(**ProcessorTask.java:1019)
> at
> com.sun.grizzly.http.**DefaultProtocolFilter.execute(**
> DefaultProtocolFilter.java:**225)
> at
> com.sun.grizzly.**DefaultProtocolChain.**executeProtocolFilter(**
> DefaultProtocolChain.java:137)
> at
> com.sun.grizzly.**DefaultProtocolChain.execute(**
> DefaultProtocolChain.java:104)
> at com.sun.grizzly.**DefaultProtocolChain.execute(**
> DefaultProtocolChain.java:90)
> at com.sun.grizzly.http.**HttpProtocolChain.execute(**
> HttpProtocolChain.java:79)
> at
> com.sun.grizzly.**ProtocolChainContextTask.**doCall(**
> ProtocolChainContextTask.java:**54)
> at
> com.sun.grizzly.**SelectionKeyContextTask.call(**
> SelectionKeyContextTask.java:**59)
> at com.sun.grizzly.ContextTask.**run(ContextTask.java:71)
> at
> com.sun.grizzly.util.**AbstractThreadPool$Worker.**
> doWork(AbstractThreadPool.**java:532)
> at
> com.sun.grizzly.util.**AbstractThreadPool$Worker.run(**
> AbstractThreadPool.java:513)
> at java.lang.Thread.run(Thread.**java:619)
> I assume I have to go and "complain" to the good people in the STAF
> community, but I thought I should ask here first, as I may have set
> something
> up wrong on the server. Is this error likely to be caused by any settings
> on
> the server? Do I need to restart the server (something I am reluctant to do
> unless I have to)?
>
>
> [1] https://hag:8181/staftest2/**faces/index.xhtml#<https://hag:8181/staftest2/faces/index.xhtml#>
>
> --
>
> [Message sent by forum member 'janpla']
>
> View Post: http://forums.java.net/node/**866705<http://forums.java.net/node/866705>
>
>
>
--
IT-Consulting Bernhard Thalmayr
- Painstaking Minds -
83620 Vagen (Munich area)
Germany