Problem with uploading structures

User 08026ff1f0

26-03-2006 19:13:15

Hi,





I was trying to develop a custom application that imports SDF files into Oracle tables.I am basically using the example code provided with Jchem. But I got an error in the transfer/upload.jsp file. the stack trace shows the following error.





java.lang.IllegalArgumentException: type of request cant be null


at chemaxon.util.HttpStreamToFile.<init>(HttpStreamToFile.java:172)


at chemaxon.util.UploadThread.setParams(UploadThread.java:85)


at org.apache.jsp.library.transfer.upload_jsp._jspService(upload_jsp.java:140)


at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)


at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)


at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)


at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)


at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)


at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)


at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)


at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)


at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)


at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)


at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)


at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)


at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)


at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)


at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)


at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)


at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)


at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)


at java.lang.Thread.run(Thread.java:534)





Could someone pls help me in finding out where exactly the error lies?





Bhargav

ChemAxon aa7c50abf8

27-03-2006 07:26:43

Hi





Which JChem version are you using?





Peter

User 08026ff1f0

27-03-2006 16:20:03

I am using jchem 3.3.2


Database: Oracle 10g on linux


Web server: tomcat 5.5.9 on linux

ChemAxon aa7c50abf8

27-03-2006 16:36:58

Hmmm. Are you sure? To all appearances, the highest JChem version number is 3.1.6.

User 08026ff1f0

27-03-2006 16:40:59

I am sorry I was a bit confused about that. The Jchem version is 2.2.1

ChemAxon aa7c50abf8

27-03-2006 18:15:52

I would like to recommend you to upgrade to the newest JChem version. The 2.2.1 version is very old, there have been many improvements and bug fixes since then.

ChemAxon 43e6884a7a

27-03-2006 18:35:50

(Possibly the JSP file and jchem.jar belong to different versions.)

User 08026ff1f0

27-03-2006 18:36:20

I think that would be a good idea. But right now we already have most of the application developed using the 2.2.1 API. The strange this is that


we have an old application running (which uses jchem 2.2.1) that has fileupload thing working just fine. We were planning to using the same thing in a new application and this time it is giving the above errors. The only difference is that the old application using tomcat 5.0 and the one on which we are working now uses the latest tomcat 5.5.9 . Do you think it might have anything to do with the problem? The error says that there is something wrong at chemaxon.util.UploadThread.setParams. But none of the arguments that are passed to this function are null as the error


"java.lang.IllegalArgumentException: type of request cant be null" says.

ChemAxon aa7c50abf8

28-03-2006 11:26:56

There indeed seems to be a problem with JChem 2.2.1, Tomcat 5.5.12 and the Firefox browser, when I try to use "Import" function of the JSP example. (Though the problem seems to be of a nature different from the one you reported.)





I experienced no problem whith the "Import" function of the JChem 3.1.6 JSP example. If you absolutely want to use JChem 2.2.1, I suggest to take the enhancements from the JSP example in JChem 3.1.6 that have taken place since JChem 2.2.1 and adapt them to the JChem 2.2.1 Java API, if necessary.