[JCA/JBoss] - JBOSS to DB2 AS400 - dateFormat is not correct
by Rickenator
I am migrating an existing web application ( no ejbs ) from Websphere to JBOSS. Our database is DB2 on the AS400. In our Websphere environment, we had to set a custom property of the datasource, the dateFormat to "iso" in order to display the dates correctly. After moving the apps over to JBOSS, we are having the same problem. I tried to pass this property as a connection-property, ala <connection-property name="dateFormat">iso</connection-property> but it doesn't seem to make a difference.
I also tried to add it to the connection-url string, as I see some other properties appended, but that has no effect either. Otherwise, the datasource works fine.
Anyone else have any experience with this issue (dateFormat) ?
Here is my db2-400-ds.xml file
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- JBoss Server Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- $Id: db2-400-ds.xml,v 1.1.4.2 2004/10/27 18:44:10 pilhuhn Exp $ -->
<!-- You need the jt400.jar that is delivered with IBM iSeries Access or the
OpenSource Project jtopen.
[systemname] Hostame of the iSeries
[schema] Default schema is needed so jboss could use metadat to test if the tables exists
-->
<local-tx-datasource>
<jndi-name>AS400DS</jndi-name>
<connection-url>jdbc:as400://WWTEST/WWTEST;extended dynamic=true;package=jbpkg;package cache=true;package library=jboss;errors=full</connection-url>
<driver-class>com.ibm.as400.access.AS400JDBCDriver</driver-class>
<user-name>****</user-name>
****
<min-pool-size>5</min-pool-size>
<!-- 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
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<connection-property name="libraries">ITDATA,GDATA,GHIST,GCOMMON,VAIMODSDTA,R35FILES,VBLIB,WEBAPPS,WEBFINRPT1,WEBFINRPT8,QGPL,WWDATA,CSDATA</connection-property>
<connection-property name="dateFormat">iso</connection-property>
<connection-property name="naming">system</connection-property>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>DB2/400</type-mapping>
</local-tx-datasource>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016467#4016467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016467
19Â years, 2Â months
[JBoss Seam] - Configuring for @Transactional
by quilleashm
Hi there,
I'm trying to get Seam managed transactions working. I've read Chap8 and looked at the hibernate example. I think I've done most of the configuration but this last piece is tripping me up. I'm running with Tomcat 6 and Hibernate 3 (no J2EE container).
The stack trace I get is this.
| org.hibernate.HibernateException: Could not locate TransactionManager
| at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:26)
| at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:325)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
| at com.azure.spark.database.hibernate.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:1029)
| at com.azure.spark.database.hibernate.util.HibernateSession.initialise(HibernateSession.java:75)
| at com.azure.spark.common.initialise.InitialiseHelper.initialiseReference(InitialiseHelper.java:82)
| at com.azure.spark.common.initialise.InitialiseHelper.initialiseReference(InitialiseHelper.java:52)
| at com.azure.spark.web.servlet.InitialisationListener.contextInitialized(InitialisationListener.java:19)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4336)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
| at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
| at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
| at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
| at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
| at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
| at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
| at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
| at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
| at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
| at org.apache.catalina.core.StandardService.start(StandardService.java:451)
| at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
| at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
| Caused by: javax.naming.NameNotFoundException: Name TransactionManager is not bound in this Context
| at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
| at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
| at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.hibernate.transaction.JNDITransactionManagerLookup.getTransactionManager(JNDITransactionManagerLookup.java:23)
| ... 31 more
|
Here's my hibernate.cfg.xml
| <!DOCTYPE hibernate-configuration PUBLIC
| "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
|
| <property name="hibernate.connection.driver_class">net.sourceforge.jtds.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:jtds:sqlserver://QUANTZ/certo;Instance=QUANTZ_SQL;PrepareSQL=0</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password">welcome</property>
|
| <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>
|
| <property name="hibernate.query.substitutions">false='N', true='Y'</property>
|
| <property name="show_sql">true</property>
|
| <property name="transaction.flush_before_completion">true</property>
| <property name="connection.release_mode">after_transaction</property>
| <property name="transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
|
| </session-factory>
| </hibernate-configuration>
|
And I have TransactionalSeamPhaseListener configured in faces-config.
It looks like hibernate can't find the TransactionManager specified by the JBossTransactionManagerLookup. Should I be using a different lookup or am I missing some crucial piece? I confess to not really understanding how the JNDI stuff gets bootstrapped and configured.
I don't have the microcontainer enabled (should I?) because it looked like the hibernate example disabled this for a war build.
Thanks.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016465#4016465
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016465
19Â years, 2Â months
[JBoss Seam] - Seam Email - IllegalStateException: No Factories configured.
by bsmithjj
Hello,
I am trying to build up an email template - as shown here:
| <m:message xmlns="http://www.w3.org/1999/xhtml"
| xmlns:m="http://jboss.com/products/seam/mail"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| >
| <m:from name="#{mailConfiguration.accountName}" address="#{mailConfiguration.emailFrom}" />
| <m:to name="#{accessRequestUser.name}">#{accessRequestUser.email}</m:to>
| <m:subject>Access Request Requires Your Approval</m:subject>
| <m:body>
| <p><h:outputText value="Dear #{accessRequestUser.manager.name}" />,</p>
| <p>
| An Access Request for Employee #{accessRequestUser.userid}, #{accessRequestUser.name},
| requires your approval.
|
| Please login to <a href="#">http://someurl.com/</a> and review your Work Queue
| to approve or reject this request.
| </p>
| </m:body>
|
| </m:message>
|
when I render the email template,
| @In(create = true)
| private Renderer renderer;
|
| ...
|
| public String sendEmailMessage(String templateFile) {
| try {
| renderer.render(templateFile);
| return "success";
|
| } catch (Exception e) {
| log.error(e,e);
| }
| return null;
| }
|
I get this exception:
| 11:41:56,045 ERROR com.evergreen.accesscontrol.impl.MailSenderBean - java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not wo
| rk at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your w
| eb application and your container for any exceptions!
| If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener
| is not setup in your web.xml.
| A typical config looks like this;
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
|
| java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration set
| tings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
| If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener
| is not setup in your web.xml.
| A typical config looks like this;
| <listener>
| <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
| </listener>
|
| at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
| at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:742)
| at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:171)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:50)
| at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:38)
| at org.jboss.seam.mail.ui.UIBody.encodeChildren(UIBody.java:34)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:174)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.ui.JSF.renderChild(JSF.java:177)
| at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
| at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:106)
| at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:54)
| at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:38)
| at com.evergreen.accesscontrol.impl.MailSenderBean.sendEmailMessage(MailSenderBean.java:175)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| at sun.reflect.GeneratedMethodAccessor747.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor745.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor744.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:51)
| at sun.reflect.GeneratedMethodAccessor743.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at sun.reflect.GeneratedMethodAccessor742.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.GeneratedMethodAccessor785.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:227)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:59)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy565.sendEmailMessage(Unknown Source)
| at com.evergreen.accesscontrol.impl.AccessRequestManagerBean.sendRequest(AccessRequestManagerBean.java:317)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| at sun.reflect.GeneratedMethodAccessor747.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor745.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor744.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:51)
| at sun.reflect.GeneratedMethodAccessor743.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.ConversationalInterceptor.checkConversationForConversationalBean(ConversationalInterceptor.java:83)
| at sun.reflect.GeneratedMethodAccessor748.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at sun.reflect.GeneratedMethodAccessor742.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy599.sendRequest(Unknown Source)
| at com.evergreen.accesscontrol.AccessRequestManager$$FastClassByCGLIB$$64e7314d.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.interceptors.SynchronizationInterceptor.serialize(SynchronizationInterceptor.java:31)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
| at com.evergreen.accesscontrol.AccessRequestManager$$EnhancerByCGLIB$$d6783274.sendRequest(<generated>)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:97)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at com.evergreen.filter.RequestDumper.doFilter(RequestDumper.java:78)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:43)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:29)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at com.evergreen.fastpass.catalina.CASSSOAuthenticatorValve.invoke(CASSSOAuthenticatorValve.java:373)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
Here is the contents of my .ear:
| bash-2.05b$ jar tvf access-control-1.0.ear
| 0 Wed Feb 14 11:37:36 EST 2007 META-INF/
| 126 Wed Feb 14 11:37:34 EST 2007 META-INF/MANIFEST.MF
| 231048 Wed Feb 14 11:37:36 EST 2007 access-control-ejbs-1.0.jar
| 130275 Wed Feb 14 11:37:36 EST 2007 access-control-schema-1.0.jar
| 2791250 Wed Feb 14 11:37:36 EST 2007 access-control-webapp-1.0.war
| 24432 Wed Feb 14 11:37:36 EST 2007 el-api-2.1wFacelets1.1.4.jar
| 97471 Wed Feb 14 11:37:36 EST 2007 el-ri-2.1wFacelets1.1.4.jar
| 6972 Wed Feb 14 11:37:36 EST 2007 evg-jaas-components-1.0.jar
| 1102 Wed Feb 14 11:37:36 EST 2007 gpd.xml
| 679480 Wed Feb 14 11:37:36 EST 2007 jboss-seam-1.1.6.jar
| 20176 Wed Feb 14 11:37:36 EST 2007 jboss-seam-mail-1.1.6.jar
| 98411 Wed Feb 14 11:37:36 EST 2007 jboss-seam-ui-1.1.6.jar
| 603060 Wed Feb 14 11:37:36 EST 2007 jbpm-3.1.4.jar
| 9456 Wed Feb 14 11:37:36 EST 2007 jbpm-hibernate.cfg.xml
| 1107 Wed Feb 14 11:37:36 EST 2007 jbpm.cfg.xml
| 291366 Wed Feb 14 11:37:36 EST 2007 jsf-facelets-1.1.11.jar
| 23630 Wed Feb 14 11:37:36 EST 2007 jsr173-1.0.jar
| 1370 Wed Feb 14 11:37:34 EST 2007 META-INF/application.xml
| 285 Wed Feb 14 11:37:36 EST 2007 META-INF/jboss-app.xml
| 249563 Wed Feb 14 11:37:36 EST 2007 myfaces-api-1.1.4.jar
| 524089 Wed Feb 14 11:37:36 EST 2007 myfaces-impl-1.1.4.jar
| 459988 Wed Feb 14 11:37:36 EST 2007 ostermiller-1.06.00.jar
| 3380 Wed Feb 14 11:37:36 EST 2007 processdefinition.xml
| 42884 Wed Feb 14 11:37:36 EST 2007 processimage.jpg
| 2637587 Wed Feb 14 11:37:36 EST 2007 xbean-2.1.0.jar
|
Help? ;-D
Thanks,
Brad Smith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016460#4016460
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016460
19Â years, 2Â months
[JBoss Portal] - Re: JBoss Portal 2.6 Alpha 2 Release
by swestbom
Ant versus Maven 2.
Ant is very procedural, and very bad at bootstrapping without a lot of work. Maven 2 is object oriented and designed around the project model of work. I don't see why you would want to reinvent the wheel with Ant when any ant task can be used within Maven 2 when you need to do something procedural.
Using maven definately involves a learning curve. Its model is very much like Eclipse, project oriented. Spend some time with it and you won't go back. Also you can use both, but my guess is work on supporting the ant build will drop by the wayside shortly after introducing Maven 2. Especially when you have to start chasing down dependencies, and dependencies of dependencies.
It would also facilitate the nightly build and deployment of the trunk to a publicly visible website so we don't have to build the code ourselves to try a fix out (this is turning out to be a lot of fun, chasing down all the stuff it uses)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016453#4016453
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016453
19Â years, 2Â months
[JBoss Seam] - seam-gen code for many-to-one associations and reference dat
by lawrieg
Hi,
I'm trying to understand the seam-generated code for many-to-one associations, and whether / how I need to modify it if I'm dealing with reference data that either is read-only (i.e. will be an Enum and will have matching database lookup table), or modified only very occasionally by an administrator (will be a class mapped to a database lookup/reference table).
seam-gen generates the following Seam Application Framework EntityHome code for my example project's Customer class:
@Name("customerHome")
| public class CustomerHome extends EntityHome<Customer> {
|
| @In(value = "#{statusHome.managedInstance}", required = false)
| Status status;
|
| @In(value = "#{customerTypeHome.managedInstance}", required = false)
| CustomerType customerType;
|
| public void setCustomerId(Integer id) {
| setId(id);
| }
|
| public Integer getCustomerId() {
| return (Integer) getId();
| }
|
| @Override
| protected Customer createInstance() {
| Customer customer = new Customer();
| return customer;
| }
|
| public void wire() {
| if (status != null) {
| getInstance().setStatus(status);
| }
| if (customerType != null) {
| getInstance().setCustomerType(customerType);
| }
| }
|
| public boolean isWired() {
| if (getInstance().getStatus() == null)
| return false;
| if (getInstance().getCustomerType() == null)
| return false;
| return true;
| }
|
| public Customer getManagedInstance() {
| return isManaged() ? getInstance() : null;
| }
|
| }
and CustomerEdit.page.xml is generated as follows
<page no-conversation-view-id="/CustomerList.xhtml">
|
| <restrict>#{identity.loggedIn}</restrict>
|
| <begin-conversation join="true"/>
|
| <action execute="#{customerHome.wire}"/>
|
| <param name="customerFrom"/>
| <param name="customerId" value="#{customerHome.customerId}"/>
|
| <param name="statusFrom"/>
| <param name="statusId" value="#{statusHome.statusId}"/>
|
| <param name="customerTypeFrom"/>
| <param name="customerTypeId" value="#{customerTypeHome.customerTypeId}"/>
|
| <navigation from-action="#{customerHome.persist}">
| <end-conversation/>
| <redirect view-id="/Customer.xhtml"/>
| </navigation>
|
| <navigation from-action="#{customerHome.update}">
| <end-conversation/>
| <redirect view-id="/Customer.xhtml"/>
| </navigation>
|
| <navigation from-action="#{customerHome.remove}">
| <end-conversation/>
| <redirect view-id="/CustomerList.xhtml"/>
| </navigation>
|
| </page>
So if I want Status to be an Enum, and CustomerType to be an immutable class that will be mapped to a database lookup/reference table, then what changes should I make to the seam-gen code???
I particular, I'm confused by the need for the wire() and isWired() methods - can anyone shed any light on what they are for and whether I'll still need them?
Thanks,
Lawrie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016451#4016451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016451
19Â years, 2Â months