<DIV>This is my code:</DIV>
<DIV>First of all I have this file:</DIV>
<DIV> </DIV>
<DIV>package javamaps;</DIV>
<DIV> </DIV>
<DIV>public class MapserverLibLoad{</DIV>
<DIV> public static void loadLibrary() throws UnsatisfiedLinkError{<BR> System.loadLibrary("mapscript");<BR> }<BR>}</DIV>
<DIV> </DIV>
<DIV>Then this is the principal program, as you see it is a servlet:</DIV>
<DIV> </DIV>
<DIV>import javamaps.*;<BR>import edu.umn.gis.mapscript.*;</DIV>
<DIV>import javax.ejb.*;</DIV>
<DIV>import javax.xml.parsers.*;<BR>import javax.xml.transform.*;<BR>import javax.xml.transform.dom.*;<BR>import org.w3c.dom.*;</DIV>
<DIV>import java.sql.*;<BR>import javax.sql.*;<BR>import javax.naming.*;</DIV>
<DIV><BR>import javax.servlet.*;<BR>import javax.servlet.http.*;<BR>import java.io.*;</DIV>
<DIV>public class test2 extends HttpServlet{<BR> <BR> InitialContext initialContext=null;<BR> <BR> static{<BR> try{<BR> MapserverLibLoad.loadLibrary();<BR> }catch(UnsatisfiedLinkError e){<BR> e.printStackTrace();<BR> System.out.println("CONTINUE");<BR> }<BR> }<BR> <BR> //---------------------------------------------------------------------------------------------------------------------------- <BR> <BR> private Connection createDatabaseConnection()throws EJBException{<BR> DataSource dataSource;<BR> Connection connection;<BR> PreparedStatement stmt;<BR> try{<BR> dataSource = (DataSource)
initialContext.lookup("jdbc/lbs");<BR> connection= dataSource.getConnection(); <BR> //System.out.println(" DATABSE:::::"+connection.getMetaData().getUserName());<BR> return connection;<BR> }catch (SQLException e){<BR> throw (new EJBException(e));<BR> }catch (NamingException e){<BR> throw (new EJBException(e));<BR> }<BR> }</DIV>
<DIV><BR> <BR> <BR>//----------------------------------------------------------------------------------------------------------------------------<BR> public void init (ServletConfig cfg){<BR> try{<BR> System.out.println("Try to init servlet");<BR> System.out.flush();<BR> initialContext= new InitialContext();<BR> }catch(Exception e){<BR> throw (new EJBException(e));<BR>
}<BR> <BR> }//fin init<BR> <BR> public void service (HttpServletRequest req, HttpServletResponse res){<BR> Connection conexion=null;<BR> String imei=null;<BR> PrintWriter out=null;<BR> Statement orden=null;<BR> ResultSet rs=null;<BR> String SQL=null;<BR> <BR> try{ itemObj item = new itemObj();<BR> System.out.println(" BIG NAME :>>"+item.getName()+"<<");<BR> <BR>
conexion=this.createDatabaseConnection();<BR> imei=req.getParameter("IMEI");<BR> out=res.getWriter();<BR> SQL="SELECT * FROM Client WHERE Name=";<BR> SQL=SQL+"'"+imei+"'"; <BR> orden=conexion.createStatement();<BR> rs=orden.executeQuery(SQL);<BR> res.setContentType("text/html");<BR> out.println("</Body></HTML>");<BR> out.println("<TABLE border=1>");<BR> rs.next();//I move to the first row<BR> out.println("<TR><TD COLSPAN=3>");<BR> out.println("</TD></TR>");<BR> out.println("<TR><TD>"+rs.getString("Name"));<BR> out.println("</TD><TD>"+rs.getString("Mobile"));<BR>
out.println("</TD><TD>"+rs.getString("Telephone_Number"));<BR> out.println("</TD></TR>");<BR> while (rs.next()){<BR> out.println("<TR><TD>"+rs.getString("Name"));<BR> out.println("</TD><TD>"+rs.getString("Mobile"));<BR> out.println("</TD><TD>"+rs.getString("Telephone_Number"));<BR> out.println("</TD></TR>");<BR> }<BR> out.println("</TABLE>");<BR> <BR> <BR> <BR> }//fin try<BR> catch (Exception e){<BR> System.out.println(e);<BR> }catch (Throwable
e){<BR> System.out.println("WRONGG POINT");<BR> e.printStackTrace();<BR> }finally{<BR> try{<BR> out.close();<BR> rs.close();<BR> conexion.close();<BR> orden.close();<BR> }catch(Exception e){ <BR> throw (new
EJBException(e));<BR> }<BR> <BR> }//fin service<BR> <BR> }<BR>}</DIV>
<DIV> </DIV>
<DIV>It seems as like he can't reach the mapserver librarys and I don't know why.It gives me this error:</DIV>
<DIV> </DIV>
<DIV>java.lang.UnsatisfiedLinkError: new_itemObj</DIV>
<DIV> </DIV>
<DIV>Can someone help me?</DIV>
<DIV>Know what I'm doing wrong?</DIV>
<DIV> </DIV>
<DIV>Thank you</DIV>
<DIV> </DIV>
<DIV>Jose Luis</DIV><p>
<hr size=1><br><table><tr><td><a href="http://es.rd.yahoo.com/mail_es/tagline/mail/image/*http://es.mail.yahoo.com"><img src="http://eur.i1.yimg.com/eur.yimg.com/i/es/mail/mails.gif" height=80 width=230 alt="Nuevo Correo Yahoo!" border=0 align="left"></a></td></tr></table>