[JBoss Seam] - Re: custom JSF component with facelets
by dgallego
This is the structure of the jar under my /WEB-INF/lib/:
META-INF:
- faces-config.xml
- nt.taglib.xml
- taglib.tld
and the packets structure containing my tags and JSF components.
My tags work only if I specify facelets.LIBRARIES option under web.xml.
faces-config.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
| "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
| <faces-config>
|
| <component>
| <component-type>component.Version</component-type>
| <component-class>component.Version</component-class>
| </component>
| </faces-config>
|
nt.taglib.xml:
| <?xml version="1.0"?>
| <!DOCTYPE facelet-taglib PUBLIC
| "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
| "facelet-taglib_1_0.dtd">
|
| <facelet-taglib>
|
| <namespace>http://www.ntrying.com</namespace>
|
| <tag>
| <tag-name>version</tag-name>
| <component>
| <component-type>component.Version</component-type>
| </component>
| </tag>
|
|
| </facelet-taglib>
|
taglib.tld:
| <?xml version="1.0"?>
| <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
| "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
| <taglib>
|
| <tlib-version>1.0</tlib-version>
| <jsp-version>1.2</jsp-version>
| <short-name>nt</short-name>
| <uri>http://www.ntrying.com</uri>
| <display-name>NTrying.com.</display-name>
|
| <!-- <nt:version /> -->
| <tag>
| <name>version</name>
| <tag-class>taglib.VersionTag</tag-class>
| <body-content>empty</body-content>
| <description>
| The current version of the Ntrying library.
| </description>
| </tag>
| </taglib>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990992#3990992
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990992
18 years, 1 month
[Beginners Corner] - Error with JBoss 5, Web module and java:comp/UserTransaction
by xbrenuchon
Hello,
I'm in my web module (in a Servlet), and i want to have the UserTransaction :
UserTransaction utx = (UserTransaction)context.lookup("java:comp/UserTransaction");
With JBoss 4, it's work very well, but with the new JBoss 5 b1, I have a exception.
JBoss 5 don't support java:comp/UserTransaction in web module ?
javax.naming.NameNotFoundException: UserTransaction not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:628)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:719)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:590)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at fr.unedic.test.web.TestServlet.runUsrTransaction(TestServlet.java:73)
at fr.unedic.test.web.TestServlet.doGet(TestServlet.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:86)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990989#3990989
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990989
18 years, 1 month
[JCA/JBoss] - [JBoss + M$ SQLServer 2005 driver] XA Datasource definition
by bulledesavon
Hi,
I'm trying to define a XA DataSource on JBoss 4.0.3SP1 (same problem with 4.0.4GA) using the Microsoft SQLServer 2005 driver version 1.1.
Here is the content of my datasource-ds.xml file :
<?xml version="1.0" encoding="UTF-8"?>
<xa-datasource>
<jndi-name>jdbc/mydatasource</jndi-name>
<track-connection-by-tx>True</track-connection-by-tx>
<connection-url>jdbc:inetdae7</connection-url>
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
<xa-datasource-property name="DatabaseName">myDB</xa-datasource-property>
<xa-datasource-property name="ServerName">myServer</xa-datasource-property>
<xa-datasource-property name="Port">1433</xa-datasource-property>
<xa-datasource-property name="ApplicationName">myAppName</xa-datasource-property>
<xa-datasource-property name="SelectMethod">cursor</xa-datasource-property>
<xa-datasource-property name="SendStringParametersAsUnicode">true</xa-datasource-property>
<user-name>myUser</user-name>
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
<new-connection-sql>select 1 from systypes</new-connection-sql>
<check-valid-connection-sql>select 1 from systypes</check-valid-connection-sql>
</xa-datasource>
Pay attention to the port number property line.
When the DataSource is created, I get the following exception :
2006-11-30 10:11:45,667 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Could not find accessor on XADataSource: ; - nested throwable: (java.lang.NoSuchMethodException: com.microsoft.sqlserver.jdbc.SQLServerXADataSource.setPort(java.lang.String)))
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:153)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:519)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:208)
at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:529)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:410)
at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:342)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:462)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:73)
It is showed in the log file as a Warning, but the DataSource is not useable at all.
It seems that JBoss can't find out that the parameter of the setPort method is an int and not a String...
If I comment out the port property line, everything is fine.
Any hint?
Is this JBoss related or driver related?
Thanks,
BdS
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990988#3990988
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990988
18 years, 1 month