Model - level exceptions not thrown (EJB, 11.1.1.3)

Hi,
We noticed that with the latest jdev version (11.1.1.3) exceptions from model layer are not thrown or logged anywhere. Steps to reproduce (HR schema):
- create a new Application (J2EE template, add ADF Faces and Page Flow to view project)
- create Entities from tables (Department and Employee)
- create a session bean
- add this method
    public void test() {
        Employee emp = null;
        emp.getDepartment();
        System.out.println("test");
    }- expose it through local interface
- create a data control from the session bean
- create a new jspx page, and drag&drop the test() method as a button
- run the project and click the button.
No exceptions in the console, the only thing I was able to find is this Info in DefaultServer.log
####<May 27, 2010 12:02:03 PM CEST> <Info> <EJB> <myMachine> <DefaultServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-0004EFF816A89E472B1E> <583c10bfdbd326ba:-226d29eb:128d928460d:-7ffd-00000000000000a0> <1274954523439> <BEA-010227> <EJB Exception occurred during invocation from home or business: [email protected]1 threw exception: java.lang.NullPointerException> This is a MAJOR issue, it makes development practically impossible. If there isn't any workaround, we are going back to 11.1.1.2 until next release.
I can send a test case if anyone is interested.
Pedja

We have identified the problem, but right now the fix is planned for a later release.
If this is an urgent/important problem for you, I would suggest that you open a service request with Oracle support and see if you can get a patch for this, or provide a higher priority for this issue.

