[Tomcat, HTTPD, Servlets & JSP] - MyFaces tomahawk for JBoss
by urswag
I would like to use tomahawk
First I get this error
anonymous wrote :
|
| javax.servlet.ServletException: The absolute uri: http://myfaces.
| apache.org/tomahawk cannot be resolved in either web.xml or the jar
| files deployed with this application
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter
| (ReplyHeaderFilter.java:96)
|
| root cause
|
| javax.faces.FacesException: The absolute uri: http://myfaces.apache.
| org/tomahawk cannot be resolved in either web.xml or the jar files
| deployed with this application
| org.apache.myfaces.context.servlet.ServletExternalContextImpl.
| dispatch(ServletExternalContextImpl.java:421)
| org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView
| (JspViewHandlerImpl.java:234)
| org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.
| java:352)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter
| (ReplyHeaderFilter.java:96)
|
|
If I add this entry (not quite shure how useful it is)
anonymous wrote :
| <init-param>
| MyFaces tlds
| <param-name>tagLibJar0</param-name>
| <param-value>jsf-libs/myfaces-impl.jar</param-value>
| </init-param>
|
then I receive this error.
anonymous wrote :
|
| javax.servlet.ServletException: /home.jsp(25,1) Unable to load tag handler class "org.apache.myfaces.custom.datalist.HtmlDataListTag" for tag "t:dataList"
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| javax.faces.FacesException: /home.jsp(25,1) Unable to load tag handler class "org.apache.myfaces.custom.datalist.HtmlDataListTag" for tag "t:dataList"
| org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
| org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
| org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
| javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965091#3965091
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965091
19 years, 10 months
[Tomcat, HTTPD, Servlets & JSP] - portlet JSP JDBC problem
by thatporguy
Alright guys, I'm trying to create a JDBC connection (or jndi) connection to a mysql database, and for some reason i think hibernate is not letting me. I can create a jsp on tomcat and it works there but not on jboss.
here is the code
public String getDB(){
| String data = "";
|
| try{
| InitialContext ctx = new InitialContext();
| DataSource ds = (DataSource)ctx.lookup("mysqlDS");
| Connection conn = ds.getConnection();
| Statement statement = conn.createStatement();
| ResultSet rs = statement.executeQuery("SELECT * FROM test");
|
|
| try {
| while (rs.next()) {
| data += rs.getString("id") + " <br>";
|
| }
| } catch (Exception e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
| conn.close();
|
| }catch(Exception s){
|
| s.printStackTrace();
| }
|
| return data;
| }
Here is the DS file:
(note i removed the username and password when posting)
Pardon the junk code, but I'm just trying to get it working at the moment. <?xml version="1.0" encoding="UTF-8" ?>
- <!-- $Id: mysql-ds.xml,v 1.3.2.3 2006/02/07 14:23:00 acoliver Exp $
-->
- <!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->
-
- <local-tx-datasource>
<jndi-name>mysqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/jbossportal</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>****</user-name>
****
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
- <!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
- <!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
- <!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
- <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional)
-->
-
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
Now, When i tried this with a JDBC connection it simply said that it was a null pointer, but this returns nothing.
Here is the log output:
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4733262996205589
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.StandardQueryCache] checking cached query results in region: org.hibernate.cache.StandardQueryCache
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.EhCache] key: sql: select 1 as col_0_0_ from jbp_cms_wsp_prop wspprop0_ where PROP_ID=?; parameters: 8b53c74f-878f-4f36-831f-83d61aaa9d24/{http://jboss.org/jcr/portalcms}lang..., ; named parameters: {}
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.StandardQueryCache] Checking query spaces for up-to-dateness: [jbp_cms_wsp_prop]
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.EhCache] key: jbp_cms_wsp_prop
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.EhCache] Element for jbp_cms_wsp_prop is null
| 2006-08-14 14:56:26,183 DEBUG [org.hibernate.cache.StandardQueryCache] returning cached query results
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4733262996271104
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] Looking for UserTransaction under: UserTransaction
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] Obtained UserTransaction
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] begin
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] commit
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4733262996271105
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] Looking for UserTransaction under: UserTransaction
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] Obtained UserTransaction
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] begin
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.transaction.JTATransaction] commit
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] processing flush-time cascades
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] dirty checking collections
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.engine.Collections] Collection found: [org.jboss.portal.identity.db.UserImpl.dynamic#1], was: [org.jboss.portal.identity.db.UserImpl.dynamic#1] (initialized)
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.engine.Collections] Collection found: [org.jboss.portal.identity.db.UserImpl.roles#1], was: [org.jboss.portal.identity.db.UserImpl.roles#1] (initialized)
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 insertions, 0 updates, 0 deletions to 1 objects
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.event.def.AbstractFlushingEventListener] Flushed: 0 (re)creations, 0 updates, 0 removals to 2 collections
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.pretty.Printer] listing entities:
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.pretty.Printer] org.jboss.portal.identity.db.UserImpl{password=21232f297a57a5a743894a0e4a801fc3, dynamic=[1155580527652], key=1, userName=admin, enabled=true, registrationDate=2006-08-09 16:13:52, realEmail=admin(a)portal.com, viewRealEmail=true, fakeEmail=null, roles=[org.jboss.portal.identity.db.RoleImpl#1], givenName=null, familyName=null}
| 2006-08-14 14:56:26,199 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965089#3965089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965089
19 years, 10 months
[Installation, Configuration & Deployment] - Error creating client Service
by mdhuyn
Hi, I'm using the tutorial to create a client accessing a web service. The end point seemed to deploy fine, but when I run a client JUnit test, I get the error:
Cannot get resource: META-INF/standard-jbossws-client-config.xml
I also don't understand why it's trying to get standard-jbossws-client-config.xml. Shouldn't it use jboss-client.xml ?
Client code:
InitialContext iniCtx = getInitialContext();
Error => service = (Service)iniCtx.lookup("java:comp/env/service/TestServices");
Trace:
javax.naming.NamingException: Could not dereference object [Root exception is org.jboss.ws.WSException: Cannot get resource: META-INF/standard-jbossws-client-config.xml]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
at $Proxy0.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
...
Caused by: org.jboss.ws.WSException: Cannot get resource: META-INF/standard-jbossws-client-config.xml
at org.jboss.ws.metadata.ClientEndpointMetaData.getClientConfig(ClientEndpointMetaData.java:87)
at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:185)
at org.jboss.ws.metadata.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:122)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:112)
at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:182)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
... 15 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965088#3965088
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965088
19 years, 10 months
[JBoss jBPM] - Re: Ending task in timer timeout action cause exception
by randy.jones@jeppesen.com
"randy.jones(a)jeppesen.com" wrote : <task-node name="Waiting for Approval">
| | | | <task name="WaitingTask">
| | | | <assignment class="com.jeppesen.sabertooth.workflow.ContentReviewerAssignment"></assignment>
| | | | <controller>
| | | | <variable name="content" access="read"></variable>
| | | | <variable name="comment"></variable>
| | | | </controller>
| | | | <timer duedate="2 seconds" >
| | | | <action class="com.jeppesen.sabertooth.workflow.EscalateToContentManager">
| | | | </action>
| | | | </timer>
| | | |
| | | | </task>
| | | | <transition name="Reject" to="Rework"></transition>
| | | | <transition name="Approve" to="CommitContent"></transition>
| | | | <transition name="Timeout" to="AssignContentTask"></transition> </task-node>
| | | |
| | | |
| | | |
| | | |
| | | | Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#1]10:28:20,258 [main] ERROR AbstractFlushingEventListener : Could not synchronize database state with session
| | | | org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.jbpm.graph.exe.Token#1]
| | | | at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1635)
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965086#3965086
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965086
19 years, 10 months
[EJB/JBoss] - Performance tuning with FlushMode
by murtuza52
I have following setup: Eclipse 3.1, MyEclipse 4.1, JBoss 4.0.4, Patch 1.
I have a medium sized application with about 50 Entities with relations. Some data in the application (roughly 500 records in total from the database of about 3 different types of entities) is requested very frequently as a result a customised catching is developed. This has increased the quering peformance considerably (from 4.5 sec to 1.5 secs) but the update and merge of entities is far too slow (about 10 secs on average).
After reading other threads and adding some attributes in hibernate setting to show SQL queries i found that upon merge, almost every entity in the memory gets flushed even when non of these entities state have changed.
Some of the queries were also slow but this has improved after adding setFlushMode(FlushModeType.COMMIT).
I very confused and need help on what should be the ideal setting for FlushMode in Stateless Session Bean.
If I change the EntityManager FlushMode to COMMIT, i have to control the commit (flush) in my code. I doubt this will resolve the problem or not as what i understand (correct me if i am wrong), the COMMIT will flush the data to database, that is all the entities in memory resulting in same performance.
Is there any way we can control or prevent the flushing of all the entities except for the one that is being merged or persisted.
I'll appreciate if anyone can enlighten on this.
Thanks
Murtuza
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965084#3965084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965084
19 years, 10 months