[JBoss Seam] - Validating errors in JBoss Seam using FacesMessages
by lara
Hi,
I am using jboss-seam-1.2.0.PATCH1 and I am try to display a message for unique names. I mean I am adding a client and the name should always be unique, I added the following in the ClientHome.java class:
| @Override
| public String persist() {
| try {
| return super.persist();
| }
| catch(Exception e)
| {
| if (e instanceof javax.persistence.EntityExistsException) {
| FacesMessages.instance().add("name", "Client Name should be unique");
| }
| return null;
| }
| }
|
The problem is that the error is catched and I have no bug in the application but the message is not displayed and I am getting the following on the server:
| ERROR [STDERR] com.sun.faces.lifecycle.RenderResponsePhase execute
| INFO: WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
|
How can I solve this issue?
Any help is appreciated!
Best Regards,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027839#4027839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027839
19Â years, 1Â month
[Management, JMX/JBoss] - Quartz MBean cannot find Classloader
by davidn
Hi,
Loading a deploy/quartz-service.xml works quite nicely upon startup, but if there is a class in the Quartz Job table, the MBean-launched service can't find the classloader. I attempted to resolve it with a element, but after reading for hours, there are no clear answers. There are some posts that skirt the issue, but no best practice or practical replies.
Following is the descriptor, then the error:
<server>
|
| <classpath codebase="." archives="MyApp.ear" />
|
| <mbean code="org.quartz.ee.jmx.jboss.QuartzService"
| name="user:service=QuartzService,name=QuartzService">
| <depends>jboss.jca:service=DataSourceBinding,name=MyDS</depends>
|
| <attribute name="Properties">
| # Default Properties file for use by StdSchedulerFactory
| # to create a Quartz Scheduler Instance, if a different
| # properties file is not explicitly specified.
| #
|
| # org.quartz.scheduler.classLoadHelper.class =
|
| org.quartz.scheduler.instanceName = MyScheduler
| org.quartz.scheduler.rmi.export = false
| org.quartz.scheduler.rmi.proxy = false
| org.quartz.scheduler.xaTransacted = false
|
| org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool
| org.quartz.threadPool.threadCount = 5
| org.quartz.threadPool.threadPriority = 4
| org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
| org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.MSSQLDelegate
| org.quartz.jobStore.useProperties=false
| org.quartz.jobStore.dataSource=MYDS
| org.quartz.jobStore.isClustered=false
| org.quartz.dataSource.MYDS.jndiURL = java:/MyDS
| org.quartz.jobStore.tablePrefix = QRTZ_
|
| #org.quartz.jobStore.nonManagedTXDataSource = QUARTZ_NO_TX
| #org.quartz.dataSource.QUARTZ_NO_TX.jndiURL = java:/jdbc/QuartzNoTxDS
|
| org.quartz.jobStore.misfireThreshold = 60000
| </attribute>
| </mbean>
|
anonymous wrote : ERROR:
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: user:service=QuartzService,name=QuartzService
| State: FAILED
| Reason: org.quartz.SchedulerConfigException: Failed to start Scheduler - [See nested exception: org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Couldn't retrieve trigger: No ClassLoaders found for: com.mycom.dto.TimerInfo [See nested exception: java.lang.ClassNotFoundException: No ClassLoaders found for: com.mycom.dto.TimerInfo]]]
| I Depend On:
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027834#4027834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027834
19Â years, 1Â month
[JBoss Portal] - Switching to Sybase Database in JBoss Portal
by eabarquez
Hello All,
I am trying to switch the database of my JBoss Portal installation to Sybase. I followed the directions in the reference guide on how to switch database, i.e.:
1. Place the connectors in the "[JBOSS_HOME]\server\default\lib" folder.
2. Add a "portal-sybase-ds.xml" datasource file and place it in the "deploy" folder. The file is shown below.
3. Remove the "portal-hsqldb-ds.xml" in the "deploy" folder to avoid conflict in the new datasource.
4. Change the dialect to "org.hibernate.dialect.SybaseDialect" of the different "hibernate.cfg.xml" files found in the "jboss-portal.sar" folder to force the DB dialect to Sybase.
When I run the server, the tables are being created accordingly. However, it throws the exception shown below. I also cannot navigate to the portal page. Is there anything I am missing out in the process?
I am using the server that is bundled with the zip file that I downloaded in the JBoss Portal site. Here are my specifications:
JBOSS: jboss-portal-2.6-ALPHA2
OS: Windows XP
| The exception being thrown:
|
| --- MBeans waiting for other MBeans ---
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: javax.jcr.RepositoryException: failed to create folder for repository meta data: failed to check existence of file system entry: /meta: failed to check existence of file system entry: /meta
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| portal:service=JAASLoginModule
| portal:service=Hibernate,type=CMS
| portal:service=Module,type=IdentityServiceController
| portal:service=InterceptorStackFactory,type=Cms
| Depends On Me:
| portal:service=Management,type=CMS,name=Default
| portal:commandFactory=CMSObject
| cms.pm.cache:service=TreeCache
| portal:service=ContentEditor,type=cms
|
| ObjectName: portal:service=Hibernate,type=Instance
| State: FAILED
| Reason: org.hibernate.exception.GenericJDBCException: could not execute query
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| Depends On Me:
| portal:container=Instance
|
| ObjectName: portal:service=Hibernate,type=PortalObject
| State: FAILED
| Reason: org.hibernate.exception.GenericJDBCException: could not execute query
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| Depends On Me:
| portal:container=PortalObject
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: portal:service=Hibernate,type=Instance
| State: FAILED
| Reason: org.hibernate.exception.GenericJDBCException: could not execute query
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| Depends On Me:
| portal:container=Instance
|
| ObjectName: portal:service=Hibernate,type=PortalObject
| State: FAILED
| Reason: org.hibernate.exception.GenericJDBCException: could not execute query
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| Depends On Me:
| portal:container=PortalObject
|
| ObjectName: portal:service=CMS
| State: FAILED
| Reason: javax.jcr.RepositoryException: failed to create folder for repository meta data: failed to check existence of file system entry: /meta: failed to check existence of file system entry: /meta
| I Depend On:
| jboss.jca:service=DataSourceBinding,name=PortalDS
| portal:service=JAASLoginModule
| portal:service=Hibernate,type=CMS
| portal:service=Module,type=IdentityServiceController
| portal:service=InterceptorStackFactory,type=Cms
| Depends On Me:
| portal:service=Management,type=CMS,name=Default
| portal:commandFactory=CMSObject
| cms.pm.cache:service=TreeCache
| portal:service=ContentEditor,type=cms
|
| My portal-sybase-ds.xml file:
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>PortalDS</jndi-name>
| <connection-url>jdbc:sybase:Tds:cc3:5000/jbossportal</connection-url>
| <driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
| <user-name>sa</user-name>
| <password></password>
| <metadata>
| <type-mapping>Sybase</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
Please advise. Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027829#4027829
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027829
19Â years, 1Â month