Re: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag
Either that classis part of a lib that must be included in your WEB-INF/lib or in your $CATALINA_HOME/lib directory or it needs to be included in your zipped up web app(.war). -Original Message- From: Brian Braun Sent: Thursday, May 19, 2011 5:16 PM To: Tomcat Users List Subject: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag Hi, I feel like a rookie, But I will ask for help on this. I will swallow my pride. I'm using Eclipe (latest version) to develop, and Tomcat 7.0.X both in development and in production. I started using JSTL1.2 today. When I run my app, I get this response: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/LoopTag org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381) org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056) org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) javax.servlet.http.HttpServlet.service(HttpServlet.java:621) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176) org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145) org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92) org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381) I already added the file jstl-impl-1.2.jar to my lib path, which is C:\EclipseTomcat7Labs\webapps\VistaControlador\WEB-INF\lib. I confirmed that when Eclipse is deploying my app, it is deloying the JST JAR. I also put this declaration on top of my JSP file: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core; % So how can that class not be found? Thanks in advace, Brian - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Fw: Tomcat manager fails and can't tell why.
From: yucca...@hotmail.com Sent: Tuesday, April 12, 2011 4:45 PM To: Tomcat Users List Subject: Tomcat manager fails and can't tell why. Hello Tomcat is playing games and I donno why. I copy my tomcat-users.xml to production and use credentials(tomcat username and password tomcat) As expected I am able to log in, but the moment I change these to more secure credentials in the xml, authentication fails. I know the xml is not meant for production authentication, but this is just to test the manager application is working before I continue with setting up rest of the server? Using version 7.05 and users.xml looks as follows: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- tomcat-users !-- NOTE: By default, no user is included in the manager-gui role required to operate the /manager/html web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- !-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove !.. .. that surrounds them. -- !-- role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- role rolename=manager-gui/ role rolename=manager-script/ user password=test roles=manager-gui, manager-script username=test/ /tomcat-users This works but changing the password to alphanumeric causes it to fail!
Re: Tomcat manager fails and can't tell why.
I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I start a new session. Are there any illegal chars when using the xml? -Original Message- From: André Warnier Sent: Tuesday, April 12, 2011 4:57 PM To: Tomcat Users List Subject: Re: Fw: Tomcat manager fails and can't tell why. Yucca Nel wrote: From: yucca...@hotmail.com Sent: Tuesday, April 12, 2011 4:45 PM To: Tomcat Users List Subject: Tomcat manager fails and can't tell why. Hello Tomcat is playing games and I donno why. I copy my tomcat-users.xml to production and use credentials(tomcat username and password tomcat) As expected I am able to log in, but the moment I change these to more secure credentials in the xml, authentication fails. I know the xml is not meant for production authentication, but this is just to test the manager application is working before I continue with setting up rest of the server? Stupid question : do you restart Tomcat after you have changed the contents of tomcat-users.xml ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
Indeed :D, Seems to be an issue when I add an ampersand to the password! -Original Message- From: David kerber Sent: Tuesday, April 12, 2011 5:07 PM To: Tomcat Users List Subject: Re: Tomcat manager fails and can't tell why. On 4/12/2011 11:04 AM, Yucca Nel wrote: I do.. :) It confuses the heck out of me. Seems to fail because I change to alphanumeric password that is longer than 4 chars long. I also make sure to close all browser tabs so that I Do you close the entire browser? I don't think just closing tabs will clear the session. D - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat manager fails and can't tell why.
Apologies, I seem to confuse myself, but am happy enough with that explanation :D I am ill with a brain tumour and trying to get back in swing of things after surgery. Prayers are welcome:D Yucca -Original Message- From: Caldarale, Charles R Sent: Tuesday, April 12, 2011 5:23 PM To: Tomcat Users List Subject: RE: Tomcat manager fails and can't tell why. From: Yucca Nel [mailto:yucca...@live.co.za] Subject: Re: Tomcat manager fails and can't tell why. Seems to be an issue when I add an ampersand to the password! Which is not an alphanumeric character, contrary to your earlier postings. Probably some escaping required when using non-alphanumeric, but I don't know the details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Maven 2 configuration for JSF2 compatible version of tomcat plugin
I was able to resolve this issue thanks to: http://stackoverflow.com/questions/3714080/tomcat-7-maven-plugin Very useful and once again indicating why maven sux... this type of docu,emtation should be expected to be found with the plugin grr -Original Message- From: Yucca Nel Sent: Thursday, April 07, 2011 3:23 PM To: Tomcat Users List Subject: Re: Maven 2 configuration for JSF2 compatible version of tomcat plugin I have managed to fix the manager application and am able to deploy war as expected through gui. However, could someone explain how the cargo plugin uses the manager? How does it find it? I don't see any documentation or examples that document explicit local server configuration. Must my local instance be running before using mvn tomcat:deploy from CLI? -Original Message- From: Yucca Nel Sent: Thursday, April 07, 2011 1:57 PM To: Tomcat Users List Subject: Maven 2 configuration for JSF2 compatible version of tomcat plugin Hello, Maven is extremely difficult to grasp when looking for appropriate documentation. My builder (IDEA) has excellent maven support and I am trying to create a JSF2/maven project I attempt to use the cargo maven plugin as documented, but it would appear that this requires me to have knowledge beforehand on how to configure my local-tomcat to be configured to be used by the plugin. Also, the tomcat 7 is not allowing me use the manager app which is deployed, but refuses the username “tomcat” and password “tomcat” although my users-xml is defined as follows: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- tomcat-users !-- NOTE: By default, no user is included in the manager-gui role required to operate the /manager/html web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- !-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove !.. .. that surrounds them. -- !-- role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- role rolename=manager-gui/ role rolename=manager-script/ user password=tomcat roles=manager-gui, manager-script username=tomcat/ /tomcat-users I get a 401 when attempting to deploy using CLI for maven, but any number of reasons could be the cause as I feel plugin documentation for cargo is incomplete. MY Pom.xml is as follows with the settings.xml ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- | This is the configuration file for Maven. It can be specified at two levels: | | 1. User Level. This settings.xml file provides configuration for a single user, | and is normally provided in ${user.home}/.m2/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -s /path/to/user/settings.xml | | 2. Global Level. This settings.xml file provides configuration for all Maven | users on a machine (assuming they're all using the same Maven | installation). It's normally provided in | ${maven.home}/conf/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -gs /path/to/global/settings.xml
Maven 2 configuration for JSF2 compatible version of tomcat plugin
Hello, Maven is extremely difficult to grasp when looking for appropriate documentation. My builder (IDEA) has excellent maven support and I am trying to create a JSF2/maven project I attempt to use the cargo maven plugin as documented, but it would appear that this requires me to have knowledge beforehand on how to configure my local-tomcat to be configured to be used by the plugin. Also, the tomcat 7 is not allowing me use the manager app which is deployed, but refuses the username “tomcat” and password “tomcat” although my users-xml is defined as follows: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- tomcat-users !-- NOTE: By default, no user is included in the manager-gui role required to operate the /manager/html web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- !-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove !.. .. that surrounds them. -- !-- role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- role rolename=manager-gui/ role rolename=manager-script/ user password=tomcat roles=manager-gui, manager-script username=tomcat/ /tomcat-users I get a 401 when attempting to deploy using CLI for maven, but any number of reasons could be the cause as I feel plugin documentation for cargo is incomplete. MY Pom.xml is as follows with the settings.xml ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- | This is the configuration file for Maven. It can be specified at two levels: | | 1. User Level. This settings.xml file provides configuration for a single user, | and is normally provided in ${user.home}/.m2/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -s /path/to/user/settings.xml | | 2. Global Level. This settings.xml file provides configuration for all Maven | users on a machine (assuming they're all using the same Maven | installation). It's normally provided in | ${maven.home}/conf/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -gs /path/to/global/settings.xml | | The sections in this sample file are intended to give you a running start at | getting the most out of your Maven installation. Where appropriate, the default | values (values used when the setting is not specified) are provided. | |-- settings xmlns=http://maven.apache.org/SETTINGS/1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd; !-- localRepository | The path to the local repository maven will use to store artifacts. | | Default: ~/.m2/repository localRepository/path/to/local/repo/localRepository -- !-- interactiveMode | This will determine whether maven prompts you when it needs input. If set to false, | maven will use a sensible default value, perhaps based on some other setting, for | the parameter in question. | | Default: true
Re: Maven 2 configuration for JSF2 compatible version of tomcat plugin
I have managed to fix the manager application and am able to deploy war as expected through gui. However, could someone explain how the cargo plugin uses the manager? How does it find it? I don't see any documentation or examples that document explicit local server configuration. Must my local instance be running before using mvn tomcat:deploy from CLI? -Original Message- From: Yucca Nel Sent: Thursday, April 07, 2011 1:57 PM To: Tomcat Users List Subject: Maven 2 configuration for JSF2 compatible version of tomcat plugin Hello, Maven is extremely difficult to grasp when looking for appropriate documentation. My builder (IDEA) has excellent maven support and I am trying to create a JSF2/maven project I attempt to use the cargo maven plugin as documented, but it would appear that this requires me to have knowledge beforehand on how to configure my local-tomcat to be configured to be used by the plugin. Also, the tomcat 7 is not allowing me use the manager app which is deployed, but refuses the username “tomcat” and password “tomcat” although my users-xml is defined as follows: ?xml version='1.0' encoding='utf-8'? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- tomcat-users !-- NOTE: By default, no user is included in the manager-gui role required to operate the /manager/html web application. If you wish to use this app, you must define such a user - the username and password are arbitrary. -- !-- NOTE: The sample user and role entries below are wrapped in a comment and thus are ignored when reading this file. Do not forget to remove !.. .. that surrounds them. -- !-- role rolename=tomcat/ role rolename=role1/ user username=tomcat password=tomcat roles=tomcat/ user username=both password=tomcat roles=tomcat,role1/ user username=role1 password=tomcat roles=role1/ -- role rolename=manager-gui/ role rolename=manager-script/ user password=tomcat roles=manager-gui, manager-script username=tomcat/ /tomcat-users I get a 401 when attempting to deploy using CLI for maven, but any number of reasons could be the cause as I feel plugin documentation for cargo is incomplete. MY Pom.xml is as follows with the settings.xml ?xml version=1.0 encoding=UTF-8? !-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -- !-- | This is the configuration file for Maven. It can be specified at two levels: | | 1. User Level. This settings.xml file provides configuration for a single user, | and is normally provided in ${user.home}/.m2/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -s /path/to/user/settings.xml | | 2. Global Level. This settings.xml file provides configuration for all Maven | users on a machine (assuming they're all using the same Maven | installation). It's normally provided in | ${maven.home}/conf/settings.xml. | | NOTE: This location can be overridden with the CLI option: | | -gs /path/to/global/settings.xml | | The sections in this sample file are intended to give you a running start at | getting the most out of your Maven installation. Where appropriate, the default | values (values used when the setting is not specified) are provided. | |-- settings xmlns=http://maven.apache.org/SETTINGS/1.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/SETTINGS/1.0.0
Re: problems at thejarbar.org
Many thanks for hepful responses my delay I reply is due to internet in afica -- From: Mark Eggers its_toas...@yahoo.com Sent: Monday, May 31, 2010 11:57 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org I think you are running into a MySQL database connection timeout. You can use a MySQL admin interface (command line, PHPAdmin, MySQL Workbench, etc.) to verify the idle connection timeout limit. There have been comments on the web concerning this. One such discussion and a solution are here: http://lists.mysql.com/java/6578 The explanation of the parameters given in the above link can be found here: http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html Based on those two references, you'll need to modify your Realm database URL: connectionURL=jdbc:mysql://localhost:3306/yucca123_thejarbarautoReconnect=truereconnectAtTxEnd=true Note, I have not tried this, so test before production. The other solution mentioned is to use a DataSource Realm. This requires you to configure a JNDI datasource describing your database connection as well as the DataSource Realm. You can add all of this information in your web application's META-INF/context.xml file if it's application-specific. If this is a host or service-based definition, then you'll have to define the JNDI resources in a GlobalNamingResources element. See the following: http://tomcat.apache.org/tomcat-6.0-doc/config/globalresources.html Note the warning that this resource will not be available to an individual web application unless you use a ResourceLink in your META-INF/context.xml file. See the globalresources link above for an example. Since you're using this connection for container managed authentication and authorization, I'm not sure why your web application would need access to this resource. However, it's 3 am, so I may have missed a few points that Chuck, Charles, or Pid will be happy to correct. To summarize - it seems the easiest fix is to add the following properties to your JDBC url: autoReconnect=true reconnectAtTxEnd=true Add them to the end of the URL, connected with ampersands. I hope this gets you up and running. . . . . . just my two cents /mde/ --- On Sun, 5/30/10, Yucca Nel yucca...@live.co.za wrote: From: Yucca Nel yucca...@live.co.za Subject: Re: problems at thejarbar.org To: Tomcat Users List users@tomcat.apache.org Date: Sunday, May 30, 2010, 9:34 AM Yes, but I am using JDBC and followed the setup step by step from tomcat docs ?xml version=1.0 encoding=UTF-8? Server port=9170 Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ GlobalNamingResources Resource auth=Container description=User database name=UserDatabase type=org.apache.catalina.UserDatabase pathname=conf/tomcat-users.xml factory=org.apache.catalina.users.MemoryUserDatabaseFactory/ /GlobalNamingResources Service name=Catalina Connector port=9670 minSpareThreads=1 address=127.0.0.1 maxThreads=50 maxSpareThreads=3 connectionTimeout=3 protocol=AJP/1.3 /Connector Engine defaultHost=thejarbar.org name=Catalina Realm className=org.apache.catalina.realm.UserDatabaseRealm/Realm className=org.apache.catalina.realm.JDBCRealm driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://localhost:3306/yucca123_thejarbar connectionName=yucca123_tom connectionPassword=myPass userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/Host appBase=/home/yucca123/public_html name=thejarbar.org Aliaswww.thejarbar.org/Alias Context path=/the_jar_bar Listener className=org.apache.catalina.startup.TldConfig/ /Context Context docBase=/usr/local/tomcat/users/yucca123/tomcat/webapps/manager path=/manager privileged=true reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ ResourceEnvRef name=users type=org.apache.catalina.UserDatabase/ /Context Context docBase=the_jar_bar path= reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ /Context /Host /Engine /Service /Server May be missing something... http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC%20Data%20Sources This error does not occur every time -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org would this help? http://tomcat.apache.org/tomcat-6.0-doc
problems at thejarbar.org
The following is becoming a common and serious problem and I am unable to find a google solution for it... I have never seen sych an error and it does not appear to be common enough to get many google hits but when it happens, no one is able to register at my site... Stck trace: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4,290,127 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3052) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3481) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:550) ... 15 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949) ... 23 more ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - Communications link failure The last packet successfully received from the server was 4,299,820 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.apache.catalina.core.ContainerBase.[Catalina].[thejarbar.org].[/].[Faces Servlet]The registration code that leads to error is as follows: Form: !--Created by IntelliJ IDEA.User: ownerDate: 02.mai.2010Time: 14:07:31To change this template use File | Settings | File Templates.--%...@page contentType=text/html language=java %%...@page pageEncoding=UTF-8%%...@taglib uri=http://java.sun.com/jsf/core; prefix=f %%@ taglib prefix=h uri=http://java.sun.com/jsf/html; %htmlheadmeta http-equiv=Content-Type content=text/html; charset=UTF-8 /titleThe jar bar:: register/title/headf:view body style=background-color:#7b68ee;margin:autodiv align=center div align=center id=headerjsp:include page=/header.jsp//div div align=center id=centred-contentstyle=border-width:3px; border-style: solid; border-color: #7fffd4;width:800pxdiv id=h1 align=centerh:outputText value=#{registerMsg.h1} style=color:white; font-family:fantasy;font-size:x-large;/ div id=p1 align=centerh:outputText value=#{registerMsg.p1} style=font-size:large;margin-bottom:5em;color:white;/ h:form/h:form/div h:formh:panelGrid columns=2 h:outputText value=*#{registerMsg.name}: style=color:yellow;/
Re: problems at thejarbar.org
Yes, but I am using JDBC and followed the setup step by step from tomcat docs ?xml version=1.0 encoding=UTF-8? Server port=9170 Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener/ Listener className=org.apache.catalina.core.JasperListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener/ GlobalNamingResources Resource auth=Container description=User database name=UserDatabase type=org.apache.catalina.UserDatabase pathname=conf/tomcat-users.xml factory=org.apache.catalina.users.MemoryUserDatabaseFactory/ /GlobalNamingResources Service name=Catalina Connector port=9670 minSpareThreads=1 address=127.0.0.1 maxThreads=50 maxSpareThreads=3 connectionTimeout=3 protocol=AJP/1.3 /Connector Engine defaultHost=thejarbar.org name=Catalina Realm className=org.apache.catalina.realm.UserDatabaseRealm/Realm className=org.apache.catalina.realm.JDBCRealm driverName=com.mysql.jdbc.Driver connectionURL=jdbc:mysql://localhost:3306/yucca123_thejarbar connectionName=yucca123_tom connectionPassword=myPass userTable=users userNameCol=user_name userCredCol=user_pass userRoleTable=user_roles roleNameCol=role_name/Host appBase=/home/yucca123/public_html name=thejarbar.org Aliaswww.thejarbar.org/Alias Context path=/the_jar_bar Listener className=org.apache.catalina.startup.TldConfig/ /Context Context docBase=/usr/local/tomcat/users/yucca123/tomcat/webapps/manager path=/manager privileged=true reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ ResourceEnvRef name=users type=org.apache.catalina.UserDatabase/ /Context Context docBase=the_jar_bar path= reloadable=true Listener className=org.apache.catalina.startup.TldConfig/ /Context /Host /Engine /Service /Server May be missing something... http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC%20Data%20Sources This error does not occur every time -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org would this help? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Common%20Problems On 5/30/2010 10:08 AM, Yucca Nel wrote: The following is becoming a common and serious problem and I am unable to find a google solution for it... I have never seen sych an error and it does not appear to be common enough to get many google hits but when it happens, no one is able to register at my site... Stck trace: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4,290,127 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3052) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3481) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:550) ... 15 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949) ... 23 more ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - Communications link failure The last packet successfully received from the server was 4,299,820 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR
Re: problems at thejarbar.org
Ok I need to keep connection open to avoid exceeption but have found this is deprecated autoReconnect=true can someone provide up to date strategy for dealing with this? -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org would this help? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Common%20Problems On 5/30/2010 10:08 AM, Yucca Nel wrote: The following is becoming a common and serious problem and I am unable to find a google solution for it... I have never seen sych an error and it does not appear to be common enough to get many google hits but when it happens, no one is able to register at my site... Stck trace: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4,290,127 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3052) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3481) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:550) ... 15 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949) ... 23 more ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - Communications link failure The last packet successfully received from the server was 4,299,820 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.apache.catalina.core.ContainerBase.[Catalina].[thejarbar.org].[/].[Faces Servlet]The registration code that leads to error is as follows: Form:!--Created by IntelliJ IDEA.User: ownerDate: 02.mai.2010Time: 14:07:31To change this template use File | Settings | File Templates.--%...@page contentType=text/html language=java %%...@page pageEncoding=UTF-8%%...@taglib uri=http://java.sun.com/jsf/core; prefix=f %%@ taglib prefix=h uri=http://java.sun.com/jsf/html; %htmlhead meta http-equiv=Content-Type content=text/html; charset=UTF-8 / titleThe jar bar:: register/title/headf:view body style=background-color:#7b68ee;margin:auto div align=center div align=center id=headerjsp:include page=/header.jsp//div div align=center id=centred-contentstyle=border-width:3px; border-style: solid; border-color: #7fffd4;width:800px div id=h1 align=center h:outputText value=#{registerMsg.h1} style=color:white; font-family:fantasy;font-size:x
Re: problems at thejarbar.org
I have found following hibernate property will this shelp? no API docs in inellij for this. Could someone explain use? -- From: Yucca Nel yucca...@live.co.za Sent: Sunday, May 30, 2010 7:53 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org Ok I need to keep connection open to avoid exceeption but have found this is deprecated autoReconnect=true can someone provide up to date strategy for dealing with this? -- From: Jeff jwi...@cox.net Sent: Sunday, May 30, 2010 5:54 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: problems at thejarbar.org would this help? http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Common%20Problems On 5/30/2010 10:08 AM, Yucca Nel wrote: The following is becoming a common and serious problem and I am unable to find a google solution for it... I have never seen sych an error and it does not appear to be common enough to get many google hits but when it happens, no one is able to register at my site... Stck trace: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet successfully received from the server was 4,290,127 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3052) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2938) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3481) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228) at org.apache.catalina.realm.JDBCRealm.getPassword(JDBCRealm.java:550) ... 15 more Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2949) ... 23 more ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - Communications link failure The last packet successfully received from the server was 4,299,820 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.hibernate.util.JDBCExceptionReporter - No operations allowed after connection closed.Connection was implicitly closed by the driver. ERROR TP-Processor6 org.apache.catalina.core.ContainerBase.[Catalina].[thejarbar.org].[/].[Faces Servlet]The registration code that leads to error is as follows: Form:!--Created by IntelliJ IDEA.User: ownerDate: 02.mai.2010Time: 14:07:31To change this template use File | Settings | File Templates.--%...@page contentType=text/html language=java %%...@page pageEncoding=UTF-8%%...@taglib uri=http://java.sun.com/jsf/core; prefix=f %%@ taglib prefix=h uri=http://java.sun.com/jsf/html; %htmlhead meta http-equiv=Content-Type content=text/html; charset=UTF-8 / titleThe jar bar:: register/title/headf:view body style=background-color:#7b68ee;margin:auto
THANK YOU ALL for help
thejarbar.org is up but has one final bug that I don't understand as this works on my development rig. I am using container managed security in two places Hello all abd thank you for all te amazing help. thejarbar.org is now up ans running /it took me a bit longer to get things working because mysql became corrupted to the point where I was unable to log in on dev rig but I worked around it with virtualbox. As a matter of interest there remains a bug that I was unable to get on top pf during development. This minor bug involves loggung out of my application where I need to refresh the page to show that the user has been logged out. The following were tried but failed redirectng from the logout action it (never redirects) currently I ask user to press button twice as this refreshes the page but not fast enough. The user is logged out on first click and I need merely to refresh the page. I noticed another message in intellij complaianing that a mysql connecton was not closed but was closed by the container to prevent a memory leak. I have look everywhere in code and have closed the connection in a finally block ehrnever it has been opened. Any idea where I should close this connection? I am using hibernate btw.
again thank you
this was my first website ever so you all deserver heaps of thank you.
Re: sneaky JDBC connection (was: THANK YOU ALL for help)
Hello and thank you... As a matter of interest there remains a bug that I was unable to get on top pf during development. This minor bug involves loggung out of my application where I need to refresh the page to show that the user has been logged out. The following were tried but failed redirectng from the logout action it (never redirects) So, what does happen if it doesn't redirect? It stays on the same page. I tried returning home from logout method to get controller to redirect but it never rendered the home page and just stayed in the current url. I also attempted to try various methods of logging out where I either used a backing method that also returned String after invalidating the session or a hardcoded redirect myself inside the backing bean with the JDBC driver, the message does not appear in tomcat logs but I googled anf found something similar A web application registered the JBDC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. I found one place I was not closing connection :p } - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:438) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:271) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: Cannot find FacesContext at javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855) at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1672) at org.apache.jsp.oops_jsp._jspx_meth_f_005fview_005f0(oops_jsp.java:93) at org.apache.jsp.oops_jsp._jspService(oops_jsp.java:67) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) ... 22 more The way I read it is that my user has some privileges denied and I keep tring to create a new user each time and get same exceptions! Each time the new user is given all privileges. -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:19 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please here is copy of email sent from hosting provider ... Dear Customer, We see no permisson problems with your database: # mysql --database=yucca123_thejarbar --user=yucca123_hiber --password=myPass Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10872472 Server version: 5.0.90-community MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql select * from usercomments; Empty set (0.00 sec) Please doublecheck your application configuration and make sure that you're using correct database login info. Also please note that Tomcat restart is required after each configuration update. Let us know if there any questions we can help you with, or confirm that we may close this ticket. Best regards, DailyRazor TechSupport Team. Ticket Details === Ticket ID: IWI-526778 Department: Technical Support Dept. Priority: High Status: Waiting for confirmation -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please there is no cli for myswl using cpanel. Only php mysql admin and I know I am using the credentials provided when I created the user in php admin -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:10 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:00 PM, Yucca Nel yucca...@live.co.za wrote: The credentials I am providing sre 100% correct Not according to the log file you sent. Are you saying that you have successfully logged in to MySQL from the command line on the server using those credentials? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr
Re: stuck confused an need help please
Hello and thank you, one user (yucca123_tom) for container managed security for tomcat and another for my application using hibernate (yucca123_hiber) I keep making sure that I provide ALL privileges and correct credentials in metedata but see same results? I know what the exception is saying but I can only swear that I am providing correct credentials. -- From: Bob Hall rfha...@yahoo.com Sent: Tuesday, May 25, 2010 9:15 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please --- On Mon, 5/24/10 at 11:52 PM, Yucca Nel yucca...@live.co.za wrote: Could someone please help me understand what thia stack trace is saying? catalina.log File Type: ASCII English text, with very long lines INFO main org.apache.catalina.startup.Catalina - Initialization processed in 875 ms INFO main org.apache.catalina.core.StandardService - Starting service Catalina INFO main org.apache.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/6.0.20 ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) There is leading white space in the user name: ' yucca123_tom'. There are also errors in your DDL SQL that will need to be fixed after your app is able to connect to the DB. ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - ALTER command denied to user 'yucca123_hiber'@'localhost' for table 'usercomments' ERROR TP-Processor2 org.hibernate.util.JDBCExceptionReporter - SELECT command denied to user 'yucca123_hiber'@'localhost' for table 'usercomments' Don't know why there are two DB users in play: yucca123_tom and yucca123_hiber Apparently, the latter was able to connect to MySQL but could not access a table. Are you sure the table exists? Did you grant select on the table to yucca123_hiber? - Bob - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
hello and than you. I will spend next few hours fixing this. I need to fix hibernate catalog too as it is still trying to create tables in my test datatabase probably because catalogs are defined for test database in entity hbm.xml mappings? Do these mappings ususally go in the WEB-INF classes directory or can I put them with other metadata directly in WEB-INF? I am not too sure on the username being incorrect for my credentials defined in xml as I made sure to check for trailing and leading whitespace but will look again.I will also fix the error handle and path to error page Better get to work and many thanks ... :) From: Mark Eggers its_toas...@yahoo.com Sent: Tuesday, May 25, 2010 12:26 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please OK - I have a huge message that I'm going to cut and paste into this one, rather than finding the original and editing it online. I'm going to edit in place and try to point out some issues. I'll ask some questions along the way. I am trying to tweak my web application at thejarbar.org to be bug free. Currrntly here is an issue whn clicking the tutorials button as you can view in your browser. I am getting some kind of exceptions as ell listed in the following stack trace and don't know how to osolve after days of trying. I have been getting mysql SELECT privilege denied exception even though user has all access to database. code deleted . . . although I recommend reworking in with try, catch, and finally blocks. Otherwise you WILL have connection leaks. As a first timer I would likw to know how a typical hibernate webapp is moved from development to production please have a look at the page if you have the time Use the same database names in both cases. Unfortunately, the URL will be different. One way is to parametrize your build to use different hibernate.cfg.xml files. You could also use Ant and appropriate build.properties files. Finally, you could spend some time with Maven. here is a log of all errors related to clicking that link ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) This looks like you cannot even connect. As others have pointed out, there is a space in front of the user name. I'm also a bit confused here. You say (further down or in another message), that you have the JDBC driver in your WEB-INF/lib folder, but this looks like you are using Tomcat's database pooling? If you're using Tomcat's database pooling, do not put the driver jars in WEB-INF/lib. If you're using Hibernate to control the connections, then don't put the driver jars in Tomcat's lib. See this link for a complete explanation of how to set everything up. http://wiki.apache.org/tomcat/TomcatHibernate The only way I was able to sort of reproduce your error was by changing the attribute resource=username in my context.xml file to resource= username. Adding a space to the username property in hibernate.cfg.xml caused no error. Fix your configuration files here. INFO main org.apache.catalina.core.StandardContext - The listener com.sun.faces.config.ConfigureListener is already configured for this context. The duplicate definition has been ignored. INFO main org.apache.catalina.core.StandardContext - The listener com.sun.faces.config.ConfigureListener is already configured for this context. The duplicate definition has been ignored. Are you using the database login ID to create tables? This is a very dangerous practice. One slip concerning SQL injection and you'll have a completely destroyed database. ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table jarbartest.user_roles (user_name varchar not null, role_name varchar not null, primary key (user_name, role_name)) Fix your HQL ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null, role_name varchar not null, primary key (user_name, role_name))' at line 1 ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table jarbartest.usercomments (commentID int unsigned not null, commentMade varchar not null, dateMade datetime not null, flagged bit not null, page_id varchar not null, made_by varchar(20) not null, primary key (commentID)) Fix your HQL ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null, dateMade datetime not null, flagged bit not null, page_id varchar not ' at line 1 ERROR TP-Processor2 org.hibernate.tool.hbm2ddl.SchemaUpdate - Unsuccessful: create table jarbartest.users (user_name varchar not null, first_name
virtualbox processors
anyone care to enlighten me if the amount of processors assigned to guest in virtualbox go according to virtual or not? IOW does assigning 2 processors mean that I am assigning 2 cores or 2 virtual cores? In a quad core what ia optimal for a guest? Many many thanks and didn't mean to post this here but this list seem very clued up
Re: stuck confused an need help please
yes but I don't know why access I being denied? The credentials I am providing sre 100% correct sn the database user has ALL privileges so could anyone perhaps think o a possible reason why I am getting these errors? I have confirmed with hosting provider that user exists and credentials are correct and they also appear to be lost. I am using correct myswl driver located in WEB-INF/lib -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 8:53 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 11:37 AM, Yucca Nel yucca...@live.co.za wrote: I have been getting mysql SELECT privilege denied exception even though user has all access to database. There would seem to be a contradiction between the above statement and the first error in your log example :-) ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) I would try to fix that first, personally... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
I forgot to mention I am using myswl 5, and tomcat 6 -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:00 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please yes but I don't know why access I being denied? The credentials I am providing sre 100% correct sn the database user has ALL privileges so could anyone perhaps think o a possible reason why I am getting these errors? I have confirmed with hosting provider that user exists and credentials are correct and they also appear to be lost. I am using correct myswl driver located in WEB-INF/lib -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 8:53 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 11:37 AM, Yucca Nel yucca...@live.co.za wrote: I have been getting mysql SELECT privilege denied exception even though user has all access to database. There would seem to be a contradiction between the above statement and the first error in your log example :-) ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) I would try to fix that first, personally... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
Perhaps the real issue herw for mr personally (and I hope anyone using dailyrazor) could answer if it's normal to not be able to use mysql in a production environment where I DON't have to have my dailyrazor username prepended to everything related in mysql? Is this a norm in prodyction environments because I can not configure mysql to mimic my development environment because every name on the server has a stupid name prepended to it. -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:06 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please I forgot to mention I am using myswl 5, and tomcat 6 -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:00 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please yes but I don't know why access I being denied? The credentials I am providing sre 100% correct sn the database user has ALL privileges so could anyone perhaps think o a possible reason why I am getting these errors? I have confirmed with hosting provider that user exists and credentials are correct and they also appear to be lost. I am using correct myswl driver located in WEB-INF/lib -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 8:53 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 11:37 AM, Yucca Nel yucca...@live.co.za wrote: I have been getting mysql SELECT privilege denied exception even though user has all access to database. There would seem to be a contradiction between the above statement and the first error in your log example :-) ERROR main org.apache.catalina.core.ContainerBase.[Catalina] - Exception opening database connection java.sql.SQLException: Access denied for user ' yucca123_tom'@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) I would try to fix that first, personally... -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
there is no cli for myswl using cpanel. Only php mysql admin and I know I am using the credentials provided when I created the user in php admin -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:10 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:00 PM, Yucca Nel yucca...@live.co.za wrote: The credentials I am providing sre 100% correct Not according to the log file you sent. Are you saying that you have successfully logged in to MySQL from the command line on the server using those credentials? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
Oh and my hosting provider sent me a snipped of the cli where they logged in with my credentials so that is not the issue -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please there is no cli for myswl using cpanel. Only php mysql admin and I know I am using the credentials provided when I created the user in php admin -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:10 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:00 PM, Yucca Nel yucca...@live.co.za wrote: The credentials I am providing sre 100% correct Not according to the log file you sent. Are you saying that you have successfully logged in to MySQL from the command line on the server using those credentials? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
here is copy of email sent from hosting provider ... Dear Customer, We see no permisson problems with your database: # mysql --database=yucca123_thejarbar --user=yucca123_hiber --password=myPass Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10872472 Server version: 5.0.90-community MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql select * from usercomments; Empty set (0.00 sec) Please doublecheck your application configuration and make sure that you're using correct database login info. Also please note that Tomcat restart is required after each configuration update. Let us know if there any questions we can help you with, or confirm that we may close this ticket. Best regards, DailyRazor TechSupport Team. Ticket Details === Ticket ID: IWI-526778 Department: Technical Support Dept. Priority: High Status: Waiting for confirmation -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please there is no cli for myswl using cpanel. Only php mysql admin and I know I am using the credentials provided when I created the user in php admin -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:10 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:00 PM, Yucca Nel yucca...@live.co.za wrote: The credentials I am providing sre 100% correct Not according to the log file you sent. Are you saying that you have successfully logged in to MySQL from the command line on the server using those credentials? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
Perhapa somwonw can recommend me another hosting provider (will gladly refer them) and one where they don't add silly prefix names o everything done in mysql? -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:19 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please here is copy of email sent from hosting provider ... Dear Customer, We see no permisson problems with your database: # mysql --database=yucca123_thejarbar --user=yucca123_hiber --password=myPass Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10872472 Server version: 5.0.90-community MySQL Community Edition (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql select * from usercomments; Empty set (0.00 sec) Please doublecheck your application configuration and make sure that you're using correct database login info. Also please note that Tomcat restart is required after each configuration update. Let us know if there any questions we can help you with, or confirm that we may close this ticket. Best regards, DailyRazor TechSupport Team. Ticket Details === Ticket ID: IWI-526778 Department: Technical Support Dept. Priority: High Status: Waiting for confirmation -- From: Yucca Nel yucca...@live.co.za Sent: Monday, May 24, 2010 9:14 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please there is no cli for myswl using cpanel. Only php mysql admin and I know I am using the credentials provided when I created the user in php admin -- From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:10 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:00 PM, Yucca Nel yucca...@live.co.za wrote: The credentials I am providing sre 100% correct Not according to the log file you sent. Are you saying that you have successfully logged in to MySQL from the command line on the server using those credentials? -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: stuck confused an need help please
aplogies there are 2 users and both credentials are configured correct one for hibernate and one for tomcat what I maen is that my dailyraor username is eg. and everything in mysql gets prepended with xxx like xxx_mydatabase xxx_myusername xxx_mytable From: Hassan Schroeder hassan.schroe...@gmail.com Sent: Monday, May 24, 2010 9:23 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: stuck confused an need help please On Mon, May 24, 2010 at 12:11 PM, Yucca Nel yucca...@live.co.za wrote: Perhaps the real issue herw for mr personally (and I hope anyone using dailyrazor) could answer if it's normal to not be able to use mysql in a production environment where I DON't have to have my dailyrazor username prepended to everything related in mysql? I have utterly no idea what you're talking about now. there is no cli for myswl using cpanel. You don't have SSH access to your server? Good luck debugging, then; I would never use a hosting provider like that. Oh and my hosting provider sent me a snipped of the cli where they logged in with my credentials so that is not the issue Again, not what the log file is saying. Which, BTW, assuming is a straight copy/paste, includes an interesting space at the front of this ' yucca123_tom'@'localhost' string, which *ALSO* doesn't match the user name in your final example: # mysql --database=yucca123_thejarbar --user=yucca123_hiber -- Hassan Schroeder hassan.schroe...@gmail.com twitter: @hassan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: HELP with my first webapp thats live!
Yes you idiot it's easy to point me to google to google for a jsf tutorial. wELL they are all broken as is tomcat. During development I tested a hundred times and it worked on my machine. I used relativ links through combinations of command links and outputlinks and they still work. But online my app is throwing 404 errors. I understand that jsf by default does a forward and therefore any new request by default is done from the same browser context as the last request. I have tried doing redirects in fsces config using redirect tag as many tutorials show and still get 404 errors so you can keep http://www.lmgtfy.com/?q=jsf+tutorial because the information I find there is not helping. -- From: André Warnier a...@ice-sa.com Sent: Wednesday, May 19, 2010 11:37 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: HELP with my first webapp thats live! Yucca Nel wrote: I am waiting on a book I ordered a while ago related = to JSF but they take about a month to get here from Amazon. Try this : http://www.lmgtfy.com/?q=jsf+tutorial - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Keeping tomcat up-to-date on linux
Here is th most basic layout of my table banner that uses outputlink tgs. on my development rig each link works 100% each time I click it. %@ taglib prefix=h uri=http://java.sun.com/jsf/html; % %@ taglib prefix=f uri=http://java.sun.com/jsf/core; % %-- Created by IntelliJ IDEA. User: owner Date: 26.apr.2010 Time: 19:46:00 To change this template use File | Settings | File Templates. --% %@ page contentType=text/html;charset=UTF-8 language=java % f:subview id=header div align=center h:form table id=Table_01 width=800 height=200 border=0 cellpadding=0 cellspacing=0 tr td colspan=9 h:outputLink value=/pages/welcome.jsf title=#{hmsg.mainHomeLink} h:graphicImage url=/images/main-home.gif width=800 height=158 alt=#{hmsg.brokenImage} style=border-style:none/ /h:outputLink /td /tr tr td colspan=9 h:graphicImage url=/images/jarbar-banner_02.png width=800 height=3 alt=//td /tr tr td colspan=3 h:graphicImage url=/images/jarbar-banner_03.png width=227 height=1 alt=//td td rowspan=2 h:outputLink value=/pages/tutorials/tutorials.jsftitle=#{hmsg.tutorialLink} h:graphicImage url=/images/tutorials.gif width=161 height=33 alt=#{hmsg.brokenImage}style=border-style:none/ /h:outputLink/td td colspan=5 h:graphicImage url=/images/jarbar-banner_05.png width=412 height=1 alt=#{hmsg.brokenImage}//td /tr tr td rowspan=2 h:graphicImage url=/images/jarbar-banner_06.png width=31 height=38 alt=#{hmsg.brokenImage}//td td rowspan=2 h:outputLink title=#{hmsg.mainHomeLink} value=/pages/welcome.jsf h:graphicImage url=/images/home.gif width=160 height=38 alt=#{hmsg.brokenImage}style=border-style:none/ /h:outputLink/td td rowspan=2 h:graphicImage url=/images/jarbar-banner_08.png width=36 height=38 alt=#{hmsg.brokenImage}//td td rowspan=2 h:graphicImage url=/images/jarbar-banner_09.png width=35 height=38 alt=#{hmsg.brokenImage}//td td h:outputLink value=/links.jsftitle=#{hmsg.linksLink} h:graphicImage url=/images/downloads.gif width=154 height=32 alt=#{hmsg.brokenImage}style=border-style:none/ /h:outputLink /td td rowspan=2 h:graphicImage url=/images/jarbar-banner_11.png width=28 height=38 alt=#{hmsg.brokenImage}//td td h:outputLink value=/pages/user/secure/contact.jsf h:graphicImage url=/images/contact.png width=173 height=32 alt=#{hmsg.brokenImage}style=border-style:none/ /h:outputLink/td td rowspan=2 h:graphicImage url=/images/jarbar-banner_13.png width=22 height=38 alt=#{hmsg.brokenImage}//td /tr tr td h:graphicImage url=/images/jarbar-banner_14.png width=161 height=6 alt=#{hmsg.brokenImage}//td td h:graphicImage url=/images/jarbar-banner_15.png width=154 height=6 alt=#{hmsg.brokenImage}//td td h:graphicImage url=/images/jarbar-banner_16.png width=173 height=6 alt=#{hmsg.brokenImage}//td /tr /table/h:form /div /f:subview If I change to the following with fqces config as follows: ?xml version='1.0' encoding='UTF-8'? faces-config xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd; version=1.2 application locale-config default-localeen/default-locale supported-localeno/supported-locale /locale-config resource-bundle base-nameorg.bar.jar.view.resources.messages.header_messages/base-name varhmsg/var /resource-bundle resource-bundle
HELP with my first webapp thats live!
I am waiting on a book I ordered a while ago related = to JSF but they take about a month to get here from Amazon. During = development my application contained no bugs during user case testing.I = am now seeing issues related to a graphic table banner that uses a few = commandlink jsf tags that take (or are meant to) users to various areas = of my site. The problem is I get a 404 when interacting with the image = links and my suspicions aree that the root cause is due to 2 reasons = possibly: 1) commandlink does not start a new request thereby causing the url to = be appended to existing url making it incorrect. 2) I am having to deploy an exploded war because my hosting provider = fails to see that I simply can not upload my war and start it. any suggestions as to why this is happening? The code behind this = is=20 h:form table id=3DTable_01 width=3D800 height=3D200 border=3D0 cellpadding=3D0 = cellspacing=3D0 tr td colspan=3D9 h:commandLink action=3Dhome = title=3D#{hmsg.mainHomeLink} h:graphicImage = url=3D/images/main-home.gif width=3D800 height=3D158 alt=3D#{hmsg.brokenImage} = style=3Dborder-style:none/ /h:commandLink /td /tr tr td colspan=3D9 h:graphicImage = url=3D/images/jarbar-banner_02.png width=3D800 height=3D3 = alt=3D//td /tr tr td colspan=3D3 h:graphicImage = url=3D/images/jarbar-banner_03.png width=3D227 height=3D1 = alt=3D//td td rowspan=3D2 h:commandLink = action=3Dtutorialstitle=3D#{hmsg.tutorialLink} h:graphicImage = url=3D/images/tutorials.gif width=3D161 height=3D33 = alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/ /h:commandLink/td td colspan=3D5 h:graphicImage = url=3D/images/jarbar-banner_05.png width=3D412 height=3D1 = alt=3D#{hmsg.brokenImage}//td /tr tr td rowspan=3D2 h:graphicImage = url=3D/images/jarbar-banner_06.png width=3D31 height=3D38 = alt=3D#{hmsg.brokenImage}//td td rowspan=3D2 h:commandLink title=3D#{hmsg.mainHomeLink} = action=3Dhome h:graphicImage url=3D/images/home.gif = width=3D160 height=3D38 = alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/ /h:commandLink/td td rowspan=3D2 h:graphicImage = url=3D/images/jarbar-banner_08.png width=3D36 height=3D38 = alt=3D#{hmsg.brokenImage}//td td rowspan=3D2 h:graphicImage = url=3D/images/jarbar-banner_09.png width=3D35 height=3D38 = alt=3D#{hmsg.brokenImage}//td td h:commandLink = action=3Dlinkstitle=3D#{hmsg.linksLink} h:graphicImage = url=3D/images/downloads.gif width=3D154 height=3D32 = alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/ /h:commandLink /td td rowspan=3D2 h:graphicImage = url=3D/images/jarbar-banner_11.png width=3D28 height=3D38 = alt=3D#{hmsg.brokenImage}//td td h:outputLink = value=3D/pages/user/secure/contact.jsf h:graphicImage = url=3D/images/contact.png width=3D173 height=3D32 = alt=3D#{hmsg.brokenImage}style=3Dborder-style:none/ /h:outputLink/td td rowspan=3D2 h:graphicImage = url=3D/images/jarbar-banner_13.png width=3D22 height=3D38 = alt=3D#{hmsg.brokenImage}//td /tr tr td h:graphicImage = url=3D/images/jarbar-banner_14.png width=3D161 height=3D6 = alt=3D#{hmsg.brokenImage}//td td h:graphicImage = url=3D/images/jarbar-banner_15.png width=3D154 height=3D6 = alt=3D#{hmsg.brokenImage}//td td h:graphicImage = url=3D/images/jarbar-banner_16.png width=3D173 height=3D6 = alt=3D#{hmsg.brokenImage}//td /tr /table/h:form =20 where the actions directly linked to the respective pages in = facesconfig.xml more specifically, if I am currently on url/welcome.jsf and click home I = get 404 as
help with hibernate (Iknow it's off topic)
but the following forums seem dead. I am horrified by the following code causing a untime exception because I want to make sure hibernate session is closed but even though the session is null, it appears to be open still? finally { if(session!=null){ session.close(); } } /I don't want a memory leak but it appears that the following exception is thrown with the above code... root cause org.hibernate.SessionException: Session was already closed org.hibernate.impl.SessionImpl.close(SessionImpl.java:302) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342) $Proxy0.close(Unknown Source) org.bar.jar.model.UserManagerBean.getAllEntities(UserManagerBean.java:120) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) javax.el.BeanELResolver.getValue(BeanELResolver.java:62) javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54) com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72) org.apache.el.parser.AstValue.getValue(AstValue.java:123) org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101) javax.faces.component.UIData.getValue(UIData.java:614) javax.faces.component.UIData.getDataModel(UIData.java:1145) javax.faces.component.UIData.setRowIndex(UIData.java:451) com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:77) javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:813) javax.faces.component.UIData.encodeBegin(UIData.java:983) javax.faces.component.UIComponent.encodeAll(UIComponent.java:928) javax.faces.render.Renderer.encodeChildren(Renderer.java:148) javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837) javax.faces.component.UIComponent.encodeAll(UIComponent.java:930) javax.faces.component.UIComponent.encodeAll(UIComponent.java:933) com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266) com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) javax.faces.webapp.FacesServlet.service(FacesServlet.java:266) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.
link for tomcat image to be used in hyperlink image?
Are there any tomcat images that I can use to link to apache tomcat?
Re: error-page exception-type subclasses of RuntimeException are not handled
I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: error-page exception-type subclasses of RuntimeException are not handled
I thought I would like to add to thepoint I am trying to make, I am using hibernate validation API and get big fat runtime exceptions if the validation API fails a check on a field that has certain validations like length etc. These excceptions are avoidable (some of them) from the point that the data is entered snd I can ask user for correct data (or more reasonable data) Lets say I have an email field in UserEntity as follows @Email public String getUserEmail() { return userEmail; } It is the job of the business layer to 1 decide on valid emails (like we only accept hotmail) if such logic applies) and it is the job of the view to find incorrect emails as soon as possible to avoid an expensive rountrip for the sake of a user using the application. -- From: Yucca Nel yucca...@live.co.za Sent: Wednesday, May 12, 2010 9:03 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: error-page exception-type subclasses of RuntimeException are not handled I am not too sure on this, but it could be because runtime exceptions are usually avoidable and perhaps therefore you need to deal with such errors beforehand(higher up in the stack) and throw custom exceptions. It doesn't sound like good coding standards(what you are doing anyway). If you are using JSF you can usefrom-outcome to control views for user error to redirect them to error page. -- From: bryan jacobs bryancjac...@hotmail.com Sent: Wednesday, May 12, 2010 12:56 AM To: users@tomcat.apache.org Subject: error-page exception-type subclasses of RuntimeException are not handled Tomcat Version: apache-tomcat-6.0.26 JDK: jdk1.6.0_19 OS: Windows XP Service Pack 2 I am using the page-error element in my web.xml with the exception-type element which contains a subclass of RuntimeException. When I subclass RuntimeException the location element which specifies my error-page to land on in the event that exception is raised is not displayed. web.xml snippet: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page Where LuaSecurityException extends RuntimeException When my JAX-RS method throws the LuaSecurityException the error.html is NOT displayed. However, if I change the above configuration to: error-page exception-typejava.lang.RuntimeException/exception-type location/error.html/location /error-page and have my class throw a RuntimeException then the error.html page is displayed. Finally if I change the web.xml to: error-page exception-typejava.lang.Exception/exception-type location/error.html/location /error-page and my jax-rs class throws a LuaSecurityException extends RuntimeException then my error.html is displayed. What I would like to do is: error-page exception-typeorg.lds.lua.directory.exception.LuaSecurityException/exception-type location/error.html/location /error-page That way I can create various RuntimeException subclasses which are appropriate for my application and handle them with specific error pages. Any help would be appreciated. If you need more information please let me know. Bryan _ Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to invalidate a user session properly?
Currently I need to fire my jsf command button twice to get the logic behind it to invalidate the session correctly as follows: public String logout(ActionEvent ae) throws IOException, ServletException { HttpServletRequest req= (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); req.getSession(false).invalidate(); return home; the backing bean is request scope and I though that that may have been the issues. I would like to add that simply changing the mthod to one for a simple action and not actionListener makes no difference. Here is where the button is called... h:commandButton rendered=#{request.userPrincipal!=null} actionListener=#{logoutForm.logout} value=#{uOptMsg.logOut}/h:commandButton tomcat 6 being used.
adding transport gauruntee ti web.xml issues
In tomcat 6 I am bringing down the container when asking for confidential RESOURCE. iS THERE A REASON FOR THIS? CONTAINER AND RESOURCE WORK FINE LIKE THIS... security-constraint web-resource-collection web-resource-nameloggedInUser/web-resource-name url-pattern/pages/user/secure/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameRegisteredUser/role-name /auth-constraint /security-constraint But fail when configured like this... /security-constraint security-constraint web-resource-collection web-resource-nameAdminArea/web-resource-name url-pattern/pages/admin/*/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-nameAdmin/role-name /auth-constraint user-data-constraint transport-guaranteeCONFIDENTIAL/transport-guarantee /user-data-constraint /security-constraint
invalidate a session twice to log out user? Why?
My command button only logs out the user on a secondt click, is there a reason? I am using tomcat 6 as follows: jsf... h:commandButton rendered=#{request.userPrincipal!=null} action=#{logoutForm.logout} value=#{uOptMsg.logOut}/h:commandButton and in my backing bean ... public String logout() throws IOException, ServletException { ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext(); HttpServletRequest request = (HttpServletRequest)ectx.getRequest(); HttpServletResponse response = (HttpServletResponse)ectx.getResponse(); request.getSession(false).invalidate(); return home; } is there another wway to invalidate the session created by tomcat to represesnt a logged in user?
Re: Tomcat and openjpa javaagent
geronumolibs need a jee container to function otherwise the classes will never be instantiated. Use hibernate as a possible workaround -- From: n0weak n0w...@gmail.com Sent: Monday, May 10, 2010 11:57 AM To: users@tomcat.apache.org Subject: RE: Tomcat and openjpa javaagent Try putting that jar into Tomcat's bin directory instead. It must be available to the system classloader, not Tomcat's common classloader. This had no effect. Tomcat in startup script sets the CLASSPATH variable to $CATALINA_HOME/bin/bootstrap.jar, so i tried to modify it in catalina.sh to $CATALINA_HOME/bin/commons-lang-2.3.jar. Now tomcat starts, but when launching my application I'm getting more exceptions, first: Caused by: NoClassDefFoundError: javax/persistence/spi/PersistenceProvider I've added geronimo-jpa_3.0_spec-1.0.jar and then I got Caused by: java.lang.ClassNotFoundException: javax.transaction.Synchronization so it asks me for a bunch of libs from my WEB-INF/lib directory. And finally JVM says it is unable to load classes from my app. So i think it is not a right way to fix my problem) Hoping for your help! -- View this message in context: http://old.nabble.com/Tomcat-and-openjpa-javaagent-tp28506406p28509633.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
jsf FORM based login?
Can this be done? What values I use in the form so that security sevlrt find values it needs? Additionally, is there a way to access the bean in tomcat that stores the user sessions so I can do an EL to display current logged in user by user name? I am using tomcat 6 and jsf 1.2 Many thanks
Almost figured out how to satisfy container and managed bean login.
I have a double login requirement because I need some finer detals that tomcst's container authentication does not seem to provide. I need a way to atore username in business logic scope when logged in (mainly just the username) my current solution is not working as follows: I submit action to backing method which is coded in the jsf as follows in the login page: f:view body style=background-color:#7b68ee;margin:auto div align=center id=headerjsp:include page=/header.jsp//div div align=center div align=center id=centred-contentstyle=border-width:3px; border-style: solid; border-color: #7fffd4;width:800px div id=h1 align=center h:outputText value=#{loginMsg.h1}... style=color:white; font-family:fantasy;font-size:large;/br h:outputText value=#{loginMsg.h2}... style=color:white; font-family:fantasy;font-size:large;//div div align=center h:form h:panelGrid columns=2 h:outputText value=#{registerMsg.userName}: style=color:yellow;/ h:inputText id=j_username value=#{loginForm.username} title=#{registerMsg.userNameTitle}required=true f:validateLength maximum=20 minimum=6/ h:outputText value=#{registerMsg.password}: style=color:yellow;/ h:inputSecret id=j_passwword value=#{loginForm.password} title=#{registerMsg.passwordTitle}required=true /h:inputSecret /h:panelGrid h:commandButton action=#{loginForm.confirmCredentials} value=#{loginMsg.login}style=color:#20b2aa; / br /h:form then in loginForm.java I have the method coded as follows to set my managed bean and hopefuly dispatch on continer needed login credentials. public String confirmCredentials() throws IOException, ServletException { UserSession userSession = (UserSession)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(userSession); if (UserManagerBean.confirmLogin(username, password)) { UsersEntity user = UserManagerBean.findUser(username); userSession.setCurrentUser(user); return home; } FacesMessage message = new FacesMessage(); message.setSummary(Login Error); message.setDetail(Unable to log you in - + username and password combination not found.); message.setSeverity(FacesMessage.SEVERITY_WARN); FacesContext.getCurrentInstance().addMessage(null,message); ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext(); HttpServletRequest request = (HttpServletRequest)ectx.getRequest(); HttpServletResponse response = (HttpServletResponse)ectx.getResponse(); RequestDispatcher dispatcher = request.getRequestDispatcher(j_security_check); dispatcher.forward(request,response); return null; } it never reaches the j_security check servlet anyone know why? The method works fine when called from outside containers security context defined around the page request.
how does declaritive xml security work?
I am finishing up my wb app and am wondering if I will have to manually add my user riles to users.xml? This is not verbose for me as I am aware how the mappings work but would like to know if this is the norm? I am thinking along the lines of: 1) I mus log in as admin and view table of all users and the user names and passwords that they have chosen. 2) Then assign these credentials to users in certain roles in users.xml. Does this sound correct? How can I do a put request in jsf to update my users.xml in Web-INF?
help with hosting options and security
I need some help in understanimg how I will set up container managed security with a host? The tomcat security examples all require that I modify serve.xml but how will I do this in production? As a bonus can anyone recommend a host with loads od support as this will be my first live webapp? (one with domain registration Ta
interesting dillemma with h:inputsecret
it would appear that the entity ben that sets the password entered into this form tag may not accept a String as it's param as I keep getting illegal argument exception. Can anyoe advise on how I rectify? -- From: André Warnier a...@ice-sa.com Sent: Wednesday, May 05, 2010 11:57 AM To: Tomcat Users List users@tomcat.apache.org Subject: Re: Log4j logging doesn't work when a web application is moved outside Tomcat/webapps directory That was a nice and concise write-up, well-worth of an article in the Tomcat FAQ/WIKI. How to setup Tomcat with 3 virtual hosts, each with its own homepage and Manager (and other) applications, and its own logfiles. My only minor remark : Mark Eggers wrote: ... Finally for my setup, I added 127.0.0.1 foo and 127.0.0.1 bar to my hosts file in WINNT\system32\drivers\etc (this is an upgraded Windows/2000 Professional machine). Upon starting up this mess, /***/ all three hosts were visible at localhost:8080, foo:8080, and bar:8080 as you would expect. At the /***/, I would insert from a browser running on the same machine. Nothing to do with Tomcat really, but there are still quite a number of people out there confused by hostname lookup and IP routing stuff. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Hibernate validator in webapp?
Anyone can explain if I can use hibernate validator in tomcat 6 webapp? Current use case tests are not failing using validator annotations but is it because it will only work in EE container?
JPA privider in tomcat wbapp
I wish to use JPA RESOURCE _LOCAL in my tomcat webapp, does tomcat have a default JPA provider I can use in perssistence.xml?
please hwlp with hibernate strategy
I am planning on using hibernate (1st time) in tomcat webapp. It would appear that it is common to use hibernate util class to load the session factory but I have yet to see this done using Servlet ContextListener. I have also only seen very bad example where someone used hibernate directly in their model instead of using it as part of a DAO façade. The following example is half finished from netbeans too:http://netbeans.org/kb/docs/web/hibernate-webapp.html Can someon point met to full MVC example with hibernate. I am only interested in seeing the bsckend examples really and would any of you recommend using hibernate directly in a model business class?
h:outputlink faulty?
I ask because new requests are nor bebing created yet yesterday they were. Lots of errors today if mwnu banner gets clicked twice. I wa under impression that outpitlink started a new request?
Re: jsp/tomcat and linux
Hello, I am busy doing a personal website where I plan to showcase how to setup the iltmate portable Java development environment. Tomcat an jboss are no doubt the best server implementations I can write up a few opinions on major advantages of tomcat an JSP or JSF and even go one better if you would like. I am however a junior DEV but know my stuff. regards, Yucca -- From: Mitch Frazier mi...@linuxjournal.com Sent: Friday, April 30, 2010 9:16 PM To: users@tomcat.apache.org Subject: jsp/tomcat and linux I'm an associate editor at Linux Journal magazine and we have an upcoming issue on web development (due June 7th) and I'm looking for somebody who would be interested in writing an article about using Tomcat/JSP on Linux. What would be nice is someone that has also used more traditional Linux technologies (PHP, Python, etc) for web development and could offer up some of the advantages that Java et. al. bring to the table. -- Mitch Frazier Associate Editor/Web Editor, Linux Journal http://www.linuxjournal.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
getting servlet context in JSF?
Hello, is it possible to gain access to servletcontext from JSP using faces or servlet EL? I need to gain access to resources in WEB-INF and creating a servlet is too verbose if there is an existing mechanism to get resource using faces or servlet expression language. regards, Yucca
should I serialize?
In my first appliaction that would like to go live, II would like to know if my webapp needs serialization as I plan to have everything in a single war an deployed on tomcat with hosting provider. This does not sound like a case where objects will be serialized there will however be a RDBMS.
conflict in var name with jsf includes?!
Is it poillegal to use same bundle var in an included jsf fragment because it seems to result in unrendred text when doing so?
Re: Classpath for JSP
Try ensuring that no conflicts from duplicate libs in WEB-INF/lib sometimes libs are already provided by container and container will not be able to resolve which of the libs to use. -- From: Tobias Crefeld t...@cataneo.eu Sent: Monday, April 26, 2010 8:15 PM To: users@tomcat.apache.org Subject: Re: Classpath for JSP Am Mon, 26 Apr 2010 13:22:49 -0400 schrieb Reuven Koblick reu...@koblick.com: I verified that the class that was not found is indeed in /WEB-INF/classes. Also, classes in *.jar files in WEB-INF/lib are found. Does anyone have any thoughts or suggestions? Maybe wrong rights for directories or files in the classes-directory? Is the class at the correct place within the directory tree compared to the class-hierarchy? What does catalina.out report exactly? There is a nice management tool called Lambda-Probe that could give you some assistance under its menu applications/attributes. You get it as a war-file at http://www.lambdaprobe.org/ . Regards, Tobias. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
how to link from a jsf to a jsf to form a new request?
my jsf is not getting rendered on a request from a linkable image using both graphicimage and outputlink. I suspect that outputlink does not start a new request and this is the cause? Should I be using command link because this is not a formand only a image banner with some image links.
Re: deploymant failure with jsf
Many thanks, I resolved issue this morning and was my own misunderstanding or prefix and suffix mappings in jsf. Many tutorials(and this was my first jsf project don't mention when they forward a request in index.jsp to page-y.jsf that page-y is in fact a file whith.jsp and and not jsf extension. Please advise on how I provide others with info that issue was rsolved?? regards, Yucca -- From: Pid p...@pidster.com Sent: Saturday, April 17, 2010 10:42 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: deploymant failure with jsf - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: loading properties file from WEB-INF instead of WEB-INF/classes
props file can be placed in src package and then placed along with classes in the Web-INF directory when compiling with the destination flag .This method has been used since jdk 1 for internationalization and is understood by new and old devs. On a side not perhaps someone can help me with a related question regarding how we intwenationalize images? or a link:P -- From: Harry Metske harry.met...@gmail.com Sent: Sunday, April 18, 2010 7:32 PM To: Tomcat Users List users@tomcat.apache.org Subject: Re: loading properties file from WEB-INF instead of WEB-INF/classes 2010/4/17 Thufir hawat.thu...@gmail.com getPropsFromWebINF works so long as the properties file is within the package of the class (/. However, I'd like to put the properties file under WEB-INF: public void getPropsFromWebINF() throws IOException { Properties p = new Properties(); InputStream is; is = getClass().getResourceAsStream(sqljdbc4.properties); p.load(is); log(p.toString()); } Class.getResourceAsStream() will delegate to the classloader to find the resource (searches the classpath) , see http://java.sun.com/javase/6/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String) The tomcat site has an excellent description of Tomcat's classloading : http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html , this should bring you to the conclusion that the above won't work. You should put your sqljdbc4.properties file in WEB-INF/classes, or in WEB-INF/lib if packaged in a jar file. If you reference it from your application, make sure you prepend a / (or it will search in your servlet's package) . I've seen mention of using: System.getenv(APP_PROPERTIES); in conjunction with a context (context.xml under META-INF) along the lines of: ?xml version=1.0 encoding=UTF-8? Context antiJARLocking=true path=/A00720398sat Environment name=APP_PROPERTIES description=The APP Properties File override=false type=java.lang.String value=/WEB-INF/app.properties / /Context however, I'm not able to get the environment, I just get a null value. can you be a bit more specific where you get a null value (show some lines of code)... although the above won't bring you to the content of the property file, you only have defined a key/value pair. regards, Harry What's the correct, and simple, idiom? (Staying away from jndi and dbcp for now, and, oddly enough, servlets in this case.) Actually, I suppose in a sense it's in WEB-INF: dtc01l0376-06:~ a00720398$ dtc01l0376-06:~ a00720398$ jar -tfv NetBeansProjects/A00720398sat/dist/A00720398sat.war | grep sql 498 Sat Apr 17 14:36:14 PDT 2010 WEB-INF/classes/controller/sqljdbc4.properties however, I'd like to move it from WEB-INF/classes up to just WEB-INF. thanks, Thufir - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
deploymant failure with jsf
over the last four days deployment continues to fail of my simple war that I set up to get to familiar with jsf. First I will stress that I am using windows 7 and the problem occurs withboth majorra and myFaces version 1.2 andboth tomcat 6.0.2 and 6.026 my war ir correctly laid out and contains the libs and classes in the WEB-INF folder. my web.xml is as follows: ?xml version=1.0 encoding=UTF-8? web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet !-- Faces Servlet Mapping -- servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping /web-app as you can see, my facess servlet should be activated on any request to file located in my faces folder inside my web folder. index.jsp forwards a request to welcome.jsp and this is where deployment fails because the minute I remove the url pattern for /faces/* then deployment succeeds. Deployment fails with a 404 and no jsps or html are located in Web-INF meaning that all should be directly accesable. /It would be easy to assume that I am not packaging my war incorrectly, but when I use same packaging and other jars unrelated to jsf like jstl then app find these jars as needed. Perhaps I am using incorrect jsf jars. Could anyone mail me a copy of jsf lib that they are using and have found to work in above mentioned containers and possibly point out any obvious errors that I am making?