Private Room throws NullPointerException

Hi,
I have created a private room and it was sucessfull. i am able to see the room without any problem. but when others(non-members) go to their rooms directory, it throws NullPointerException. This problem is only for private rooms only.
we are using SP 17
The exception is
java.lang.NullPointerException
     at com.sap.ip.collaboration.roomui.api.util.properties.RoomResourceProperties.getPropertyValueAsString(RoomResourceProperties.java:53)
     at com.sap.ip.collaboration.roomui.api.util.properties.RoomResourceProperties.getRoomPrivacy(RoomResourceProperties.java:33)
     at com.sap.netweaver.coll.roomui.api.uicommands.UIRequestMembershipCommand.isExecutable(UIRequestMembershipCommand.java:67)
     at com.sapportals.wcm.rendering.uicommand.UIGroupCommand.getResourceCommands(UIGroupCommand.java:78)
     at  ..............
can anyone reply what might be the reason be?
Thank you.
Saravana.
Edited by: Saravana Parthiban Palaniswamy on Feb 4, 2009 1:22 PM
Edited by: Saravana Parthiban Palaniswamy on Feb 4, 2009 1:26 PM

Hi,
If u goes to room directory in collaboration, there is a tab called Restricted Rooms. End of the room name there is context menu if u click that, it will show the menu there you can see the option called “Request Membership”. If you click that, corresponding room owner will receive the mail if he/she enabled the mail properties.
If the answer helps your Question, provide the points.
Regards,
Kathiresan R

