NullPointerException When trying to Get Session Scoped Bean data in another ManagedBean

hello
i wont to access to some data in my session scoped bean from a request bean so when i try to get this data all i get is 
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection
on managed bean «discussionlaoder»
in the end of the exception there is
Caused by: java.lang.NullPointerException at Hiber.discussionlaoder.init(discussionlaoder.java:35)
this is my code:
1-the request scoped bean
@ManagedBean
@RequestScoped
public class discussionlaoder {
  private MyadmninHelper halper;
@ManagedProperty(value="#{serviceBean}")
     private ServicesBean  serviceBean;
    @PostConstruct
    public void init() {
      halper=getServiceBean().getHalper();  // line 35
//seter and geter code
2-the sesions scoped bean
@ManagedBean (eager=true)
@SessionScoped
public class ServicesBean {
    private MyadmninHelper halper;
//seter and geter code
am using glassfish server 3.1
thank's for help

What you need to do is fix all those typos in your code, then you don't have to override names.
- the proper Java class name is DiscussionLoader, not discussionlaoder (fix english typo also)
- if you want to inject a class named ServicesBean, then also call the property the same.
@ManagedProperty
public ServicesBean servicesBean;
But what you're doing now is call the class 'ServicesBean' and then in your managed bean declaration you seem to change your mind and it should all of a sudden be 'serviceBean'. Well then rename the class so you don't have your typo anymore!

Similar Messages

  • Java.lang.IllegalStateException when trying to get a entity bean

    hi all,
    I wrote a simple container managed entity bean and deployed it. When i call the find all method of the entity bean following is the log trace of my exception
    com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba TX optimistic: false referenceCount =1 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQL statement<select t0."USER_ID", t0."LOGIN_NAME", t0."PASSWORD", t0."FIRST_NAME", t0."LAST_NAME", t0."EMAIL", t0."ADDRESS1", t0."ADDRESS2", t0."POSTALCODE", t0."CITY", t0."COUNTRY", t0."STATE", t0."ACCOUNT_STATUS", t0."CREATE_DATE", t0."MODIFY_DATE", t0."CREATED_BY", t0."MODIFIED_BY" from "EXPENSE_USER" t0> with no input values
    [22/Jul/2003:23:35:54] FINE ( 1496): <-> DBVendorType.getSpecialDBOperation():com.sun.jdo.spi.persistence.support.sqlstore.database.oracle.OracleSpecialDBOperation@1a92d3a.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking key field iD as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINER ( 1496): SQLStoreManager.getPersistenceConfig(), classType = com.expense.ejb.entity.container.UserBean1689033004_JDOState.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore constructor() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINE ( 1496): --> SqlStateManager.applyUpdates(), field = iD.
    [22/Jul/2003:23:35:54] FINEST ( 1496): iD = 1.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for PersistenceManagerImpl.cacheLock.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.acquire() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): loginName = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field loginName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): password = root.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field password as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): firstName = super user.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field firstName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): lastName = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field lastName as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): email = root@expen.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field email as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address1 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address1 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): address2 = xxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field address2 as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): postalCode = 12345 .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field postalCode as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): city = xxxx .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field city as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): country = usa .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field country as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): state = ca .
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field state as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): accountStatus = null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): marking local field accountStatus as present.
    [22/Jul/2003:23:35:54] FINEST ( 1496): convertValue: 7/22/03 11:07 PM From: java.sql.Timestamp To: class java.lang.Long.
    [22/Jul/2003:23:35:54] FINEST ( 1496): createDate = 7/22/03 11:07 PM.
    [22/Jul/2003:23:35:54] FINEST ( 1496): NullSemaphore.release() for SQLStateManager.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.releaseConnection(): TX optimistic: false Inside Commit: false referenceCount: 0 for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): --- TransactionImpl.closeConnection() com.sun.enterprise.resource.JdbcXAConnection$JdbcConnection@13974ba for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.popCurrentWrapper() > current: com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper@2606b8 prev: null.
    [22/Jul/2003:23:35:54] FINE ( 1496): Exception in forceDestroyBean()
    java.lang.IllegalStateException: Primary key not available
         at com.sun.ejb.containers.EntityContextImpl.getPrimaryKey(EntityContextImpl.java:157)
         at com.sun.ejb.containers.EntityContainer.forceDestroyBean(EntityContainer.java:1252)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1792)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread.currentThread()Tran[  Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].afterCompletion: status = STATUS_ACTIVE, sync = null, STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ACTIVE
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ACTIVE => STATUS_ROLLING_BACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].internalRollback:status = STATUS_ROLLING_BACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLING_BACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].setStatus: STATUS_ROLLING_BACK => STATUS_ROLLEDBACK for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---PersistenceManagerImpl.afterCompletion() process: true.
    [22/Jul/2003:23:35:54] FINEST ( 1496): Thread[service-j2ee,5,main] Tran[   Transaction:
    status = STATUS_ROLLEDBACK
    Transaction Object = Transaction@17774593
    threads = 1
    ].forget:status = STATUS_ROLLEDBACK ,txType: CMT for com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: com.sun.ejb.containers.PMTransactionImpl@2.
    [22/Jul/2003:23:35:54] FINEST ( 1496): ---SQLPersistenceManagerFactory.releasePersistenceManager() PM:com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl@12a585c for JTA Tx: null.
    [22/Jul/2003:23:35:54] FINEST ( 1496): <--SQLPersistenceManagerFactory.returnToPool().
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5018: Some unmapped exception occurred : [{0}]
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.acces
    [22/Jul/2003:23:35:54] FINE ( 1496): EJB5019: Some application or system exception occurred : [UserBean]
    [22/Jul/2003:23:35:54] FINE ( 1496):
    [22/Jul/2003:23:35:55] SEVERE ( 1496): StandardWrapperValve[usertest]: Servlet.service() for servlet usertest threw exception
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
    java.lang.ClassCastException
         at com.expense.ejb.entity.container.UserBean1689033004_JDOState.jdoSetField(UserBean1689033004_JDOState.java:969)
         at com.sun.jdo.spi.persistence.support.sqlstore.model.FieldDesc.setValue(FieldDesc.java:337)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.setFields(ResultDesc.java:749)
         at com.sun.jdo.spi.persistence.support.sqlstore.ResultDesc.getResult(ResultDesc.java:635)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:648)
         at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:500)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.retrieve(PersistenceManagerImpl.java:989)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.doExecute(QueryImpl.java:634)
         at com.sun.jdo.spi.persistence.support.sqlstore.query.QueryImpl.execute(QueryImpl.java:455)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl.ejbFindAll(UserBean1689033004_ConcreteImpl.java:1249)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:128)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    javax.ejb.EJBException: nested exception is: java.lang.ClassCastException
         at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:1893)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1796)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1608)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:529)
         at com.expense.ejb.entity.container.UserBean1689033004_ConcreteImpl_LocalHomeImpl.findAll(UserBean1689033004_ConcreteImpl_LocalHomeImpl.java:133)
         at jasper.usertest_jsp._jspService(_usertest_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:552)
         at com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:368)
         at com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:287)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.c
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:36:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO expiration started. Current entries: 0
    [22/Jul/2003:23:37:15] FINE ( 1496): SingleSignOn[server1]: SSO cache will expire 0 entries.
    following is the ejb-jar.xml part of this entity bean
    <entity>
    <ejb-name>UserBean</ejb-name>
    <local-home>com.expense.ejb.entity.container.LocalUserHome</local-home>
    <local>com.expense.ejb.entity.container.LocalUser</local>
    <ejb-class>com.expense.ejb.entity.container.UserBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>userSchema</abstract-schema-name>
    <cmp-field>
    <field-name>loginName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>password</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>iD</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>firstName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>email</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>lastName</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address1</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>address2</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>postalCode</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>city</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>state</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>country</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>accountStatus</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createdBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifiedBy</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>modifyDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>createDate</field-name>
    </cmp-field>
    <primkey-field>iD</primkey-field>
    <query>
    <query-method>
    <method-name>findByLoginName</method-name>
    <method-params>
    <method-param>java.lang.String</method-param>
    </method-params>
    </query-method>
    <ejb-ql> select object(l) from userSchema l WHERE l.loginName = ?1</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByCreateDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema l where l.createDate = ?1 </ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findByModifyDate</method-name>
    <method-params>
    <method-param>java.lang.Long</method-param>
    <method-param>java.lang.Long</method-param>
    </method-params>
    </query-method>
    <ejb-ql>select object(l) from userSchema as l where l.modifyDate between ?1 and ?2</ejb-ql>
    </query>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params>
    </method-params>
    </query-method>
    <ejb-ql>SELECT OBJECT(L) FROM userSchema L </ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>UserBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    can anyone suggest me on howto solve this problem

    I suspect that there is a type mismatch somewhere in the CMP fields (there is a ClassCastException in the trace).
    Please check the generated code (UserBean1689033004_JDOState.java line 969) that can be found under
    <appserver-install>/domains/domain1/server1/generated/ejb/j2ee-apps/<app-name>/<packages...>/
    Thank you,
    -marina

  • Add FacesMessage to FacesContext in an session scoped bean HOWTO?

    I have an simple question. How can I add an FacesMessage to the FacesContext in a session scoped bean.
    This code works fine for request scoped beans.
    String message = "Some message";          
    FacesMessage curentMessage = new FacesMessage(message, message);
    curentMessage.setSeverity(FacesMessage.SEVERITY_ERROR); //Mark as ERROR
    context.addMessage(�userForm�, curentMessage);          When I change bean scope to "session" I am getting java.lang.IllegalStateException at the last line when adding message to context.
    Thanks:
    -- Nermin

    I have an simple question. How can I add an
    FacesMessage to the FacesContext in a session scoped
    bean.
    This code works fine for request scoped beans.
    String message = "Some message";          
    FacesMessage curentMessage = new FacesMessage(message,
    message);
    curentMessage.setSeverity(FacesMessage.SEVERITY_ERROR);
    //Mark as ERROR
    context.addMessage(�userForm�, curentMessage);          When I change bean scope to "session" I am getting
    java.lang.IllegalStateException at the last line when
    adding message to context.
    Thanks:
    -- NerminHow do you get "context"? If you are storing it as an instance variable of the bean, then you
    should expect to get an exception. The FacesContext is scoped only to one request. Instead
    of storing it in the bean, use FacesContext.getCurrentInstance() each time you need to use it.

  • Are session-scoped beans singleton

    Hi all, I miss something in the bean lifecycle within JSF. Assume that a page action navigates toward another page, linked to a session-scoped bean: this is created for the duration of this session. Then a button leads back to the original page, so that another action will lead to another page with its associated bean. Is this a new bean or the previous one ?
    This question is linked to the topic of bean dependencies through managed properties: it works fine, but since a bean is declared per class and not per instance, I miss the overall instantiation philosophy.

    Once the bean is created the first time in session, it will not be created again (until the session dies and you attempt to access the bean again of course).
    So in your scenario, the first time you access the page the bean gets created. When you go back and then go forward to the page again, a new bean is not created. The originally created one is re-used. Which means the constructor is not called again.
    CowKing

  • NullPointerException when trying to load faces application

    Hi,
    I'm new with JSF and I have a NullPointerException when trying to use a JSF tag in my file.
    My web.xml is defined as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>
    And faces-config.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC
    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    The exception that I get is:
    java.lang.NullPointerException
         javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:615)
         javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:217)
         org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:71)
    (HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    I guess that it's a matter of configuration, but couldn't find a solution.
    Can someone help?
    Thanks,
    Efrat

    well i think you will need
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    in you web.xml as well can be server or client state save but quite sure you have to define that

  • Using Query String Parameters with Session Scoped bean

    I would like to pass query string parameters from a product page (user clicks on a specific product commandLink) that is request scope to a details page that is session scoped.
    The problem is that the session scoped page only handles the first request. If you view the details of a product and then navigate back to the product page and choose another product ... the details page will not handle the new query string parameters and display the details for the first product chosen.
    Is there a way to make the session scoped bean recognize the query string parameters past the first request?

    I was able to replicate this problem with a very simple app that performs a redirection... just like the real app. Here's the simple app that I put together:
    From request scope page:
    <f:view>
             <h:form>
               <h:commandButton value="Link 1" action="#{reqbean.Link1}"/>
               <br/><br/>
              <h:commandButton value="Link 2" action="#{reqbean.Link2}"/>
            </h:form>
           </f:view>
    From request scope bean:
    public String Link1() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=1");
        return null;
      public String Link2() throws IOException
        // Add event code here...
        //redirect the user
        FacesContext.getCurrentInstance().getExternalContext().redirect("untitled2.jspx?p=2");
        return null;
      }At this point... I put a println in the constructor of the session scoped bean because this is where I want to get the query string params. The constructor only gets called the first time a redirect is performed.

  • Getting exception when trying to get taskdetails url using BPM worklist api

    Getting exception when trying to get taskdetails url using BPM worklist api method :
    String url = WorklistUtil.getTaskDisplayURL(
    wfSvcClient,
    ctx,
    task,
    null,
    "worklist",
    parameters);
    Jul 21, 2011 11:24:40 AM oracle.bpel.services.common.ServicesLogger __log
    WARNING: <oracle.bpel.services.workflow.client.worklist.util.TaskFlowPropsUtil.getServerPropertiesFromMbean()> Exception while loading install config file in standalone Error : javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
    oracle.fabric.common.FabricException: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
    at oracle.soa.common.util.PlatformUtils.getServerInfo(PlatformUtils.java:184)
    at oracle.bpel.services.workflow.client.worklist.util.TaskFlowPropsUtil.getServerPropertiesFromMbean(TaskFlowPropsUtil.java:319)
    at oracle.bpel.services.workflow.client.worklist.util.TaskFlowPropsUtil.getServerInfoForWeblogicServer(TaskFlowPropsUtil.java:491)
    at oracle.bpel.services.workflow.client.worklist.util.TaskFlowPropsUtil.getServerInfo(TaskFlowPropsUtil.java:363)
    at oracle.bpel.services.workflow.worklist.api.util.WorklistUtil.getDefaultURLPrefix(WorklistUtil.java:264)
    at oracle.bpel.services.workflow.worklist.api.util.WorklistUtil.getTaskDisplayURL(WorklistUtil.java:353)
    at oracle.bpel.services.workflow.worklist.api.util.WorklistUtil.getTaskDisplayURL(WorklistUtil.java:293)
    at com.test.WorflowServiceClient.main(WorflowServiceClient.java:198)
    Caused by: javax.management.InstanceNotFoundException: com.bea:Name=RuntimeService,Type=weblogic.management.mbeanservers.runtime.RuntimeServiceMBean
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1094)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:662)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:638)
    at oracle.as.jmx.framework.config.session.ConfigurationMBeanServerImpl.getAttribute(ConfigurationMBeanServerImpl.java:210)
    at oracle.soa.common.util.PlatformUtils.getServerInfo(PlatformUtils.java:78)
    ... 7 more
    Caught workflow exception: null
    Process exited with exit code 0.
    Can anyone please help me

    Actually i'm using Jdeveloper 11.1.1.4 and our requirement is to show list of BPM worklist tasks for the logged in user on the first page and onclick of each task task details page should be opened. I can use Webcenter PS3 worklist taskflow. But i'm not able to customize that taskflow. So, i'm going for Worklist client api.
    I'm able to retrive the taskId,task title and few other details like task payload. But i don't know why the below method is giving exception.
    String url =
    WorklistUtil.getTaskDisplayURL(wfSvcClient,
    ctx, task, null,
    "worklist", parameters);
    And i observed that you have also used the same code for getting Taskdetails url. And one more thing is i'm trying to access BPM worklist which is installed on remote machine.
    Can you tell me what could be the reason for the exception?

  • I get an error message when trying to sign into the support community with another Apple id. On the pick a username screen I get "an account utilizing this address already exists...." despite trying a few usernames. Anyone know how I can resolve this?

    I get an error message when trying to sign into the support community with another Apple id. On the <pick a username> screen I get "an account utilizing this address already exists.Only one account per email address is allowed on the Apple Support Communities" despite trying a few usernames. Anyone know how I can resolve this?

    This problem has been driving me demented. The instructions that Ivan gives have partially worked for me. By following his link
    "How to find out if you have multiple Apple IDs" I was able to identify that yes I did have two apple accounts using the same e mail address. One was very old that I used to use for the forum boards and one is my much more recent ID that I use for everything these days. So I changed the e mail address for the old account which is associated with these discussion boards and that's the account that I am now posting this from. However even though the two accounts now have different e mail addresses when I try to log onto the boards with my more recent main apple ID I still get all the same errors as described at the start of this thread by rodgers_j. And of course that's the one I want to use so that I only have one itunes account for everything.
    So if anyone has any more hints I'd be very grateful.

  • Mail unexpectedly quits when trying to get mail

    Please help me, the person at the genius bar was useless. My mail unexpectedly quits only when trying to get mail. I have repaired permissions, and I did an archive reinstall (at the recommendation of the genius). Nothing I seem to do works, even when I removed the envelop index and started mail after getting re setup it just crashed again.

    Hi CurtRK, and a warm welcome to the forums!
    You mention the envelope, but how about the Cache, and doing it like this...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move the following folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.

  • When trying to get updates it says that I am not conntected and to check my network.  How do I fix this?

    When trying to get an update, a message reads that it cannot connect and to check the network setting.  I can get the internet, so I dont know how the fix this. 

    Temporarily turn off the anti-virus and firewall software on your PC before attempting to get the update

  • When trying to get new messages, keep getting asked for password and then get "operation couldn't be completed. (MFMessager error domain error 1032)-Why?

    When trying to get new messages, keep getting asked for password and then get "operation couldn't be completed. (MFMessager error domain error 1032)-Why?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • I am running Lion 10.7.2 and I have an external drive hooked to my time machine. I can't rename folders and when trying, I get an error code 8076. The checkbox "ignore permissions for this device" does not show on volume info. Help please???

    I am running Lion 10.7.2 and I have an external drive hooked to my time machine. I can't rename folders and when trying, I get an error code 8076. The checkbox "ignore permissions for this device" does not show on volume info. Help please???

    The TIme Machine volume does not have that checkbox.
    I think the issue is with your Finder...
    Go to Finder "Go" menu hold the option key and choose Library. Then go to Preferences trash these files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then, restart, or log out and in again.
    (You will have to reset a few finder prefs the way you like them.)

  • HT204266 cannot connect to itunes store when trying to get app updates

    Why do I get this message...."cannot connect to itunes store" when trying to get app updates.  I have no trouble connecting to store in other area.

    Try this http://support.apple.com/kb/TS1702

  • Why do I keep getting a Network time out message when trying to get current update on my 3GS?

    Why do I keep getting, "Network timed out error", when trying to get latest update to my IPhone 3GS? Have never had trouble before.

    Disable your firewall and any antivirus and similar software.

  • Sorry the answer to my previous question did not help....when trying to get app message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Sorry the answer to my previous question did not help....when trying to get new app installed on iPad  message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Whatever the reasons are that you think the problem exists, you will not be able to resolve it on your own. Did you see this at the bottom of the support article that I suggested that you read?
    Additional Information
    If the issue persists, you can visit iCloud Support, iTunes Support, Apple Print Products, or contact AppleCare for further assistance.
    You should probably contact iTunes Support.

