[JBoss Seam] - Seam doesn't play with ICEFaces
by hispeedsurfer
My question is 'why this app work with pur Seam and MyFaces, but not with ICEFaces'
1. Abstract editor class
public abstract class AbstractEditorBean<T extends StandardEntity> extends AbstractEditorListeGemeinsames<T> implements Serializable {
| .
| .
| protected boolean neu;
|
| @Begin(nested=true, ifOutcome={"editor"})
| public String bearbeiten() {
|
| if (id == null) {
| addWarning(idError());
| return "main";
| }
|
| //Entity holen
| try {
| setEntity((T) em.find(getEntityClass(), Long.parseLong(id)));
| neu = false;
| if (getEntity() == null) throw new Exception();
| } catch (Exception ex) {
| addWarning(findenError());
| return null;
| }
|
| nachLaden();
|
| //Alles ok? Dann Editor anzeigen
| return "editor";
| }
| .
| .
| public boolean getNeu() {
| checkKorrekterAufruf();
| return neu;
| }
| .
| .
| }
|
2. Measurement class
@Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("messmitteltypEditor")
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| public class MessmitteltypEditorBean extends AbstractEditorBean<Messmitteltyp> implements MessmitteltypEditor {
|
| @In(required=false) @Out(required=false)
| private Messmitteltyp messmitteltyp;
| .
| .
| }
3. All changes to web.xml, faces-config.xml and lib dirs for ICEFaces as descriped here:http://support.icesoft.com/jive/servlet/KbServlet/download/623-102-8...
4. The xhtml pages:
a)messmittelTypListe.xhtml
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| 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"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| template="vorlage-liste.xhtml">
|
| <!-- content -->
|
| <ui:param name="ueberschrift" value="Messmitteltypen" />
| <ui:param name="editor" value="#{messmitteltypEditor}" />
| <ui:param name="liste" value="#{messmitteltypListe}" />
| <ui:param name="login" value="true" />
|
| <ui:define name="content">
|
| .....
|
| </ui:define>
|
| </ui:composition>
|
b)
Template
vorlage-liste.xhtml -> this call AbstractEditor.bearbeiten
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| 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"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| template="vorlage-grundgeruest.xhtml">
| .
| .
| .
|
| <t:dataTable var="zeile" value="#{liste.eintraege}"
| rendered="#{liste.eintraege.rowCount > 0}" styleClass="table">
|
| <ui:insert name="content" />
|
| <t:column styleClass="breite16">
| <h:commandLink action="#{editor.bearbeiten}"> <!-- this call AbstractEditor.bearbeiten() neu= true -->
| <f:param name="id" value="#{zeile.id}" />
| <h:graphicImage value="/img/edit.gif" />
| </h:commandLink>
| </t:column>
|
| </t:dataTable>
c)
Template
vorlage-editor.xhtml -> Exception getting value of property neu of base of typ
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| 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"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| template="vorlage-grundgeruest.xhtml">
|
| <!-- Hauptteil -->
|
| <ui:define name="hauptteil">
|
| <div class="section">
| <h1>
| #{ueberschrift}
| <i><h:outputText value="#{editor.entity}" rendered="#{!editor.neu}" /></i> <!-- Exception getting value of property neu of base of type...-->
| <h:outputText value="neu anlegen" rendered="#{editor.neu}" />
| </h1>
| </div>
d)
messmitteltypEditor.xhtml
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| 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"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:sandbox="http://myfaces.apache.org/sandbox"
| template="vorlage-editor.xhtml">
|
| <!-- content -->
|
| <ui:param name="ueberschrift" value="Messmitteltyp" />
| <ui:param name="editor" value="#{messmitteltypEditor}" />
| <ui:param name="login" value="true" />
|
| ...
| <ui:define name="content">
| ...
|
at last the stack trace:
09:33:39,577 ERROR [D2DFaceletViewHandler] Problem in renderResponse: /vorlage-editor.xhtml @17,75 rendered="#{!editor.neu}": Exception getting value of property neu of base of type : de.bosch.ccecp.mmd.action.MessmitteltypEditor$$EnhancerByCGLIB$$8423db5e
| javax.faces.el.EvaluationException: /vorlage-editor.xhtml @17,75 rendered="#{!editor.neu}": Exception getting value of property neu of base of type : de.bosch.ccecp.mmd.action.MessmitteltypEditor$$EnhancerByCGLIB$$8423db5e
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:60)
| at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:1075)
| at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:508)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:528)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:535)
| at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:273)
| at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:250)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:394)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| 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 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
| at org.jboss.web.tomcat.security.HttpServletRequestResponseValve.invoke(HttpServletRequestResponseValve.java:70)
| 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.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| 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:619)
| Caused by: javax.faces.el.EvaluationException: Bean: de.bosch.ccecp.mmd.action.MessmitteltypEditor$$EnhancerByCGLIB$$8423db5e, property: neu
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:117)
| at com.sun.el.parser.AstNot.getValue(AstNot.java:46)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
| at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
| ... 43 more
| Caused by: java.lang.reflect.InvocationTargetException
| 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:597)
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
| ... 50 more
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.util.Parameters.convertMultiValueRequestParameter(Parameters.java:48)
| at org.jboss.seam.Component.injectParameters(Component.java:1151)
| at org.jboss.seam.Component.inject(Component.java:1114)
| at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:48)
| at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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.ManagedEntityIdentityInterceptor.aroundInvoke(ManagedEntityIdentityInterceptor.java:39)
| 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:597)
| 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:23)
| at sun.reflect.GeneratedMethodAccessor399.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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:51)
| at sun.reflect.GeneratedMethodAccessor398.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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:49)
| at sun.reflect.GeneratedMethodAccessor397.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
| 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:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| 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:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy487.getNeu(Unknown Source)
| at de.beffo.seam.helper.AbstractEditor$$FastClassByCGLIB$$d100690e.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:73)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
| at sun.reflect.GeneratedMethodAccessor396.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:38)
| at sun.reflect.GeneratedMethodAccessor395.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| 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:82)
| at org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:51)
| at de.bosch.ccecp.mmd.action.MessmitteltypEditor$$EnhancerByCGLIB$$8423db5e.getNeu(<generated>)
| ... 55 more
|
Here the steps when I debug this app
1. current page: messketteListe.xhtml - click: bearbeiten
2. methode invoked: AbstractEditor.bearbeiten() -> set property neu=true -> outcome:"editor"
3. from outcome:"editor" -> messmitteltypEditor.xhtml
4. BANG. java.lang.NullPointerException (Exception getting value of property neu of base of type
So whats going wrong here? Without ICEFaces the app working perfectly. In ICEFaces Forum they gave no advice.
Thanks
Andreas Franke
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999359#3999359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999359
19 years, 3 months
[Persistence, JBoss/CMP, Hibernate, Database] - Hibernate JNDI failure...
by joachimhb
Hello,
I am trying to set up a web application that uses Spring and Hibernate on JBoss 4.0.5. The Hibernate classes are placed inside a .HAR inside the .EAR, and referenced in jboss-app.xml.
I have placed jboss-service.xml inside the HAR:
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
| <depends>jboss:service=Naming</depends>
| <attribute name="DatasourceName">java:/MyDS</attribute>
| <attribute name="Dialect">org.hibernate.dialect.OracleDialect</attribute>
| <attribute name="SessionFactoryName">java:hibernate/BMSessionFactory</attribute>
| <attribute name="CacheProviderClass">org.hibernate.cache.HashtableCacheProvider</attribute>
| <attribute name="ShowSqlEnabled">true</attribute>
| <attribute name="ScanForMappingsEnabled">true</attribute>
| </mbean>
| </server>
|
and the following inside spring-web.xml:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
| <beans>
| <bean id="mySessionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
| <property name="jndiName" value="java:hibernate/BMSessionFactory"/>
| </bean>
|
| <bean id="svinnDao" class="com.svinn.SvinnDao">
| <property name="sessionFactory"><ref local="mySessionFactory"/></property>
| </bean>
|
| </beans>
|
When I deploy to JBoss, I get the following (important lines marked in bold):
| 09:49:30,533 INFO [Configuration] Searching for mapping documents in jar: tmp28513bm.ear-1.0-SNAPSHOT.ear
| 09:49:30,534 INFO [Configuration] Searching for mapping documents in jar: bm-hibernate.har
| 09:49:30,534 INFO [Configuration] Searching for mapping documents in jar: bm.ejb-1.0-SNAPSHOT.jar
| 09:49:30,536 INFO [NamingHelper] JNDI InitialContext properties:{}
| 09:49:30,539 INFO [DatasourceConnectionProvider] Using datasource: java:/MyDS
| 09:49:30,539 INFO [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
| With the Partitioning, OLAP and Data Mining options
| 09:49:30,539 INFO [SettingsFactory] JDBC driver: Oracle JDBC driver, version: 10.2.0.1.0
| 09:49:30,540 INFO [Dialect] Using dialect: org.hibernate.dialect.OracleDialect
| 09:49:30,542 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
| 09:49:30,543 INFO [NamingHelper] JNDI InitialContext properties:{}
| 09:49:30,543 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
| 09:49:30,543 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 09:49:30,543 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
| 09:49:30,543 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
| 09:49:30,543 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
| 09:49:30,543 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
| 09:49:30,543 INFO [SettingsFactory] JDBC batch size: 15
| 09:49:30,543 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
| 09:49:30,544 INFO [SettingsFactory] Scrollable result sets: enabled
| 09:49:30,544 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
| 09:49:30,544 INFO [SettingsFactory] Connection release mode: after_statement
| 09:49:30,544 INFO [SettingsFactory] Default batch fetch size: 1
| 09:49:30,544 INFO [SettingsFactory] Generate SQL with comments: disabled
| 09:49:30,544 INFO [SettingsFactory] Order SQL updates by primary key: disabled
| 09:49:30,544 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
| 09:49:30,544 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
| 09:49:30,544 INFO [SettingsFactory] Query language substitutions: {}
| 09:49:30,544 INFO [SettingsFactory] JPA-QL strict compliance: disabled
| 09:49:30,544 INFO [SettingsFactory] Second-level cache: enabled
| 09:49:30,544 INFO [SettingsFactory] Query cache: disabled
| 09:49:30,544 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
| 09:49:30,544 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
| 09:49:30,545 INFO [SettingsFactory] Structured second-level cache entries: disabled
| 09:49:30,545 INFO [SettingsFactory] Echoing all SQL to stdout
| 09:49:30,545 INFO [SettingsFactory] Statistics: disabled
| 09:49:30,545 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
| 09:49:30,545 INFO [SettingsFactory] Default entity-mode: pojo
| 09:49:30,549 INFO [SessionFactoryImpl] building session factory
| 09:49:30,549 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
| 09:49:30,549 INFO [NamingHelper] JNDI InitialContext properties:{}
| 09:49:30,550 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:hibernate/BMSessionFactory]
|
Then, further down I get this Exception:
| 09:49:31,102 ERROR [ContextLoader] Context initialization failed
| org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mySessionFactory' defined in ServletContext resource [/WEB-INF/spring-web.xml]: Initialization of bean failed; nested exception is javax.naming.NamingException: JNDI object with [java:hibernate/BMSessionFactory] not found: JNDI implementation returned null
| javax.naming.NamingException: JNDI object with [java:hibernate/BMSessionFactory] not found: JNDI implementation returned null
| at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:125)
| at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
| at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:146)
| ...
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999356#3999356
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999356
19 years, 3 months
[JBoss Messaging] - Node0 cant' be killed or Cluster Configuration Problem?
by geniusfox
Hi all:
I deploy jboss-messaging1.2 beta on jboss-4.0.2. Follow the cluster document, i create 4 node and startup this node from node0 to node4. When server started, i have catched this message:
16:33:25,203 INFO [ServerPeer] JBoss Messaging 1.2.0.Beta1 server [0] started
16:33:25,578 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 127.0.0.1:4543
-------------------------------------------------------
16:33:25,687 INFO [DefaultClusteredPostOffice] ClusteredPostOffice[0:Clustered
JMS:127.0.0.1:4543] got new view: [127.0.0.1:4396|5] [127.0.0.1:4396, 127.0.0.1:
4407, 127.0.0.1:4433, 127.0.0.1:4543]
16:33:25,703 INFO [STDOUT]
-------------------------------------------------------
GMS: address is 127.0.0.1:4548
-------------------------------------------------------
16:33:26,437 INFO [ConnectionFactory] Connector socket://192.168.0.51:4457 has
leasing enabled, lease period 10000 milliseconds
Then i running my Queue Tester, It can send and receive message successful. But when i kill the node0 retesting that, it can't find any JMS server. Error as follow:
0 ERROR jms.QueueMessage (QueueMessage.java:82) - init JMS Queue failed
javax.naming.CommunicationException: Could not obtain connection to any of these urls: 192.168.0.51:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 192.168.0.51:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.0.51:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1420)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:595)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.travelco.jms.ContextHelper.getQueueFactory(ContextHelper.java:154)
at com.travelco.jms.QueueMessage.init(QueueMessage.java:71)
at com.travelco.jms.QueueMessage.(QueueMessage.java:48)
at com.travelco.jms.QueueSenderTester.main(QueueSenderTester.java:11)
Caused by: javax.naming.CommunicationException: Failed to connect to server 192.168.0.51:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.0.51:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:270)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1391)
... 7 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 192.168.0.51:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 8 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
at java.net.Socket.connect(Socket.java:452)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.(Socket.java:309)
at java.net.Socket.(Socket.java:211)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:240)
... 8 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999354#3999354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999354
19 years, 3 months
[JBossWS] - Problems deploying a web service with a Session Bean as endp
by performante
Hi,
I get this exception when trying to deploy a Session Bean as Web Service:
org.jboss.ws.WSException: Cannot obtain servlet mapping for servlet link: null
at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.initServicePathJSE(JSR109ServerMetaDataBuilder.java:315)
at org.jboss.ws.deployment.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:202)
at org.jboss.ws.deployment.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:78)
at org.jboss.ws.integration.jboss.DeployerInterceptor.create(DeployerInterceptor.java:80)
at org.jboss.ws.integration.jboss.DeployerInterceptorJSE.create(DeployerInterceptorJSE.java:74)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy47.create(Unknown Source)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:595)
JBoss is looking for a servlet link when the deployed webservice uses an ejb link, this are the xml descriptors:
configuration.xml:
<java-wsdl>
<namespaces target-namespace="http://servicios.com/"
type-namespace="http://servicios.com/types"/>
<webservices ejb-link="HelloBean"/>
</java-wsdl>
ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" version="2.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>chapter 12 EJB JAR</display-name>
<enterprise-beans>
<ejb-name>HelloBean</ejb-name>
<service-endpoint>com.servicios.Hello</service-endpoint>
<ejb-class>com.servicios.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
</method-permission>
<container-transaction>
<ejb-name>HelloBean</ejb-name>
<method-name>*</method-name>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
And this are the generated webservices.xml:
<webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:impl='http://servicios.atidenet.eusa.net/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
<webservice-description>
<webservice-description-name>HelloService</webservice-description-name>
<wsdl-file>META-INF/wsdl/HelloService.wsdl</wsdl-file>
<jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
<port-component>
<port-component-name>HelloPort</port-component-name>
<wsdl-port>impl:HelloPort</wsdl-port>
<service-endpoint-interface>com.servicios.Hello</service-endpoint-interface>
<service-impl-bean>
<ejb-link>HelloBean</ejb-link>
</service-impl-bean>
</port-component>
</webservice-description>
and jaxrpc-mapping.xml:
<?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
<package-mapping>
<package-type>com.servicios</package-type>
http://servicios.com/types
</package-mapping>
<service-interface-mapping>
<service-interface>com.servicios.HelloService</service-interface>
<wsdl-service-name xmlns:serviceNS='http://servicios.com/'>serviceNS:HelloService</wsdl-service-name>
<port-mapping>
<port-name>HelloPort</port-name>
<java-port-name>HelloPort</java-port-name>
</port-mapping>
</service-interface-mapping>
<service-endpoint-interface-mapping>
<service-endpoint-interface>com.servicios.Hello</service-endpoint-interface>
<wsdl-port-type xmlns:portTypeNS='http://servicios.com/'>portTypeNS:Hello</wsdl-port-type>
<wsdl-binding xmlns:bindingNS='http://servicios.com'>bindingNS:HelloBinding</wsdl-binding>
<service-endpoint-method-mapping>
<java-method-name>hello</java-method-name>
<wsdl-operation>hello</wsdl-operation>
<method-param-parts-mapping>
<param-position>0</param-position>
<param-type>java.lang.String</param-type>
<wsdl-message-mapping>
<wsdl-message xmlns:wsdlMsgNS='http://servicios.com/'>wsdlMsgNS:Hello_hello</wsdl-message>
<wsdl-message-part-name>String_1</wsdl-message-part-name>
<parameter-mode>IN</parameter-mode>
</wsdl-message-mapping>
</method-param-parts-mapping>
<wsdl-return-value-mapping>
<method-return-value>java.lang.String</method-return-value>
<wsdl-message xmlns:wsdlMsgNS='http://servicios.com/'>wsdlMsgNS:Hello_helloResponse</wsdl-message>
<wsdl-message-part-name>result</wsdl-message-part-name>
</wsdl-return-value-mapping>
</service-endpoint-method-mapping>
</service-endpoint-interface-mapping>
</java-wsdl-mapping>
The ejb gets correctly deployed as I can see in JBoss console and jmx console. As you can see, the webservices.xml definition file defines an ejb link:
<service-impl-bean>
<ejb-link>HelloBean</ejb-link>
</service-impl-bean>
Why does Jboss tries to look for a servlet link with this configuration...
I'm using Jboss 4.0.5 GA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999348#3999348
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999348
19 years, 3 months