EJB 2.1 Timer bean using CMT (WAS 6.0) with Toplink 10.1.3

I have a timer bean that is calling a toplink transaction. The timer bean uses CMT with a "RequiresNew" transaction attribute. The ejbTimeout() method of the bean calls a toplink transaction - this transaction includes code to do uow.commit().
I am using the external transaction controller. Here is the relevant portion of the sessions.xml file:
<login>
<datasource>jdbc/XvsOMDataSource</datasource>
<platform-class>oracle.toplink.oraclespecific.Oracle9Platform</platform-class>
<uses-external-connection-pool>true</uses-external-connection-pool>
<uses-external-transaction-controller>true</uses-external-transaction-controller>
</login>
<external-transaction-controller-class>com.ford.it.persistence.impl.toplink.JTSExternalTransactionControllerExtended_WAS6</external-transaction-controller-class>
When the uow.commit is being executed, Toplink tries to get the UserTransaction but since the code has been invoked by a CMT EJB - access to the UserTransaction is not allowed and my transaction fails as follows:
[7/19/06 7:46:30:539 EDT] 00000048 TransactionHe E com.ford.it.persistence.impl.toplink.TransactionHelper getUserTransaction Cannot obtain UserTransaction from JNDI. <javax.naming.NameNotFoundException: Name "comp/UserTransaction" not found in context "java:".>javax.naming.NameNotFoundException: Name "comp/UserTransaction" not found in context "java:".
If I don't use the external transaction controller, the transaction again fails on uow.commit() - saying that Connection.commit() cannot be explicitly called, since it is part of a global transaction.
All I want, is for Toplink to just fire the SQL during uow.commit() (without issuing a Connection.commit()) - the CMT timer bean will take care of the Connection.commit.
Any thoughts on how to resolve this issue?
Prabodh.

The problem has been resolved. It was a usage-related issue. Thank you all.

Similar Messages

  • HT1339 my ipod shuffle(1st generation) is corrupted (error 1442) it will not restore.             is it possible to correct this or is it beyond repair. It worked the last time I used it on my laptop with Windows Vista. Vista.

    My ipod shuffle (1st generation) will not restore. It says it is corrupted(error 1442) Is it possible to correct this problem, or is it beyond repair. It worked last  time I used it on my laptop with Windows Vista. Any help would be much appreciated.

    Im actually tilting it up where it cinnects to my iPod, not where it connects to my computer, and i have tried three(yes, 3) different cables, one of which i bought brand new. still nothing, and i've also tried different USB ports on my computer,....nothing. Could this simply be a hardware failure of somekind? maybe a physical problem...i mean, why would i have to tilt the cable in order for my computer to actually read my iPod? im looking at the USB connector on my iPod (maybe it's my imagination, not sure) it possible might be bent, the little metal part in the port.

  • Using transaction activation policy together with TOPLINK Java object/relational mapping "commit and resume" transaction?

    Has any one has experience using WLE transaction context together with TOPLINK Java
    version of "commit and resume" context?

    Has any one has experience using WLE transaction context together with TOPLINK Java
    version of "commit and resume" context?

  • How many tabs can I open at a time when using Firefox 3.0.5 with Windows Xp?

    I tried to open 25 tabs in one window using firefox 3.0.5 with windows xp. It would only let me open 10. Tabs I added after 10 were added, but tabs at the begining were erased. What do I have to do to open all the tabs that I may need without changing the firefox or windows version? Do I need to open a new browser window for every 10 tabs?

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • I don't know what happened with my IPad. It's dead. The last time I used it was fine with 60% charged. I can't get it to turn on. Can you help me please.

    I don't know what happened with my IPad, It's dead. I bought it 7 months ago. Please help!

    While plugged into power (wall charger),
    Perform a "hard reset" on the device by pressing down and holding the home button and the sleep/wake button for up to 30secs. until you see a black screen with the Apple logo, then release.
    Then test to see if it solved the problem.

  • GC taking long time when using Concurrent Mark Sweep GC with Sun JDK 150_12

    We are having problem of Garbage collection taking too long. We are using Weblogic 9.2 and Sun JDK 150_12
    Below are the memory arguments we are using. We are using Concurrent Mark Sweep GC. What we are observing is Young Generation is getting filled up and consequent tenured generation also hangs with long pauses.
    Below are the JVM arguments we are using
    -Xms2560M -Xmx2560M -Xloggc:${LOGDIR}/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:CMSInitiatingOccupancyFraction=60 -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=256m
    I have seen many forums where there are many reported issues with Concurrent Mark Sweep garbage collection with Sun JDK, but with different recommendations. But did not find any defnite recommendation. Please advice.
    - - Tarun

    We are having problem of Garbage collection taking too long. We are using Weblogic 9.2 and Sun JDK 150_12
    Below are the memory arguments we are using. We are using Concurrent Mark Sweep GC. What we are observing is Young Generation is getting filled up and consequent tenured generation also hangs with long pauses.
    Below are the JVM arguments we are using
    -Xms2560M -Xmx2560M -Xloggc:${LOGDIR}/gc.log -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:SurvivorRatio=128 -XX:MaxTenuringThreshold=0 -XX:CMSInitiatingOccupancyFraction=60 -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=256m
    I have seen many forums where there are many reported issues with Concurrent Mark Sweep garbage collection with Sun JDK, but with different recommendations. But did not find any defnite recommendation. Please advice.
    - - Tarun

  • A lot of artists and albums missing since the last time I used iTunes.

    The last time I used iTunes was a while ago, back then I was able to type out bands such as Leaves' Eyes, or Tyr's older album works etc. Now iTunes doesn't have them anymore. What happened? Why can I not find Leaves' Eyes or Three Days Grace: Life Starts Now? And no I did try different country, so don't even bother suggesting.
    Now that my PC had to rip tunes from CDs onto iTunes from scratch due to reinstalling xp, it can't find albums for those respective bands.

    Now I'm clear on what you're asking.
    Dave's right - artists or distributors sometimes pull their content from the iTunes store. Who knows exactly why?
    A few years back, NBC pulled TV shows here in the USA, but then added them back later:
    http://www.nytimes.com/2007/08/31/technology/31NBC.html
    My advice is to contact those artists/labels and see if tey give you any answer why they pulled from Apple.
    Also, see if another mp3 download store in Wales has them for sale. They might be on Amazon UK. There are some other music services not available to me in the USA - perhaps they have moved there for distribution. They also might be on emusic UK, although that is a subscription service and eMusic's downloader is clunky.
    Most legit online mp3 stores have downloader programs that automatically add tracks to itunes. I really like the Amazon USA store, myself.

  • Java Heap Error when using Stateless Session Timer Bean deployed in Oracle

    Hi,
    Am getting following Java Heap Error when using Stateless Session Timer Bean deployed in Oracle 10g AS R3 (Oracle Containers for J2EE 10g (10.1.3.0.0) (build 060119.1546.05277) ):
    06/08/02 14:58:43 javax.ejb.EJBException: java.lang.OutOfMemoryError: Java heap space
    06/08/02 14:58:43 at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:304)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:67)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.system.TxNotSupportedInterceptor.invoke(TxNotSupportedInterceptor.java:45)
    06/08/02 14:58:43 at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
    06/08/02 14:58:43 at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:86)
    06/08/02 14:58:43 at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:71)
    06/08/02 14:58:43 at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1624)
    06/08/02 14:58:43 at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:92)
    06/08/02 14:58:43 at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:184)
    06/08/02 14:58:43 at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:819)
    06/08/02 14:58:43 at java.lang.Thread.run(Thread.java:595)
    06/08/02 14:58:43 Caused by: java.lang.OutOfMemoryError: Java heap space
    I had tried using -Xms / -Xmx options (upto 1 GB).
    The trace of exception gets delayed (from being displayed on the console) as the memory size is increased; but after sometime it starts getting displayed on the console.
    Even though this exception is displayed on the console, the Timer Bean continues to execute upto sometime before it finally crashes!
    If anyone has encountered such problem; would appreciate if you could share the solution.
    Regards, Vidyadhar

    Hi guys, I have the same problem. I have an application EAR file with two modules (EJB and WAR starting in this order). The application can schedule a process via EJB timer. In this case restarting the server I receive the error above. If I change the modules start order --> WAR - EJB the server start correctly, but the application scheduler fails (the persistency is not working) with this error:
    07/10/09 10:30:54 FINISSIMO: TimerTask.runBeanTimer java.lang.NullPointerException; nested exception is: java.lang.NullPointerExceptionjavax.ejb.TransactionRolledbackLocalException: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException
    java.lang.NullPointerException
         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:107)
         at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
         at java.util.ResourceBundle.getString(ResourceBundle.java:285)
         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
         at oracle.j2ee.util.TraceLogFormatter.format(TraceLogger.java:124)
         at oracle.j2ee.util.TraceLogger$TraceLoggerHandler.publish(TraceLogger.java:105)
         at java.util.logging.Logger.log(Logger.java:428)
         at java.util.logging.Logger.doLog(Logger.java:450)
         at java.util.logging.Logger.log(Logger.java:539)
         at oracle.ias.container.timer.TimerEntry.readObjFromBytes(TimerEntry.java:308)
         at oracle.ias.container.timer.TimerEntry.getInfo(TimerEntry.java:107)
         at oracle.ias.container.timer.Timer.getInfo(Timer.java:367)
         at oracle.ias.container.timer.EJBTimerImpl.getInfo(EJBTimerImpl.java:89)
         at com.finantix.foundation.integration.ejbtimer.EJBTimerServiceExecutorBean.ejbTimeout(EJBTimerServiceExecutorBean.java:42)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBTimeoutJoinPoint.invoke(EJBTimeoutJoinPoint.java:20)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:53)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:38)
         at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1714)
         at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:106)
         at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:220)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    javax.ejb.TransactionRolledbackLocalException: java.lang.NullPointerException; nested exception is: java.lang.NullPointerException
         at com.evermind.server.ejb.EJBUtils.getLocalUserException(EJBUtils.java:309)
         at com.evermind.server.ejb.interceptor.system.AbstractTxInterceptor.convertAndHandleMethodException(AbstractTxInterceptor.java:73)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:55)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatelessSessionEJBObject.OC4J_invokeMethod(StatelessSessionEJBObject.java:87)
         at com.evermind.server.ejb.StatelessSessionEJBHome.invokeTimer(StatelessSessionEJBHome.java:38)
         at com.evermind.server.ejb.EJBContainer.invokeTimer(EJBContainer.java:1714)
         at oracle.ias.container.scheduler.TimerTask.runBeanTimer(TimerTask.java:106)
         at oracle.ias.container.scheduler.TimerTask.run(TimerTask.java:220)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
         at java.util.ListResourceBundle.handleGetObject(ListResourceBundle.java:107)
         at java.util.ResourceBundle.getObject(ResourceBundle.java:319)
         at java.util.ResourceBundle.getString(ResourceBundle.java:285)
         at java.util.logging.Formatter.formatMessage(Formatter.java:108)
         at oracle.j2ee.util.TraceLogFormatter.format(TraceLogger.java:124)
         at oracle.j2ee.util.TraceLogger$TraceLoggerHandler.publish(TraceLogger.java:105)
         at java.util.logging.Logger.log(Logger.java:428)
         at java.util.logging.Logger.doLog(Logger.java:450)
         at java.util.logging.Logger.log(Logger.java:539)
         at oracle.ias.container.timer.TimerEntry.readObjFromBytes(TimerEntry.java:308)
         at oracle.ias.container.timer.TimerEntry.getInfo(TimerEntry.java:107)
         at oracle.ias.container.timer.Timer.getInfo(Timer.java:367)
         at oracle.ias.container.timer.EJBTimerImpl.getInfo(EJBTimerImpl.java:89)
         at com.finantix.foundation.integration.ejbtimer.EJBTimerServiceExecutorBean.ejbTimeout(EJBTimerServiceExecutorBean.java:42)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBTimeoutJoinPoint.invoke(EJBTimeoutJoinPoint.java:20)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SetContextActionInterceptor.invoke(SetContextActionInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:53)
         ... 9 more
    Any idea?
    Thx Auro

  • How am I able to use an injected EJB in a Managed Bean Constructor?

    JSF 1.2
    EJB 3.0
    Glassfish v1
    Summary:
    Managed bean injected EJB is null when referencing EJB var in constructor.
    Details:
    In my managed bean, I have a constructor that tries to reference an injected EJB, such as:
    public class CustomerBean implements Serializable {
    @EJB private CustomerSessionRemote customerSessionRemote;
    public CustomerBean() {
    List<CustomerRow> results = customerSessionRemote.getCustomerList();
    }The call within the constructor to customerSessionRemote is null - I've double checked this in Netbeans 5.5.
    How am I able to use an injected EJB in a Managed Bean Constructor?
    Thanks,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    OK, I was reading the article Web Tier to Go With Java EE 5: A Look at Resource Injection and I understand your statement too.
    Is there any way possible to Inject the EJB prior to the bean instance creation at all?
    Maybe, I need to approach it with the old fashion Java EE 1.4 route and using JNDI in the PostConstruct annotated method to reference the EJB in the managed bean.
    This had to been thought out before, I don't understand why a manged bean's life cycle places any injections at the end of the bean creation.
    Also, now that I understand that the @PostConstruct annotated method will be called by the container after the bean has been constructed and before any business methods of the bean are executed.
    I am trying to reference my EJB as part of the creation of the managed bean.
    What happens: the JSF page loads the managed bean and I need to populate a listbox component with data from an EJB.
    When I try to make the call to the EJB in the listbox setter method, the EJB reference is null.
    Now, I'm not for sure if the @PostConstruct annotation is going to work... hmmmm.
    ** Figured it out. ** I just needed to move the EJB logic that was still in the setter of the component I wanted to populate into the annotated PostConstruct method.

  • Problem in using EJB 2.1 Timer Service

    Hi all,
    I need a method in my EJB to be called by the EJB container at regular intervals. For this I plan to use the EJB 2.1 Timer Service.
    I did the following for implementing the Timer Service.
    1. My bean class implements the TimedObject interface. Thus the method ejbTimeout(Timer t) will be called by the container according to the interval I define in the timer.
    2. For defining a timer, I have created a business method in the EJB which creates a Timer object with the timer service.
    public void registerTimer(){
         // getting the timerService from the EJBContext     
         timerService = myContext.getTimerService();
         // create a timer which times out after 5 seconds, and subsequently after every 10 seconds
         t = timerService.createTimer(5000,10000,"my timer");
    Q: Is this enough or do we have to configure the engine in some way, so that it calls the ejbTimeout() method ? Maybe I am missing out something.
    If the above tasks are enough then according to my understanding,  the timer is created and then the ejbTimeout(Timer arg0) should be called first after 5 seconds and then after every 10 seconds.
    I have created a servlet which acts as a client to this EJB, by which I can see that the Timer object is created, but the ejbTimeout() is never fired .
    What could be the reason behind this? Am I missing something? Do I need to configure the engine in some way?
    Any input on the above will be most valuable.
    Thanks and Regards,
    Gagan Parhar.

    Hi ,,
        Go THru this article, sure it helps .
    http://www.oracle.com/technology/sample_code/tutorials/fbs10g/fbs10gtoc.htm
    Reg
      VArun CN

  • Design Time Bean Customizer validate Rule and use multiple time problem

    Hi,
    I have implement a custom validation rule ,add a design time bean customizer for my rule then register on datamodel project,i can use the graphic design time bean customizer and add my validate rule to my entity xml file,but when i add another instance to the same entity,data added to entity xml file was not correct,it may be not integrity or all data are same ,how can i do ? I found all bean validation with the same name ,it is the registered rule name "plsql rule", any suggestion are appreciative
    thank you advance
    li xin zhu 2007/09/08

    Hi,
    One thing you can do in the FOX would be to mark all fields in 'to be changed'. This will have the impact of having all data in the same data package and the FOX code will execute only once.

  • Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finder

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

    I'm trying to call an entity bean froma session bean i get the error :-
    7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
    [findByCustID].
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
    7/02/27 14:35:25       at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
    My session bean looks like this :-
    public class HelloBean implements SessionBean
      public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
         String lzRevenue=null;
         int liCustomerID=Integer.parseInt(pzCustomerID);
         try
              Context initial = new InitialContext();
              Object objref =   initial.lookup("SalesBean");
              SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
              Sales sales=salesHome.findByCustID(liCustomerID);
              lzRevenue=(String) sales.findByCustID(liCustomerID);
    My entity bean looks like this:-
    public class SalesBean implements EntityBean
      public String factPK;
      public int timeID;
      public int custID;
      public int locID;
      public int itemID;
      public int entityID;
      public String currency;
      public float qty;
      public float unitPrice;
      public float amount;
      public EntityContext context;
      private Connection con;
        private void makeConnection() {
            try {
                InitialContext ic = new InitialContext();
                javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
                con = ds.getConnection();
            } catch (Exception ex) {
                throw new EJBException("Unable to connect to database. " +
                    ex.getMessage());
      public SalesBean()
      public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
         makeConnection();
         PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
         pstmt.setInt(1, custID);
         ResultSet rset = pstmt.executeQuery();
         if (!rset.next())
              throw new RemoteException("no records present" );
         return rset.getString(1);
      }My entity bean's home interface looks like this:-
    public interface SalesHome extends EJBHome
    public Sales create() throws RemoteException, CreateException;
    public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    My entity bean's remote interface looks like this:-
    public interface Sales extends EJBObject
         public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
    my ejb-jar.xml looks like this:-
    <enterprise-beans>
    <session>
    <description>Hello Bean</description>
    <ejb-name>HelloBean</ejb-name>
    <home>myEjb.HelloHome</home>
    <remote>myEjb.HelloRemote</remote>
    <ejb-class>myEjb.HelloBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
         <entity>
              <ejb-name>SalesBean</ejb-name>
              <home>myEjb.SalesHome</home>
              <remote>myEjb.Sales</remote>
              <ejb-class>myEjb.SalesBean</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-field>
              <field-name>factPK</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>timeID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>custID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>locID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>itemID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>entityID</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>currency</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>qty</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>unitPrice</field-name>
         </cmp-field>
         <cmp-field>
              <field-name>amount</field-name>
         </cmp-field>
              <primkey-field>factPK</primkey-field>
              <resource-ref>
              <res-ref-name>jdbc/DSource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref>
         </entity>
    </enterprise-beans>
    please help me out of this trouble.

  • Nas on airport extreme not recognized by time machine. same nas was previously used as time machine backup on different airport extreme. are there any configuration files that i can delete to fix this problem ?

    nas on airport extreme not recognized by time machine. same nas was previously used as time machine backup on different airport extreme. are there any configuration files that i can delete to fix this problem ?

    Time Machine has been working just fine, but in the last week or two it has given up the ghost. I reset the connections to the drive, and it will basically save a few bytes of data and then hang.
    Although Apple originally announced, prior to the release of the first 802.11n AirPort Extreme Base Stations (AEBSn), that it would support Time Machine backups to AirPort Disks, they removed that option before they did finally release the base station for sale.
    Since then, Apple has posted (as you have noted) that they DO NOT support Time Machine backups to AirPort Disks. As far as I know, they have not changed from that position and those who do these backups find that they become corrupted over time. Sorry, but it sounds like you just confirmed that for yourself.
    1) Has one of the recent updates either on the AE (firmware) or OSX disabled this function?
    No. Again, this feature has never been supported by Apple for every generation of AEBSn released.
    2) Are there any changes I can make to get this working again?
    If your data backups are critical to you, then you will want to use a different solution for your Time Machine backup destination drive strategy. I would suggest that you connect your WD My Book directly to your Mac in the mean time.
    Your other options would be to either use a Time Capsule (which interestingly does support TM backups to AirPort Disks) or a non-Apple solution like the Drobo FS or HP MediaSmart server.

  • I transferred PPT files from a windows based pc (microsoft PPT 2003), at first my macbook was able to run all animations in file, after some time it stopped running it, partly because i "switched on" something since this is my first time to use a mac ?

    i transferred PPT files from a windows based laptop to my macbook, at first it was able to run the animations in the file no problem, its my first time to use a mac also bythe way, so i started downloading freebies like the VLC, FLIP4MAC, and other plug-in players, would it be because of this downloads that my mac now cannot seem to run the powerpoint animations any more ?

    I don't think vlc would affect powerpoint.  What were those "other plug-in players" you downloaded? 
    I'm not that familiar with powerpoint so how are those animations played?  Are they windows media player files?  If so then flip4mac might affect them.

  • When i first inst photoshop cs6 i was able to see the 3D icon, but on the next time i used the program there is no more 3D icon. when i launch photoshop it say " photoshop detected graphic hardware is not officially supported if you experience problem ple

    when i first inst Photoshop cs6 i was able to see the 3D icon, but on the next time i used the program there is no more 3D icon. when i launch Photoshop it say " Photoshop detected graphic hardware is not officially supported if you experience problem please unchecked the use graphic processor check box in the performance panel of the preference dialog" Is this the cause? If so how to uncheck that box? Thanks

    Your video card is underpowered for the task.
    Go to Photoshop > Preferences > Performance and click on the tick mark next to the box labeled "Use Graphics Processor":

Maybe you are looking for

  • How to change the size of a mixed signal graph programmaticaly and properly ?

    Hello to all I'm posting because I can't find a way to do the following thing : I want to resize a MixedSignal Graph programmatically using property node which are in read/write mode. For XY graph it works nicely using PlotAreaSize (? not sure of tra

  • IMovie not picking up camera

    Hello everyone. I have seen a couple people with a similar issue to mine, but no solutions yet, so I will try to provide a little more info. I am using a MacBook Pro, and am trying to import video into iMovie from my Canon ZR80 via Firewire. Plug int

  • SAP Netweaver 7.1 - Released?

    All, I had a few questions about the SAP Netweaver 7.1.  Has it been released?  I am not able to locate installation files for the 7.1.  If not, when is it scheduled to be released?  Also, I am so confused as to what the difference is between SAP Net

  • EMac freezes randomly, open window turns into broken up jibber

    My eMac freezes randomly, open window turns into broken up jibber (kinda looks like I put a photoshop filter on it or something). I can't force quit when it does this, no error message, I've repaired permissions. Any ideas?

  • ORA-00904: "ORA_ROWSCN": invalid identifier prevents data to show

    in sqldeveloper version 2106373 in Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 Please fix in next version last version .63 it did not work and this current version same