Help on setup https on Tomcat in linux
I try to setup tomcat https connection on port 8443 in redhat linux. I followed the instruction and get no error when start tomcat. But I could NOT connect to it from browser by https://:8443/xxx.html . I setup the same tomcat in Window. It works. Could someone help me to sovle it? Thanks, Jack
Tomcat 5.5.17 500 error
I hava a web app running well in tomcat 5.5.16 yesterday, but when I copy the app in another machine, I met following error. "org.apache.jasper.JasperException: File "/webwork" not found" when I use webwork in jsp. "org.apache.jasper.JasperException: /index.jsp(22,4) File "/common/cn/myMenu.jsp" not found" when I use <%@ include ...%> tag in jsp. This is the error message -- HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: File "/webwork" not found org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375) 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) root cause org.apache.jasper.JasperException: File "/webwork" not found org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114) org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:159) org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:423) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:492) org.apache.jasper.compiler.Parser.parseElements(Parser.java:1552) org.apache.jasper.compiler.Parser.parse(Parser.java:126) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211) org.apache.jasper.compiler.ParserController.parse(ParserController.java:100) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155) org.apache.jasper.compiler.Compiler.compile(Compiler.java:295) org.apache.jasper.compiler.Compiler.compile(Compiler.java:276) org.apache.jasper.compiler.Compiler.compile(Compiler.java:264) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303) 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) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs. Apache Tomcat/5.5.17 And this is web.xml -- http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> Newsystem application wj 2005-2006 (Spring WebWork Hibernate App) contextConfigLocation /WEB-INF/classes/com/exbizex/applicationContext/applicationContext.xml, /WEB-INF/classes/com/exbizex/applicationContext/applicationTestContext.xml, /WEB-INF/classes/com/exbizex/applicationContext/standardJspApplicationContext.xml, /WEB-INF/classes/com/exbizex/applicationContext/applicationValueListContext.xml log4jConfigLocation /WEB-INF/classes/log4j.properties webAppRootKey centerApplication org.springframework.web.context.ContextLoaderListener com.atlassian.xwork.ext.ResolverSetupServletContextListener org.apache.axis.transport.http.AxisHTTPSessionListener cEncoding com.exbizex.center.filter.SetCharacterEncodingFilter encoding GBK jEncoding com.exbizex.center.filter.SetCharacterEncodingFilter encoding shift_jis centerAdminFilter com.exbizex.center.filter.CenterAdminFilter OpenSessionInViewFilter org.springframework.orm.hibernate3.support.OpenSessionInViewFilter jstlfilter com.exbizex.center.filter.JSTLFilter jstlfilter *.jsp jstlfilter *.action OpenSessionInViewFilter /* centerAdminFilter /centerAdmin/cn/index.htm centerAdminFilter /cente
MySQL's XA problem
I hava done a test to use the MySQL XADataSource. For MySQL has no MYSQLXADataSourceFactory class, so I coded one to produce MysqlXADataSource. MysqlXADataSource is configured in tomcat 5.5 server.xml. I can get the MysqlXADataSource instance xaDs by which I can get XAConnection and XAResource. I also configured a UserTransaction which was produced by org.objectweb.jotm.UserTransactionFactory. The following is the action's code in a test web application. This action runs correctly the first time, but in the second time, it runs very slow, then reports "Lock wait timeout exceeded; try restarting transaction" error. The first question is that it seems the action did not update the table testdata's data. Did the UserTransaction ut have some error not participate in the database transaction? The second question is that I have searched this error, but don't know how to solve it. Please give me some tips. Must I not use MySQL's XA in Kandula ? Thanks. The java code (JOTM example): UserTransaction ut = null; try{ Context ctx = new InitialContext(); MysqlXADataSource xaDs = (MysqlXADataSource)ctx.lookup("java:comp/env/jdbc/myXADB"); ut = (UserTransaction)ctx.lookup("java:comp/env/UserTransaction"); XAConnection xCon = xaDs.getXAConnection(); java.sql.Connection conn = xCon.getConnection(); System.out.println("<<< beginning the transaction >>> xa con = " + conn); ut.begin(); // JDBC statements Statement stmt = conn.createStatement(); ResultSet rst = stmt.executeQuery("select id, foo from testdata"); if(rst.next()) { foo=rst.getInt(2); } System.out.println("foo = "+ foo +" (before completion)"); String sql = "update testdata set foo=" + (++foo) + " where id=1"; stmt.executeUpdate(sql);// <=== The program will wait here, and then report the error message ! ut.commit(); System.out.println("<<< committing the transaction >>>"); conn.close(); System.out.println("<<< done >>>"); }catch(Exception e) { System.out.print("DBTest >> "); e.printStackTrace(); System.out.println("<<< rolling back the transaction >>>"); try { ut.rollback(); System.out.println("rollback ok."); }catch(Exception e1){ System.out.println("rollback Error " + e1); } System.out.println("rollback end"); } } The error message: ==> xaDataSource = [EMAIL PROTECTED] <== <<< beginning the transaction >>> xa con = [EMAIL PROTECTED] foo = 29 (before completion) <<< committing the transaction >>> <<< done >>> <<< beginning the transaction >>> xa con = [EMAIL PROTECTED] foo = 29 (before completion) - set rollback only (tx=bb14:38:0:01777d30dfc9556034...986c02:) DBTest >> java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536) at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1159) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:684) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1184) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1101) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1086) at com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:840) at foo.XADBTest.init(XADBTest.java:92) at org.apache.jsp.testJotm_jsp._jspService(org.apache.jsp.testJotm_jsp:55) 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:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 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.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 or
Null XADataSource of Mysql from InitialContext in Tomcat
I have send this mail to another mail list, but have no reply yet. I have wasted much time in this problem, please help. Does MySQL5.0.18 suport XA in Tomcat 5.5 ? I do a XA test in tomcat with only one jsp file and necessary jars. The jsp is as: - <% Context ctx = new InitialContext(); com.mysql.jdbc.jdbc2.optional.MysqlXADataSource xads = new com.mysql.jdbc.jdbc2.optional.MysqlXADataSource(); xads.setServerName("localhost"); xads.setDatabaseName("test"); xads.setPortNumber(3306); XAConnection xcon = xads.getXAConnection("root","password"); Connection con = xcon.getConnection(); System.out.println("I get the correct xads and the con=" + con); System.out.println("Bind xads to InitialContext"); ctx.bind("myXADB", xads); MysqlXADataSource mysqlXADataSource = (MysqlXADataSource)ctx.lookup("myXADB"); System.out.println("Get the null MysqlXADataSource from ctx xads=" + mysqlXADataSource ); %> - Why I can only get a null mysqlXADataSource from the InitialContext ? Is this why I can not configure the XADataSource in tomcat ? Thanks. Wang Jun - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]