Similar Messages

  • CreateEntityManagerFactory throws NullPointerException for ejb3 jse client

    This question has been posted to the Toplink/jpa forum without any reply.
    Dear experts!
    I am trying to create a java standard edition client, to test outside the weblogic server, my ejb 3 entities, declared as shown in the following persistence.xml.
    The java code follows also. I have read about some relevant bugs in eclipselink back in 2006, or 7 or 8 and mostly unanswered threads :
    CreateEntityManagerFactory null pointer exception and
    Returned null to createEntityManagerFactory about tomcat and oc4j.
    Persistence.createEntityManagerFactory() throw NullPointerException in oc4j
    I am using JDeveloper 11g Studio Edition Version 11.1.1.3.0, Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660.
    Any helping hand available?
    Thank you very much in advance!
    NA
    package chapter12javaseclient;
    import actionbazaar.buslogic.BidException;
    import actionbazaar.persistence.Bid;
    import actionbazaar.persistence.Bidder;
    import actionbazaar.persistence.Item;
    import java.util.HashMap;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import org.eclipse.persistence.config.EntityManagerProperties;
    public class PlaceBidBeanJavaSE {
    private static EntityManagerFactory emf;
    private static EntityManager em;
    public static void main(String[] args) {
    String userId= "idiot";
    Long itemId = new Long (1);
    Double bidPrice = 2001.50;
    try {
    if (emf == null){
    emf = Persistence.createEntityManagerFactory("actionBazaar");
    System.out.println("EntityManagerFactory created!");
    getEntityManager();
    System.out.println("EntityManager created!");
    addBid(userId,itemId,bidPrice);
    commitTransaction();
    } finally {
    // close the EntityManager when done
    em.close();
    emf.close();
    private static void getEntityManager() {
    HashMap emProps = new HashMap();
    emProps.put(EntityManagerProperties.JDBC_USER, "ab");
    emProps.put(EntityManagerProperties.JDBC_PASSWORD, "ab");
    System.out.println("Creating entity manager");
    em = emf.createEntityManager(emProps);
    em.getTransaction().begin();
    private static void commitTransaction() {
    em.getTransaction().commit();
    private static Long addBid(String userId, Long itemId, Double bidPrice) throws BidException {
    Item item = em.find(Item.class,itemId);
    if (item == null)
    throw new BidException("Invalid Item Id");
    Bidder bidder = em.find(Bidder.class,userId);
    if (bidder == null)
    throw new BidException("Invalid Bidder Id");
    Bid bid = new Bid();
    bid.setItem(item);
    bid.setBidBidder(bidder);
    bid.setBidPrice(bidPrice);
    em.persist(bid);
    return bid.getBidId();
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="actionBazaar" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>actionbazaar.persistence.Bid</class>
    <class>actionbazaar.persistence.Item</class>
    <class>actionbazaar.persistence.User</class>
    <class>actionbazaar.persistence.Bidder</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.target-database" value="Oracle11"/>
    <property name="javax.persistence.jdbc.driver"
    value="oracle.jdbc.OracleDriver"/>
    <property name="javax.persistence.jdbc.password"
    value="ab"/>
    <property name="javax.persistence.jdbc.url"
    value="jdbc:oracle:thin:@hera:1521:orcl"/>
    <property name="javax.persistence.jdbc.user" value="ab"/>
    <property name="eclipselink.logging.level" value="ALL"/>
    </properties>
    </persistence-unit>
    </persistence>

    A solution might be found here:
    Re: createEntityManagerFactory() throws NullPointerException for ejb jse client
    Re: createEntityManagerFactory() throws NullPointerException for ejb jse client
    NA
    [http://nickaiva.blogspot.com/]

  • CreateEntityManagerFactory() throws NullPointerException for ejb jse client

    Dear experts!
    I am trying to create a java standard edition client, to test outside the weblogic server, my ejb 3 entities, declared as shown in the following persistence.xml.
    The java code, and stacktrace follows also. I have read about some relevant bugs in eclipselink back in 2006, or 7 or 8 and mostly unanswered threads :
    CreateEntityManagerFactory null pointer exception and
    Returned null to createEntityManagerFactory about tomcat and oc4j.
    Persistence.createEntityManagerFactory() throw NullPointerException in oc4j
    I am using JDeveloper 11g Studio Edition Version 11.1.1.3.0, Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660.
    Any helping hand available?
    Thank you very much in advance!
    NA
    package chapter12javaseclient;
    import actionbazaar.buslogic.BidException;
    import actionbazaar.persistence.Bid;
    import actionbazaar.persistence.Bidder;
    import actionbazaar.persistence.Item;
    import java.util.HashMap;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import org.eclipse.persistence.config.EntityManagerProperties;
    public class PlaceBidBeanJavaSE {
    private static EntityManagerFactory emf;
    private static EntityManager em;
    public static void main(String[] args) {
    String userId= "idiot";
    Long itemId = new Long (1);
    Double bidPrice = 2001.50;
    try {
    if (emf == null){
    emf = Persistence.createEntityManagerFactory("actionBazaar");
    System.out.println("EntityManagerFactory created!");
    getEntityManager();
    System.out.println("EntityManager created!");
    addBid(userId,itemId,bidPrice);
    commitTransaction();
    } finally {       
    // close the EntityManager when done
    em.close();
    emf.close();
    private static void getEntityManager() {
    HashMap emProps = new HashMap();
    emProps.put(EntityManagerProperties.JDBC_USER, "ab");
    emProps.put(EntityManagerProperties.JDBC_PASSWORD, "ab");
    System.out.println("Creating entity manager");
    em = emf.createEntityManager(emProps);
    em.getTransaction().begin();
    private static void commitTransaction() {
    em.getTransaction().commit();
    private static Long addBid(String userId, Long itemId, Double bidPrice) throws BidException {
    Item item = em.find(Item.class,itemId);
    if (item == null)
    throw new BidException("Invalid Item Id");
    Bidder bidder = em.find(Bidder.class,userId);
    if (bidder == null)
    throw new BidException("Invalid Bidder Id");
    Bid bid = new Bid();
    bid.setItem(item);
    bid.setBidBidder(bidder);
    bid.setBidPrice(bidPrice);
    em.persist(bid);
    return bid.getBidId();
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="actionBazaar" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>actionbazaar.persistence.Bid</class>
    <class>actionbazaar.persistence.Item</class>
    <class>actionbazaar.persistence.User</class>
    <class>actionbazaar.persistence.Bidder</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="eclipselink.target-server" value="WebLogic_10"/>
    <property name="eclipselink.target-database" value="Oracle11"/>
    <property name="javax.persistence.jdbc.driver"
    value="oracle.jdbc.OracleDriver"/>
    <property name="javax.persistence.jdbc.password"
    value="ab"/>
    <property name="javax.persistence.jdbc.url"
    value="jdbc:oracle:thin:@hera:1521:orcl"/>
    <property name="javax.persistence.jdbc.user" value="ab"/>
    <property name="eclipselink.logging.level" value="ALL"/>
    </properties>
    </persistence-unit>
    </persistence>
    The log output follows:
    C:\Oracle\Middleware\jdev_11gR1\jdk160_18\bin\javaw.exe -client -classpath C:\MyWork\11g\ejb3inaction\.adf;C:\MyWork\11g\ejb3inaction\Chapter12JavaSEClient\classes;C:\MyWork\11g\ejb3inaction\Chapter12\classes;C:\Oracle\Middleware\jdev_11gR1\modules\javax.ejb_3.0.1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\com.oracle.toplink_1.0.0.0_11-1-1-3-0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\org.eclipse.persistence_1.0.0.0_2-0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\com.bea.core.antlr.runtime_2.7.7.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.toplink_11.1.1\javax.persistence_2.0_preview.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.jsf_1.0.0.0_1-2.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.enterprise.deploy_1.2.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.interceptor_1.0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.jms_1.1.1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.jsp_1.1.0.0_2-1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.jws_2.0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.activation_1.1.0.0_1-1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.mail_1.1.0.0_1-4-1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.xml.soap_1.3.1.0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.xml.rpc_1.2.1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.xml.ws_2.1.1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.management.j2ee_1.0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.resource_1.5.1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.servlet_1.0.0.0_2-5.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.transaction_1.0.0.0_1-1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.xml.stream_1.1.1.0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.security.jacc_1.0.0.0_1-1.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.xml.registry_1.0.0.0_1-0.jar;C:\Oracle\Middleware\jdev_11gR1\modules\javax.persistence_1.0.0.0_1-0-2.jar;C:\Oracle\Middleware\jdev_11gR1\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdev_11gR1\wlserver_10.3\server\ext\jdbc\oracle\11g\ojdbc6.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-collation.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-lcsd.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-mapping.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-servlet.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-translation.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n-utility.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;C:\Oracle\Middleware\jdev_11gR1\oracle_common\modules\oracle.dms_11.1.1\dms.jar -Djavax.net.ssl.trustStore=C:\Oracle\Middleware\jdev_11gR1\wlserver_10.3\server\lib\DemoTrust.jks chapter12javaseclient.PlaceBidBeanJavaSE
    [EL Finest]: 2010-06-25 09:23:10.495--ServerSession(229902)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit actionBazaar; session file:/C:/MyWork/11g/ejb3inaction/Chapter12JavaSEClient/classes/_actionBazaar; state Initial; factoryCount 0
    [EL Finest]: 2010-06-25 09:23:10.518--ServerSession(229902)--Thread(Thread[main,5,main])--property=eclipselink.orm.throw.exceptions; default value=true
    [EL Finer]: 2010-06-25 09:23:10.532--ServerSession(229902)--Thread(Thread[main,5,main])--Searching for default mapping file in file:/C:/MyWork/11g/ejb3inaction/Chapter12JavaSEClient/classes/
    [EL Finer]: 2010-06-25 09:23:10.537--ServerSession(229902)--Thread(Thread[main,5,main])--Searching for default mapping file in file:/C:/MyWork/11g/ejb3inaction/Chapter12JavaSEClient/classes/
    [EL Config]: 2010-06-25 09:23:10.652--ServerSession(229902)--Thread(Thread[main,5,main])--The access type for the persistent class [class actionbazaar.persistence.Item] is set to [PROPERTY].
    [EL Config]: 2010-06-25 09:23:10.696--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to many mapping element [method getCategorySet] is being defaulted to: class actionbazaar.persistence.Category.
    [EL Config]: 2010-06-25 09:23:10.702--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [method getBids] is being defaulted to: class actionbazaar.persistence.Bid.
    [EL Config]: 2010-06-25 09:23:10.71--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [method getSeller] is being defaulted to: class actionbazaar.persistence.Seller.
    [EL Config]: 2010-06-25 09:23:10.71--ServerSession(229902)--Thread(Thread[main,5,main])--The access type for the persistent class [class actionbazaar.persistence.User] is set to [PROPERTY].
    [EL Config]: 2010-06-25 09:23:10.711--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [method getCategories] is being defaulted to: class actionbazaar.persistence.Category.
    [EL Config]: 2010-06-25 09:23:10.716--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to one mapping element [method getBillingInfo] is being defaulted to: class actionbazaar.persistence.BillingInfo.
    [EL Config]: 2010-06-25 09:23:10.717--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to one mapping element [method getContactInfo] is being defaulted to: class actionbazaar.persistence.ContactInfo.
    [EL Config]: 2010-06-25 09:23:10.718--ServerSession(229902)--Thread(Thread[main,5,main])--The access type for the persistent class [class actionbazaar.persistence.Bidder] is set to [PROPERTY].
    [EL Config]: 2010-06-25 09:23:10.72--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the one to many mapping element [method getBids] is being defaulted to: class actionbazaar.persistence.Bid.
    [EL Config]: 2010-06-25 09:23:10.721--ServerSession(229902)--Thread(Thread[main,5,main])--The access type for the persistent class [class actionbazaar.persistence.Bid] is set to [PROPERTY].
    [EL Config]: 2010-06-25 09:23:10.721--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [method getBidBidder] is being defaulted to: class actionbazaar.persistence.Bidder.
    [EL Config]: 2010-06-25 09:23:10.721--ServerSession(229902)--Thread(Thread[main,5,main])--The target entity (reference) class for the many to one mapping element [method getItem] is being defaulted to: class actionbazaar.persistence.Item.
    [EL Config]: 2010-06-25 09:23:10.722--ServerSession(229902)--Thread(Thread[main,5,main])--The alias name for the entity class [class actionbazaar.persistence.Item] is being defaulted to: Item.
    [EL Config]: 2010-06-25 09:23:10.746--ServerSession(229902)--Thread(Thread[main,5,main])--The alias name for the entity class [class actionbazaar.persistence.Bidder] is being defaulted to: Bidder.
    [EL Config]: 2010-06-25 09:23:10.746--ServerSession(229902)--Thread(Thread[main,5,main])--The alias name for the entity class [class actionbazaar.persistence.User] is being defaulted to: User.
    [EL Config]: 2010-06-25 09:23:10.753--ServerSession(229902)--Thread(Thread[main,5,main])--The table name for entity [class actionbazaar.persistence.Bidder] is being defaulted to: USERS.
    [EL Config]: 2010-06-25 09:23:10.753--ServerSession(229902)--Thread(Thread[main,5,main])--The discriminator column name for the root inheritance class [class actionbazaar.persistence.Bidder] is being defaulted to: DTYPE.
    [EL Config]: 2010-06-25 09:23:10.755--ServerSession(229902)--Thread(Thread[main,5,main])--The primary key column name for the inheritance class [class actionbazaar.persistence.Bidder] is being defaulted to: USER_ID.
    [EL Config]: 2010-06-25 09:23:10.755--ServerSession(229902)--Thread(Thread[main,5,main])--The foreign key column name for the inheritance class [class actionbazaar.persistence.Bidder] is being defaulted to: USER_ID.
    [EL Config]: 2010-06-25 09:23:10.758--ServerSession(229902)--Thread(Thread[main,5,main])--The alias name for the entity class [class actionbazaar.persistence.Bid] is being defaulted to: Bid.
    Exception in thread "main" java.lang.NullPointerException
         at chapter12javaseclient.PlaceBidBeanJavaSE.main(PlaceBidBeanJavaSE.java:43)
    Process exited with exit code 1.

    Thank you for your reply!
    The client now works correctly. It seems that the line
    em = emf.createEntityManager(emProps);//
    throws an exception when no argument is given for em = emf.createEntityManager();// emProps missing!
    There was also a warning in jdev editor, about the line you mentioned:
    <property name="eclipselink.target-server" value="WebLogic 10"/>
    Carry on with your good work!
    The updated persistence.xml and java source code shown below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="actionBazaar" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <class>actionbazaar.persistence.Bid</class>
    <class>actionbazaar.persistence.Item</class>
    <class>actionbazaar.persistence.User</class>
    <class>actionbazaar.persistence.Bidder</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
    <property name="eclipselink.target-database" value="Oracle11"/>
    <property name="javax.persistence.jdbc.driver"
    value="oracle.jdbc.OracleDriver"/>
    <property name="javax.persistence.jdbc.password"
    value="29E8BD11B89A62E3862F19C4F84B7DB0"/>
    <property name="javax.persistence.jdbc.user" value="ab"/>
    <property name="eclipselink.logging.level" value="ALL"/>
    <property name="eclipselink.orm.validate.schema" value="true"/>
    <property name="javax.persistence.jdbc.url"
    value="jdbc:oracle:thin:@hera:1521:orcl"/>
    </properties>
    </persistence-unit>
    </persistence>
    package chapter12javaseclient;
    import actionbazaar.buslogic.BidException;
    import actionbazaar.persistence.Bid;
    import actionbazaar.persistence.Bidder;
    import actionbazaar.persistence.Item;
    import java.util.HashMap;
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.persistence.EntityManager;
    import javax.persistence.EntityManagerFactory;
    import javax.persistence.Persistence;
    import org.eclipse.persistence.config.EntityManagerProperties;
    public class PlaceBidBeanJavaSE {
    private static EntityManagerFactory emf;
    private static EntityManager em;
    private static Hashtable emProps = new Hashtable();
    public static void main(String[] args) {
    String userId= "idiot";
    Long itemId = new Long (2);
    Double bidPrice = 2002.50;
    try {
    if (emf == null){
    emf = Persistence.createEntityManagerFactory("actionBazaar");
    System.out.println("EntityManagerFactory created!");
    getEntityManager();
    System.out.println("EntityManager created!");
    addBid(userId,itemId,bidPrice);
    commitTransaction();
    } finally {       
    // close the EntityManager when done
    em.close();
    emf.close();
    private static void getEntityManager() {
    try {
    System.out.println("Creating entity manager");
    em = emf.createEntityManager(emProps);// if argument is missing exception is thrown!
    em.getTransaction().begin();
    } catch (Exception ne) {
    // TODO: Add catch code
    ne.printStackTrace();
    private static void commitTransaction() {
    em.getTransaction().commit();
    private static Long addBid(String userId, Long itemId, Double bidPrice) throws BidException {
    Item item = em.find(Item.class,itemId);
    if (item == null)
    throw new BidException("Invalid Item Id");
    Bidder bidder = em.find(Bidder.class,userId);
    if (bidder == null)
    throw new BidException("Invalid Bidder Id");
    Bid bid = new Bid();
    bid.setItem(item);
    bid.setBidBidder(bidder);
    bid.setBidPrice(bidPrice);
    em.persist(bid);
    return bid.getBidId();
    NA
    [http://nickaiva.blogspot.com/]

  • Request Memembership in Collaboration Private Room

    Hi All,
    In Portal we have one option to Request Membership for Private room.When we click this Request Membership command  its calling following class com.sap.netweaver.coll.roomui.api.uicommands.UIRequestMembershipCommand mean while it sending  RequestMembership notification mail to room owner.
    Notification mail send the  Room Name: (%room_link_ext%)  with the room link  , and  ("%accept% )member acceptance link (SP 14) to Room owner. Which  class generate the value for these e-mail variables(%recipient_firstname%, %recipient_lastname% ,%room_link_ext%,"%accept%) ?.
    Regards,
    Malini.V

    Hi Malini,
    Did you get answer for your question?
    from where these e-mail variables(%recipient_firstname%, %recipient_lastname% ,%room_link_ext%,"%accept%) are generated?
    when we moved from dev to quality, the %accept% still going to dev collaboration room... where we need to check the values of these variable???
    Thanks,
    PradeeP

  • StartElement throws NullPointerException

    hi
    The code below throws a NullPointerException at startElement method ... Can someone help figure out how to fix it ...?
    xmlSt value is set from another method which is NOT NULL.....
    public class xmlResHandler extends HandlerBase
    public void validateXml (String xmlSt) throws Exception
    String xmlString = xmlSt;
    java.io.InputStream input=null;
    input=new java.io.ByteArrayInputStream(xmlString.getBytes());
    out = new OutputStreamWriter (System.out, "UTF8");
    SAXParserFactory factory = SAXParserFactory.newInstance();
    factory.setValidating(true);
    factory.newSAXParser().parse( input, new xmlResHandler());
    System.out.println("validation success in validateXml");
    public Writer out;
    public xmlResHandler(){}
    public void error (SAXParseException e) throws SAXParseException
    throw e;
    public void warning (SAXParseException err) throws SAXParseException
    System.out.println("** Warning" + ", line " + err.getLineNumber () + ", uri " + err.getSystemId ());
    System.out.println(" " + err.getMessage ());
    public void startDocument () throws SAXException
    showData ("<?xml version='1.0' encoding='UTF-8'?>");
    newLine();
    public void endDocument () throws SAXException
    try {
    newLine();
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    public void startElement (String name, AttributeList attrs) throws SAXException
    showData ("<"+name);
    if (attrs != null) {
    for (int i = 0; i < attrs.getLength (); i++) {
    showData (" ");
    showData (attrs.getName(i)+"=\""+attrs.getValue (i)+"\"");
    showData (">");
    public void endElement (String name) throws SAXException
    showData ("</"+name+">");
    public void characters (char buf [], int offset, int len) throws SAXException
    String s = new String(buf, offset, len);
    showData (s);
    private void showData (String s) throws SAXException
    try {
    System.out.println (s);
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    private void newLine () throws SAXException
    String lineEnd = System.getProperty("line.separator");
    try {
    System.out.println (lineEnd);
    out.flush ();
    } catch (IOException e) {
    throw new SAXException ("I/O error", e);
    Spent a lot of time ....no luck where i am going wrong ... Thanks for the help in advance
    prabhu

    Tested this with JDK 1.4 and it works with the following changes:
    Make these static:
    static public Writer out;
    static public void validateXml (String xmlSt)
    and, of course adding:
    import java.io.*;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    Then here is what I used to test it:
    public class Test2 {
         static public void main(String args[]){
              System.out.println("Hi there");
              String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html> <head> <title> Ho there </title> </head> <body> <h1> Hi there </h1> </body> </html>";
              try {
                   xmlResHandler.validateXml(s);
              }catch (Exception ex){
                   ex.printStackTrace();
    }I think you problem make have to do with your management of the "out" Writer.

  • DefaultTreeModel.removeNodeFromParent throwing NullPointerException

    I have an applet which involves editing data represented by a JTree. However, I'm getting this exception when I try to remove a node from the tree (to move it by subsequently inserting it at +/-1 position):
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicTreeUI.completeEditing(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI.completeEditing(Unknown Source)
    at javax.swing.plaf.basic.BasicTreeUI$TreeSelectionHandler.valueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
    at javax.swing.tree.DefaultTreeSelectionModel.removeSelectionPaths(Unknown Source)
    at javax.swing.JTree.removeDescendantSelectedPaths(Unknown Source)
    at javax.swing.JTree.removeDescendantSelectedPaths(Unknown Source)
    at javax.swing.JTree$TreeModelHandler.treeNodesRemoved(Unknown Source)
    at javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(Unknown Source)
    at javax.swing.tree.DefaultTreeModel.nodesWereRemoved(Unknown Source)
    at javax.swing.tree.DefaultTreeModel.removeNodeFromParent(Unknown Source)
    at ...[my code from here]This is the code that moves the node:
    DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)myTree.getLastSelectedPathComponent();
    factbookTree.setEnabled(false);
    DefaultMutableTreeNode parent = (DefaultMutableTreeNode)selectedNode.getParent();
    DefaultTreeModel treeModel = (DefaultTreeModel)factbookTree.getModel();
    int oldIndex = treeModel.getIndexOfChild(parent,selectedNode);
    int newIndex = oldIndex + move;
    //throws exception here:
    treeModel.removeNodeFromParent(selectedNode);
    //This also causes exception:
    //parent.remove(selectedNode);
    //treeModel.nodesWereRemoved(parent, new int[] {oldIndex}, new Object[] {selectedNode});Any ideas as to what the problem is?
    It started throwing this error when I changed my objects overriding JTree and TreeNode, but I'm not doing anything far out here, just getting the CellRenderer to include a JCheckBox and adding code to store the state of the JCheckBox. There is no multithreading that I'm adding. The node is being visibly removed from the applet before the exception. My only thought was that I needed to initialise the tree model somwhere myself - the tree is being constructed by passing it the root node.
    I'm using JDK 1.4.1 as a JApplet with the Java Plug-In on W2K.
    cheers,
    Andy

    Yeah, I checked that it wasn't null. I've hacked the code down and here's a complete listing which shows the problem, apologies for dodgy formatting. The code is modified from the JCheckTree implementation I found at http://www.fawcette.com/archives/premier/mgznarch/javapro/2001/01jan01/vc0101/vc0101.asp
    // FactbookBrowser.java
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class FactbookBrowser extends JApplet implements ActionListener {
         JButton upButton;
         JButton downButton;
         JCheckTree factbookTree;
         public FactbookBrowser() {
              //Set up the tree display
              CheckTreeNode root = new CheckTreeNode("Root");
              CheckTreeNode one = new CheckTreeNode("one");
              CheckTreeNode two = new CheckTreeNode("two");
              CheckTreeNode three = new CheckTreeNode("three");
              root.add(one);
              root.add(two);
              root.add(three);
              factbookTree = new JCheckTree(root);
              factbookTree.getSelectionModel().setSelectionMode(
                   TreeSelectionModel.SINGLE_TREE_SELECTION
              factbookTree.putClientProperty("JTree.lineStyle", "Angled");
              JPanel moveButtons = new JPanel();
              upButton = new JButton("up");
              downButton = new JButton("down");
              moveButtons.add(upButton);
              moveButtons.add(downButton);
              upButton.addActionListener(this);
              downButton.addActionListener(this);
              //Add everything to scrollpanes, split panes and this
              JScrollPane treeScroll = new JScrollPane(factbookTree);
              JPanel treePanel = new JPanel();
              treePanel.setLayout(new BorderLayout());
              treePanel.add(treeScroll, BorderLayout.CENTER);
              treePanel.add(moveButtons, BorderLayout.SOUTH);
              this.getContentPane().setLayout(new BorderLayout());
              this.getContentPane().add(treePanel, BorderLayout.CENTER);
         private void moveNode(int move) {
              DefaultMutableTreeNode selectedNode = (DefaultMutableTreeNode)factbookTree.getLastSelectedPathComponent();
            if ((move == -1) && (selectedNode.getPreviousSibling() == null)) {
                   System.out.println("Node already at start of section, can't move up");
                   return;
              } else if ((move == 1) && (selectedNode.getNextSibling() == null)) {
                   System.out.println("Node already at end of section, can't move down");
                   return;
              } else if ((move != 1) && (move != -1)) {
                   System.out.println("Can't move node more than one place");
                   return;
              DefaultMutableTreeNode parent = (DefaultMutableTreeNode)selectedNode.getParent();
              DefaultTreeModel treeModel = (DefaultTreeModel)factbookTree.getModel();
              int oldIndex = treeModel.getIndexOfChild(parent,selectedNode);
              int newIndex = oldIndex + move;
    System.out.println("*** treeModel:"+treeModel+" selectedNode:"+selectedNode+" new index:"+newIndex);
    //@todo Throwing exception here! WHY?
              treeModel.removeNodeFromParent(selectedNode);
              //parent.remove(selectedNode);
              //treeModel.nodesWereRemoved(parent, new int[] {oldIndex}, new Object[] {selectedNode});
    System.out.println("*** Removed node, inserting");
              treeModel.insertNodeInto(selectedNode,parent,newIndex);
    System.out.println("*** Inserted Node");
              TreePath newPath = new TreePath(selectedNode.getPath());
              factbookTree.scrollPathToVisible(newPath);
              factbookTree.setSelectionPath(newPath);
              factbookTree.repaint();
         public void actionPerformed(ActionEvent ae) {
              if (ae.getSource() == upButton) {
                   //Move the currently selected node up within its folder
                   moveNode(-1);
              } else if (ae.getSource() == downButton) {
                   //Move the currently selected node up within its folder
                   moveNode(1);
        public static void main(String[] args) {
            FactbookBrowser browser = new FactbookBrowser();
    // JCheckTree.java
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class JCheckTree extends JTree {
      public JCheckTree(TreeNode root) {
        super(root);
        super.setCellRenderer(new CheckTreeCellRenderer(this));
        setCellEditor(new CheckTreeCellEditor(this));
        setEditable(true);
      public void setCellRenderer(TreeCellRenderer renderer) {
        super.setCellRenderer(new CheckTreeCellRenderer(this, renderer));
      public void setEditorRenderer(TreeCellRenderer renderer) {
        setCellEditor(new CheckTreeCellEditor(this, renderer));
    // CheckTreeNode.java
    import java.util.*;
    import javax.swing.tree.*;
    public class CheckTreeNode extends DefaultMutableTreeNode {
         protected boolean selected, propagate;
         public CheckTreeNode(Object data) {
              this(data, false, true);
         public CheckTreeNode(Object data, boolean selected) {
              this(data, selected, true);
         public CheckTreeNode(Object data, boolean selected, boolean propagate) {
              super(data);
              this.selected = selected;
              this.propagate = propagate;
         public boolean isSelected() {
              return selected;
         public void setSelected(boolean selected) {
              this.selected = selected;
              if (propagate)
              propagateSelected(selected);
         public void propagateSelected(boolean selected) {
              Enumeration enum = children();
              while (enum.hasMoreElements()) {
                   CheckTreeNode node = (CheckTreeNode)enum.nextElement();
                   node.setSelected(selected);
         public void setUserObject(Object obj) {
              if (obj == this) return;
              super.setUserObject(obj);
    // CheckTreeCellRenderer.java
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    public class CheckTreeCellRenderer extends JPanel implements TreeCellRenderer {
         protected CheckTreeNode node;
         protected TreeCellRenderer renderer;
         protected JCheckBox check;
         public CheckTreeCellRenderer(JTree tree) {
              this(tree, new DefaultTreeCellRenderer());
         public CheckTreeCellRenderer(JTree tree, TreeCellRenderer renderer) {
              setLayout(new BorderLayout());
              this.renderer = renderer;
              add(BorderLayout.CENTER,
              renderer.getTreeCellRendererComponent(tree, "", true, true, true, 0, true));
              check = new JCheckBox();
              add(BorderLayout.WEST, check);
         public Component getTreeCellRendererComponent(JTree tree,
                                  Object value,
                                  boolean selected,
                                  boolean expanded,
                                  boolean leaf,
                                  int row,
                                  boolean hasFocus) {
              if (value instanceof CheckTreeNode) {
                   node = (CheckTreeNode)value;
                   check.setSelected(node.isSelected());
                   value = node.getUserObject();
              renderer.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
              return this;
    // CheckTreeCellEditor.java
    import java.awt.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class CheckTreeCellEditor extends CheckTreeCellRenderer implements TreeCellEditor, ActionListener {
      protected CellEditorListener list;
      public CheckTreeCellEditor(JTree tree)
        this(tree, new DefaultTreeCellRenderer());
      public CheckTreeCellEditor(JTree tree, TreeCellRenderer renderer)
        super(tree, renderer);
        check.addActionListener(this);
      public Component getTreeCellEditorComponent(
        JTree tree, Object value, boolean selected,
        boolean expanded, boolean leaf, int row)
        return getTreeCellRendererComponent(
          tree, value, true, expanded, leaf, row, true);
      public boolean stopCellEditing()
        return true;
      public Object getCellEditorValue()
        node.setSelected(check.isSelected());
        return node;
      public boolean isCellEditable(EventObject event)
        return true;
      public boolean shouldSelectCell(EventObject event)
        return true;
      public void  cancelCellEditing()
        fireEditingCanceled();
         HashSet listeners = new HashSet();
      public void addCellEditorListener(CellEditorListener listener) {
        listeners.add(listener);
      public void removeCellEditorListener(CellEditorListener listener) {
        listeners.remove(listener);
      protected void fireEditingStopped() {
         Iterator i = listeners.iterator();
         while (i.hasNext()) {
              ((CellEditorListener)i.next()).editingStopped(new ChangeEvent(this));
      protected void fireEditingCanceled() {
         Iterator i = listeners.iterator();
         while (i.hasNext()) {
              ((CellEditorListener)i.next()).editingCanceled(new ChangeEvent(this));
      public void actionPerformed(ActionEvent event) {
        fireEditingStopped();
    }

  • Weblogic throws NullPointerException when using ServiceControl.setTimeout

    We are invoking a SOAP service via a com.bea.control.ServiceControl that was generated from a WSDL (right click WSDL, Generate Service Control) using Weblogic 8.1.6.
    SOAP service execution is successful using an http and https endpoint. However, when setting a timeout via ServiceControl.setTimeout(int millisecods) method, the Weblogic API is throwing a NullPointerException when using an https endpoint. When using an http endpoint with the setTimeout method execution is successful.
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: opening connection to https://[... edit removed ...]
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: Response generation exception
    Throwable: java.lang.NullPointerException
    Stack Trace:
    java.lang.NullPointerException
         at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:455)
         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:235)
         at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:389)
         at weblogic.net.http.HttpsClient.<init>(HttpsClient.java:209)
         at weblogic.net.http.HttpClient.New(HttpClient.java:228)
         at weblogic.net.http.HttpsURLConnection.getHttpClient(HttpsURLConnection.java:246)
         at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:217)
         at weblogic.net.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:189)
         at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(SoapHttpCall.java:179)
         at com.bea.wlw.runtime.jws.call.SoapHttpCall.invoke(SoapHttpCall.java:80)
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1288)
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1155)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)
    DEBUG com.bea.wlw.runtime.jws.call.SoapFault [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: SoapFault exception throwable e
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: response code=0, responseMsg=null
    DEBUG com.bea.wlw.runtime.jws.call.SoapHttpCall [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: closed connection to https://[... edit removed ...]
    WARN WLW.INVOKE.[... edit removed ...] [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: Id=[... edit removed id ...] Method=[... edit removed method ...]; Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.NullPointerException
    String:null
    Detail:
    END SERVICE FAULT
    ERROR [... edit removed ...]
    [ExecuteThread: '10' for queue: 'weblogic.kernel.Default']: ServiceControlException
    com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.NullPointerException
    String:null
    Detail:
    END SERVICE FAULT
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1268)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)

    Thanks for the suggestion. But with -DUseSunHttpHandler=true the Weblogic API is throwing a ClassCastException with or without the timeout value set.
    Failure=com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.ClassCastException
    String:null
    Detail:
    END SERVICE FAULT
    ERROR: ServiceControlException
    com.bea.control.ServiceControlException: SERVICE FAULT:
    Code:java.lang.ClassCastException
    String:null
    Detail:
    END SERVICE FAULT
         at com.bea.wlw.runtime.core.control.ServiceControlImpl.invoke(ServiceControlImpl.jcs:1268)
         at com.bea.wlw.runtime.core.dispatcher.DispMethod.invoke(DispMethod.java:377)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:433)
         at com.bea.wlw.runtime.core.container.Invocable.invoke(Invocable.java:406)
         at com.bea.wlw.runtime.jcs.container.JcsProxy.invoke(JcsProxy.java:388)

  • Af:inputListOfValues without values throws NullPointerException

    Hello!
    In some cases we have an af:inputListOfValues without any values, due to restrictions in the query. Unfortunately, a NullPointerException is thrown in this case. Actually, we are using JDev 11.1.1.5.
    Is there any solution or workaround to allow empty af:inputListOfValues?
    Regards,
    Christoph
    Edited by: mephistopheles on Sep 3, 2012 11:47 PM

    Hi,
    can you verify with JDeveloper 11.1.1.6 and provide a reproducible set of steps if it reproduces? Also I am wondering if the NPE is throw when you close the LOV or when you submit the form later
    Frank

  • Edit locally throws NullPointerException

    Hi All,
    While doing EditLocally  in a Custom Repository Manager,it throws a null pointer Exception.
    As per the Repository Manager Implementation
    log ,we don’t any exception. So as there is no such relevent error realted to repository manager in default.trc file.
    RF doesn’t pass call to setContent() method of ContentManager.
    We failed to do so in Nw04 SPS11 and Nw04 SPS14.
    Where as we can able to edit successfully in NW04 SPS09.
    Regards
    Arati
    Following is the stack trace we got in iview of edit locally
    Please wait
    Your request is being processed
    System Error
    An exception occurred during the program execution. Below you will find technical information pertaining to this exception that you might want to forward to your system administrator.
    Exception Class 
    Call Stack java.lang.NullPointerException
            at com.sapportals.wcm.control.edit.ResourceClientSideEditControl.renderLockedByUser(ResourceClientSideEditControl.java:1029)
            at com.sapportals.wcm.control.edit.ResourceClientSideEditControl.renderIsLockedByOther(ResourceClientSideEditControl.java:344)
            at com.sapportals.wcm.control.edit.ResourceClientSideEditControl.renderCurrentConditions(ResourceClientSideEditControl.java:302)
            at com.sapportals.wcm.control.edit.ResourceClientSideEditControl.render(ResourceClientSideEditControl.java:191)
            at com.sapportals.wdf.layout.HorizontalLayout.renderControls(HorizontalLayout.java:42)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:155)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.layout.HorizontalLayout.renderPanes(HorizontalLayout.java:73)
            at com.sapportals.wdf.stack.Pane.render(Pane.java:158)
            at com.sapportals.wdf.stack.PaneStack.render(PaneStack.java:67)
            at com.sapportals.wdf.WdfCompositeController.internalRender(WdfCompositeController.java:696)
            at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:664)
            at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
            at com.sapportals.htmlb.Container.preRender(Container.java:118)
            at com.sapportals.htmlb.Container.preRender(Container.java:118)
            at com.sapportals.htmlb.Container.preRender(Container.java:118)
            at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:413)
            at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
            at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:130)
            at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
            at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
            at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:73)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.doRefresh(AbstractPortalComponent.java:355)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:188)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.pb.IviewModeProxy.doContent(IviewModeProxy.java:20)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
            at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
            at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
            at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
            at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
            at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
            at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
            at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
            at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
            at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
            at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
            at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
            at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
            at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
            at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
            at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)
    Report Error

    Some more behavior of this problem
    1)when try to edit locally>file download started and open the file in approprite application>and in the KM iview got the null pointer exception(which usually have check in now, check in later, cancel local editing buttons)
    2) When resume local editing...nothing happens. Even doesn’t through error in iview
    3) when do a lock explicitly to any document- through selection->lock,it puts a check_out_by_me symbol rather than lock_by_me symbol
    Please any body help to resolve the issue,
    Regards
    arati

  • Impersonate domain user to call MessageQueue.Create() to create a private queue throw exception "Msmq service is not available".

    The code impersonate a domain user to create a private messaging queue on local machine, using MessageQueue.Create(".\\myqueue").
    When the current user is a member of local administrators, it works well. 
    When the current user is a member of local users, it throw exception "Msmq service is not available."

    Hi Psun,
    In my opinion, this thread is related to MSMQ forum. So please post thread on that forum for more effective response. Thank you for understanding. Please refer to the following link.
    http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=msmq
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HttpConnection throws NullPointerException

    Hi everybody !
    I'm faceing an odd problem here. I have developed an J2ME (MIDP1.0) application that, among other things, needs to comunicate with my server. The application woks fine on the emulator, it even works great on my phone (Nokia 2650) and on my partners phone (Nokia 6610), but when tested on other phones (SonyErricson, Sagem, Motorola, even an smartphone from Nokia, a 7610 i think) it throws a NullPointerException. I've run out of ideeas regading how to solve this. Here's the piece of code that bugs me:
    public void run(){
            Pachet raspuns = null;               
            display.setCurrent(forma);
            progress.setLabel("Trying to connect");       
            try {
                conn = (HttpConnection) Connector.open(URL, Connector.READ_WRITE);
                conn.setRequestMethod( HttpConnection.POST );
                conn.setRequestProperty("Content-Type", "application/vnd.wap.wmlc");
                byte[] dataForSend = deTrimis.getRawData();
                conn.setRequestProperty("Content-Length", ""+dataForSend.length);
                progress.setLabel("Sending request");
                progress.setValue(25);                      
                forma.append("Opening outputstream\n");
                os = conn.openOutputStream();
                forma.append("Sending data\n");           
                os.write( dataForSend );
                forma.append("Flushing data\n");           
                os.flush();      // this throws the exception
                forma.append("Closing stream\n");           
                os.close();    // if i remove the "os.flush()", the exception is thrown here
                forma.append("Getting response code\n");
                int code = conn.getResponseCode(); // if i remove both os.flush() and os.close() the exception is thrown here !!!
                forma.append("Response code = "+code+"\n");                          
                progress.setLabel("Checking response");
                progress.setValue(50);
                if (code != HttpConnection.HTTP_OK){
                     throw new Exception (conn.getResponseMessage()+"("+code+")");
                progress.setLabel("Reading data");
                progress.setValue(75);           
                if (!aborted){
                    dIn = conn.openDataInputStream();               
                    raspuns = new Pachet();
                    raspuns.readPackage(dIn);
                if (!aborted)
                    listener.packageReceived(raspuns);           
            } catch (Exception e) {
                forma.append("Connection failed. Reason: "+e.getMessage());           
                e.printStackTrace();
            } finally{
                cleanUp();
        }I really need to get this working, so could please someone give me a hint.
    Thank you,
    Daniel Comsa.

    Hi
    I solved this problem.
    There is nothing wrong with the device but the connection that we use.
    Our service provider does not provide the pure HTTP connection rather it goes over WAP and thats where the problem comes.
    Cause we attach our header for the server and WAP sticks his header in between , thats why server does not handle the request and consider it as bad request.
    I have commented the following lines for my code to work
    connection.setRequestProperty("User-Agent",
    System.getProperty("microedition.profiles"));
    connection.setRequestProperty("Content-Type",
    "application/octet-stream");
    Regards,
    Sushil

  • MTOM throws NullPointerException

    Hello,
    I need to transfer large files (12Mb) of diferent types (.pdf, .jpg, .doc, etc). I changed the return type to DataHandler and tried to enable MTOM in my webservice, but when I enabled it, after the method is executed, system throws a NullPointerException.
    I'm enabling MTOM with the annotation @MTOM, and if I just take off this annotation the webservice works correctly.
    Do you know of any problem using MTOM with Java 1.6.0_10? Do you have a suggestion of a better way to transfer it?
    Thanks

    Tested this with JDK 1.4 and it works with the following changes:
    Make these static:
    static public Writer out;
    static public void validateXml (String xmlSt)
    and, of course adding:
    import java.io.*;
    import org.xml.sax.*;
    import javax.xml.parsers.SAXParserFactory;
    Then here is what I used to test it:
    public class Test2 {
         static public void main(String args[]){
              System.out.println("Hi there");
              String s = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> <html> <head> <title> Ho there </title> </head> <body> <h1> Hi there </h1> </body> </html>";
              try {
                   xmlResHandler.validateXml(s);
              }catch (Exception ex){
                   ex.printStackTrace();
    }I think you problem make have to do with your management of the "out" Writer.

  • Opening Image throws NullPointerException

    Hi,
    I'm trying to make a very simple midlet that displays a .png file. I've got the Prentice/Hall book on J2ME and am trying to use the examples therein. This is my code:
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.lcdui.Image;
    import javax.microedition.media.*;
    import java.io.*;
    public class islandia1 extends MIDlet implements CommandListener
         private Display display; // Reference to Display object
         private Form fmMain; // The main form
         private Command cmExit; // Command to exit the MIDlet
         public void ImmutableImageFromFile()
              display = Display.getDisplay(this);
              cmExit = new Command("Exit", Command.EXIT, 1);
              fmMain = new Form("");
              fmMain.addCommand(cmExit);
              fmMain.setCommandListener(this);
         try
                   // Read the image
                   Image im = Image.createImage("/guy.png");
                   fmMain.append("A1");
                   fmMain.append(new ImageItem(null, im,
                   ImageItem.LAYOUT_NEWLINE_BEFORE|
                   ImageItem.LAYOUT_CENTER|
                   ImageItem.LAYOUT_NEWLINE_AFTER, null));
                   display.setCurrent(fmMain);
    catch (java.io.IOException e)
    System.err.println("Unable to locate or read .png file");
    public void startApp()
    display.setCurrent(fmMain);
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command c, Displayable s)
    if (c == cmExit)
    destroyApp(false);
    notifyDestroyed();
    }I put the picture guy.png in the res directory and compile the thing. No problem so far. Then when I execute the viewer and click the 'Launch' button I get a nullpointerexception being the following:
    Running with storage root DefaultColorPhone
    startApp threw an Exception
    java.lang.NullPointerException
    java.lang.NullPointerException
         at islandia1.startApp(+8)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+270)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)I've been at this for two days now, tried millions of examples but I just plain don't know why it does this. Can anybody help?

    You're never assigning anything to the variable display, so it is null, so you're getting a NullPointerException. If display wasn't null you still wouldn't see anything on screen because in startApp() fmMain is also null. You are doing all the initialization in ImmutableImageFromFile(), but you aren't calling that function anywhere.
    Try changing startApp() to call that functio.
    shmoove

  • TaskManagerQueryService / TaskSearchFilter throws NullPointerException

    I am trying to run a task search using the TaskManagerQueryService and a TaskSearchFilter.  I'm looking for active tasks assigned to groups that a user belongs to.  Whenever I include the Conditions with the Connectives shown below, the query service throws a null pointer exception as shown in the stacktrace below.  What I'm trying to do with the Connectives is effectively create the equivalent of
    if (Correct status code && (in group 1 || in group 2 ... ) {return the task}
    Anyone have a clue what I'm doing wrong?
    The code looks like this:
    final ServiceClientFactory myFactory = getServiceClientFactory(pAdobeServername, pUserId, pPassWord);
    final TaskManager taskManager = TaskManagerClientFactory.getTaskManager(myFactory);
    final TaskManagerQueryService queryManager = TaskManagerClientFactory.getQueryManager(myFactory);
    LiveCycleUser retUser = getUserInfo(pAdobeServername, pUserId, pPassWord);
    final TaskSearchFilter taskSearchFilter = new TaskSearchFilter();
    Operator operator = new Operator("<");
    Integer statusCode = new Integer(StatusFilter.completed);
    taskSearchFilter.addCondition(TaskSearchingConstants.pSTATUS, operator, statusCode);
    HashSet<Group> groups = retUser.getGroupMembership();
    Iterator<Group> groupIter = groups.iterator();
    operator = new Operator("=");
    if (groupIter.hasNext()) {
    Group grp = groupIter.next();
    String grpName = grp.getCommonName();
    taskSearchFilter.addCondition(TaskSearchingConstants.pASSIGNMENT_QUEUE_OWNER, operator, grpName, Connective.AND);   
    while (groupIter.hasNext()) {
    Group grp = groupIter.next();
    String grpName = grp.getCommonName();
    taskSearchFilter.addCondition(TaskSearchingConstants.pASSIGNMENT_QUEUE_OWNER, operator, grpName, Connective.OR);
    if (processName != null) {
    taskSearchFilter.setServiceName(processName);
    taskSearchFilter.setIgnoreAllAcls(true);
    final List<TaskRow> taskRowList = queryManager.taskSearch(taskSearchFilter);
    beanList = buildBeanList(taskRowList, queryManager, taskManager);
    The stacktrace looks like this:
    Running: testGetAllTasksForSpecificProcessAsBeans
    java.lang.NullPointerException
    at com.adobe.idp.taskmanager.dsc.queryservice.TaskManagerQueryServiceImpl.taskSearch(TaskMan agerQueryServiceImpl.java:467)
    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:597)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassi vationInterceptor.java:53)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:357)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.java:227)
    at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
    at $Proxy165.doSupports(Unknown Source)
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:104)
    at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:165)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
    at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
    at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:115)
    at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiv er.java:329)
    at com.adobe.idp.dsc.provider.impl.ejb.receiver.EjbReceiverBean.invoke(EjbReceiverBean.java: 158)
    at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:158)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:169)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at sun.reflect.GeneratedMethodAccessor402.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:231)
    at sun.reflect.GeneratedMethodAccessor401.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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 javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:28 8)
    at $Proxy16.invoke(Unknown Source)
    at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:734)
    at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:560)
    at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:383)
    at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:165)
    Completed: testGetAllTasksForSpecificProcessAsBeans 

    It appears as though I have stumbled on the answer to my own question.  In the task filter, I should be using TaskSearchingConstants.pCURRENT_ASSIGNMENT_QUEUE_OWNER instead of TaskSearchingConstants.pASSIGNMENT_QUEUE_OWNER.

  • EntityManagerImpl.getActivePersistenceContext throws NullPointerException

    Hello,
    I'm attempting to do a simple write to the database using JPA/Toplink in a stand-alone J2SE environment, connecting to a SQLServer instance. I'm running into trouble when a NullPointerException is thrown when I call EntityTransaction.begin().
    So far I've confirmed that the EntityManager and the EntityManagerFactory are active (.isActive() is true), and that the EntityTransaction is not null.
    I've been trying various things for the past few days with no success. I would be grateful for any suggestions...
    Here's the relevant portion of the code:
    public class QuantumResponsePersistor {
    private static Logger LOG = Logger.getLogger(QuantumResponsePersistor.class.getCanonicalName());
    private EntityManagerFactory emf;
    private EntityManager em;
    public QuantumResponsePersistor() {
    emf = Persistence.createEntityManagerFactory("QuantumViewCommunicationsPU", new HashMap());
    LOG.debug("EntityManagerFactory is " + (emf.isOpen()? "open" : "closed"));
    em = emf.createEntityManager();
    LOG.debug("EntityManager is " + (em.isOpen()? "open" : "closed"));
    public void saveXmlObj(QuantumEvent xEvent) {
    // new instance of JPA Entity
    SubscriptionEvent pEvent = new SubscriptionEvent();
    // .... skipped: pull data from xEvent, set properties on pEvent
    persist(pEvent)
    private void persist(SubscriptionEvent pEvent) {
    EntityTransaction et = em.getTransaction();
    et.begin();
    em.persist(pEvent);
    et.commit();
    em.close();
    And here is the persistence.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="QuantumViewCommunicationsPU" transaction-type="RESOURCE_LOCAL">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <class>com.qbp.quantumview.persistence.dao.Delivery</class>
    <class>com.qbp.quantumview.persistence.dao.Exception</class>
    <class>com.qbp.quantumview.persistence.dao.Cod</class>
    <class>com.qbp.quantumview.persistence.dao.ActivityLocation</class>
    <class>com.qbp.quantumview.persistence.dao.Activity</class>
    <class>com.qbp.quantumview.persistence.dao.PackageSvcOptions</class>
    <class>com.qbp.quantumview.persistence.dao.EmailMessageBody</class>
    <class>com.qbp.quantumview.persistence.dao.SubscriptionEvent</class>
    <class>com.qbp.quantumview.persistence.dao.Manifest</class>
    <class>com.qbp.quantumview.persistence.dao.SpecialInstructions</class>
    <class>com.qbp.quantumview.persistence.dao.Package</class>
    <class>com.qbp.quantumview.persistence.dao.Address</class>
    <class>com.qbp.quantumview.persistence.dao.ManifestReferenceNumber</class>
    <class>com.qbp.quantumview.persistence.dao.UnitOfMeasure</class>
    <class>com.qbp.quantumview.persistence.dao.SubscriptionFile</class>
    <class>com.qbp.quantumview.persistence.dao.Currency</class>
    <class>com.qbp.quantumview.persistence.dao.Origin</class>
    <class>com.qbp.quantumview.persistence.dao.PackageReference</class>
    <class>com.qbp.quantumview.persistence.dao.ExtendedAddressInfo</class>
    <class>com.qbp.quantumview.persistence.dao.Sysdiagrams</class>
    <class>com.qbp.quantumview.persistence.dao.Notification</class>
    <class>com.qbp.quantumview.persistence.dao.EmailMessage</class>
    <class>com.qbp.quantumview.persistence.dao.ServiceCode</class>
    <class>com.qbp.quantumview.persistence.dao.PaymentType</class>
    <class>com.qbp.quantumview.persistence.dao.ShipmentServiceOptions</class>
    <class>com.qbp.quantumview.persistence.dao.OnCallPickUpDetail</class>
    <class>com.qbp.quantumview.persistence.dao.Shipper</class>
    <properties>
    <property name="toplink.jdbc.url" value="jdbc:sqlserver://10.0.10.40:1334;databaseName=quantumview"/>
    <property name="toplink.jdbc.user" value="quantumview"/>
    <property name="toplink.jdbc.driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
    <property name="toplink.jdbc.password" value="ups"/>
    </properties>
    </persistence-unit>
    </persistence>
    Thanks much in advance!
    --Dave                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I'm posting to this forum in particular since the exception is thrown from within the Toplink method stack.
    On the off chance that this was related to running as a stand-alone app, I rebuilt it as a simple Servlet. I get the same exception:
    StandardWrapperValve[MainServlet]: PWC1406: Servlet.service() for servlet MainServlet threw exception
    java.lang.NullPointerException
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.getActivePersistenceContext(EntityManagerImpl.java:602)
    at oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.EntityTransactionImpl.begin(EntityTransactionImpl.java:78)
    at com.qbp.quantumview.persistence.QuantumResponsePersistor.persist(QuantumResponsePersistor.java:97)
    at com.qbp.quantumview.persistence.QuantumResponsePersistor.persist(QuantumResponsePersistor.java:71)
    at com.qbp.quantumview.servlet.MainServlet.processRequest(MainServlet.java:58)
    at com.qbp.quantumview.servlet.MainServlet.doGet(MainServlet.java:86)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Here is the definition of the class I am trying to persist:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.qbp.quantumview.persistence.dao;
    import java.io.Serializable;
    import java.util.Collection;
    import java.util.Date;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.OneToMany;
    import javax.persistence.Table;
    import javax.persistence.Temporal;
    import javax.persistence.TemporalType;
    * @author dhoyt
    @Entity
    @Table(name = "subscription_event")
    @NamedQueries({@NamedQuery(name = "SubscriptionEvent.findById", query = "SELECT s FROM SubscriptionEvent s WHERE s.id = :id"), @NamedQuery(name = "SubscriptionEvent.findByName", query = "SELECT s FROM SubscriptionEvent s WHERE s.name = :name"), @NamedQuery(name = "SubscriptionEvent.findByNumber", query = "SELECT s FROM SubscriptionEvent s WHERE s.number = :number"), @NamedQuery(name = "SubscriptionEvent.findByBeginDt", query = "SELECT s FROM SubscriptionEvent s WHERE s.beginDt = :beginDt"), @NamedQuery(name = "SubscriptionEvent.findByEndDt", query = "SELECT s FROM SubscriptionEvent s WHERE s.endDt = :endDt"), @NamedQuery(name = "SubscriptionEvent.findBySubscriptionStatusCode", query = "SELECT s FROM SubscriptionEvent s WHERE s.subscriptionStatusCode = :subscriptionStatusCode"), @NamedQuery(name = "SubscriptionEvent.findBySubscriptionStatusDescription", query = "SELECT s FROM SubscriptionEvent s WHERE s.subscriptionStatusDescription = :subscriptionStatusDescription")})
    public class SubscriptionEvent implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Integer id;
    @Column(name = "name")
    private String name;
    @Column(name = "number")
    private String number;
    @Column(name = "begin_dt")
    @Temporal(TemporalType.TIMESTAMP)
    private Date beginDt;
    @Column(name = "end_dt")
    @Temporal(TemporalType.TIMESTAMP)
    private Date endDt;
    @Column(name = "subscription_status_code")
    private String subscriptionStatusCode;
    @Column(name = "subscription_status_description")
    private String subscriptionStatusDescription;
    @OneToMany(mappedBy = "subscriptionEventId")
    private Collection<SubscriptionFile> subscriptionFileCollection;
    // @OneToMany(mappedBy = "subscriptionEventId1")
    // private Collection<SubscriptionFile> subscriptionFileCollection1;
    public SubscriptionEvent() {
    public SubscriptionEvent(Integer id) {
    this.id = id;
    public Integer getId() {
    return id;
    public void setId(Integer id) {
    this.id = id;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    public String getNumber() {
    return number;
    public void setNumber(String number) {
    this.number = number;
    public Date getBeginDt() {
    return beginDt;
    public void setBeginDt(Date beginDt) {
    this.beginDt = beginDt;
    public Date getEndDt() {
    return endDt;
    public void setEndDt(Date endDt) {
    this.endDt = endDt;
    public String getSubscriptionStatusCode() {
    return subscriptionStatusCode;
    public void setSubscriptionStatusCode(String subscriptionStatusCode) {
    this.subscriptionStatusCode = subscriptionStatusCode;
    public String getSubscriptionStatusDescription() {
    return subscriptionStatusDescription;
    public void setSubscriptionStatusDescription(String subscriptionStatusDescription) {
    this.subscriptionStatusDescription = subscriptionStatusDescription;
    public Collection<SubscriptionFile> getSubscriptionFileCollection() {
    return subscriptionFileCollection;
    public void setSubscriptionFileCollection(Collection<SubscriptionFile> subscriptionFileCollection) {
    this.subscriptionFileCollection = subscriptionFileCollection;
    // public Collection<SubscriptionFile> getSubscriptionFileCollection1() {
    // return subscriptionFileCollection1;
    // public void setSubscriptionFileCollection1(Collection<SubscriptionFile> subscriptionFileCollection1) {
    // this.subscriptionFileCollection1 = subscriptionFileCollection1;
    @Override
    public int hashCode() {
    int hash = 0;
    hash += (id != null ? id.hashCode() : 0);
    return hash;
    @Override
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof SubscriptionEvent)) {
    return false;
    SubscriptionEvent other = (SubscriptionEvent) object;
    if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
    return false;
    return true;
    @Override
    public String toString() {
    return "com.qbp.quantumview.persistence.dao.SubscriptionEvent[id=" + id + "]";
    }

Maybe you are looking for