Similar Messages

  • Why is exception not thrown in AseCommand when "Truncation error occurred"?

    In the below SQL, data is written to SOURCE and from there to TARGET.
    The DECIMAL columns in TARGET are deliberately smaller than those in SOURCE (eg a DECIMAL (12, 2) column populated from a DECIMAL (19,11) source).
    When I run this in an Query tool (eg, SqlDbx) I get the messages:
    "Truncation error occurred
    Command has been aborted"
    But when I run this using the .net Client (supplied with the Developer Edition of ASE 16.0) no exception is thrown (the INSERT fails though).  The method is AseCommand.ExecuteNonQuery().
    Is this deliberate? 
    Is this believed to be correct?
    How can I tell that a truncation error has been raised?
    Thanks
    IF OBJECT_ID ('dbo.TARGET') IS NOT NULL
      DROP TABLE dbo.TARGET
    GO
    CREATE TABLE dbo.TARGET
      S_Name_NVARCHAR NVARCHAR (50) null,
        S_RedComponent_DEC_15_6 decimal(15, 6) NULL,
        S_BlueComponent_DEC_12_2 decimal(12, 2) NULL, 
        S_GreenComponent_DEC_18_10 decimal(18, 10) NULL
    GO
    IF OBJECT_ID ('dbo.SOURCE') IS NOT NULL
      DROP TABLE dbo.SOURCE
    GO
    CREATE TABLE dbo.SOURCE
      Name_NVARCHAR      NVARCHAR (2000) NULL,
      RedComponent_DEC   DECIMAL (19,11) NULL,
      GreenComponent_DEC DECIMAL (19,11) NULL,
      BlueComponent_DEC  DECIMAL (19,11) NULL
    GO
    INSERT INTO dbo.SOURCE (Name_NVARCHAR, RedComponent_DEC, GreenComponent_DEC, BlueComponent_DEC)
    VALUES ('Beige', 272.195, 272.195, 244.42)
    GO
    INSERT INTO dbo.SOURCE (Name_NVARCHAR, RedComponent_DEC, GreenComponent_DEC, BlueComponent_DEC)
    VALUES ('Bisque', 283.305, 253.308, 217.756)
    GO
    INSERT INTO dbo.SOURCE (Name_NVARCHAR, RedComponent_DEC, GreenComponent_DEC, BlueComponent_DEC)
    VALUES ('Black', 0, 0, 0)
    GO
    INSERT INTO dbo.SOURCE (Name_NVARCHAR, RedComponent_DEC, GreenComponent_DEC, BlueComponent_DEC)
    VALUES ('BlanchedAlmond', 283.305, 261.085, 227.755)
    GO
    --Is there data to migrate?
    SELECT LEFT( S.Name_NVARCHAR,8000),S.GreenComponent_DEC,S.GreenComponent_DEC,S.GreenComponent_DEC
    FROM (
    SELECT * FROM SOURCE
    ) S
    --Yes.migrate away!
    --Next line gives a truncation error occurred in Sybase (gives a truncation error occurred in a query tool
    --but fails silently in AseCommand.ExecuteNonQuery).
    INSERT dbo.TARGET (S_Name_NVARCHAR,S_RedComponent_DEC_15_6,S_BlueComponent_DEC_12_2,S_GreenComponent_DEC_18_10)
    SELECT LEFT( S.Name_NVARCHAR,8000),S.GreenComponent_DEC,S.GreenComponent_DEC,S.GreenComponent_DEC
    FROM (
    SELECT * FROM SOURCE
    ) S
    select * from dbo.TARGET

    Hi Dave,
    I am consulting internally on this. To my understanding, this behavior is based on the ASE severity level, as returned in the TDS_EED token. AseExceptions are thrown when severity level is 11 or higher.
    Our docs are not explanatory in this regard.  Once I get clarification we will provide something in the form of wiki or KBA or doc bug to further explain the detail.  Apologize for the delay and problems this caused. I guess since the command is aborted by ASE, therefore no insertion occurs, even though ASE indicates truncation occurs prior - makes this confusing.
    The message severity, etc is controlled by ASE and the client is just following suit according to the TDS spec. Its just lacking in the client docs. This can be remedied.
    ASE does provide the option to allow truncation and not abort.  It's a set command:
    Enter a query:
    1 > set arithabort numeric_truncation off
    Enter a query:
    1 > INSERT dbo.TARGET (S_Name_NVARCHAR,S_RedComponent_DEC_15_6,S_BlueComponent_DEC_12_2,S_GreenComponent_DEC_18_10) SELECT LEFT( S.Name_NVARCHAR,8000),S.GreenComponent_DEC,S.GreenComponent_DEC,S.GreenComponent_DEC FROM (SELECT * FROM SOURCE
    ) S
    4 rows Affected.
    Notice though ASE does NOT send truncation message. This is when it is well known and accepted to insert and truncate the numeric data.
    Cheers,
    -Paul

  • Exception not thrown on Key Exists

    using c# api:
    I have a Btree DB configured with two secondary DB's and a custom comparer, I have initialized the DB with 'DuplicatesPolicy.NONE'. To my understanding this should cause an exception to be raised if I try to enter a duplicate. On Put(), I get no such exception.
    Why? Am I supposed to throw this from comparer? (Actually tried this but it looks like it leaves cursor in undefined state). How Do I get the KeyExists Exception to be raised when a key exists???
    To my understadning I cannot use PutNoDuplicate() as a primary with secondaries cannot have duplicates configured, and you can only use PutNoDuplicate if there is a sorted duplicate policy...
    Any suggestions?

    Hi,
    The documentation could be a little misleading here. If you specify DuplicatesPolicy.NONE for a database, then duplicates will not be allowed in the database, and when trying to put a key/data pair in the database when the key already exist will fail:
    "Insertion when the key of the key/data pair being inserted already exists in the database will fail. "
    Failing here means that there will be no duplicate created, without any exception being thrown as the default behavior is to "Store the key/data pair in the database, replacing any previously existing key if duplicates are disallowed"; see the Database.Put() methods (BTreeDatabase extends from / is a sub-class of Database).
    You should use the PutNoOverwrite method. When the key that your are trying to insert already exists in the database, you will get a KeyExistException exception.
    Regards,
    Andrei

  • Exceptions not thrown on interrupted SocketChannel.write()

    I just noticed a behaviour of java.nio.channels.SocketChannel.write() that makes me wonder. If write() blocks(), and the channel is closed during this blocking by another thread, AsynchronousCloseException should be thrown.
    However, in most cases this does not happen in my little test app. If any part of the data passed to write() has already been written to TCP before the socket was closed, write() returns without exception.
    Similar behaviour is observed with intterupting. If the thread blocked in write() is interrupted by another thread, it returns immediately and has the interrupted Flag set, but in most cases no Exception is thrown.
    ClosedByInterruptException is only thrown if not any part of the data passed to write() has been passed to TCP.
    Is this a bug or a feature ?

    Yes, i'm pretty sure that it blocks. In my test, the server just accepts the connection and then goes to sleep for a looooong time. The client just connects, and sends 10Meg of fata in one write() call. If i do not interrupt the client, it blocks as long as the server sleeps. In this case, this is the client's stack while blocking:
    Thread [main] (Suspended)     
         FileDispatcher.write0(FileDescriptor, long, int) line: not available [native method]     
         SocketDispatcher.write(FileDescriptor, long, int) line: 29     
         IOUtil.writeFromNativeBuffer(FileDescriptor, ByteBuffer, long, NativeDispatcher, Object) line: 104     
         IOUtil.write(FileDescriptor, ByteBuffer, long, NativeDispatcher, Object) line: 75     
         SocketChannelImpl.write(ByteBuffer) line: 334     
         Channels.write(WritableByteChannel, ByteBuffer) line: 60     
         Channels.access$000(WritableByteChannel, ByteBuffer) line: 47     
         Channels$1.write(byte[], int, int) line: 134     
         Channels$1(OutputStream).write(byte[]) line: 58     
         SocketClient.main(String[]) line: 75     If i start another thread before calling write(), that closes the socket after 3 seconds, the following happens: The call of IOUtil.write() returns ( with a value n that i cannot see in the debugger ), This value n is tested inside SocketChannelImpl.write() via (n > 0 || (n == IOStatus.UNAVAILABLE), what return true. For that reason, AbstractInterruptibleChannel.end(boolean), does not throw an exception.
    Once the server wakes up later, it is able to read about 200K from the socket...
    I tried this on a linux system (kernel 2.6.17, glibc 2.4) with jdk 1.6.0_03. I'm now gonna try it under windows, hold on..
    Of course, if anybody is interested, i'll post the test proggy...

  • Wait - interrupt  Why Exception not thrown?

    Hello. I expected that calling interrupt() on a waiting thread should result in InterruptedException thrown by wait(). Nevertheless, in the code below no Exception is thown as if there were no interrupt() call. Actually this snippet prints the same output irregardless of whether interrupt() is called.
    public class Runner {
        synchronized public void foo(){
            System.out.println("before wait in foo()");
            try {
                wait();
            } catch (InterruptedException e) {
                System.out.println("InterruptedException");
                e.printStackTrace();
            System.out.println("after wait in foo()");
        synchronized public void bar(){
            System.out.println("before sleep in bar()");
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            System.out.println("after sleep in bar()");
            notify();
            System.out.println("after notify in bar()");
        public static void main(String[] args) {
            final Runner runner = new Runner();
            Thread t1 = new Thread(new Runnable(){
                public void run() {
                    runner.foo();
            Thread t2 = new Thread(new Runnable(){
                public void run() {
                    runner.bar();
            t1.start();
            t2.start();
            try {
                Thread.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            t1.interrupt();
            System.out.println("t1 interrupted");
    }

    Thanks for your response.
    Still the whole thing is not clear to me.
    Why InterruptedException is not deterministic in this
    case?
    Where is the ?non-deterministic? code in this
    example?The fact that t1.start() is written before t2.start() in you code does not guarantee that foo() method will always be called first. Either the bar() method or foo() method can be invoked firstly, because this is how threads work in Java. Try to invert: put t2.start() before t1.start(), and see what happens. Probably the exception will be thrown in this case, but this behaviour is still non deterministic.
    Please pay attention to timing -
    t1.interrupt() is called in about 5 seconds after
    both threads are started, at the time when one thread
    is in sleep(10000) and the other in wait(). I believe
    that above condition may be taken for granted taking
    in account 5 seconds interval between calls.You know that when you invoke the notify() method inside the bar method() you are making the foo() method not waiting anymore, don?t you? Therefore, if foo() method is called firstly, then the InterruptedException probably won?t be thrown. I said "probably" because the behaviour is non deterministic. Time is relative. If your processor is fast, then probably the exception will never be thrown, but you will never be completely sure. Maybe if there are other executions using your processor, then the processor might be slow for your program, and then the InterruptedException might be thrown. If you want to make your program have the same behaviour always, then you have to use semaphore variables, that indicate when exactly one thread is permitted to run.

  • BPM - Exception not thrown

    Hi ,
    I created a BPM in which I I have
    Receive Step -> Send Step -> Block Step ->
    Block Processing branch - Receive Step ->Send Step
    Block Dead Line Branch - Dead line of 1 minute and Control step for raising exception
    Block Exception handler branch - Control step for cancelling the process.
    My requirement is that, When I receive the first message and within 1 minute if I DO NOT receive the second message the process should be cancelled(Error in SXMB_MONI).
    Right now the process simply waits for ever for the second message and the process is never Cancelled.
    Any help is greatly appreciated.
    Regards,
    Nazim

    Nazim,
    Try this.
    - Click on the Block Step, in the Properties window give some exception name.
    - Now in the Deadline branch Keep Control Step.
    - Click on the Control Step , choose Action Throw Exception and choose the exception you gave for block step.
    - Remember don't use exception branch, Coz as per your requirement you want to fail the BPM, if you use exception branch then it means again you are catching that. Hence don't use exception branch.
    raj.

  • Row concurrency exception not thrown for 1 page but others

    All pages have the default of true for enableTokeValidation.
    Edit a page -> Save -> Browser Back Button -> Click on Save button
    For all but one of our pages, we will successfuly get the JboException for row concurrency is inconsistent, which is what we need/hope for.
    The one page that does not give this exception is dedicated to "create" a person. After creation, it will navigate to a list name page. If back button is used and the user then click on the "Save" button on this new person page, ADF layer acutally tries to update the person for one field for the last created person. We are expecting the row concurrency exception.
    I have check and read all the thread on back buttons. And the consistent of the entity/view object used by this one page versus the rest.
    Note: All of our pages are using "redirect" navigation.
    Thanks,
    Mel

    One important different I should mention is that
    - the new person page is using a different application module A than the rest
    - all the other maintaining page is using application module B
    Is this why? How to make it work?
    Mel

  • EJB5018: An exception was thrown during an ejb invocation on [ResultFacade]

    I have a problem to access from application client to methods of session beans
    the problem haw to call this method "getcodesresultcampbean("ARTV")"
    EJB5018: An exception was thrown during an ejb invocation on [ResultFacade]
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean: java.lang.NoClassDefFoundError: org/postgresql/jdbc3/Jdbc3PreparedStatement
    at com.sun.ejb.containers.BaseContainer.checkExceptionClientTx(BaseContainer.java:3591)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3436)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1247)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:192)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:71)
    at $Proxy306.findByRefCampagne(Unknown Source)
    at com.bellconsulting.praxys.stats.service.StatCampagneBean.getcodesresultcampbean(StatCampagneBean.java:77)
    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:589)
    at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
    at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
    at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
    at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
    at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:67)
    at $Proxy305.getcodesresultcampbean(Unknown Source)
    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:589)
    at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
    at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
    at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
    at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
    at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Caused by: java.lang.NoClassDefFoundError: org/postgresql/jdbc3/Jdbc3PreparedStatement
    at org.postgresql.jdbc3.Jdbc3Connection.prepareStatement(Jdbc3Connection.java:37)
    at org.postgresql.jdbc3.AbstractJdbc3Connection.prepareStatement(AbstractJdbc3Connection.java:266)
    at org.postgresql.jdbc2.AbstractJdbc2Connection.prepareStatement(AbstractJdbc2Connection.java:151)
    at com.sun.gjc.spi.ConnectionHolder.prepareStatement(ConnectionHolder.java:413)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:497)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:415)
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1538)
    at org.hibernate.loader.Loader.doQuery(Loader.java:661)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
    at org.hibernate.loader.Loader.doList(Loader.java:2211)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
    at org.hibernate.loader.Loader.list(Loader.java:2090)
    at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
    at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
    at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
    at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
    at com.bellconsulting.praxys.stats.facades.ResultFacade.findByRefCampagne(ResultFacade.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    **************************code source************** ResultFacade******
    package com.bellconsulting.praxys.stats.facades;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import com.bellconsulting.praxys.stats.entities.Result;
    * @author idriss
    @Stateless
    public class ResultFacade implements ResultFacadeLocal {
    @PersistenceContext
    private EntityManager em;
    /** Creates a new instance of ResultFacade */
    public ResultFacade() {
    public void create(Result result) {
    em.persist(result);
    public void edit(Result result) {
    em.merge(result);
    public void destroy(Result result) {
    em.merge(result);
    em.remove(result);
    public Result find(Object pk) {
    return (Result) em.find(Result.class, pk);
    public List findAll() {
    return em.createQuery("select object(o) from Result as o").getResultList();
    public List findByRefCampagne (String campaignCode) {
    return em.createNamedQuery("Result.findByRefcampagne").setParameter("refcampagne", campaignCode).getResultList();
    *****************StatCampagneBean********
    package com.bellconsulting.praxys.stats.service;
    import com.bellconsulting.praxys.stats.facades.ResultFacadeLocal;
    import java.sql.Date;
    import javax.ejb.EJB;
    import javax.ejb.Stateful;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    import com.bellconsulting.praxys.stats.entities.Campaign;
    import com.bellconsulting.praxys.stats.entities.Result;
    import com.bellconsulting.praxys.stats.facades.CampaignFacadeLocal;
    import java.util.Iterator;
    import java.util.List;
    * @author idriss
    @Stateful
    public class StatCampagneBean implements StatCampagneRemote {
    @EJB
    private CampaignFacadeLocal campaignFacade;
    private @EJB ResultFacadeLocal resultFacade;
    private String _campagnecode;
    /** Creates a new instance of StatCampagneBean */
    public StatCampagneBean() {
    public StatCampagneBean(String campagnecode)
    this._campagnecode= campagnecode;
    @PersistenceContext
    private EntityManager _manager;
    public int getnbreOKbean(String codecampagne) {
    //TODO implement getnbreOK
    Campaign camp= _manager.find(Campaign.class,codecampagne);
    return camp.getNbRepPositive();
    public void statCodesResultats(String nomcamp, String codecamp, Date datedebut, Date datefin) {
    //TODO implement statCodesResultats
    public String[ ] getcodesresultcampbean(String codecamp) {
    //TODO implement getcodesresultcampbean
    // _manager.getTransaction().begin();
    /* EntityManagerFactory emf = Persistence.createEntityManagerFactory("Result");
    EntityManager em = emf.createEntityManager();
    String querystring = "select object(r) from Result r"+" where r.refcampagne = ?1";
    Query query =em.createQuery(querystring).setParameter(1,codecamp);
    *for (Result r : coderesultList)
    coderesult[j++]= r.getResultPK().getCode().toString();
    // List<Result> coderesultList = query.getResultList();
    List<Result> coderesultList = resultFacade.findByRefCampagne(codecamp);
    Iterator<Result> itr = coderesultList.iterator();
    String[]codesresult =null;
    int j= 0;
    while (itr.hasNext()){
    codesresult[j++] =itr.next().getResultPK().getCode().toString();
    // _manager.getTransaction().commit();
    return codesresult;
    *********************Application client *************
    package application.praxys;
    import com.bellconsulting.praxys.stats.service.StatCampagneRemote;
    import javax.swing.JOptionPane;
    import stats.praxys.*;
    * @author idriss
    public class Main {
    /** Creates a new instance of Main */
    public Main() {
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    // InitialContext ctx;
    String[] nbreok =null ;
    int c =0;
    /* try {
    ctx = new InitialContext();
    StatCampagneRemote simpleSession = (StatCampagneRemote) ctx.lookup(StatCampagneRemote.class.getName());
    nbreok = simpleSession.getnbreOK("ARTV");
    System.out.println("voici un resultaaaaaaaaaaaaaaaaaaaaa"+" "+nbreok);
    } catch (NamingException ex)
    TeleVenteServiceLocator tvLocator = new TeleVenteServiceLocator();
    StatCampagneRemote statCampagneBean = (StatCampagneRemote)tvLocator.getCampaignService();
    JOptionPane.showMessageDialog(null, "dfsdfsdfsfsq");
    nbreok=statCampagneBean.getcodesresultcampbean("ARTV");
    //nbreok =statCampagneBean.getnbreOKbean("ARTV");
    System.out.println("voici un resultaaaaaaaaaaaaaaaaaaaaa "+ nbreok[1]);
    JOptionPane.showMessageDialog(null, "dfsdfsdfsfsq"+nbreok[2]);
    ***************Result entity bean*********
    package com.bellconsulting.praxys.stats.entities;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.EmbeddedId;
    import javax.persistence.Entity;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    * Entity class Result
    * @author idriss
    @Entity
    @Table(name = "result")
    @NamedQueries( {
    @NamedQuery(name = "Result.findByCode", query = "SELECT r FROM Result r WHERE r.resultPK.code = :code"),
    @NamedQuery(name = "Result.findByLibelle", query = "SELECT r FROM Result r WHERE r.libelle = :libelle"),
    @NamedQuery(name = "Result.findByPriorite", query = "SELECT r FROM Result r WHERE r.priorite = :priorite"),
    @NamedQuery(name = "Result.findByPrix", query = "SELECT r FROM Result r WHERE r.prix = :prix"),
    @NamedQuery(name = "Result.findByResType", query = "SELECT r FROM Result r WHERE r.resType = :resType"),
    @NamedQuery(name = "Result.findByRefcampagne", query = "SELECT r FROM Result r WHERE r.resultPK.refcampagne = :refcampagne"),
    @NamedQuery(name = "Result.findByRetValue", query = "SELECT r FROM Result r WHERE r.retValue = :retValue"),
    @NamedQuery(name = "Result.findByRetUnit", query = "SELECT r FROM Result r WHERE r.retUnit = :retUnit")
    public class Result implements Serializable {
    * EmbeddedId primary key field
    @EmbeddedId
    protected ResultPK resultPK;
    @Column(name = "libelle")
    private String libelle;
    @Column(name = "priorite", nullable = false)
    private int priorite;
    @Column(name = "prix", nullable = false)
    private float prix;
    @Column(name = "resType")
    private Integer resType;
    @Column(name = "retValue")
    private Integer retValue;
    @Column(name = "retUnit")
    private String retUnit;
    @JoinColumn(name = "refcampagne", referencedColumnName = "code", insertable = false, updatable = false)
    @ManyToOne
    private Campaign campaign;
    /** Creates a new instance of Result */
    public Result() {
    * Creates a new instance of Result with the specified values.
    * @param resultPK the resultPK of the Result
    public Result(ResultPK resultPK) {
    this.resultPK = resultPK;
    * Creates a new instance of Result with the specified values.
    * @param resultPK the resultPK of the Result
    * @param priorite the priorite of the Result
    * @param prix the prix of the Result
    public Result(ResultPK resultPK, int priorite, float prix) {
    this.resultPK = resultPK;
    this.priorite = priorite;
    this.prix = prix;
    * Creates a new instance of ResultPK with the specified values.
    * @param refcampagne the refcampagne of the ResultPK
    * @param code the code of the ResultPK
    public Result(String refcampagne, String code) {
    this.resultPK = new ResultPK(refcampagne, code);
    * Gets the resultPK of this Result.
    * @return the resultPK
    public ResultPK getResultPK() {
    return this.resultPK;
    * Sets the resultPK of this Result to the specified value.
    * @param resultPK the new resultPK
    public void setResultPK(ResultPK resultPK) {
    this.resultPK = resultPK;
    * Gets the libelle of this Result.
    * @return the libelle
    public String getLibelle() {
    return this.libelle;
    * Sets the libelle of this Result to the specified value.
    * @param libelle the new libelle
    public void setLibelle(String libelle) {
    this.libelle = libelle;
    * Gets the priorite of this Result.
    * @return the priorite
    public int getPriorite() {
    return this.priorite;
    * Sets the priorite of this Result to the specified value.
    * @param priorite the new priorite
    public void setPriorite(int priorite) {
    this.priorite = priorite;
    * Gets the prix of this Result.
    * @return the prix
    public float getPrix() {
    return this.prix;
    * Sets the prix of this Result to the specified value.
    * @param prix the new prix
    public void setPrix(float prix) {
    this.prix = prix;
    * Gets the resType of this Result.
    * @return the resType
    public Integer getResType() {
    return this.resType;
    * Sets the resType of this Result to the specified value.
    * @param resType the new resType
    public void setResType(Integer resType) {
    this.resType = resType;
    * Gets the retValue of this Result.
    * @return the retValue
    public Integer getRetValue() {
    return this.retValue;
    * Sets the retValue of this Result to the specified value.
    * @param retValue the new retValue
    public void setRetValue(Integer retValue) {
    this.retValue = retValue;
    * Gets the retUnit of this Result.
    * @return the retUnit
    public String getRetUnit() {
    return this.retUnit;
    * Sets the retUnit of this Result to the specified value.
    * @param retUnit the new retUnit
    public void setRetUnit(String retUnit) {
    this.retUnit = retUnit;
    * Gets the campaign of this Result.
    * @return the campaign
    public Campaign getCampaign() {
    return this.campaign;
    * Sets the campaign of this Result to the specified value.
    * @param campaign the new campaign
    public void setCampaign(Campaign campaign) {
    this.campaign = campaign;
    * Returns a hash code value for the object. This implementation computes
    * a hash code value based on the id fields in this object.
    * @return a hash code value for this object.
    @Override
    public int hashCode() {
    int hash = 0;
    hash += (this.resultPK != null ? this.resultPK.hashCode() : 0);
    return hash;
    * Determines whether another object is equal to this Result. The result is
    * <code>true</code> if and only if the argument is not null and is a Result object that
    * has the same id field values as this object.
    * @param object the reference object with which to compare
    * @return <code>true</code> if this object is the same as the argument;
    * <code>false</code> otherwise.
    @Override
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof Result)) {
    return false;
    Result other = (Result)object;
    if (this.resultPK != other.resultPK && (this.resultPK == null || !this.resultPK.equals(other.resultPK))) return false;
    return true;
    * Returns a string representation of the object. This implementation constructs
    * that representation based on the id fields.
    * @return a string representation of the object.
    @Override
    public String toString() {
    return "com.bellconsulting.praxys.stats.entities.Result[resultPK=" + resultPK + "]";
    Message was edited by:
    081283

    Try posting this on the EJB forum:
    http://forum.java.sun.com/forum.jspa?forumID=13

  • Exception logged but not thrown on invocation of webservice (BEA-000905)

    Using webservices.jar that comes with Weblogic SP3 and ant task clientgen to build the client, I got this warning on console:
    <14/Abr/2005 16H00m BST> <Warning> <Net> <BEA-000905> <Could not open connection with host: localhost and port: 7777.>
    Of course, weblogic is right, localhost:7777 is not listening, but the problem is that the application does not know this, since no exception is thrown. I'm catching for a Throwable and I get nothing. This is severe because I'm changing the state of some records in a DB table if the invocation of the webservice is OK, i.e., if no exception is thrown. But there really is a connection exception...
    Can anyone help?

    Just to clarify: the warning is logged when invoking a webservice and the target machine is down. I'm sniffing the communication through localhost:7777 (so this is the target machine for the invocation), and then it redirects the request to the machine where the webservice is hosted.
    I was expecting to catch an exception like IOException or RemoteException, or even a custom exception that I defined in the throws clause of the webservice method.

  • Exception is thrown "mydb is not bound"(needs urgent help)

    We r three students and our final project is a BPM(Business peocess Management)system.
    BPM is actually a workflow system(managing the business processes)and all the rules and constraints are applied from the Rule Management System.
    we have started the implementation, and therefore we need some help related to the implementation.
    We r using EJB2.0 with JBuilder9, JBoss3.2 as the application server and tomcate as the web server.
    problem:
    I want to create manual database connection using DataSource,
    I am using mysql and database name is mydb.
    I have done all the reqiured configration of mysql with Joss and it is working.
    After getting the initial context, when i try to lookup the datasource, exception is thrown "mydb is not bound"
    Initial context is correct because i have tried entity beans asd it works well.
    code is
    Hashtable contextValues = new Hashtable();
    contextValues.put(Context.PROVIDER_URL, "jnp://loopback:1099");
    contextValues.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    Context context = new InitialContext(contextValues);
    context.lookup("java://mydb");
    Kindly help me if u find time,
    regards!

    try java:comp/env/jdbc/mydb or java:comp/env/mydb

  • Exception is thrown or not

    What should I do to ensure that a certian part of my code is always excuted whether an exception is thrown or not?

    Put it in a finally section and the code that might throw in the preceding try block.
    Chuck

  • Exception is not thrown immediately in Hibernate 3.  Why??

    I am using Hibernate 3.
    If I execute "session.update" and the update is not successful (e.g. value too large), the exception is not thrown immediately.
    For example,
    System.out.println ("pass 1");
    session.update(dataBean) ;
    System.out.println ("pass 2");
    session.getTransaction().commit();
    System.out.println ("pass 3");
    I find if session.update(dataBean) fails, "pass 1" and "pass 2" are printed but "pass 3" is not printed. That meams Hibernate will not throw exception until I execute "commit". Can I force it to throw immediately (i.e. only "pass 1" will be printed) ?
    Thanks in advance.

    O/R mappers such as Hibernate and JDO generally defer communications with the database for as long as possible; for an insert or update transaction that will be until commit().
    This is for several reasons:
    1) general efficiency - a series of update() calls may modify the same attribute of an object multiple times; it's substantially more efficient to update the database just once
    2) database efficiency - when a transaction is in progress, even when nothing is occuring in that transaction, more resources are consumed inthe database than when no transaction is active. For example, if a transaction updates a row and then 10 minutes later commits, then during that interval the database has to keep track of 2 different versions of that row and know which connections see which version of the row.
    3) connection management - DB connections are expensive resources and once a transaction has started updating the DB, it has to tie up a connection for the duration.
    In other words, no matter how long it takes to set up your transaction in Java, a good O/R mapper is not going to begin a database transaction until the last possible moment, which is at commit().
    Can I force it to throw immediatelyYou can call commit() any time you want.
    It sounds like you want the database to do your input data validation for you. That's wrong. You need to validate input (for size, length, whatever) before you attempt to put it in the database.

  • Table changes in database are not captured in ODI model level

    Hi All,
    Can any one help me how to fix the bug in ODI.
    Table changes in database are not captured in ODI model level.
    Thanks in advance

    I created the interface which is running successfully.
    Now i did some changes in target table(data base level).
    I reversed the updated table in model section. Till here its ok
    The table which is updated in the model section is not automatically updated in the interface.
    I have to drop the existed datastore in the interface and and re do the entire process of bringing the updated datastore, mapping,etc..
    Please tell the any alternate way.
    Regards
    suresh

  • Enable Audit on SCOM Agent An exception was thrown while processing Submit Tasks does not have sufficient permission to perform the operation.

    Hi All,
    An exception was thrown while processing Submit Tasks Domain\"SDK Account" does not have sufficient permission to perform the operation.
    am getting this error when try to enable audit in one of Domain controllers.

    Dear Mark,
    i face similar problem before, i had resolve it be adding SDK service account to Operation Manager Administration group.
    Regards, Ibrahim Hamdy

  • Exceptions from nested includes not thrown to errorPage

    In our application a central dispatcher servlet includes JSPs.
              These JSPs include other JSPs. When an Exception is thrown from one of these
              pages it is not thrown, even when the error page is indicated in the
              included JSP with the page directive and the Exception is explicitly thrown
              from a catch block.
              I apprciate any thoughts.
              Thanks.
              -mc
              

    can u send the code snippet?
    "Abhishek" <[email protected]> wrote in message
    news:[email protected]..
    Hi
    I am having a stateless session bean(SLBean) which uses a singleton
    class(Single1). Both the SLBean and the Single1 are in the same jar
    file. Single1 contains a static method called getInstance() which
    returns the instance of the Single1(if not already existing).
    The probelm is that when I try to do the "Single1.getInstance()" from
    the stateless bean, then some exception( java.rmi.RemoteException:
    EJBException: ;nested Exception is: Java.lang.NullPointerException) is
    thrown.and getInstance() method of Single1 class in never invoked.
    What might be the problem? why am I not able to call my singleton
    class from the staless bean.
    Thanks in advance.
    Abhishek

Maybe you are looking for