generator works without problems using ant:
ant -f build-torque.xml
ant -f build-torque.xml create-db
ant -f build-torque.xml insert-sql
ant -f build-torque.xml jdbc
all targets end with "BUILD SUCCESSFUL"
but when using runtime in web application:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:26
23: <%@ page
import="org.apache.commons.beanutils.*,org.apache.torque.*,torque.generated.*"
%>
24: <%
25:
26: Torque.init("C:\\Projects\\db2.properties");
27:
28: %>
<<<
db2.properties:
torque.database.default = torquetest
torque.database.torquetest.adapter = db2
#Using commons-dbcp
torque.dsfactory.torquetest.factory =
org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.torquetest.connection.driver = com.ibm.db2.jcc.DB2Driver
torque.dsfactory.torquetest.connection.url =
jdbc:db2://127.0.0.1:50000/torquetest
torque.dsfactory.torquetest.connection.user = aljosa
torque.dsfactory.torquetest.connection.password = aljosa
<<<
tomcat - root cause:
java.lang.NullPointerException
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:164)
org.apache.torque.adapter.DBFactory.create(DBFactory.java:165)
org.apache.torque.TorqueInstance.initAdapters(TorqueInstance.java:254)
org.apache.torque.TorqueInstance.initialize(TorqueInstance.java:157)
org.apache.torque.TorqueInstance.init(TorqueInstance.java:464)
org.apache.torque.TorqueInstance.init(TorqueInstance.java:444)
org.apache.torque.Torque.init(Torque.java:138)
org.apache.jsp.index_jsp._jspService(index_jsp.java:65)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
<<<
anyone here using ibm db2? any ideas why i have this problem?
--
Aljosa Mohorovic
http://www.revolucija.hr
Ivana Lucica 5
10000 Zagreb, Croatia
+385 (0)1 616 8414
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]