Note that there are some explanatory texts on larger screens.

plurals
  1. POUse External Jar files web app/ Stratos Live
    primarykey
    data
    text
    <p>I need to use Stanfordparser.jar, pdfbox.jar, FontBox.jar in my web application. I’m developing this web app on Netbeans und using tomcat 7.0.22 server, I have include all those .jar file in both WEB-INF/lib AND Libraries Folder (But webapp uses .jar in the libraries folder), The web app runs fine on local machine. But when I run the .war file in WSO2 Stratoes live server and go to the JSP page that uses the .jar file ,it give this error. </p> <pre><code>java.lang.NullPointerException controler.ControlerServelet.doPost(ControlerServelet.java:499) javax.servlet.http.HttpServlet.service(HttpServlet.java:641) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) sun.reflect.GeneratedMethodAccessor1364.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:305) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) </code></pre> <p>Putting .jar files just in WEB-INF/lib is enough? Or do I need to point them in the web.xml file? Or how do I overcome this issue? </p> <hr> <p><strong>Update</strong> </p> <p>this is my code </p> <pre><code>String url = "jdbc:mysql://rss1.stratoslive.wso2.com/karshamarkuptool_karsha_opensource_lk"; String username = "root2_lQrhzZUK"; String password = "nbuser"; BasicDataSource ds = new BasicDataSource(); ds.setDriverClassName("com.mysql.jdbc.Driver"); ds.setUrl(url); ds.setUsername(username); ds.setPassword(password); byte[] b = null; try { b = getBLOB("2"); } catch (Exception ex) { Logger.getLogger(ControlerServelet.class.getName()).log(Level.SEVERE, null, ex); } 492 //ArrayList&lt;String&gt; sentenceList = new ArrayList&lt;String&gt;(); 493 ArrayList&lt;String&gt; sentenceList; 494 parseDocument doc = new parseDocument(); // Parse document object this has the external dependencies 495 sentenceList=doc.pdfDocToSentence(b); 499 // sentenceList.add("test string"); 500 request.setAttribute("allphrases", sentenceList); </code></pre> <p>I have commented out line 499 and modified 492 to 493. Now web page shows no error, But a blank page. Rest of the pages works fine</p> <p>I'm using netbeans IDE and added external jar files to project's Libraries folder too. Althought I have jar files in WEb_INf/lib folder, the clases are using the external libraries from project folder's Library folder, Can this be a problem? do i need to point servelet classes to use the libraies from WEB_INf/lib folder?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload