QAjmsSession.createReceiver(queue) Always Throws NullPointerException

I am trying to get the aqjmsdemo01 sample code to work, but I consistently get a null pointer error when it tries to get a receiver from the session.
The queue setup was as follows:
begin
DBMS_AQADM.CREATE_NP_QUEUE CACHE_INVALIDATION_QUEUE',false,'My Cache Invalidation Queue');
DBMS_AQADM.START_QUEUE('CACHE_INVALIDATION_QUEUE', TRUE, TRUE);
end;
The code (where it fails is like this:
System.out.println("Get the Queue") ;
/* Get the Queue */
/* Queue JMSMAPQ is created in aqjmsdemo02 */
queue = ((AQjmsSession)qsess).getQueue("FLT", "CACHE_INVALIDATION_QUEUE") ;
System.out.println("Create Receiver...") ;
/* Create a queue receiever */
qrecv = qsess.createReceiver(queue, "JMSCorrelationID='BLUE'") ; // <---- Fails Here
Any ideas ?

I am seeing a similar behavior only with createSubscriber.
What is interesting to me is that it thinks that it is durable when the topic was created with the following:
     dbms_aqadm.create_np_queue (
          queue_name => 'px_jmx_lf_con_evt',
          multiple_consumers => true);
Here is the stack trace.
java.lang.NullPointerException
     at oracle.jms.AQjmsSession.getAQJmsSelector(AQjmsSession.java:2567)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2537)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2478)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2290)
     at oracle.jms.AQjmsSession.createSubscriber(AQjmsSession.java:2237)
     at com.paychex.common.jms.Listener.setTopicListener(Listener.java:60)
     at com.paychex.common.jms.Listener.setMessageListener(Listener.java:45)
     at com.paychex.common.jms.ConnectionTests.testTopicListener(ConnectionTests.java:123)
     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:324)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:397)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:281)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:173)
Here is my stack trace:
java.lang.NullPointerException
     at oracle.jms.AQjmsSession.getAQJmsSelector(AQjmsSession.java:2567)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2537)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2478)
     at oracle.jms.AQjmsSession.createDurableSubscriber(AQjmsSession.java:2290)
     at oracle.jms.AQjmsSession.createSubscriber(AQjmsSession.java:2237)
     at com.paychex.common.jms.Listener.setTopicListener(Listener.java:60)
     at com.paychex.common.jms.Listener.setMessageListener(Listener.java:45)
     at com.paychex.common.jms.ConnectionTests.testTopicListener(ConnectionTests.java:123)
     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:324)
     at junit.framework.TestCase.runTest(TestCase.java:154)
     at junit.framework.TestCase.runBare(TestCase.java:127)
     at junit.framework.TestResult$1.protect(TestResult.java:106)
     at junit.framework.TestResult.runProtected(TestResult.java:124)
     at junit.framework.TestResult.run(TestResult.java:109)
     at junit.framework.TestCase.run(TestCase.java:118)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:397)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:281)
     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:173)

Similar Messages

  • Does the priority queue always work?

    Hi 
    I have a 8Mbp of wan link which sometime gets saturated and I have shaped average this to 8Mbps but i am running vocie on this WAN link and have defined priority for voice with 850kbps under voice class. My question is when the link is not fully utilized, Will the packets from priority queue are always dequeued first as compared to packets sent from from other queus or will the QoS will not do anything here since the link utilization is lot less than what is sepecified in shape average. I am asking this to confirm if the priority queue always help to overcome the issue of jitter if either the link is saturated or not?
    Thanks

    Disclaimer
    The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.
    Liability Disclaimer
    In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.
    Posting
    You describe PQ and shaping, but the former is usually a part of doing QoS on L2/L3 switches, and the latter on routers.  What device(s) and their IOS versions and the WAN media are you working with?
    On "routers", interfaces generally have FIFO tx-rings, only when they overflow, are packets placed in CBWFQ queues.  Within CBWFQ, LLQ will be dequeued first, but such packets might have already been queued behind other non-LLQ traffic within the interface tx-ring.  (NB: for routers, with tx-rings, when supporting VoIP, you may want to minimize the size of the tx-ring.)
    Shapers, in my experience, are "interesting".  First, I believe many shapers don't account for L2 overhead, but provider CIRs often do.  So unless you shape slower than the nomimal CIR rate, you can send faster than the available bandwidth.  (Often I've found shaping 10 to 15% slower allows for average L2 overhead.)
    Second, shapers work on averages over time intervals.  For VoIP, you'll often want to insure the shaper is using a small Tc, otherwise it will allow FIFO bursts.  (I've found a Tc of 10ms seems to support VoIP fairly well.)
    Third, I suspect some shapers might have their own queues between the interface and the defined policy queues.  If they do, unknown what their queuing organization is or their supported queuing depths.  If this is the case, makes it difficult to engineer QoS.
    Whenever possible, I've found it beneficial to work to avoid using shapers especially for timing sensitive traffic, like VoIP.  In your case, I would suggest, if possible, obtaining 10 Mbps of WAN bandwidth and somewhere passing the traffic through a physical 10 Mbps interface, with a QoS policy.
    But to more directly answer your question, PQ (or LQ) will dequeue its packets next compared to other "peer" queues.  This should always help VoIP for delay and jitter, but there's more involved whether this is necessary and/or whether it's helpful enough when necessary.
    You ask about when a link is saturated, but a link is 100% saturated everytime a packet is being transmitted.  Often link usage is represented in percentages of usage of possible maximum transmission rate over some time period, but when it comes to QoS, 100% utilization might be just fine while 1% utilization is not.  Much, much more information, about your situation, might be needed to offer truly constructive recommendations.

  • 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

  • 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/]

  • GetLocalhost() always throws UnknownHostException

    Hi,
    On my computer the method InetAddress.getLocalHost() always throws an UnknownHostException (JRE: jre-1_5_0_05-windows-i586-p.exe).
    I found a topic for this trouble (http://forum.java.sun.com/thread.jspa?forumID=11&threadID=495321) but it doesn't help me.
    I think there is a problem in my network configuration. Can you help me?
    My OS is XP service pack 2.
    >>>> Result of the command "ipconfig /all" (sorry it's in french, and I changed some number with "XXXX' for confidentiality)
    Configuration IP de Windows
            Nom de l'h�te . . . . . . . . . . : myhost
            Suffixe DNS principal . . . . . . :
            Type de noud . . . . . . . . . . : Inconnu
            Routage IP activ� . . . . . . . . : Non
            Proxy WINS activ� . . . . . . . . : Non
    Carte Ethernet Connexion au r�seau local:
            Suffixe DNS propre � la connexion :
            Description . . . . . . . . . . . : 3Com Gigabit LOM (3C940)
            Adresse physique . . . . . . . . .: 00-0C-6E-XX-XX-XX
            DHCP activ�. . . . . . . . . . . : Oui
            Configuration automatique activ�e . . . . : Oui
            Adresse IP. . . . . . . . . . . . : 192.168.0.2
            Masque de sous-r�seau . . . . . . : 255.255.255.0
            Adresse IP. . . . . . . . . . . . : XXXX::XXXX:XXXX:fe85:ebb4%4
            Passerelle par d�faut . . . . . . : 192.168.0.1
            Serveur DHCP. . . . . . . . . . . : 192.168.0.1
            Serveurs DNS . . . . . . . . . .  : 192.168.0.1
                                                fec0:0:0:ffff::1%1
                                                fec0:0:0:ffff::2%1
                                                fec0:0:0:ffff::3%1
            Bail obtenu . . . . . . . . . . . : mardi 18 octobre 2005 18:16:51
            Bail expirant . . . . . . . . . . : vendredi 21 octobre 2005
    18:16:51
    Carte Tunnel Teredo Tunneling Pseudo-Interface :
            Suffixe DNS propre � la connexion :
            Description . . . . . . . . . . . : Teredo Tunneling
    Pseudo-Interface
            Adresse physique . . . . . . . . .: FF-FF-FF-FF-FF-FF-FF-FF
            DHCP activ�. . . . . . . . . . . : Non
            Adresse IP. . . . . . . . . . . . : XXXX::5445:5245:444f%5
            Passerelle par d�faut . . . . . . :
            NetBIOS sur TCPIP. . . . . . . .  : D�sactiv�
    Carte Tunnel Automatic Tunneling Pseudo-Interface :
            Suffixe DNS propre � la connexion :
            Description . . . . . . . . . . . : Automatic Tunneling
    Pseudo-Interface
            Adresse physique . . . . . . . . .: C0-A8-00-02
            DHCP activ�. . . . . . . . . . . : Non
            Adresse IP. . . . . . . . . . . . : fe80::5efe:192.168.0.2%2
            Passerelle par d�faut . . . . . . :
            Serveurs DNS . . . . . . . . . .  : fec0:0:0:ffff::1%1
                                                fec0:0:0:ffff::2%1
                                                fec0:0:0:ffff::3%1
            NetBIOS sur TCPIP. . . . . . . .  : D�sactiv�
    Result of the "ping localhost" command:
    ping localhost
    Envoi d'une requ�te 'ping' sur myhost [::1] avec 32 octets de donn�es :
    R�ponse de ::1 : temps<1ms
    R�ponse de ::1 : temps<1ms
    R�ponse de ::1 : temps<1ms
    R�ponse de ::1 : temps<1ms
    >>>> Result of the "route print" command
    ===========================================================================
    Liste d'Interfaces
    0x1 ........................... MS TCP Loopback interface
    0x2 ...00 0c 6e XX XX XX ...... 3Com Gigabit LOM (3C940) - Miniport
    d'ordonnance
    ment de paquets ===========================================================================
    ===========================================================================
    Itin�raires actifs :
    Destination r�seau    Masque r�seau  Adr. passerelle   Adr. interface
    M�trique
              0.0.0.0          0.0.0.0      192.168.0.1     192.168.0.2       20
         64.4.XXX.XXX  255.255.255.255      192.168.0.1     192.168.0.2       20
        65.54.XXX.XXX  255.255.255.255      192.168.0.1     192.168.0.2       20
            127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
          192.168.0.0    255.255.255.0      192.168.0.2     192.168.0.2       20
          192.168.0.2  255.255.255.255        127.0.0.1       127.0.0.1       20
        192.168.0.255  255.255.255.255      192.168.0.2     192.168.0.2       20
       207.46.XXX.XXX  255.255.255.255      192.168.0.1     192.168.0.2       20
       207.68.XXX.XXX  255.255.255.255      192.168.0.1     192.168.0.2       20
            224.0.0.0        240.0.0.0      192.168.0.2     192.168.0.2       20
      255.255.255.255  255.255.255.255      192.168.0.2     192.168.0.2       1
    Passerelle par d�faut :       192.168.0.1
    ===========================================================================
    Itin�raires persistants :
      AucunThank you!

    Just a guess, but try setting "Suffixe DNS propre � la connexion"
    On my machine, I bring up the window Local Area Connection Status, then click on Properties, that brings up the Local Area Connection Properties window. Then I click on Internet Protocol (TCP/IP) in the list, then click the Properties button. That brings up the Internet Protocol (TCP/IP) Properties window; in there click Advanced button. That brings up the Advanced TCP/IP Settings window. In it click on the DNS tab. Down near the bottom is a box labeled "DNS suffix for this connection" and in it I have the suffix for my domain (berkeley.edu). I've never understood what the two boxes below are for/what they do.
    This is just a stab in the dark; I have no idea if it will help.

  • 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)

  • ImapFolder.getAttributes() throws NullPointerException

    When we call ImapFolder.getAttributes() we sometimes get NullPointerException. We we dig in the source code of javamail and we saw that it will be possibly a bug ;
    Here is code block of getAttributes method:
        public String[] getAttributes() throws MessagingException {
         if (attributes == null)
             exists();          // do a LIST to set the attributes     
         return (String[])(attributes.clone());
        }Here when attributes attribute is null exists() method is called to fill this attribute but at exist() method;
         } else {
             exists = opened;
             attributes = null;
    .this else block says that even if we call exists() method attributes attribute can be null!
    after calling exists() method our attributes attribute is null and when it is called "attributes.clone()" it causes NullPointerException.

    The exists() method will fail to fill in attributes only if the LIST command
    returns no information about the folder, which should only happen if the
    folder doesn't exist. I'd love to see a protocol trace from your server
    showing the response to the LIST command. What server are you using?
    How are you sure that the folder exists? Is it a folder that always exists?
    Is the folder never removed and recreated? Is getAttributes being called
    on an open folder?
    Again, I agree that getAttributes should detect this case, but when it detects this case
    it would would throw a FolderNotFoundException rather than a NullPointerException.
    On some servers it may be possible for the folder to be open (and thus "exist"),
    but have been removed, so that LIST shows no evidence of the folder. In this case
    getAttributes should return an empty String array.
    But again, I'd still like to know what conditions are causing this problem for you,
    to make sure I fix all the possible cases correctly.

  • Properties.store throws NullPointerException

    Hi,
    I have a strange problem with the java.util.Properties class. Calling
    store on a Properties object AFTER I've called System.setProperties
    always leads to a NullPointerException.
    Code sample 1:
    Properties props = new Properties();
    props.put("prop1", "val1");
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    Code sample 2:
    Properties props = new Properties();
    props.put("prop1", "val1");
    System.setProperties(props);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    Code sample 1 works fine, sample 2 throws a NullPointerException in
    the last line. Even code sample 3 throws the exception in the last
    line.
    Code sample 3:
    Properties props = new Properties();
    props.put("prop1", "val1");
    System.setProperties(props);
    props = new Properties();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    props.store(out, "Header");
    How can I avoid this problem. I can't guarantee that no one calls
    System.setProperties before the store call, so this is no solution. I
    need the store call to save the properties to a String. At a later
    time I want to use Properties.load to read the properties from this
    String (via ByteArrayInputStream). Perhaps there is another way to
    store/load properties to/from a String?
    Thanks,
    Markus

    Hi,
    I think the problem is that if u create a new Property it will create a new property with null value
    Creates an empty property list with no default values.
    and if u try to override the systemproperty creates a null pointer Exception.
    Insteda try this
    Properties p=System.getProperties();
              p.put("prop1","val1");
              System.setProperties(p);
              ByteArrayOutputStream out = new ByteArrayOutputStream();
              p.store(out, "Header");
    means , try to get the property object from the system and go ahead with ur coding is working fine
    Greetz
    Kumar.R

  • Persistence.createEntityManagerFactory() throw NullPointerException in oc4j

    Hi,
    I am trying to use JPA(toplink essential) with EJB 2.0 spec using the DAO pattern. Outside the oc4j container all my DAO unit tests passes but when I run the same code inside oc4j the Persistence.createEntityManagerFactory() method throws a NPE. I verified that META-INF/persistence.xml file is available through the classpath inside the container but I don’t see any toplink specific logs in oc4j. Do I need to do anything to tell oc4j load up persistence.xml? I have been trying many different options in persistence.xml but I always get the same exception. Any help will be appreciated.
    Code:
    Persistence.createEntityManagerFactory(“default”, new HashMap());
    Exception:
    07/07/06 17:25:21 java.lang.NullPointerException
    07/07/06 17:25:21 at oracle.toplink.essentials.ejb.cmp3.EntityManagerFacto
    ryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:120)
    07/07/06 17:25:21 at javax.persistence.Persistence.createEntityManagerFact
    ory(Persistence.java:59)
    07/07/06 17:25:21 at com.retek.rib.domain.hospital.dao.toplink.ToplinkSess
    ionDispenser.currentEntityManager(ToplinkSessionDispenser.java:31)
    Config File:
    <?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="default" transaction-type="RESOURCE_LOCAL">
    <!--persistence-unit name="ribPersistenceUnit" transaction-type="JTA"-->
    <!--provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    </provider-->
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <!--jta-data-source>jdbc/OracleRibDs</jta-data-source-->
    <class>com.retek.rib.domain.hospital.bo.impl.HospitalEntryImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageFailureImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageRoutingInfoImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageHospitalRefImpl</class>
    <!--properties>
    <property name="toplink.jdbc.url" value="jdbc:derby://localhost:1527/testD
    B"/>
    <property name="toplink.jdbc.user" value="APP"/>
    <property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.ClientDr
    iver"/>
    <property name="toplink.jdbc.password" value="APP"/>
    </properties-->
    <properties>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@pbora-lnx:1521:
    orcl"/>
    <property name="toplink.jdbc.user" value="stubby2"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDrive
    r"/>
    <property name="toplink.jdbc.password" value="retek"/>
    <property name="toplink.logging.level" value="FINE"/>
    </properties>
    <!--properties>
    <!--property name="toplink.server.platform.class.name" value="oracle.topli
    nk.essentials.platform.server.oc4j.Oc4jPlatform"/- ->
    <property name="toplink.logging.level" value="FINE"/>
    </properties-->
    </persistence-unit>
    </persistence>

    Hi,
    I am trying to use JPA(toplink essential) with EJB 2.0 spec using the DAO pattern. Outside the oc4j container all my DAO unit tests passes but when I run the same code inside oc4j the Persistence.createEntityManagerFactory() method throws a NPE. I verified that META-INF/persistence.xml file is available through the classpath inside the container but I don’t see any toplink specific logs in oc4j. Do I need to do anything to tell oc4j load up persistence.xml? I have been trying many different options in persistence.xml but I always get the same exception. Any help will be appreciated.
    Code:
    Persistence.createEntityManagerFactory(“default”, new HashMap());
    Exception:
    07/07/06 17:25:21 java.lang.NullPointerException
    07/07/06 17:25:21 at oracle.toplink.essentials.ejb.cmp3.EntityManagerFacto
    ryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:120)
    07/07/06 17:25:21 at javax.persistence.Persistence.createEntityManagerFact
    ory(Persistence.java:59)
    07/07/06 17:25:21 at com.retek.rib.domain.hospital.dao.toplink.ToplinkSess
    ionDispenser.currentEntityManager(ToplinkSessionDispenser.java:31)
    Config File:
    <?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="default" transaction-type="RESOURCE_LOCAL">
    <!--persistence-unit name="ribPersistenceUnit" transaction-type="JTA"-->
    <!--provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    </provider-->
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <!--jta-data-source>jdbc/OracleRibDs</jta-data-source-->
    <class>com.retek.rib.domain.hospital.bo.impl.HospitalEntryImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageFailureImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageRoutingInfoImpl</class>
    <class>com.retek.rib.domain.ribmessage.bo.impl.RibMessageHospitalRefImpl</class>
    <!--properties>
    <property name="toplink.jdbc.url" value="jdbc:derby://localhost:1527/testD
    B"/>
    <property name="toplink.jdbc.user" value="APP"/>
    <property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.ClientDr
    iver"/>
    <property name="toplink.jdbc.password" value="APP"/>
    </properties-->
    <properties>
    <property name="toplink.jdbc.url" value="jdbc:oracle:thin:@pbora-lnx:1521:
    orcl"/>
    <property name="toplink.jdbc.user" value="stubby2"/>
    <property name="toplink.jdbc.driver" value="oracle.jdbc.driver.OracleDrive
    r"/>
    <property name="toplink.jdbc.password" value="retek"/>
    <property name="toplink.logging.level" value="FINE"/>
    </properties>
    <!--properties>
    <!--property name="toplink.server.platform.class.name" value="oracle.topli
    nk.essentials.platform.server.oc4j.Oc4jPlatform"/- ->
    <property name="toplink.logging.level" value="FINE"/>
    </properties-->
    </persistence-unit>
    </persistence>

  • URLStream.readBytes always throw out of memory exception (errorID=1000)

    When I try to load a file as 180MBytes by using URLStream.readBytes(). 
    In some PCs, it's OK.
    But in some PCs, there are always [out of memory] exception (errorID=1000) even such PC still had enough memory.
    For example:
       Total memory is 2G, current used is 1.43G, but URLStream.readBytes() still throw such exception.
    For file with little size such as 30M, there isn't such problem.
    Could any body give some suggestion?
    Best regards,
    Sourcecode is very simple like:
      var myStream:URLStream;
      var inputBytes: ByteArray = new ByteArray();
      ... do load ...
      // load by progressive event. I only deal progress load once, and ignore all later progressive load events.
      // for example first 500KBytes was read.
      myStream(inputBytes,inputBytes.length);
      // load again when all datas is loaded completely. For example, 180MBytes should be read.
      try {
        myStream(inputBytes,inputBytes.length);
      }  catch(e:*) {
        // warning log

    When I try to load a file as 180MBytes by using URLStream.readBytes(). 
    In some PCs, it's OK.
    But in some PCs, there are always [out of memory] exception (errorID=1000) even such PC still had enough memory.
    For example:
       Total memory is 2G, current used is 1.43G, but URLStream.readBytes() still throw such exception.
    For file with little size such as 30M, there isn't such problem.
    Could any body give some suggestion?
    Best regards,
    Sourcecode is very simple like:
      var myStream:URLStream;
      var inputBytes: ByteArray = new ByteArray();
      ... do load ...
      // load by progressive event. I only deal progress load once, and ignore all later progressive load events.
      // for example first 500KBytes was read.
      myStream(inputBytes,inputBytes.length);
      // load again when all datas is loaded completely. For example, 180MBytes should be read.
      try {
        myStream(inputBytes,inputBytes.length);
      }  catch(e:*) {
        // warning log

  • Site mailbox always throwing error code 0

    Hello,
    In our SharePoint environment I have configured site mailbox as per instruction given at technet site. While running the ps1 script to setup mailbox  I have not received any error. All setup has been ok.
    But while I have added site mailbox app to one of the subsites and clicking on site mailbox I am always getting error like "We are facing troubled while contacting with the SharePoint Server and error code is showing as 0 "
    I have checked the sharepoint log and found below error is throwing
    The scale out database mappings cache has been refreshed for service id 275cb0da-777d-4f5f-aff5-78558afa3be3.
    The new mappings are as follows:
    For database Data Source=SQL12-3\INST3;Initial Catalog=AppMng_Service_DB_290fd9b502d34f07bb428a52788d4a36;
    Integrated Security=True;Enlist=False;Pooling=True;Min Pool Size=0;Max Pool Size=100;Connect Timeout=15:
    range start 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00, range end NULL. b95d899c-c3a4-e04a-1a4b-6d2b28c555e5
    04/21/2014 10:47:21.96  w3wp.exe (0x21B8)                        0x13D4 SharePoint Portal Server       
    Site Mailbox                   ajv81 Exception  System.NullReferenceException: Object reference not set to an instance of an object.    
    at Microsoft.SharePoint.Portal.CollaborationMailboxInternalService.ExchangeHasPermissionsToSiteSubscriptionInternal(SPWeb web, CollaborationMailboxErrorCodes& errorCode)     at Microsoft.SharePoint.Portal.CollaborationMailboxInternalService.<>c__DisplayClassf.<ExchangeHasPermissionsToSiteSubscription>b__e()
    StackTrace:  at Microsoft.Office.Server.Native.dll: (sig=678c0f87-966f-4d99-9c94-b49e788d2672|2|microsoft.office.server.native.pdb, offset=131CE) at Microsoft.Office.Server.Native.dll: (offset=21BE5) b95d899c-c3a4-e04a-1a4b-6d2b28c555e5
    04/21/2014 10:47:21.96  w3wp.exe (0x21B8)    
    I am struggling to resolve this issue from last 7 days.
    Any help to resolve this issue would be appreciated.
    Thanks

    Hi,
     Please refer this one
    http://www.scinaptic.com/support/0109.html
    If its not helping you please let me know
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • 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

  • ExecSQL throws NullPointerException in large jobs (Oracle)

    I'm processing a loop with execSQL calls on a Oracle database. My program works fine, but after 15 minutes (= about 90 loops) it always terminates with a NullPointerException from the execSQL call. Is there any time-out for the database connection ? I have also tried to reconnect in every loop step (I know that's a terrible idea), but it doesn't work either.
    I'm using Oracle 8.1.6 on Windows NT with SUN JDK 1.2.2 and the OCI drivers.
    Thanks, Holger

    It's costly to provide the source code, because I have this problem within the webMethods B2B Integration server which is a pure Java solution. In my scenario I use partly the special services/methods from this middleware solution to access my database tables. But anyway, I've decompiled all that crap and underneath there is the normal JDBC coding which looks fine. But I suppose it could be a problem with the Oracle settings or (more probable) the OCI drivers. I've switched to the Oracle Thin Drivers and everything works fine. But to slow !
    Holger

Maybe you are looking for

  • Ipod shuffle will not connect to itunes on win7

    Ipod touch will not connect to Itunes on WIN7. Used to work on Vista but has never worked on new WIN7 computer. Tried several cables and tried an Ipod shuffle. No joy. Current version of Itunes, restarted apple services and checked USB driver install

  • F.05 doubt in Open Item and balance managed

    Hi, I noticed that we have the option to valuate open items and G/L balances for the same account number's in F.05 If suppose, an open item managed account was entered and checked in both places (Open item and G/L balances), will the system do both?

  • How to init sequence on server to return to client?

    How do I initialize a sequence to be returned to a client from a java server? sample idl : module someModule { typedef sequence<octet> Data; struct SomeStructure { Data file; string info; typedef sequence<SomeStructure> results; interface someObject

  • TreeView Error in MVC pattern

    <htmlb:tree id        = "ztr_dpt"                   showTitle = "false"                   table2 = "//MODEL/ZA_IT_TREETAB">       </htmlb:tree> table2(MODEL/ZA_IT_TREETAB) structure: treeid   |  childid  |  text   |   statues |   click ztr_dpt |   00

  • Read infotype using HR_READ_INFOTYPE

    Hi all, I Try to read infotype (pa0021) using HR_READ_INFOTYPE. Its getting fine. Im using Web Dynpro ABAP Interactive form. I want to insert some value in infotype pa0021, so i used HR_INFOTYPE_OPERATION. Data's are Inserting. The problem is if i pr