Maybe you are looking for

  • Satellite Pro A200 - question about BIOS update

    I have a Satellite Pro A200 (PSAE7E) with Windows Vista and XP that were installed recently. In Toshiba's driver page (BIOS update) says: "This Bios is only compatible for Notebooks with Windows Vista!!!!" 1) Should I update my BIOS(1.4) or is it goi

  • FCP X PLUG INS/TEMPLATES

    Created some templates/plug ins in motion and saved them as generators that appear in the FCP X themes window. Want to delete some of these.....can anyone give me the correct path on my drive where they are likely to be saved? Thx.

  • CVS  files checked out- import problem

    Hi all, when I update a project using CVS, in 9i the tool used to prompt me like 'do you want to open new files in active project?' in 10i it doesn't , so when I create and deploy wars the new files sometimes are missing. do you know any workaround?

  • Problem in ALV Edit

    Hi everyone, I am working on ALV report  and in this some coloumns should be edited. I have done that , But Iam getting wrong result. I mean Iam editing currency value , If I enter some value 3000.00, It is rounding off to 30.00. I have done the repo

  • 0 src error message

    I get an error: 0 src is null or not an object code 0 line :291 char: 341 this pops up when i go into yahoo games and click on screen shots. I have updated my java and it stills does this, how can i get this to work I dont want to download a game tha