[EJB 3.0] - RC9 mappedBy and InheritanceType.JOINED problem
by supernovasoftware.com
I want to upgrade to JBoss 4.0.5, but I cannot deploy my applications anymore.
I have some classes with
@Inheritance(strategy=InheritanceType.JOINED )
and a collection mapped as
| private Set<Coupling> couplings;
| @OneToMany(mappedBy="state")
| public Set<Coupling> getCouplings() { return couplings; }
| public void setCouplings(Set<Coupling> couplings) { this.couplings = couplings; }
|
State is not a property of Coupling, but is a property of the base class GenericItem.
This deployed find in 4.0.4, but now I get the following error. Is this due changes in RC9? I would appreciate any advice on a workaround or solution.
| org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: pipetracker.model.inventory.coupling.Coupling.state in pipetracker.model.state.State.couplings
| at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:506)
| at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:471)
| at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
| at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1054)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:296)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1211)
| at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:264)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:102)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.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.GeneratedMethodAccessor5.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 $Proxy56.start(Unknown Source)
| at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96)
| at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:467)
| at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:317)
| at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
| at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
| at sun.reflect.GeneratedMethodAccessor3.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.GeneratedMethodAccessor5.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 $Proxy28.start(Unknown Source)
| at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
| 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.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:92)
| 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 $Proxy29.start(Unknown Source)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at sun.reflect.GeneratedMethodAccessor13.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 $Proxy6.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.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.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.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.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)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993602#3993602
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993602
19 years, 7 months
[JBoss Seam] - Re: Can Seam work with no ejb3 but with Hibernate ORM?
by pgrillo
anonymous wrote : "how can I have my DAOs use the Seam-managed persistence context when running inside the context of Seam, but use some other method of persistence context management outside of Seam"
|
Yes, that is my main problem. However, our DAOs are not publicly constructable, they are returned from one of our DAO factories, given a "product id" because we have different flavors of "Customer DAOs" depending on the context (productID) in which we are working. It's the nature of our business.
Our code knows its productID, and simply does:
DOAFactory.getFactory(productID).getCustomerDAO()
However, our DAO's DO have setSession(Session) on them as well (override).
So, maybe there is an answer somewhere using your approach, i've just got to figure it out. perhaps our seam components don't use our DAOFactory directly, but a Seam component that interacts with our DAOFactory, that will get the DAO and set the "injected" session into it ....
Thanks for the idea, Gavin, i'll see if i can get it working.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993599#3993599
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993599
19 years, 7 months
[JBoss Seam] - Re: Seam generate-entities failing
by paradigmza
Hi,
I have also been getting this error
| [hibernate] Expression pojo.identifierProperty is undefined on line 47, column 85 in view/list.xhtml.ftl.
| [hibernate] The problematic instruction:
| [hibernate] ----------
| [hibernate] ==> ${pojo.identifierProperty.name} [on line 47, column 83 in view/list.xhtml.ftl]
| [hibernate] ----------
|
| [hibernate] Java backtrace for programmers:
| [hibernate] ----------
| [hibernate] freemarker.core.InvalidReferenceException: Expression pojo.identifierProperty is undefined on line 47, column 85 in view/list.xhtml.ftl.
| [hibernate] at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
| [hibernate] at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
| [hibernate] at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
| [hibernate] at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
| [hibernate] at freemarker.core.Expression.getStringValue(Expression.java:93)
| [hibernate] at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
| [hibernate] at freemarker.core.Environment.visit(Environment.java:196)
| [hibernate] at freemarker.core.MixedContent.accept(MixedContent.java:92)
|
and the problem is with tables with composite primary keys.
I was using MySql And everything works perfectly until I add a table with a composite primary key.
create table `seantest`.`linktable` (
`link_fk` int(11) NOT NULL DEFAULT '0' ,
`link2_fk` int(11) NOT NULL DEFAULT '0' ,
PRIMARY KEY (`link_fk`,`link2_fk`)
)Engine=InnoDB;
Any ideas on how to fix this?
Thanks
Sean.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993588#3993588
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993588
19 years, 7 months
[Clustering/JBoss] - Re: Clustering NOT working on physical separate boxes.
by bstansberry@jboss.com
I checked and the farm service doesn't attempt to monitor merges. If you want you can add a feature request JIRA for that? JBoss Application Server project.
There really isn't a simple step-by-step guide. Typically the "run -c all on all the servers" approach just works. If it doesn't it's not a simple step-by-step thing to resolve, as the source of problems tends to be very specific to the particular environment. But, you're right, the docs are weak when it comes to the initial effort on getting things running; they dive in too much into details are architectural principles.
Re: your config, don't change the GMS.join_timeout. A PING timeout of 300000 is way to high; how about something like 5000 or 7500? To be honest, I have no idea what kind of weird effects a PING timeout of 300000 would cause. If your servers aren't able to discover each other normally within 5 seconds, I recommend you talk to your network guys to see if there are communication issues between the servers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993583#3993583
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993583
19 years, 7 months
[JBoss Seam] - Re: Problem with DataModelSelection?
by jkrupka
Certainly... Here's the two most relevant snippets, let me know if there's something else that would be helpful...
|
| @Name("eTDocumentEditor")
| @Stateful
| @SerializedConcurrentAccess
| @Interceptors(SeamInterceptor.class)
| public class ETDocumentEditorBean implements ETDocumentEditor {
|
| @In(create = true)
| private EntityManager entityManager;
|
| @Valid
| private ETDocument instance = new ETDocument();
|
| private boolean startConv = true;
|
| @DataModel
| private List<ETContact> contactList;
|
| @DataModelSelection
| private ETContact selectedETContact;
|
| @In(create = true)
| private ETContactEditor eTContactEditor;
|
| @In(create = false, required = false)
| private ETContactFinder eTContactFinder;
|
| private boolean isNew = true;
|
| private boolean isChild = true;
|
| private String doneOutcome = "find";
|
| private String doneChildOutcome = "doneChild";
|
| @In(required = false)
| private transient ETDocumentFinder eTDocumentFinder;
|
| @In(create = true)
| private transient ResourceBundle resourceBundle;
|
| @TransactionAttribute(NOT_SUPPORTED)
| public ETDocument getInstance() {
| return instance;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public void setInstance(ETDocument instance) {
| this.instance = instance;
|
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public boolean isNew() {
| return isNew;
| }
|
| public void setNew(boolean isNew) {
| this.isNew = isNew;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public boolean isChild() {
| return isChild;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public void setChild(boolean isChild) {
| this.isChild = isChild;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public void setDoneOutcome(String outcome) {
| doneOutcome = outcome;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public void setDoneChildOutcome(String outcome) {
| doneChildOutcome = outcome;
| }
|
| public String create() {
| if (entityManager.find(ETMaster.class, instance.getPartkey()) == null ) {
| FacesContext.getCurrentInstance().addMessage(
| null,
| new FacesMessage("This violates a constraint!"));
| FacesContext.getCurrentInstance().addMessage(
| null,
| new FacesMessage("There is no EiTradeMaster record with a primary key of " +
| instance.getPartkey()));
| return null;
| }
|
| entityManager.persist(instance);
| isNew = false;
| refreshFinder();
| return null;
| }
|
| @End(ifOutcome = {"find", "doneChild"})
| public String update() {
| refreshFinder();
| return isChild ? doneChildOutcome : doneOutcome;
| }
|
| @End(ifOutcome = {"find", "doneChild"})
| public String delete() {
| entityManager.remove(instance);
| entityManager.flush();
| refreshFinder();
| return isChild ? doneChildOutcome : doneOutcome;
| }
|
| @Begin(nested=true)
| public String updateAndCreateChild() {
| eTContactEditor.setInstance(new ETContact());
| eTContactEditor.setDocConInstance(new ETDocContact(
| new ETDocContactId(instance.getDocId(), null)));
| eTContactEditor.setNew(true);
| eTContactEditor.setChild(true);
| refreshFinder();
| return "child";
| }
|
| @End(ifOutcome = {"find", "doneChild"})
| public String done() {
|
| if (!isNew)
| entityManager.refresh(instance);
| return isChild ? doneChildOutcome : doneOutcome;
| }
|
| @Begin(nested=true)
| public String selectContact() {
| eTContactEditor.setInstance(selectedETContact);
| eTContactEditor.setDocConInstance(entityManager.find(ETDocContact.class,
| new ETDocContactId(instance.getDocId(), selectedETContact.getContactkey())));
| eTContactEditor.setNew(false);
| eTContactEditor.setChild(true);
|
| return "editEiTradeContact";
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public String reorderChildren() {
| eTContactFinder.setDocumentKey(instance.getDocId());
| eTDocumentFinder.reorder();
| return null;
| }
|
| @TransactionAttribute(NOT_SUPPORTED)
| public String findChildren() {
| contactList = instance.getContacts();
| return null;
| }
|
| public List<ETContact> getContactList() {
| return contactList;
| }
|
| private void refreshFinder() {
| if (eTDocumentFinder != null) {
| eTDocumentFinder.refresh();
| }
| }
|
| @Destroy
| @Remove
| public void destroy() {
| }
|
| public ETContactFinder getETContactFinder() {
| return eTContactFinder;
| }
|
| public void setETContactFinder(ETContactFinder contactFinder) {
| eTContactFinder = contactFinder;
| }
|
| public void setContactList(List<ETContact> contactList) {
| this.contactList = contactList;
| }
|
| }
| ...
|
|
|
| editEiTradeDocument:
|
| <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
| <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
| <%@ taglib uri="http://javascript4jsf.dev.java.net/" prefix="j4j" %>
| <%@ taglib uri="http://jboss.com/products/seam/taglib" prefix="s" %>
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
| <f:view>
| <f:loadBundle basename="messages" var="msg"/>
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
| <meta http-equiv="Content-Script-Type" content="text/javascript" />
| <title>
| <h:outputText value="#{msg.Create} #{msg.EiTradeDocument}" rendered="#{eTDocumentEditor.new}"/>
| <h:outputText value="#{msg.Update}/#{msg.Delete} #{msg.EiTradeDocument}" rendered="#{!eTDocumentEditor.new}"/>
| </title>
| <style type="text/css" media="all">
| @import "style/default/screen.css";
| </style>
| </head>
| <body>
| <h:form>
|
| <h1>
| <h:outputText value="#{msg.Create} #{msg.EiTradeDocument}" rendered="#{eTDocumentEditor.new}"/>
| <h:outputText value="#{msg.Update}/#{msg.Delete} #{msg.EiTradeDocument}" rendered="#{!eTDocumentEditor.new}"/>
| </h1>
|
| <div class="rvgSwitch">
| <h:selectOneMenu value="#{switcher.conversationIdOrOutcome}">
| <f:selectItem itemLabel="Create EiTradeDocument" itemValue="editEiTradeDocument"/>
| <f:selectItem itemLabel="Create EiTradeContact" itemValue="editEiTradeContact"/>
| <f:selectItem itemLabel="Create EiTradeMaster" itemValue="editEiTradeMaster"/>
| <f:selectItem itemLabel="Create EiTradeUomXref" itemValue="editEiTradeUomXref"/>
| <f:selectItem itemLabel="Find EiTradeDocument" itemValue="findEiTradeDocument"/>
| <f:selectItem itemLabel="Find EiTradeContact" itemValue="findEiTradeContact"/>
| <f:selectItem itemLabel="Find EiTradeMaster" itemValue="findEiTradeMaster"/>
| <f:selectItem itemLabel="Find EiTradeUomXref" itemValue="findEiTradeUomXref"/>
| <f:selectItems value="#{switcher.selectItems}"/>
| </h:selectOneMenu>
| <h:commandButton action="#{switcher.select}" value="Switch"/>
| </div>
|
| <div class="rvgChildren">
| <fieldset class="rvgFieldSet">
| <legend><h:outputText value="#{msg.EiTradeDocument} #{msg.Attributes}"/></legend>
|
| <span class="rvgInputs">
| <span class="rvgMessage"><h:messages globalOnly="true"/></span>
| <s:validateAll>
| <h:panelGrid columns="4" headerClass="rvgInputs">
| <h:outputLabel value="#{msg.EiTradeDocument_documentkey}" for="docId">
| <h:inputText value="#{eTDocumentEditor.instance.docId}" id="docId" disabled="true"/>
| <span class="rvgMessage"><h:message for="docId"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_isaidkey}" for="isaidkey">
| <h:inputText value="#{eTDocumentEditor.instance.isaidkey}" id="isaidkey" disabled="#{eTDocumentEditor.child}" required="true"/>
| <span class="rvgMessage"><h:message for="isaidkey"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_partkey}" for="partkey">
| <h:inputText value="#{eTDocumentEditor.instance.partkey}" id="partkey" disabled="#{eTDocumentEditor.child}" required="true"/>
| <span class="rvgMessage"><h:message for="partkey"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_tsetid}" for="tsetid">
| <h:inputText value="#{eTDocumentEditor.instance.tsetid}" id="tsetid" required="true"/>
| <span class="rvgMessage"><h:message for="tsetid"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_direction}" for="direction">
| <h:inputText value="#{eTDocumentEditor.instance.direction}" id="direction" required="true"/>
| <span class="rvgMessage"><h:message for="direction"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_partnerGsId}" for="partnerGsId">
| <h:inputText value="#{eTDocumentEditor.instance.partnerGsId}" id="partnerGsId"/>
| <span class="rvgMessage"><h:message for="partnerGsId"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_burrisGsId}" for="burrisGsId">
| <h:inputText value="#{eTDocumentEditor.instance.burrisGsId}" id="burrisGsId"/>
| <span class="rvgMessage"><h:message for="burrisGsId"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_loc}" for="loc">
| <h:inputText value="#{eTDocumentEditor.instance.loc}" id="loc" required="true"/>
| <span class="rvgMessage"><h:message for="loc"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_ediset}" for="ediset">
| <h:inputText value="#{eTDocumentEditor.instance.ediset}" id="ediset" required="true"/>
| <span class="rvgMessage"><h:message for="ediset"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_rptid}" for="rptid">
| <h:inputText value="#{eTDocumentEditor.instance.rptid}" id="rptid"/>
| <span class="rvgMessage"><h:message for="rptid"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_tstprod}" for="tstprod">
| <h:inputText value="#{eTDocumentEditor.instance.tstprod}" id="tstprod" required="true"/>
| <span class="rvgMessage"><h:message for="tstprod"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_billto}" for="billto">
| <h:inputText value="#{eTDocumentEditor.instance.billto}" id="billto"/>
| <span class="rvgMessage"><h:message for="billto"/></span>
| </h:outputLabel>
| <h:outputLabel value="#{msg.EiTradeDocument_chrgcode}" for="chrgcode">
| <h:inputText value="#{eTDocumentEditor.instance.chrgcode}" id="chrgcode"/>
| <span class="rvgMessage"><h:message for="chrgcode"/></span>
| </h:outputLabel>
| </h:panelGrid>
| </s:validateAll>
| </span>
|
| <span class="rvgActions">
| <h:commandButton type="submit" value="#{msg.Create}" action="#{eTDocumentEditor.create}" rendered="#{eTDocumentEditor.new}" accesskey="c"><j4j:defaultAction/> </h:commandButton>
| <h:commandButton type="submit" value="#{msg.Update}" action="#{eTDocumentEditor.update}" rendered="#{!eTDocumentEditor.new}" accesskey="u"><j4j:defaultAction/> </h:commandButton>
| <h:commandButton type="submit" value="#{msg.Delete}" action="#{eTDocumentEditor.delete}" rendered="#{!eTDocumentEditor.new}" accesskey="d"/>
| <h:commandButton type="submit" value="#{msg.Done}" action="#{eTDocumentEditor.done}" immediate="true" accesskey="e"/>
| <h:commandButton type="submit" value="#{msg.SaveAndCreate} #{msg.EiTradeContact}" action="#{eTDocumentEditor.updateAndCreateChild}" accesskey="s" rendered="#{!eTDocumentEditor.new}"/>
|
| </span>
|
| </fieldset>
| </div>
|
| <div class="rvgChildren">
|
| <h2>
| <h:outputText value="Associated Contacts" rendered="true"/>
| </h2>
|
| <div class="rvgChildren">
| <h:outputText value="#{msg.No} #{msg.EiTradeContact} #{msg.MatchedSearchCriteria}" rendered="#{!eTDocumentEditor.hasContacts"/>
|
| <h:dataTable value="#{eTDocumentEditor.contactList}" var="eTContact" rendered="true"
| rowClasses="rvgRowOne,rvgRowTwo" headerClass="rvgOrder">
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_contactkey}">
| <f:param name="orderBy" value="contactkey"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.contactkey}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_name}">
| <f:param name="orderBy" value="name"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.name}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_atten}">
| <f:param name="orderBy" value="atten"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.atten}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_addr1}">
| <f:param name="orderBy" value="addr1"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.addr1}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_addr2}">
| <f:param name="orderBy" value="addr2"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.addr2}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_addr3}">
| <f:param name="orderBy" value="addr3"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.addr3}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_city}" >
| <f:param name="orderBy" value="city"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.city}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_state}" >
| <f:param name="orderBy" value="state"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.state}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_zip}" >
| <f:param name="orderBy" value="zip"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.zip}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_phone}" >
| <f:param name="orderBy" value="phone"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.phone}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_cell}" >
| <f:param name="orderBy" value="cell"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.cell}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:commandLink value="#{msg.EiTradeContact_email}" >
| <f:param name="orderBy" value="email"/>
| </h:commandLink>
| </f:facet>
| <h:outputText value="#{eTContact.email}"/>
| </h:column>
|
| <h:column>
| <f:facet name="header"><h:outputText value="#{msg.Action}"/></f:facet>
| <h:commandButton action="#{eTDocumentEditor.selectContact}" value="#{eTContactSelector.buttonLabel}"/>
| </h:column>
| </h:dataTable>
| </div>
| </div>
|
|
| </h:form>
|
| </body>
| </f:view>
| </html>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993582#3993582
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993582
19 years, 7 months
[JBoss Seam] - Problem with Stateful SessionBean
by jrosskopf
Hello,
I have a stateful SessionBean which should be a facade to my Entities, etc.
It is declared as following:
| @Stateful
|
| @Name("currentUser")
| @Scope(ScopeType.CONVERSATION)
| public class UserFacadeBean implements UserFacade {
| public static final String LOGIN_SUCCESS = "login_success";
| public static final String LOGIN_FAILED = "login_failed";
|
| @Logger
| Log log;
|
| String username = new String("");
| String password = new String ("");
|
| public String getPassword() {
| return password;
| }
| public void setPassword(String password) {
| this.password = password;
| }
| public String getUsername() {
| return username;
| }
| public void setUsername(String username) {
| this.username = username;
| }
|
| public String login() {
| log.info("Trying to log in \"" + username + "\" with password \"" + password + "\";");
|
| return LOGIN_SUCCESS;
| }
|
| @Destroy @Remove
| public void destroy() {
| log.info("Destroying ...");
| }
| }
|
I tried to deploy the application (faclets and ICEFaces), but the component was´t recognized by seam.
So I tried to declare the component in components.xml. Now I get the confusing error:
| 20:10:50,062 INFO [Component] Component: currentUser, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: de.yourule.facade.UserFacadeBean,
| JNDI: yourule/UserFacadeBean/local
| 20:10:50,062 ERROR [[/yourule]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListene
| r
| java.lang.IllegalArgumentException: Stateful session bean component should have a method marked @Remove @Destroy: currentUser
| at org.jboss.seam.Component.checkDestroyMethod(Component.java:322)
| at org.jboss.seam.Component.<init>(Component.java:254)
| .
| .
| .
|
And I really don´t understand, whats going wrong.
Any help appreciated! Thank you in advance.
Regards
---
Joachim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993555#3993555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993555
19 years, 7 months