[JBoss Seam] - Uncaught ValidationException closes transaction in validatio
by atzbert
Hi All,
Is that true? I read a comment somewhere which was saying that any uncaught exception would cause Seam to close the opened connection (hence preventing the next phases from accessing it...?)
I noticed that when adding a validation method to the input tag that queries the database and afterwards throws an ValidationException if not valid. Then the selectItems (on the same rerendered page) would try to execute a entityquery.getResultList() which results in a transaction - closed exception...
Did I interpret this correctly? If so, is there any way around it?
Any help or hint appreciated,
Tino
my xhtml:
| ...
| <q:field helpText="Please enter an alpha-numerical value" fieldId="receipt_receiptId">
| <h:inputText styleClass="editEntity"
| id="receipt_receiptId"
| validator="#{receiptHome.validateUniqueReceiptId}"
| value="#{receiptHome.instance.receiptId}"
| required="true"
| requiredMessage="Please enter a valid receipt ID" >
| </h:inputText>
| </q:field>
| <q:field fieldId="receipt_rep">
| <h:selectOneMenu id="receipt_rep" value="#{receiptHome.instance.rep}">
| <si:selectItems value="#{allUserList.resultList}" var="user" label="#{user.stringRep}" noSelectionLabel="Select one..."/>
| </h:selectOneMenu>
| </q:field>
| ...
|
my validation method:
public void validateUniqueReceiptId(FacesContext context,
| UIComponent component, Object value) throws ValidatorException {
| if(isManaged() && getInstance().getReceiptId().equals(value.toString())){
| return;
| }
| List existing = fetchReceiptList(value);
| if (existing.size() > 0) {
| throwValidationError("Receipt with this ID already exists",
| component);
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093366#4093366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093366
18Â years, 8Â months
[JBossCache] - Some questions about JBC 1.4
by jorgemoralespou_2
Hi,
I have some questions for which I can`t find an answer.
1- If I configure a non_local JBC, with an Asynch JDBCCacheLoader, configured through a JBoss Datasource. Need this datasource be transactional, or can be local, due to the asynchronizity of the loading/passivation to the data store?
2- When having a 2 node cluster JBC with a JDBCCacheLoader. Is there a way to make passivation of node changes not done in every change, but only on the event of stopping of the JBC service, and loading only on the event of starting of the service?
3- If there is a way for previous question, how can I do this to only read if it is first member of the cluster, only passivate if it is last member of the cluster?
I have read that this is possible in Habanero, but I`m using JBossAS 4.2.x and don`t know if Habanero is compatible with these release.
4- Is there a way to store some data in cache in a transactional mode, and some in a no transactional mode?
Thanks for your replies.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093365#4093365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093365
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Re: Overriding universal classloader, JBoss 4.2.1GA
by jimpo
I guess you are right, after modifying the jboss-web.xml the original classloading the original classcastexception disappeared. However I am still getting classloading -related problems:
1. I got 'org.apache.commons.logging.impl.Log4JLogger' cannot be found exceptions. I have log4j.jar and commons-logging.jar inside my war. To try a quick solution, I removed them from my war, and this seemed to solve the problem.
2. XML parsers. Now I am getting
| 11:41:59,296 ERROR [FacesConfigRuleSet] Cannot configure DescriptionTextRule for pattern 'faces-config/managed-bean/description'
| java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
| at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
| at org.apache.commons.digester.NodeCreateRule.<init>(NodeCreateRule.java:363)
| at com.sun.faces.config.rules.DescriptionTextRule.<init>(DescriptionTextRule.java:42)
| at com.sun.faces.config.rules.FacesConfigRuleSet.addFeatureRules(FacesConfigRuleSet.java:376)
| at com.sun.faces.config.rules.FacesConfigRuleSet.addRuleInstances(FacesConfigRuleSet.java:200)
| at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1663)
| at com.sun.faces.config.ConfigureListener.digester(ConfigureListener.java:973)
| at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:270)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
| at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
| at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
| at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
| 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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| 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:5310)
| 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.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
| 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.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
| at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
| at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
| 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.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.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 $Proxy45.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.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
| 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 $Proxy46.start(Unknown Source)
| 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 sun.reflect.GeneratedMethodAccessor18.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 $Proxy9.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.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.GeneratedMethodAccessor9.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.start(Unknown Source)
| at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
| at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy5.deploy(Unknown Source)
| at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
| at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
| at org.jboss.Main.boot(Main.java:200)
| at org.jboss.Main$1.run(Main.java:508)
| at java.lang.Thread.run(Thread.java:595)
|
I don't have xerces*.jar in my war, or in my JBoss folders as far as I can tell. I have jdom.jar, dom4j.jar ja xml-apis.jar in my war. I have tried removing the jars from JBoss lib, etc. solutions.
What is going on, and how could I fix this issue?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093364#4093364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093364
18Â years, 8Â months
[JBossCache] - Re: ClassCastException/instanceof fails when getting object
by jorgemoralespou_2
I have encountered such a problem before, and mine was due to an Object being moved from one jar to another. While the object is in the same package, same serialVersionUID, classloader is different, and as far as I know, real class identifies by it`s classloader, package, class file, serialVersionUID. So if different classloaders load the class, in reality it is a different class, and you get a ClassCastException.
We`ve been having hard times updating a running application that have objects in cache that have to be updated. For this we have done a real freaky solution.
It`s real hard to update object model of an application running clustered, so good luck.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093363#4093363
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093363
18Â years, 8Â months
[JBossCache] - ClassCastException/instanceof fails when getting object from
by dode
I am replicating a custom type in my JBossAS 4.0.5 cluster. It is working just great, but when I get an object put in the cache by one node on another, instanceof fails and if I just cast to the type I get a ClassCastException.
In the debugger I can see it is the expected type - but somehow it is not the same.
The type in question is a simple bean with some fields and getters/setters. I added a serialVersionUID to it and packed it in a JAR that I added to both the WAR which puts/gets the objects in/from the cache as well as to JBOSS_HOME/server/default/lib, since I get a NoClassDefFoundError when the objects a deserialized if I don't put it there.
I'm sure it's me who is doing something wrong - but what?
In general - is it wise at all to put custom types in the cache or should it better be just a Map with Strings and so?
Torsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093356#4093356
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093356
18Â years, 8Â months
[JBoss Seam] - Re: Eclipse Enterprise Application Project
by tony.herstellï¼ gmail.com
Create an Ear project, select to have it also auto create the War and Jar (I use the EJB3 form).
Crack open a Seam Ant created Ear file (booking example is a good one).
Lay out the files in the right bits (Ear, War and Jar).
Tell MyEclipse to "exploded" deploy it to JBoss and click on the button for the JBoss server inside MyEclipse to just run the server.
Simple as that... I have posted more detailed info that this elsewhere on this forum.
No ANT to build the project
No Ant Script to run the project
No ANT script at all.
You can hack away at the source and you dont even need to re-build/re-deploy the code... 99% of the time (notably when hacking with the .xhtml files) you just refresh the page and carry on... BLINDINGLY productive!!!
Enjoy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093346#4093346
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093346
18Â years, 8Â months