[JBoss Seam] - Iterate List of entities
by vikramchhetryy
Hi all,
I am getting class cast exception when I try to execute this code in this line
roles = (Roles) it.next();
public void loadRolesList() {
| List<Roles> list = (List<Roles>) em
| .createQuery(
| "select r.iroleId, r.strDescription from Roles r order by r.iroleId")
| .getResultList();
| log.info("Query executed = " + list.size());
| Roles roles;
| ListIterator<?> it = list.listIterator();
| while(it.hasNext()){
| roles = (Roles) it.next();
| log.info("Id = " + roles.getIroleId());
| rolesList.add(new SelectItem(roles.getIroleId(), roles
| .getStrDescription()));
| }
| }
|
I am not sure if it is the right way of doing it but I want to iterate the list in java only.
Any help would be appreciated.
Thanks,
Vikram
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121340#4121340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121340
18 years, 5 months
[Installation, Configuration & DEPLOYMENT] - Services with EJB dependency do not start up
by tina99
Hi,
I am currently upgrading from JBoss 4.0.5 to 4.2.2ga. We have some services defined in the service.xml. This xml has not changed since working with JBoss 4.0.5. However with JBoss 4.2.2ga we get the following error message:
| INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=dp.ear,jar=dp.jar,name=ImportManagerBean,service=EJB3 with dependencies:
| INFO [JmxKernelAbstraction] jboss.j2ee:ear=dp.ear,jar=dp.jar,name=QManagerBean,service=EJB3
| INFO [JmxKernelAbstraction] jboss.j2ee:ear=dp.ear,jar=dp.jar,name=VManagerBean,service=EJB3
|
| ...
| ...
|
| [EJBContainer] STARTED EJB: de.dis.set.ejb.ImportManagerBean ejbName: ImportManagerBean
|
| ...
| ...
|
| ObjectName: de.dis.set:service=InitializeApplication
| State: CONFIGURED
| I Depend On:
| jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
| ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager
| State: NOTYETINSTALLED
| Depends On Me:
| de.dis.set:service=ReimportScheduler
| de.dis.set:service=RemoveUnused
| de.dis.set:service=ExportExtProdnamen
| de.dis.set:service=InitializeApplication
The ImportManager seems correct configured, is up and bound to jndi. So what is the problem here? Has something changed from 4.0.5 to 4.2.2ga?
One example configuration of our mbeans:
| <mbean code="org.jboss.varia.scheduler.Scheduler" name="hbv.dpBild:service=RemoveUnused">
| <attribute name="StartAtStartup">true</attribute>
| <attribute name="SchedulableClass">de.dis.service.DeleteUnusedPicsSchedule</attribute>
| <attribute name="InitialStartDate">NOW</attribute>
| <attribute name="SchedulePeriod">6000000</attribute>
| <attribute name="InitialRepetitions">-1</attribute>
| <depends>jboss.j2ee:service=EJB,plugin=pool,jndiName=ImportManager</depends>
| </mbean>
|
Any help appreciated. Thx.
Tina
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121338#4121338
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121338
18 years, 5 months
[JBoss Seam] - Re: FailedConfiguration while running test
by hubaghdadi
| [testng] FAILED CONFIGURATION: @BeforeClass init
| [testng] java.lang.NoClassDefFoundError: EDU/oswego/cs/dl/util/concurrent/ConcurrentReaderHashMap
| [testng] at org.jboss.util.collection.CollectionsFactory.createConcurrentReaderMap(CollectionsFactory.java:73)
| [testng] at org.jboss.kernel.plugins.event.AbstractEventEmitter.<init>(AbstractEventEmitter.java:60)
| [testng] at org.jboss.kernel.plugins.AbstractKernelObject.<init>(AbstractKernelObject.java:47)
| [testng] at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.<init>(AbstractBootstrap.java:51)
| [testng] at org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap.<init>(BasicBootstrap.java:58)
| [testng] at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:130)
| [testng] at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:76)
| [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] ... Removed 22 stack frames
| [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
| [testng] SKIPPED CONFIGURATION: @AfterMethod end
| [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
| [testng] SKIPPED: siimulateBijection
| [testng]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121337#4121337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121337
18 years, 5 months