[JBoss Portal] - Re: Problem with PortletSession
by aspdeepak
I some how found that there is an inconsistent (may be) behavior of PortletSession attributes, since the stored values vanishes after page rendering.
To be more precise the values become null after the page refreshes, I don't know whether this is a bug.
But I started using PortalSession object for storing the information
My new implementation
| String isFirst =(String) Navigation.getPortalRuntimeContext().getSession().getAttribute(IS_FIRST_LOAD);
| log.info(" IS_FIRST_LOAD (before) = "+isFirst+" for user["+request.getUserPrincipal()+"]");
|
| if ( isFirst == null) { // if this is the first time loading
| Navigation.getPortalRuntimeContext().getSession().setAttribute(IS_FIRST_LOAD,"false");
| log.info(" showing the default charts(COLLECTION since IS_FIRST_LOAD )");
| log.info(" IS_FIRST_LOAD (after) = "+Navigation.getPortalRuntimeContext().getSession().getAttribute(IS_FIRST_LOAD));
|
| .............................................................
|
| .............................................................
| }
|
Here
Navigation.getPortalRuntimeContext().getSession()
returns the PortalSession
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228497#4228497
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228497
16 years, 11 months
[Beginners Corner] - Re: Cant deply an .ear file into the JBOSS.
by chairill
hi.. more likely i got the same error here. Can someone please help me how to solve this problem? i really need a guide
anonymous wrote : ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/usr/jboss/jboss-5.0.0.GA/server/default/deploy/application1.ear state=Not Installed mode=Manual requiredState=Parse
| org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/usr/jboss/jboss-5.0.0.GA/server/default/deploy/application1.ear/webapp1.war
| at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:337)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:297)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:269)
| at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:230)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
| at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
| at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
| at org.jboss.Main.boot(Main.java:209)
| at org.jboss.Main$1.run(Main.java:547)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.b: The content of element 'application' is not complete. One of '{"http://java.sun.com/xml/ns/j2ee":description, "http://java.sun.com/xml/ns/j2ee":display-name, "http://java.sun.com/xml/ns/j2ee":icon, "http://java.sun.com/xml/ns/j2ee":module}' is expected. @ vfszip:/usr/jboss/jboss-5.0.0.GA/server/default/deploy/application1.ear/webapp1.war/WEB-INF/classes/META-INF/application.xml[2,228]
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228496#4228496
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228496
16 years, 11 months
[EJB 3.0] - Re: Use of CMP EntityManager in POJO
by voidhawc
Found what could be the problem.
This is the code that causes the null pointer in 4.2.3.GA
| public EntityManager getNonTxEntityManager()
| {
| Map map = nonTxStack.get();
| EntityManager em = (EntityManager)map.get(this); // Null Pointer here
| if (em == null)
| {
| em = entityManagerFactory.createEntityManager();
| map.put(this, em);
| }
| return em;
| }
|
Compared against the JPA code.
| public EntityManager getNonTxEntityManager()
| {
| Map<ManagedEntityManagerFactory, EntityManager> map = nonTxStack.get();
|
| EntityManager em = null;
| if (map != null)
| em = map.get(this);
| else
| {
| map = new HashMap<ManagedEntityManagerFactory, EntityManager>();
| nonTxStack.push(map);
| }
|
| if (em == null)
| {
| em = entityManagerFactory.createEntityManager();
| map.put(this, em);
| }
| return em;
| }
|
As you can see there is a guard around the map reference code. However the code with a guard around it appears to from revision 75254 where as the code without a guard is from 75965 which is later.
However the 4.2 code appears to have been copied from 4.0 (rev 58000).
Does anyone happen to know which release this was fixed in?
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228492#4228492
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228492
16 years, 11 months