Sharon, thanks once again. I found out how to do it only Friday evening - the documentation for the application server (Glassfish) was a bit unclear about this, but in the end I founs out that one has to put the jar file in a directory called applibs, and the accompanying shared library in another one called ext. After that it was amazingly easy to get things to work.
/jan Sharon Lucas wrote: > If you are using the correct syntax to create a STAFHandle and you get > this error, then your CLASSPATH does not contain JSTAF.jar. as this jar > file contains class com.ibm.staf.STAFHandle. > > -------------------------------------------------------------- > Sharon Lucas > IBM Austin, luc...@us.ibm.com > (512) 286-7313 or Tieline 363-7313 > > ----- Forwarded by Sharon Lucas/Austin/IBM on 11/26/2011 11:46 AM ----- > > From: Sharon Lucas/Austin/IBM@IBMUS > To: "Andersen, Jan" <jander...@informatica.com>, > Cc: staf <staf-users@lists.sourceforge.net> > Date: 11/26/2011 11:46 AM > Subject: Re: [staf-users] Using STAF from an Java EE 6 application > server > > > > Is the following really the Java code you're using to create a new > STAFHandle? > > Handle=new STAFHandle("session"); > > If so, it's syntax is incorrect. It should be the following as documented > in the STAF Java User's Guide at > http://staf.sourceforge.net/current/STAFJava.htm#Header_STAFHandle > > STAFHandle handle = new STAFHandle("session"); > > -------------------------------------------------------------- > Sharon Lucas > IBM Austin, luc...@us.ibm.com > (512) 286-7313 or Tieline 363-7313 > > > > > From: "Andersen, Jan" <jander...@informatica.com> > To: "staf" <staf-users@lists.sourceforge.net>, > Date: 11/22/2011 10:11 AM > Subject: [staf-users] Using STAF from an Java EE 6 application > server > > > > I am developing a web application that needs to call into STAF; the > application server is GlassFish 3, the java is version 6, and I have > included a reference to the JSTAF.jar in the server configuration. I try > to create a new STAFHandle like this: > > @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=""; > } > ... > > - but I get an error, saying: > > Could not initialize class com.ibm.staf.STAFHandle > > What have I done wrong? Is it the wrong version of java? Something in the > server setup? > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > staf-users mailing list > staf-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/staf-users > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > staf-users mailing list > staf-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/staf-users > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > > > ------------------------------------------------------------------------ > > _______________________________________________ > staf-users mailing list > staf-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/staf-users ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users