[JBoss Seam] - Re: Problem with selectItems taglib
by dave.rogers
This is the code for the bean that #currentItem refers to:
package halvor.pojo;
|
| // Generated Dec 11, 2006 11:02:45 AM by Hibernate Tools 3.2.0.beta8
|
| import java.util.HashSet;
| import java.util.Set;
|
| import javax.persistence.CascadeType;
| import javax.persistence.Column;
| import javax.persistence.Entity;
| import javax.persistence.FetchType;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.JoinColumn;
| import javax.persistence.ManyToOne;
| import javax.persistence.NamedNativeQueries;
| import javax.persistence.NamedNativeQuery;
| import javax.persistence.OneToMany;
| import javax.persistence.Table;
| import org.hibernate.annotations.GenericGenerator;
| import org.jboss.seam.annotations.Name;
|
| /**
| * Item generated by hbm2java
| */
| @Entity
| @Table(name = "item", catalog = "nrg2", uniqueConstraints = {})
| @Name("item")
| @NamedNativeQueries({
| @NamedNativeQuery(
| name="itemSearch",
| query="select distinct i.*, s.itemCode from item i left join itemSearch s on i.itemId = s.itemId where description like :searchPattern or i.itemId like :searchPattern or s.itemCode = :searchTerm",
| resultClass=Item.class
| )
| })
| public class Item implements java.io.Serializable {
|
| // Fields
|
| private String itemId;
|
| private Catalogue catalogue;
|
| private String description;
|
| private String stock;
|
| private int lead;
|
| private String note;
|
| private Set<Line> lines = new HashSet<Line>(0);
|
| private Set<ItemSearch> itemSearchs = new HashSet<ItemSearch>(0);
|
| private Set<Price> prices = new HashSet<Price>(0);
|
| // Constructors
|
| /** default constructor */
| public Item() {
| }
|
| /** minimal constructor */
| public Item(Catalogue catalogue, String description, String stock, int lead) {
| this.catalogue = catalogue;
| this.description = description;
| this.stock = stock;
| this.lead = lead;
| }
|
| /** full constructor */
| public Item(Catalogue catalogue, String description, String stock,
| int lead, String note, Set<Line> lines,
| Set<ItemSearch> itemSearchs, Set<Price> prices) {
| this.catalogue = catalogue;
| this.description = description;
| this.stock = stock;
| this.lead = lead;
| this.note = note;
| this.lines = lines;
| this.itemSearchs = itemSearchs;
| this.prices = prices;
| }
|
| // Property accessors
| @GenericGenerator(name = "generator", strategy = "increment", parameters = {})
| @Id
| @GeneratedValue(generator = "generator")
| @Column(name = "itemId", unique = true, nullable = false, insertable = true, updatable = true, length = 30)
| public String getItemId() {
| return this.itemId;
| }
|
| public void setItemId(String itemId) {
| this.itemId = itemId;
| }
|
| @ManyToOne(cascade = {}, fetch = FetchType.LAZY)
| @JoinColumn(name = "catalogueId", unique = false, nullable = false, insertable = true, updatable = true)
| public Catalogue getCatalogue() {
| return this.catalogue;
| }
|
| public void setCatalogue(Catalogue catalogue) {
| this.catalogue = catalogue;
| }
|
| @Column(name = "description", unique = false, nullable = false, insertable = true, updatable = true)
| public String getDescription() {
| return this.description;
| }
|
| public void setDescription(String description) {
| this.description = description;
| }
|
| @Column(name = "stock", unique = false, nullable = false, insertable = true, updatable = true, length = 5)
| public String getStock() {
| return this.stock;
| }
|
| public void setStock(String stock) {
| this.stock = stock;
| }
|
| @Column(name = "lead", unique = false, nullable = false, insertable = true, updatable = true)
| public int getLead() {
| return this.lead;
| }
|
| public void setLead(int lead) {
| this.lead = lead;
| }
|
| @Column(name = "note", unique = false, nullable = true, insertable = true, updatable = true)
| public String getNote() {
| return this.note;
| }
|
| public void setNote(String note) {
| this.note = note;
| }
|
| @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "item")
| public Set<Line> getLines() {
| return this.lines;
| }
|
| public void setLines(Set<Line> lines) {
| this.lines = lines;
| }
|
| @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "item")
| public Set<ItemSearch> getItemSearchs() {
| return this.itemSearchs;
| }
|
| public void setItemSearchs(Set<ItemSearch> itemSearchs) {
| this.itemSearchs = itemSearchs;
| }
|
| @OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "item")
| public Set<Price> getPrices() {
| return this.prices;
| }
|
| public void setPrices(Set<Price> prices) {
| this.prices = prices;
| }
|
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993321#3993321
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993321
19 years, 7 months
[JBoss Seam] - variable resolver not working?
by supert24
When my action method of my Seam component is triggered, I try to find an enclosed UIComponent, for which I defined id="datMod", by executing
| UIComponent uiDat = javax.faces.context.FacesContext.getCurrentInstance().getViewRoot().findComponent("datMod");
|
Unfortunatelly it returns null.
Another approach was to resolve a variable "item" bound by this UIComponent, unfortunately returning null, too:
| Object o = javax.faces.context.FacesContext.getCurrentInstance().getApplication().getVariableResolver().resolveVariable(javax.faces.context.FacesContext.getCurrentInstance(), "item");
|
Ok, here is the code of my enclosing UIComponent:
| <h:dataTable var="item" value="#{buy_ActionShowMenu_menu_WEB_OUT.menuItems}" id="datMod">
|
| ..
| <h:column>
| <s:button value="ADD" action="#{mySeamComponent.myActionMethod()}" />
| </h:column>
| </h:dataTable>
Any idea?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993316#3993316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993316
19 years, 7 months
[Security & JAAS/JBoss] - RMI over SSL - mutual authentication
by Evka
Hello everybody.
I've tried to configure Jboss to use RMI over SSL to access my Session beans. It works fine only that way, the server sends it's certificate key to the client and client must have it in it's trust store, but the client isn't required to send it's certificate key to the server and server doesn't control it. Could you please help me? What am I doing wrong?
The service XML file deployed on server:
| <?xml version="1.0" encoding="UTF-8"?>
| <server>
|
| <!-- The SSL domain setup -->
| <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
| name="jboss.security:service=JaasSecurityDomain,domain=RMI+SSL">
| <constructor>
| <arg type="java.lang.String" value="RMI+SSL"/>
| </constructor>
| <attribute name="KeyStoreURL">d:/jboss-4.0.4.GA/server/suc/certs/ServerKeyTrust.jks</attribute>
| <attribute name="KeyStorePass">password</attribute>
| <attribute name="TrustStoreURL">d:/jboss-4.0.4.GA/server/suc/certs/ServerKeyTrust.jks</attribute>
| <attribute name="TrustStorePass">password</attribute>
| <attribute name="ManagerServiceName">jboss.security:service=JaasSecurityManager</attribute>
| </mbean>
|
| <mbean code="org.jboss.invocation.jrmp.server.JRMPInvoker"
| name="jboss.security:service=invoker,type=jrmp,socketType=SSLSocketFactory,wantsClientAuth=true">
| <attribute name="RMIObjectPort">14445</attribute>
| <attribute name="RMIClientSocketFactory">org.jboss.security.ssl.RMISSLClientSocketFactory
| </attribute>
| <attribute name="RMIServerSocketFactoryBean"
| attributeClass="org.jboss.security.ssl.RMISSLServerSocketFactory"
| serialDataType="javaBean">
| <property name="bindAddress">${jboss.bind.address}</property>
| <property name="securityDomain">java:/jaas/RMI+SSL</property>
| <property name="wantsClientAuth">true</property>
| <property name="needsClientAuth">true</property>
| </attribute>
| <depends>jboss.security:service=JaasSecurityDomain,domain=RMI+SSL</depends>
| </mbean>
| </server>
|
Part of the definition in jboss.xml in my deployed application:
| <session>
| <ejb-name>SlSbModule</ejb-name>
| <jndi-name>ejb/SlSbModule</jndi-name>
| <local-jndi-name>SlSbModuleLocal</local-jndi-name>
| <invoker-bindings>
| <invoker>
| <invoker-proxy-binding-name>
| stateless-ssl-invoker
| </invoker-proxy-binding-name>
| </invoker>
| <call-logging>true</call-logging>
| </invoker-bindings>
| </session>
| ...
| <invoker-proxy-bindings>
| <invoker-proxy-binding>
| <name>stateless-ssl-invoker</name>
| <!-- invoker-mbean>jboss:service=invoker,type=jrmp,socketType=SSL</invoker-mbean -->
| <invoker-mbean>jboss.security:service=invoker,type=jrmp,socketType=SSLSocketFactory,wantsClientAuth=true</invoker-mbean>
| <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
| <proxy-factory-config>
| <client-interceptors>
| <home>
| <interceptor>org.jboss.proxy.ejb.HomeInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
| <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
| </home>
| <bean>
| <interceptor>org.jboss.proxy.ejb.StatelessSessionInterceptor</interceptor>
| <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
| <interceptor>org.jboss.proxy.TransactionInterceptor</interceptor>
| <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
| </bean>
| </client-interceptors>
| </proxy-factory-config>
| </invoker-proxy-binding>
| </invoker-proxy-bindings>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993308#3993308
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993308
19 years, 7 months
[EJB 3.0] - context.xml environment entries
by crnflke
This *MIGHT* not be EJB3 specific, but in case it is, I thought I'd better put it in here.
I've got a web application which requires external environment entries. These tell it where to look for certain resources and will differ between our live sites and developer test environments.
When we use Tomcat directly, we use entries in the individual contexts in server.xml. This didn't seem to work in JBoss, so I defined the Environment entries in context.xml
Annoyingly, these don't show up at all in the web application.
Is this a supported use? Do I need to define specific imports in the jboss-web.xml? Or am I merely doing it wrong by defining it for every web context? Is this related to EJB3?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993306#3993306
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993306
19 years, 7 months
[JBoss Seam] - Taks instances
by MelampO
Hello
I am trying to create a Task instances list with the pendings tasks for an actor. I am not doing it from a JSF, so I think that I can't use TaskIntanceList or TaskInstaceListFoType components.
Following DVD Store example, I think that I must use ManagedJbpmContext.
This is the process definition:
| ...
| <start-state name="Inicio">
| <transition name="peticion" to="Peticion"></transition>
| </start-state>
|
| <task-node name="Peticion">
| <task name="evaluarPeticion">
| <assignment actor-id="#{asignarTarea.getBibliotecario}"/>
| </task>
|
| <transition name="aceptar" to="Pedido"></transition>
| <transition name="cancelar" to="Eliminado"></transition>
| </task-node>
| ...
|
I would like to get a tasks list for type "evaluarPeticion" from a bean method.
At this momments, it is working with this code:
| @SuppressWarnings("unchecked")
| public void test() {
| AsignarTarea bibliotecario = new AsignarTarea();
|
| // JBPM Context
| JbpmContext context = ManagedJbpmContext.instance();
|
| // Taks for an actor
| TaskMgmtSession tms = context.getTaskMgmtSession();
|
| List<TaskInstance> taskInstances = (List<TaskInstance>) tms
| .findTaskInstances(bibliotecario.getBibliotecario());
|
| // Task filter
| for (Iterator<TaskInstance> itr=taskInstances.iterator(); itr.hasNext();) {
| TaskInstance taskInstance = itr.next();
|
| if (taskInstance.getName().equals("evaluarPeticion"))
| System.out.println(taskInstance.getVariable("idPeticion"));
| }
|
| }
|
With this method I get all the information I am looking for and it is working fine, but I think that this is not the best way to do it.
Looking at the DVD Store demo, it uses the context.getSession to create a query and access to the information. Can I do somethig like that to get a task instances list for an actor and for a type without manually iterate all the task instances?
If I use context.getSession, I dont know how to implement a query to retrieve a task list.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993298#3993298
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993298
19 years, 7 months
[Clustering/JBoss] - Re: Clustering NOT working on physical separate boxes.
by rajeshchande
Hello Brian,
Thanks for the reply.
Here is the config for protocol stack:
<Config>
| <UDP bind_addr="172.17.132.70" mcast_addr="228.8.8.8" mcast_port="45566" ip_ttl="32" ip_mcast="true"
| mcast_send_buf_size="100000" mcast_recv_buf_size="200000"
| ucast_send_buf_size="100000" ucast_recv_buf_size="200000"
| loopback="true" max_bundle_size="60000" max_bundle_timeout="30" use_incoming_packet_handler="false" use_outgoing_packet_handler="false" enable_bundling="false" />
| <PING timeout="2000" num_initial_members="3"
| up_thread="true" down_thread="true"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <FD shun="true" up_thread="true" down_thread="true"
| timeout="2500" max_tries="5"/>
| <VERIFY_SUSPECT timeout="3000" num_msgs="3"
| up_thread="true" down_thread="true"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="300,600,1200,2400,4800" max_xmit_size="8192"
| up_thread="true" down_thread="true"/>
| <UNICAST timeout="300,600,1200,2400,4800" window_size="100" min_threshold="10" down_thread="true"/>
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="true" down_thread="true"/>
| <FRAG frag_size="8192" down_thread="true" up_thread="true"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
| shun="true" print_local_addr="true"/>
| <pbcast.STATE_TRANSFER up_thread="true" own_thread="true"/>
| </Config>
I have few question:
1) When they merge, there is no "pulling" of the deployments, why?
2) On the jboss index page, do we have "step-by-step" process to make jboss cluster work? (I see all information present, but its too scattered..no? ), If we have such a link can u please provide the same?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993296#3993296
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993296
19 years, 7 months
[Management, JMX/JBoss] - JMX vs EJB
by mirciuss
Hi,
I am about to develop an Network Management System application with JBoss; it's purpose is to manage network elements.
I am not very sure what technology to use: JMX or EJB.
I am thinking to use JMX MBeans for business logic since I want to map these devices in java objects. These objects should act as remote proxy and should track device changing configuration.
My concern is: how JMX MBeans are acting in multi-user environment ?
I know that EJB stateless beans have different pooling and cycling mechanism that are important in multi-user environment so I am wondering if it would be better to put business logic in stateless EJB beans .
Another approach may be to put EJB beans on top of JMX adaptors (SNMP for instance - I can make trap handling via JMX notification mechanism) - but the same problem can be met in multi-user environment since every EJB method call would use an JMX Mbean to acces the device via SNMP for instance.
Many Thanks in advance, Mircea
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993291#3993291
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993291
19 years, 7 months
[JBoss Seam] - Re: si:selectItem error parsing
by lowecg2004
Hi Pete,
I'm getting this exception:
SEVERE: Error Rendering View[/view/public/order-storage.xhtml]
| java.lang.IllegalArgumentException: selectItems' value="#{hardDisks}" must implement java.lang.Iteratable but it is org.jboss.seam.jsf.ListDataModel@1715c20 (class org.jboss.seam.jsf.ListDataModel)
| at org.jboss.seam.selectitems.ui.UISeamSelectItems.createSelectItems(UISeamSelectItems.java:225)
| at org.jboss.seam.selectitems.ui.UISeamSelectItems.getValue(UISeamSelectItems.java:204)
| at org.apache.myfaces.trinidadinternal.renderkit.uix.SelectItemSupport.addSelectItems(SelectItemSupport.java:270)
| at org.apache.myfaces.trinidadinternal.renderkit.uix.SelectItemSupport.getSelectItems(SelectItemSupport.java:90)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleSelectOneRenderer.encodeAllAsElement(SimpleSelectOneRenderer.java:255)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.encodeAll(FormElementRenderer.java:66)
| at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:294)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.renderFieldCellContents(InputLabelAndMessageRenderer.java:139)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:367)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:263)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:117)
| at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:181)
| at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:673)
| at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:67)
| at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:255)
| at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:277)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:70)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:134)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:150)
| at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:76)
| at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:181)
| at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:673)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
| at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
| 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:32)
| 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: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.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)
Facelets:
<tr:selectOneChoice value="#{orderStorageBean.mediaHardDisk}">
| <si:selectItems value="#{hardDisks}" var="hd" label="#{hd.name}" />
| <si:convertEntity entityClass="com.ripuk.model.MediaHardDisk" />
| </tr:selectOneChoice>
EJB
@Name("orderStorageBean")
| @Stateful
| public class OrderStorageBeanHome implements OrderStorageBean, Serializable {
|
| @SuppressWarnings("unused") //seam handled outjection
| @DataModel
| private List<MediaHardDisk> hardDisks;
|
| ...
| }
Any pointers on what this might be?
Thanks for your help so far,
Chris.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993290#3993290
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993290
19 years, 7 months
[JBoss Seam] - Event scoped component accessing Conversion scope
by quilleashm
I have a search component which is event scoped. Itself it just has four properties which are bound to four input fields in my JSF page.
It extends a generic search component which has a hibernate session which is injected by the @In( create = true ) from the ManagedHibernateSession component. This generic component has bindings to a couple of the controls on the JSF page (grid/parameter panel etc).
The search renders fine when it is visited the first time, including some db queries to get some meta-information. On clicking the search button which posts back the @In injection of the Session fails because the bijection gets fired when binding the UI components to the search object. This happens during the restore view phase when the conversation scope is not available and therefore neither is the hibernate session.
I get the feeling I'm just not using it right but I'm not sure why. Is injecting conversation scoped components into event scoped components something that shouldn't/can't be done? Or do I have my components badly designed.
I've posted the highlights of the classes here..
The component
| @Name( "elementSearch" )
| @Scope( ScopeType.EVENT )
| public class ElementSearch extends SparkSearch
| {
| // control value bindings
| private String eltName;
| private Integer elementSet;
| private Integer country;
| private String eltDigits;
|
| public String getEltName()
| {
| return eltName;
| }
|
| // ... more getters/setters here
|
| public abstract class SparkSearch
| {
| private UIData dataGrid;
| private HtmlPanelGrid parameterGrid;
|
| @In( create = true )
| private Session referenceSession;
|
| @In( required = true )
| private SessionFactory referenceSessionFactory;
|
| public HtmlPanelGrid getParameterGrid()
| {
| return parameterGrid;
| }
|
| public void setParameterGrid( HtmlPanelGrid parameterGrid )
| {
| // this gets called during the restore-view phase at which point the bijection fails on the referenceSession
| this.parameterGrid = parameterGrid;
| }
|
| // .. more getters/setters here + action methods
|
Any comments appreciated.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993288#3993288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993288
19 years, 7 months
[JBoss Seam] - Debuggers can cause early bijection
by quilleashm
Found an interesting and vaguely irritating problem when debugging my Seam application.
My debugger (IDEA) in certain modes will execute toString() on all local/class variables that are visible at a breakpoint for display information. For a Seam component that has interception enabled this results in all the interceptors being fired including bijection. If this happens too early in the JSF lifecycle (e.g. restore view phase) then the bijection can try and inject other components that are not present yet (e.g. conversation scope) and you get an unknown error.
I have no great solution for this. The only possiblility I can think of would be to exclude toString() from the interception which may have other side effects for implementations relying on this.
Cheers.
Mike.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993285#3993285
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993285
19 years, 7 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
<?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<message name="uploadForm1SoapIn">
</message>
<message name="uploadForm1SoapOut">
</message>
<portType name="ServiceSoap">
<input message="tns:uploadForm1SoapIn"/>
</portType>
<binding name="ServiceSoap" type="tns:ServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<soap:body use="literal"/>
</binding>
<service name="Service" >
<port name="WSInfoPathEndPointPort" binding="tns:ServiceSoap">
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
</service>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
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.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.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:595)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993281#3993281
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993281
19 years, 7 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
<?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<input message="tns:uploadForm1SoapIn"/>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<soap:body use="literal"/>
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
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.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.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:595)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993280#3993280
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993280
19 years, 7 months
[JBossWS] - Excpetion
by Ruslan.Khmelyuk
Hello!
I am using Specification-Version: jbossws-1.0.
While my work, I need to create web-service to provide processing of submitted InfoPath forms.
According to this I change autogenerated wsdl to other more compatible with InfoPath format of wsdl:
?xml version="1.0" encoding="utf-8" ?>
<definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://myhost/WSInfoPath/"
targetNamespace="http://myhostWSInfoPath/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<xs:schema elementFormDefault="qualified" targetNamespace="http://myhost/WSInfoPath/">
<xs:element name="uploadForm1">
<xs:complexType />
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="requestData" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="uploadForm1Response">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="uploadForm1Result">
<xs:complexType mixed="true">
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<soap:operation soapAction="http://myhost/WSInfoPath/uploadForm1" style="document"/>
<soap:body use="literal"/>
<soap:body use="literal"/>
<soap:address location="http://host:8080/EJB/WSInfoPath"/>
While processing SOAP client request to my WebService occurres next exception:
SOAP request exception
java.lang.IllegalArgumentException: local part cannot be "null" when creating a QName
at javax.xml.namespace.QName.(Unknown Source)
at javax.xml.namespace.QName.(Unknown Source)
at org.jboss.ws.binding.soap.SOAPBindingProvider.getParameterFromMessage(SOAPBindingProvider.java:787)
at org.jboss.ws.binding.soap.SOAPBindingProvider.unbindRequestMessage(SOAPBindingProvider.java:282)
at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:112)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
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.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.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:595)
Maybe problem in incorrect wsdl and soap format?
I do know!!!
Maybe you know? - Then please help!!!
Thanks, Ruslan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993278#3993278
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993278
19 years, 7 months
[JBoss jBPM] - Couldn't parse 'bean' into a 'org.jbpm.configuration.BeanInf
by yegaofei888@sohu.com
Hi,
I am trying to change the jbpm.war(the websales) to a portlet.
I configured the persistence service in jbpm.cfg.xml with the code below
| <jbpm-context>
| <service name="persistence">
| <factory>
| <bean factory="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="isTransactionEnabled"><false /></field>
| <field name="sessionFactoryJndiName">
| <string value="java:/myHibSessFactJndiName" />
| </field>
| <field name="dataSourceJndiName">
| <string value="java:/myDataSourceJndiName" />
| </field>
| </bean>
| </factory>
| </service>
| ...
| </jbpm-context>
|
I put this jbpm.cfg.xml in the WEB-INF/classes folder of jbpm.war (the websales example application)
And then deploy the application, the exception "Couldn't parse 'bean' into a 'org.jbpm.configuration.BeanInfo'" was thrown:
| 2006-12-13 16:18:05,400 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/jbpm]] Servlet /jbpm threw load() exception
| org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'jbpm.cfg.xml'
| at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:284)
| at org.jbpm.web.JbpmThreadsServlet.init(JbpmThreadsServlet.java:73)
| at javax.servlet.GenericServlet.init(GenericServlet.java:211)
| at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
| at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
| at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
| 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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.apache.catalina.core.StandardContext.init(StandardContext.java:5116)
| 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.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
| at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:297)
| at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:103)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:371)
| at org.jboss.web.WebModule.startModule(WebModule.java:83)
| at org.jboss.web.WebModule.startService(WebModule.java:61)
| 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 $Proxy85.start(Unknown Source)
| at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
| 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.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
| at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
| at org.jboss.ws.server.WebServiceDeployer.start(WebServiceDeployer.java:117)
| at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
| at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
| 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 $Proxy86.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor71.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:1007)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
| 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:464)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jbpm.JbpmException: couldn't parse 'jbpm-context' into a 'org.jbpm.configuration.JbpmContextInfo': <?xml version="1.0" encoding="UTF-8"?><jbpm-context name="default.jbpm.context">
| <service name="persistence">
| <factory>
| <bean factory="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="isTransactionEnabled"><false/></field>
| <field name="sessionFactoryJndiName">
| <string value="java:/jbpm/SessionFactory"/>
| </field>
| <field name="dataSourceJndiName">
| <string value="java:comp/env/JbpmDS"/>
| </field>
|
| </bean>
| </factory>
| </service>
|
| <!-- <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
| -->
| </jbpm-context>
| at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:144)
| at org.jbpm.configuration.ObjectFactoryParser.parseElements(ObjectFactoryParser.java:117)
| at org.jbpm.configuration.ObjectFactoryParser.parseElementsStream(ObjectFactoryParser.java:110)
| at org.jbpm.JbpmConfiguration.parseObjectFactory(JbpmConfiguration.java:303)
| at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:280)
| ... 139 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:142)
| ... 143 more
| Caused by: org.jbpm.JbpmException: couldn't parse 'bean' into a 'org.jbpm.configuration.BeanInfo': <?xml version="1.0" encoding="UTF-8"?><bean factory="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="isTransactionEnabled"><false/></field>
| <field name="sessionFactoryJndiName">
| <string value="java:/jbpm/SessionFactory"/>
| </field>
| <field name="dataSourceJndiName">
| <string value="java:comp/env/JbpmDS"/>
| </field>
|
| </bean>
| at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:144)
| at org.jbpm.configuration.JbpmContextInfo.<init>(JbpmContextInfo.java:81)
| ... 148 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at org.jbpm.configuration.ObjectFactoryParser.parse(ObjectFactoryParser.java:142)
| ... 149 more
| Caused by: java.lang.NullPointerException
| at org.jbpm.configuration.BeanInfo.<init>(BeanInfo.java:55)
|
I followed the jbpm document(http://docs.jboss.com/jbpm/v3/userguide/persistence.html#userpro... to config it.
I also put the hibernate.cfg.xml and ehcache.xml in WEB-INF/classes
What shll I do?
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993277#3993277
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993277
19 years, 7 months
[JBoss Messaging] - Re: javax.jms.InvalidDestinationException: Destination is no
by chaituu
U said for remote lookup u use testQueue but what about QueueConnectionFactory.how to lookup QueueConnectionFactory??
when i send the message to the queue i am getting below exception.
| javax.jms.InvalidDestinationException: Destination is not an instance of SpyDestination JBossQueue[testQueue]
|
|
| Properties env = new Properties();
| env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
| env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
| env.put(Context.PROVIDER_URL, "localhost:1099");
| Context remoteCtx = new InitialContext(env);
| Queue queue = (Queue)remoteCtx.lookup("queue/testQueue");
| System.out.println("queue="+queue);
|
| //I am getting queue correctly here
|
|
| QueueConnectionFactory queueFactory = (QueueConnectionFactory)remoteCtx.lookup("java:JmsXA");
|
| //How to get queueFactory here??
|
| System.out.println("queueFactory="+queueFactory);
| queueConnection = queueFactory.createQueueConnection();
| QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
| QueueSender queueSender = queueSession.createSender(queue);
| System.out.println("queueSender="+queueSender);
| TextMessage message = queueSession.createTextMessage();
|
| message.setText(Long.toString(2));
| queueSender.send(message);
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993274#3993274
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993274
19 years, 7 months
[JBoss Seam] - Re: Basic Seam questions
by lightbulb432
That's a really good answer, thanks.
I now have a question for when the different things on the "assembly line" are not different session beans, but different action methods on the same session bean.
Because it's the same session bean, how does this impact when you need to inject or outject? For example, if you have a User entity that is used by multiple action methods on the same session bean, I'm guessing you would of course inject it using @In...but would you need to outject it using @Out as well?
I ask because it's the same session bean, so is there a need to outject?
Also, is there any major downside to outjecting every variable? It seems like you could outject every variable for use in session beans (parts of the "assembly line") that you will develop at a later time?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993272#3993272
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993272
19 years, 7 months
[JBoss Seam] - Can't get Seam managed persistance working in an app scoped
by krica
OK, this is not really a big deal, because it works when I change it to EJB managed (i.e. @PersistenceContext), but I'ld like to understand why it doesn't work.
I have an application-scoped bean that should be initialized at startup:
| @Stateful
| @Name("anonUserFactory")
| @Startup(depends="org.jboss.seam.core.ejb")
| @Scope(ScopeType.APPLICATION)
| public class AnonUserFactory implements AnonUserFactoryInterface {
|
| @Logger
| protected Log log;
|
| private User anonUser;
|
| @In(create = true)
| EntityManager theDatabase;
|
| @Create
| public void createAnonUser() {
| try {
| anonUser = (User) theDatabase.createQuery("blah blah").getSingleResult();
| anonUser.populatePermissions();
| }
| catch (NoResultException e) {
| log.fatal("Could not load anonymous user", e);
| throw e;
| }
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public User getAnonUser() {
| return anonUser;
| }
|
| @Remove
| @Destroy
| public void destroy() {
| }
| }
|
For some reason, theDatabase is null when I try to use it. This same injected EntityManager works in other (non-startup) classes, so the datasource and all that is set up correctly. I get no exception, except of course the NPE when trying to use the EntityManager.
If I may throw in a related question. Seeing as this EntityManager is not needed after the @Create method, how can I close it. If I do, I get the exception stating that I cannot call close() on injected components. I've tried to get it via "Component.getInstance("em", true)" and all sorts of things, but it always returns null.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993268#3993268
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993268
19 years, 7 months