CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 NewsWAP don't works....

Print topic Send  topic

Author Message
icarrara@studio5.it
Posted: 03/19/2002, 2:56 AM

I'm trying to use your Wap Example but it don't works.

I tried tuo run the generated Jsp pages via Jakarta Tomcat 3.3.
In alternative I tried also the Resin web server version 2.0.5.

When I use the application generated for "JSP 1.1" ALL WORK FINE!

But when I generated the application for "JSP 1.1 & WML" there is a problem:

I browse the published Wap application with Opera Web Browser because it support Wml language and also via Wap emulator (I used http://www.wapsilon.com/PDA/wapsilon.com).

I select "Top > News > World News" - When I select the "World News" link I can see a little bit of the new page ("Press forward...") but after a second I get the below error:
----------------------------------
Error: 500

Location: /wap/news.jsp

Internal Servlet Error:

javax.servlet.ServletException: General error
at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
at news_5._jspService(news_5.java:1302)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6160)
at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(JdbcOdbc.java:2742)
at sun.jdbc.odbc.JdbcOdbcDriver.closeConnection(JdbcOdbcDriver.java:842)
at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.java:736)
at news_5._jspService(news_5.java:1276)
at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Unknown Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
----------------------------------------------------

I get the above error every times the application starts to use the database....

I think the problem is in the below piece of the error:

"Root cause:
......
===> at sun.jdbc.odbc.JdbcOdbc.SQLFreeEnv(JdbcOdbc.java:2742) <===="

... because in the Jakarta-Tomcat forum I get this interesting reply to a very similar case:

----------------------------------------
"The close method will throw an exception if the database connection is not currently open or not valid. Are you sure the database is opening correctly? Can you read data from the database?"
-------------------------------------------

It seems that the Wap application try to free and/or close the database connection before use it.

I will repeat you that if I generate the application for JSP 1.1 only it works fine - the problem exists only in the "JSP 1.1 & WML" version.

Please, could you help me?

Sincerely, Ivano Carrara - Studio 5 Liguria srl - Italy
dg
Posted: 03/19/2002, 3:57 AM

I have tried CodeCharge and found that the generated JSP applications often generate the sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6160)
error.

I think that CodeCharge generated code does not trap all JDBC errors.
icarrara@studio5.it
Posted: 03/19/2002, 7:11 AM

Hi,

It's strange... CodeCharge staff told me to use another Jsp server instead Tomcat... the suggest is to use Rasin Http server... I dod that but the problem persist.

I asked them to tell me what server & version they are using for the online demo and I'm waiting for a reply.... In fact the online demo don't produce any errors.

Any suggest about trapping some Jdbc errors?

Ivano C.
CodeCharge Support
Posted: 03/19/2002, 7:14 AM

Ivano,
from the investigation made we've found that problem appears with ODBC connection to Access db only (using standard ODBC driver sun.jdbc.odbc.JdbcOdbcDriver). ODBC connection to other db should be OK.
The workaround is to remove or comment following lines in all generated files:

for(int i=0;i<ConnectionVector.size();i++)
((java.sql.Connection)ConnectionVector.elementAt(i)).close();


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.