Java Language problem: Multiple interfaces extension.

Not just any interfaces. Take a close look:
public interface interface1 {
     public void aMethod();
public interface Interface2 {
     public void aMethod() throws Exception();
}As you can see, both interfaces define a single method with the same signature... but one of them throws Exception.
Consider "merging" these two interfaces:
public interface Interface3 extends Interface1, Interface2 {}Should the resulting method throw Exception? Eclipse says it does. But I think it shouldn't. Here's the logic:
If the method in Interface3 DIDN'T throw Exception, it would be able to extends the method in Interface1 and Interface2, because it is not throwing checked exceptions not thrown in the superinterfaces' methods definitions... however, as It DOES throw Exception, it can't extend the method in Interface1, because Interface1's method doesn't throw Exception. Am I right?

It's not a naming problem. I'll tell you where the problem comes from:
I'm working with EJBs. I (personally) like to separete the business "signatures" of the beans in a single interface.
So, for every bean I make, I have a single interface that defines the method.... it says NOTHING about the beans.
Remote beans methods have to throw RemoteException, so I have to throw RemoteException in my business logic classes. I then make two interfaces that implement this interface. One remote (that just extends this interface and EJBRemote) and another local that extends EJBLocal and overrides all the methods so they don't throw RemoteExceptions (Local bean interfaces' methods must NOT throw RemoteException).
For example:
public interface Beaninterface {
public void aMethod() throws RemoteExeption();
public interface Bean extends EJBRemote, BeanInterface {}
public interface BeanLocal extends EJBLocalObject , Beaninterface {
public void aMethod();
}No problem so far.
Here's where the mess comences:
I want to EXTEND this bean interfaces so I make a bean based on the former.
I will add another method to the business interface of the new bean:
Business Interface
public interface ExtendedBeanInterface extends BeanInterface {
public void newMethod() throws RemoteException;
}This new interface defines the new method and inherits the method from BeanInterface
Remote Interface of the new bean:
public interface ExtendedBean extends ExtendedBeanInterface, EJBObject {}Nothing wo do there.
Here is the real problem:
I have to extend the ExtendedBeanInterface, but that will bring two methods that throw Remote Exception. I have no problem overriding both methods in this interface.. but how about if thyere are 50 methods in the BeanInterface? I'm not going to go ahead and removing each method for evety bean I extend. That makes NO sense. What I think I should do is to extend BeanLocal so those methods that were brought from BeanInterface be known not to throw RemoteExeption.
public interface ExtendedBeanLocal extends EJBLocalObject, ExtendedBeanInterface, BeanLocal {
public void newMethod();
}And THERE is where I hit the wall, because when I deploy the bean, the application server informs me that the resulting interface is throwing RemoteException (courtesy of ExtendedBeanInterface).
Accoring to my logic about Java Language, by extending BeanLocal, aMethod() shouldn't throw RemoteException as a result in ExtendedBeanLocal.
So... what is the next step? Go with JCP?

Similar Messages

  • SWIG - C++/Java and multiple interface inheritance - SWIG typemaps

    In C++ I have the following. Can someone explain how to use SWIG typemaps to accomplish multiple interface inheritance in Java? I understand there is a javainterfaces typemap built into SWIG however I am such a newb with SWIG I really don't know where to start.
    class IRemoteSyncIO
    public:
      virtual ~IRemoteSyncIO () {}
    protected:
      IRemoteSyncIO () {}
    private:
      IRemoteSyncIO (const IRemoteSyncIO&);
      IRemoteSyncIO& operator= (const IRemoteSyncIO&);
    class IRemoteAsyncIO
    public:
      virtual ~IRemoteAsyncIO () {}
    protected:
      IRemoteAsyncIO () {}
    private:
      IRemoteAsyncIO (const IRemoteAsyncIO&);
      IRemoteAsyncIO& operator= (const IRemoteAsyncIO&);
    class RemoteMpe : public IRemoteSyncIO, public IRemoteAsyncIO
    }Thanks!

    Actually now I understand what you mean.... Ok, now I am going to modify the problem slightly and add Interface2 into the picture. The new code is:
    interface Interface1<SelfType extends Interface1<SelfType>>
    interface Interface2
    class Superclass implements Interface1<Superclass>
    class Dependant<Type extends Interface1<Type>>
       public static <Type extends Interface1<Type> & Interface2> Dependant<Type> getInstance(Class<Type> c)
         return new Dependant<Type>();
    class Subclass extends Superclass implements Interface2
      public Subclass()
        Dependant<Subclass> dependant = Dependant.getInstance(Subclass.class);
    }Now, previously I could replace:
    Dependant<Subclass> dependant = Dependant.getInstance(Subclass.class);
    with
    Dependant<Superclass> dependant = Dependant.getInstance(Superclass.class);
    and it solved the problem, but now that Type must implement Interface2 I cannot.
    The reason I added this requirement is that this is actually what is going on in my applicationI had made mistakely omited this detail from the original use-case.
    Can you think up of a possible solution to this new use-case?
    Thanks,
    Gili

  • Java threading problem... threads only work on 1 processor

    I've got a iterative deepening problem that i have to parallelize. As far as i know i did everything correctly however everything seems to be running on 1 processor instead of 2 processors. As far as i know i am using threads (-Xprof either defines them as thread-1 thread-2 or pool1-thread1,depending on the method used for issueing)
    the worker thread is:
    public int solutionsT(Board board, int currentDepth) {
            int temp = 0;
            int result = 0;
            if (board.distance() == 0) {
               return 1;
            if (board.distance() > board.bound()) {
                return 0;
            Board[] children = board.makeMoves();
            result = 0;
            for (int i = 0; i < children.length; i++) {
                if (children[i] != null) {
                    temp = solutionsT(children, currentDepth + 1);
    if(temp != 0){
    result += temp;
    return result;
    public void run() {
    int temp =0;
    int i = 0;
    while(true){
    while(bag.size() !=0){
    bag.putSolution(solutionsT(bag.get(),1));
    try{   
    barrier.await();
    }catch(Exception e){}
    it get's it's input from a bag that is filled before the iteration begins. (once the bag is filled it trips a barrier) this worker thread is a implementation of Runnable
    This piece of code is used to make the thread object and to issue it
    public SolutionThread(int numberOfThreads) {
       thread = numberOfThreads;
       bag = new bagOfBoards();
       barrier = new CyclicBarrier(thread+1);
       if(thread > 1){
          ExecutorService threadExecutor = Executors.newFixedThreadPool( thread );
          solution = new ThreadTest[thread];
          bag = new bagOfBoards();
          for(int i = 0;i<thread;i++){
             solution[i] = new ThreadTest(bag, lock, barrier, i);
             threadExecutor.execute(solution);
    finally this is the code which is used to acces the bag and get a board.
    synchronized public Board get() {
                if (size > 0) {
                size--;
                Board result = bag[size];
                return result;
            } else {
             return null;
        }since this method is synchronized and it always returns something (either null or a board) and the worker tests for this. there is no race condition here.
    furter more. the main thread is a loop. It fills te bags with an intial state. then it trips the barrier and waits for the workers to do the work. the workers then process the bag until it hits zero and then trip the barrier so that the main thread can do the next iteration (and fill the bag)
    p.s. i know the code is a bit messy, but i want to get the threading to work. As of now i relaly don't understand why the threads are just running on 1 processor instead of 2 processors. not only that. the excecution time is nearly the same as that of a sequential equivalent.
    p.s.2 the code is parallisable. and it is run on a smp system.
    Message was edited by:
    jstrike

    i'm very sure that the jvm and os support smp. the
    problem really should be in the code.I don't see how this can be the case. There's nothing in the Java language that deals with how threads are assigned to processors (at least not as far as I know) so there isn't anything you can do in your code to affect that.
    Or did you meant that i have to tell the jvm in the class that
    there is support for multiple processorsThat would be the only possibility. I have no idea whether it can be done or not, though.

  • Super class for java Language

    which is the super class for java Language...
    this is an interview question .
    I SAY Object is the super class for java Language ...
    then he asked whether object class will extend ??
    i say Yes it will implectly extend ...
    then he whether each and every class will extend object
    i say yes ...
    then he asked multiple inheritance is possible in java ...
    i say no ...
    then how will say object class will extend in each and every class....
    hai friends if there is any solution tell mem
    by
    dhana

    which is the super class for java Language...
    this is an interview question .
    I SAY Object is the super class for java Language
    ge ...If you mean the ultimate parent of all classes, yes.
    (Although it's not the parent of interfaces.)
    then he asked whether object class will extend ??
    i say Yes it will implectly extend ...Not sure what is meant by "will object extend."
    then he whether each and every class will extend
    object
    i say yes ...Correct.
    then he asked multiple inheritance is possible in
    java ...
    i say no ...Correct. At least in the usual sense. When people talk about multiple inheritance, the usually mean multiple inheritance of implementation, such as C++ supports. The ability to implement more than one interface in Java is sometimes referred to as multiple inheritance of interface. I don't know if that term is in common use outside of Java.
    then how will say object class will extend in each
    and every class....
    hai friends if there is any solution tell memMultiple inheritance means that a class' ancestors are not all in a straight line to the ultimate parent. That is, not all ancestors are parents or children of each other.
    You are you father's son, and he is his father's son, and so on. So your grandfather is your ancestor, and so is your father. This is not MI.
    You also have a mother. She's neither an ancestor nor a descendant of your father. That's MI.

  • Multiple Interfaces on a single web service URL

    we have a scenario where we have a multiple interfaces that are related to SD that needs to be exposed to another system. When we generate the WSDL from XI - it seems we can do only for one interface at a time.
    Is there a way - where in we can expose a single URL and treat these interfaces as web methods on that single URL? (similar to .Net or Java)
    If yes - how do we do that?
    Thanks.

    That will not be possible. Instead you have to expose only one interface which takes generic data as input. In the mapping, depending on dat, you should map them to various other interfaces which would definetly make your scenario complex..
    In XI each outbound interface is a separate web service (method).
    VJ

  • Problem in VO Extension

    hi all ,,
    Problem in VO Extension ,,,
    After extending the VO ,,,and impoting the jpx file .
    I am getting foolwing error:
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT 'N' AS select_flag, mtrh.request_number, mtrl.line_number,
    msibkfv.concatenated_segments, mmtt.primary_quantity,
    mtr.reason_name reason, mmtt.transaction_reference REFERENCE,
    we.wip_entity_name work_order_name, wro.operation_seq_num,
    mmtt.subinventory_code source_subinventory,
    mitkfv1.concatenated_segments source_locator, wro.date_required,fu.user_name created_by, we.wip_entity_id wip_entity_id,we.entity_type, mmtt.organization_id,mmtt.transaction_temp_id transaction_temp_id, mmtt.transaction_header_id, mmtt.move_order_line_id,mmtt.reason_id reason_id, wro.inventory_item_id inventory_item_id, msibkfv.lot_control_code,
    msibkfv.serial_number_control_code, mmtt.locator_id, mmtt.primary_quantity AS issue_quantity,
    DECODE (msibkfv.eam_item_type,
    3, 'Rebuild',
    'Disabled'
    ) AS enter_rebuild,
    mmtt.rebuild_item_id, mmtt.rebuild_serial_number,
    mmtt.rebuild_activity_id, mmtt.rebuild_job_name, NULL AS rebuild_item,
    NULL AS rebuild_activity, msibkfv.description description,
    TO_CHAR ('N') AS warning_shown,
    ( wro.required_quantity
    - NVL (wro.quantity_issued, 0)
    - (eam_material_allocqty_pkg.allocated_quantity
    (wro.wip_entity_id,
    wro.operation_seq_num,
    wro.organization_id,
    wro.inventory_item_id
    ) open_quantity,
    wro.released_quantity, (wip.department_code) AS departmentcode
    FROM mtl_item_locations_kfv mitkfv1,
    mtl_txn_request_headers mtrh,
    mtl_material_transactions_temp mmtt,
    mtl_txn_request_lines mtrl,
    fnd_user fu,
    mtl_system_items_b_kfv msibkfv,
    wip_requirement_operations wro,
    wip_entities we,
    mtl_transaction_reasons mtr,
    wip_discrete_jobs wdj,
    wip_operations_v wip
    WHERE wro.wip_entity_id = mtrl.txn_source_id
    AND wro.operation_seq_num = mtrl.txn_source_line_id
    AND wro.organization_id = mtrl.organization_id
    AND wro.inventory_item_id = mtrl.inventory_item_id
    AND we.wip_entity_id = wro.wip_entity_id
    AND we.organization_id = wro.organization_id
    AND wdj.organization_id = we.organization_id
    AND wdj.wip_entity_id = we.wip_entity_id
    AND wdj.status_type IN (3, 4)
    AND msibkfv.inventory_item_id = mmtt.inventory_item_id
    AND msibkfv.organization_id = mmtt.organization_id
    AND fu.user_id(+) = mtrl.created_by
    AND mtrh.header_id = mtrl.header_id
    AND mtrl.line_id = mmtt.move_order_line_id
    AND mmtt.locator_id = mitkfv1.inventory_location_id(+)
    AND mmtt.organization_id = mitkfv1.organization_id(+)
    AND mmtt.reason_id = mtr.reason_id(+)
    AND we.entity_type = 6
    AND mmtt.primary_quantity > 0
    AND mtrh.move_order_type = 5
    AND mtrl.line_status = 7
    AND (mmtt.transaction_mode IS NULL OR mmtt.transaction_mode = 1)
    AND mmtt.organization_id = :1
    AND ( ( msibkfv.serial_number_control_code = 1
    AND msibkfv.lot_control_code = 1
    AND :2 IS NULL
    OR ( ( msibkfv.serial_number_control_code > 1
    OR msibkfv.lot_control_code > 1
    AND :3 IS NOT NULL
    AND wip.wip_entity_id = we.wip_entity_id
    AND wip.organization_id = we.organization_id
    AND wro.operation_seq_num = wip.operation_seq_num) QRSLT WHERE (( UPPER(WORK_ORDER_NAME) like :4 AND (WORK_ORDER_NAME like :5 OR WORK_ORDER_NAME like :6 OR WORK_ORDER_NAME like :7 OR WORK_ORDER_NAME like :8)))
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1169)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2850)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1838)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:536)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:424)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)
    ## Detail 0 ##
    java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:9231)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8812)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9534)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:9560)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4537)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:437)
         at oracle.apps.fnd.framework.server.OAPlsqlViewObjectImpl.executeQuery(OAPlsqlViewObjectImpl.java:524)
         at oracle.apps.eam.stores.materialissue.server.MaterialIssueTableVOImpl.executeQuery(MaterialIssueTableVOImpl.java:44)
         at oracle.apps.eam.stores.materialissue.server.MaterialIssueTableVOImpl.executeQuery(MaterialIssueTableVOImpl.java:56)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:741)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2330)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2304)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(OAQueryHelper.java:2858)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(OAQueryHelper.java:1284)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:847)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(OAQueryHelper.java:1021)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2846)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1838)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:536)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:424)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)
    java.sql.SQLException: Invalid column type
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:9231)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8812)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9534)
         at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:9560)
         at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:3919)
         at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3335)
         at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:13827)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:804)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:669)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3723)
         at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(Unknown Source)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4537)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:743)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:892)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:806)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:800)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3643)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:437)
         at oracle.apps.fnd.framework.server.OAPlsqlViewObjectImpl.executeQuery(OAPlsqlViewObjectImpl.java:524)
         at oracle.apps.eam.stores.materialissue.server.MaterialIssueTableVOImpl.executeQuery(MaterialIssueTableVOImpl.java:44)
         at oracle.apps.eam.stores.materialissue.server.MaterialIssueTableVOImpl.executeQuery(MaterialIssueTableVOImpl.java:56)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.initQuery(OAViewObjectImpl.java:741)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2330)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.setCriteriaOnVO(OAWebBeanHelper.java:2304)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.handleSubmitButton(OAQueryHelper.java:2858)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequestAfterController(OAQueryHelper.java:1284)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:847)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAQueryHelper.processFormRequest(OAQueryHelper.java:1021)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1189)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1027)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:993)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:848)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:382)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2846)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1838)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:536)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:424)
         at OA.jspService(_OA.java:212)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:335)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:478)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:401)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
         at oracle.apps.jtf.base.session.ReleaseResFilter.doFilter(ReleaseResFilter.java:26)
         at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15)
         at oracle.apps.fnd.security.AppsServletFilter.doFilter(AppsServletFilter.java:318)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:610)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:359)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:870)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:451)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:299)
         at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:187)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:797)
    Please help urgent
    thanks

    Your error is :
    java.sql.SQLException: Invalid column type
    Try out following:
    1. Verify if Attribute mappings are correct in VO?
    2. Verify if Attrubute type and database column types are in sync?
    3. Which VO you extended, Why you extended the vo? what changes you made?
    4. This issue has been discussed before in Forums:
    SQL Error during statement preparation - in LOV Region
    is one such thread. There are many others too.
    -Prince

  • Single IDOC to Multiple Interface Mapping

    We have a requirement in our project where one masterdata IDOC will be sent from a SAP MDM box and will be transformed to a target IDOC and be sent to an SAP SNC box. However, the scenario is that depending on the contents of the IDOC, there can be multiple IDOCs that need to be created. For example, the single MDM IDOC has V1, V2 and V3 values then the IDOCS that should be sent to the SAP SNC box should be three.
    The IT head of the customer decided against using Enhanced Interface Determination (since the problem can be easily solved using a 1:n mapping) due to the complexity especially when the solution is rolled out to other regions as each region has it's own logic (currently, the other implementation has only 1:1 mapping so there is no problem). I had developed a 1:n mapping but the resulting map is too big and very complex.
    What I tried to do is to create separate mappings for each scenario that an IDOC needs to be generated out of the values from the received IDOC in XI and then define rules in the Interface Determination. Problem is that XI throws an error stating that multiple interfaces are found. So I cannot use Interface Determination to trigger creation of multiple IDOCS of the same type with different values from a single IDOC sent by the same SAP box.
    Question is, is there any way to solve this requirement without using Enhanced Receiver Determination. I was thinking of BPM but not really sure how to do it.
    Thanks in advance!
    Best Regards,
    Rommel Mendoza
    Hewlett Packard Asia-Pacific, Ltd.

    Thanks a lot for that.
    For example, We have this input Message:
    <ZMATMA>
      <IDOC>
        <E1MARAM>
           <E1MARMM>
               <MEINH>IT</MEINH>
           </E1MARMM>
           <E1MARMM>
               <MEINH>CS</MEINH>
           </E1MARMM>
           <E1MARMM>
               <MEINH>SW</MEINH>
           </E1MARMM>
        </E1MARAM>
      </IDOC>
    </ZMATMA>
    then there should be an output of:
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>IT</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>CS</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    <SAVEMULTIPLE204>
      <IDOC>
        <BUOM>SW</BUOM>
      </IDOC>
    </SAVEMULTIPLE204>
    The logic is when the MEINH field of the ZMATMA02 IDOC has the values: IT, CS and SW, create one IDOC for each.
    Thanks in advance!
    Edited by: Rommel Mendoza on Nov 6, 2008 7:30 PM

  • JAVA arithmetic problem with double ?

    If I try to work double precision numbers I get a unintelligible result, but what do I do wrong ?
    Are there any inaccuracy in the JAVA double precision numbers arithmetic or what's the problem with this very simple example code ? How can I get correct result ?
    Simple example code :
    ================
    for (double i = 0; i < 10; i = i + 0.01)
    System.out.println(i);
    On the output :
    ===========
    0.0
    0.01
    0.02
    0.03
    0.04
    0.05
    0.060000000000000005
    0.07
    0.08
    0.09
    0.09999999999999999
    0.10999999999999999
    0.11999999999999998
    0.12999999999999998
    0.13999999999999999
    0.15
    0.16
    0.17
    0.18000000000000002
    0.19000000000000003
    0.20000000000000004
    0.21000000000000005
    0.22000000000000006
    0.23000000000000007
    0.24000000000000007
    0.25000000000000006
    0.26000000000000006
    0.2700000000000001
    0.2800000000000001
    0.2900000000000001
    0.3000000000000001
    0.3100000000000001
    0.3200000000000001
    0.3300000000000001
    0.34000000000000014
    0.35000000000000014
    0.36000000000000015
    0.37000000000000016
    0.38000000000000017
    0.3900000000000002
    0.4000000000000002
    0.4100000000000002
    0.4200000000000002
    0.4300000000000002
    0.4400000000000002
    0.45000000000000023
    0.46000000000000024
    0.47000000000000025
    0.48000000000000026
    0.49000000000000027
    0.5000000000000002
    0.5100000000000002
    0.5200000000000002
    0.5300000000000002
    0.5400000000000003
    0.5500000000000003
    0.5600000000000003
    0.5700000000000003
    0.5800000000000003
    0.5900000000000003
    0.6000000000000003
    0.6100000000000003
    0.6200000000000003
    0.6300000000000003
    0.6400000000000003
    0.6500000000000004
    0.6600000000000004
    0.6700000000000004
    0.6800000000000004
    0.6900000000000004
    0.7000000000000004
    0.7100000000000004
    0.7200000000000004
    0.7300000000000004
    0.7400000000000004
    0.7500000000000004
    0.7600000000000005
    0.7700000000000005
    0.7800000000000005
    0.7900000000000005
    0.8000000000000005
    0.8100000000000005
    0.8200000000000005
    0.8300000000000005
    0.8400000000000005
    0.8500000000000005
    0.8600000000000005
    0.8700000000000006
    0.8800000000000006
    0.8900000000000006
    0.9000000000000006
    0.9100000000000006
    0.9200000000000006
    0.9300000000000006
    0.9400000000000006
    0.9500000000000006
    0.9600000000000006
    0.9700000000000006
    0.9800000000000006
    0.9900000000000007
    1.0000000000000007
    1.0100000000000007
    1.0200000000000007
    1.0300000000000007
    1.0400000000000007
    1.0500000000000007
    1.0600000000000007
    1.0700000000000007
    1.0800000000000007
    1.0900000000000007
    1.1000000000000008
    1.1100000000000008
    1.1200000000000008
    1.1300000000000008
    1.1400000000000008
    1.1500000000000008
    1.1600000000000008
    1.1700000000000008
    1.1800000000000008
    1.1900000000000008
    1.2000000000000008
    1.2100000000000009
    1.2200000000000009
    1.2300000000000009
    1.2400000000000009
    1.2500000000000009
    1.260000000000001
    1.270000000000001
    1.280000000000001
    1.290000000000001
    1.300000000000001
    1.310000000000001
    1.320000000000001
    1.330000000000001
    1.340000000000001
    1.350000000000001
    1.360000000000001
    1.370000000000001
    1.380000000000001
    1.390000000000001
    1.400000000000001
    1.410000000000001
    1.420000000000001
    1.430000000000001
    1.440000000000001
    1.450000000000001
    1.460000000000001
    1.470000000000001
    1.480000000000001
    1.490000000000001
    1.500000000000001
    1.5100000000000011
    1.5200000000000011
    1.5300000000000011
    1.5400000000000011
    1.5500000000000012
    1.5600000000000012
    1.5700000000000012
    1.5800000000000012
    1.5900000000000012
    1.6000000000000012
    1.6100000000000012
    1.6200000000000012
    1.6300000000000012
    1.6400000000000012
    1.6500000000000012
    1.6600000000000013
    1.6700000000000013
    1.6800000000000013
    1.6900000000000013
    1.7000000000000013
    1.7100000000000013
    1.7200000000000013
    1.7300000000000013
    1.7400000000000013
    1.7500000000000013
    1.7600000000000013
    1.7700000000000014
    1.7800000000000014
    1.7900000000000014
    1.8000000000000014
    1.8100000000000014
    1.8200000000000014
    1.8300000000000014
    1.8400000000000014
    1.8500000000000014
    1.8600000000000014
    1.8700000000000014
    1.8800000000000014
    1.8900000000000015
    1.9000000000000015
    1.9100000000000015
    1.9200000000000015
    1.9300000000000015
    1.9400000000000015
    1.9500000000000015
    1.9600000000000015
    1.9700000000000015
    1.9800000000000015
    1.9900000000000015
    2.0000000000000013
    2.010000000000001
    2.020000000000001
    2.0300000000000007
    2.0400000000000005
    2.0500000000000003
    Thanks for answerers !
    Joseph

    This result is entirely unsurprising, and the flaw lies in your program, not in Java.
    Java represents numbers in 2's complement [SEM] form (read the Java Language Specification (JLS), according to agreed standards. When you specify a fractional number that appears to be nice and easy to work with, you are thinking in decimal notation, not binary, and you are giving it a number that cannot be precisely represented. It is a little like asking you to write down exactly what pi is (all its digits ;-)).
    So the number you get is not precisely what you asked for (one very insignificant error). But then you compound it by adding an inaccurately represented number to an inaccurately represented number, and so on, until the bit errors combine to make a very inaccurate number.
    The correct way to approach what you are trying to do would be to perform the addition using integers, and multiply each time you want to scale it to a double.
    This has been asked many times - I would suggest you:
    - Search the forums
    - Check out the language spec
    - or do a degree in CompSci :-)
    A calculator is a little more accurate because it does not have to conform to agreed standards, and so can use special logic to minimise such errors. The average pocket calulator also works to a much lower level of accuracy (usu 8 digits), and therefore masks the errors to you. You'd find that you got the same effect if you played with it long enough.
    Hope this helps

  • Some changes we need in the Java language

    Dear Java language makers,
    I'm actually coding a fairly complex program, and I'm facing several issues c++ does solve while Java doesn't handle them. I strongly wish these features could be included in next editions of the Java language, and I think I'm not the only one...
    1) Friend Class access
    Say I have a parser and a Data structure. The parser reads a file, and updates another class (being a data structure) as it parses line by line an input text file.
    I want my parser to fill up the data structure step by step, that is field after field, rather than using a constructor, because the information appears sequentialy in my text input file.
    Using a constructor to intitialize my data structure (rather than field by field access on a void object)would require me creating several variables in my parser for buffering the information, then create my object. This results in a loss of coding performance, and execution performance (spending time allocating and killing buffer values).
    On the other hand, I don't want these field values to be exposed to the users of my SDK, I want them to be accessed thru accessor methods.
    You would answer me : put both classes in the same package, and declare the fields of the data structure "protected", and accessors "public".
    Yes, that is a solution...but if you do really think Object Oriented, this sucks. Because a data structure and a parser are not the same thing, and I want to have them in separate packages.
    one being named myApp.Datasets, the other being named myApp.Parsers.
    And this can't be done with Java.
    If only I could declare in my data structure class the Parser class as a Friend Class, this would solve the issue and be CLEAN for Object Oriented programming !
    2) Operators
    This very annoying the Java language doesn't support operators
    Say you have a Vector3D class and you want to make a calculation :
    in c++, you can define operators for your class, and make a calculation like this :
    float a;
    Vector3D v1,v2,v3;
    //calculation
    v1 = v2 - v3 * a; //clean and easy to read
    Now in Java, not having operators, you have to deal with functions :
    float a;
    Vector3D v1,v2,v3, tmpv;
    v1=new Vector3D();
    tmpv=new Vector3D();
    //calculation
    tmpv.sub(v2,v3);
    tmpv.mul(a);
    v1=tmpv; //dirty and unreadable
    In Java you get 3 lines for a basic calculation. This is the way it's implemented in JAVA3D, and this is the best you can do in Java to my opinion.
    Just imagine how math code looks in java when you code a 3D Physics engine, regarding the previous exemple, and having to deal with matrices, vectors, quaternions...Well I give you a taste, a simple slice of the code :
    vtmp.cross(Airplane.vAngularVelocity,Element.vCGCoords); // rotational part
    vLocalVelocity = add(Airplane.vVelocityBody , vtmp);
    fLocalSpeed = magnitude(vLocalVelocity);
    if(fLocalSpeed > 1) vDragVector = div(negate(vLocalVelocity),fLocalSpeed);
    Vector3f v = new Vector3f();
    v.cross(vDragVector,Element[i].vNormal);
    vLiftVector.cross(v,vDragVector);
    tmp = magnitude(vLiftVector);
    vLiftVector=normalize(vLiftVector);
    v=new Vector3f(vDragVector);
    tmp = v.dot(Element[i].vNormal);
    Got it ? :)

    Because a data structure and a parser are not the same thing,
    and I want to have them in separate packages.Because a data structure and a parser are not the same thing, you should not jave them as the same type (class or interface), that is right. But this does not prevent us from putting them into the same package!
    java. lang.Integer and java.lang.String are not the same thing, but I am quite happy with them as classes in the same package.
    Put both classes in the same package, and declare the fields
    of the data structure "protected", and accessors "public".Protected access would allow access for inheriting classes as well. The default (package-wide) access would be better.

  • Can you write javac in java Language

    Hi,
    is it possible to write java compiler in java language.

    Here's a compiler written in Java, it is part of an IDE I wrote:
    Compiler.java: import java.io.*;
    * Wrap up javac.
    * The class exists to supply a single method - to compile a file
    * and report status along with error/success messages
    * Compilation (by javac) is carried out asynchronously using a
    * background Thread. Status and any error messages are passed back to
    * the calling object through a callback method.
    public class Compiler implements Runnable
        * Constructor.
        * @param owner the <TT>JavacTool</TT> that has created this Compiler
       public Compiler( CompilerListener owner )
          myOwner = owner;
       private CompilerListener myOwner;
        * Compile a file using javac.
        * This method will compile a Java source file and report both the
        * status of the operation and any error strings produced.
        * The method kicks off a separate Thread that actually carries out
        * the compilation. Upon completion a the JavacTool is called back with
        * a CompilerStatus object.
        * @param filename   the name of a file which <I>must</I> be in the same directory
        * as the JavacTool was run from.  this tool does not have tha capability
        * of working across multiple directories.
       public void compile( String fileToCompile )
          filename = fileToCompile;
          new Thread( this ).start();
       private String filename;
        * The method run by the separate Thread.
        * It runs once for each filename passed to the Compiler object.
        * It creates a new OS process to run "javac filename" externally
        * and captures the error output from the real compiler into
        * a String so that it can be returned to the calling code via
        * a callback method (very similar in principle to an event)
       public void run()
          CompilerStatus returnValue = new CompilerStatus();
          returnValue.outputString = new String();
          try
             Runtime r = Runtime.getRuntime();
             Process p = r.exec( "javac " + filename );
             InputStream is = p.getErrorStream();
             BufferedReader rdr = new BufferedReader( new InputStreamReader( is ) );
             String line = rdr.readLine();
             while( line != null )
               returnValue.outputString += (line + "\n");
               line = rdr.readLine();
             p.waitFor();
             returnValue.exitValue = p.exitValue();
             if( returnValue.exitValue == 0 )
               returnValue.outputString = "Compilation successful\n\nNo errors\n";
          catch( Exception e )
            e.printStackTrace();
          myOwner.compileComplete( returnValue );
    } CompilerStatus.java: public class CompilerStatus
       public int exitValue;
       public String outputString;
    }JavacTool.java: import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * The main class in the application
    * Provides the screen presence for the controllers and the output view
    public class JavacTool extends JTextArea implements CompilerListener
        * Constructor for the tool
        * @param list A java.util.Vector containing the list of files for compilation
        * or null if none entered.
       public JavacTool( JTextArea jTextArea )
          // View    
          outputWindow = jTextArea;     
          outputWindow.setFont( new Font( "Monospaced", Font.PLAIN, 12 ) ); 
          outputWindow.setText( "TBJava IDE: -ready to compile" );   
          // Get it going!
          // Must create a Compiler object and provide it with a link
          // so that it can call this object back when it has completed
          theCompiler = new Compiler( this );
          // set the size and the visibility
          setSize( 500, 250 );
          setVisible( true );
         public void Compile( String fileToCompile )
                // Infrom user that something is happening
                   filename = fileToCompile;
                   outputWindow.setBackground( Color.white );
                   outputWindow.setText( "Compiling " + filename );
                   setCursor( new Cursor( Cursor.WAIT_CURSOR ) );
                   theCompiler.compile( fileToCompile );
                // When compilation is complete, the Compiler
                // object will callback on the method compileComplete
                // The Compiler runs its own Thread so this method
                // will complete immediately and the outputWindow
                // update can occur.
       private String filename;                                             // the filename as a String
       private JTextArea outputWindow;                                   // the window containing the messages                         
       private Compiler theCompiler;                                        // the compiler
        * Method called by the Compiler when it has completed
        * @param status A CompilerStatus object that contains
        *    the exit value from the compiler
        *    (indicating success or failure) value == 0 => OK and value != 0 => error
        *    and an appropriate text message
       public void compileComplete( CompilerStatus status )
          setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );
          if( status.exitValue == 0 )
             outputWindow.setBackground( new Color( 0.85F, 1.0F, 0.85F ) );
                                         // pale green
          else
             outputWindow.setBackground( new Color( 1.0F, 0.85F, 0.85F ) );
                                         // pale red
          outputWindow.setText( status.outputString );
    }This is taken straight from my IDE; you'll have to adapt it slightly to make it into a seperate application

  • JRE 6 x Mozilla Firefox Java Console problem

    Dear sirs
    I want to call the attention that the extension that JRE 6 installs on Firefox has a wrong MaxVersion. This causes the Java Console not working on Firefox 2.0.0.4 (the most recent version)
    Instead of the maxversion
    2.0
    (current, cause of problem) it should be
    2.0.*
    It's possible to fix in our computer, editing the install.rdf file but it's important that java community delivers the CORRECT extension with Maxversion 2.0.*
    Steps to fix on your computer:
    1- Find c:\program files\Mozilla Firefox\Extensions\{CAFEEFAC-0016-0000-0001-ABCDEFFEDCBA}
    2- Edit the maxversion in the install.rdf file to 2.0.*
    3- Save the file
    4- Pack all the content of this folder (two files and the chrome folder) into a new zip file called temp.xpi
    5- Drag this file on a Firefox Window or open it from File - 'open file' menu
    6- Install and restart. Now Java Console will be working.
    Best Regards
    Sergio Abreu

    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6506635
    This issue is fixed with yet to be released JRE version 6u02
    You can find related information at bugzilla as well:
    https://bugzilla.mozilla.org/show_bug.cgi?id=364390

  • Language problem in JSP please help

    Hi all java guru;
    Altough I tried all different way I can not solve the my problem.
    My problem is Turkish language problem in JSP.
    If my jsp page use database applications such as push or pull data to my SQL 2000 database or call some datas from database, some data which contains turkish caracter are seen wrong. suc as ����� is to ??????
    what is the problem?
    But important point is that; this is only Database data which come from sql database. But I can see JSP data or HTML data truly.
    I try different method to solve in JSP page;
    1-request.setEncoding("iso-8859-9");
    or
    request.setCharacterEncoding( "windows-1250" );
    2-
    @contentType="text/html; charset=iso-8859-9"
    @page pageEncoding="iso-8859-9"
    3-
    <meta http-equiv="Content-Language" content="tr">
    <META http-equiv="Content-Style-Type" content="text/css">
    4-
    ISO-8859-9 is turkish charecter spefications
    String TR_tlp = new String(NEW_TALEP.getBytes(),"ISO-8859-9"); // this parm is inserting database but problem is go on.
    5-
    for the database...
    Properties props = new Properties();
    props.put("user","login");
    props.put("password","password");
    props.put("charSet","UNICODE");
    6-
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET="+sun.io.ByteToCharConverter.getDefault().getCharacterEncoding();
    or
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET=ISO-8859-9"
    con= DriverManager.getConnection(url, kulad, sifre);
    I am using tomcat 5.0.19,
    is there any way to solve this problem... Please help......

    Were you ever able to solve your problem?
    I have a similar problem.
    My database is storing the characters correctly and they can be viewed in Java, but when I try to convert them to unicode using:
    String inputUtf8 = new String(input.getBytes(),charset);
    it works for almost all characters, but some come through as noncharacter "boxes."
    The characters that come through as boxes in iso8859-1 are the ones that are in the "supplementary" character range of that set, such as:
    - curved left and right quotes
    - "TM" symbol
    - bullets
    - m dash and n dash
    (see this table: http://www.csgnetwork.com/htmlchrset.html for a more complete list of the supplementary characters )
    Any idea what I need to do to have these characters show up properly?

  • Java.lang.Exception: Multiple Matches Found

    Hi,
    I have written scheduler task to connect people soft DataBase get the users list and disable user accounts in IDM . Below is the peace of code.
    =============================
    ResultSet results = stmt.executeQuery(selectQuery);
    tcReconciliationOperationsIntf reconUtil = (tcReconciliationOperationsIntf)getUtility("Thor.API.Operations.tcReconciliationOperationsIntf");
    HashMap[] userValues = null;
    userValues = createDeleteHashMap(results);
    if (userValues.length < 1)
    return;
    Set deletedAcc = reconUtil.provideDeletionDetectionData(this.resourceObject, userValues);
    ============================================================
    In the Set deletedAcc = reconUtil.provideDeletionDetectionData(this.resourceObject, userValues); i am getting the following exception . please help me
    Regarding this.
    [XELLERATE.APIS],Class/Method: tcReconciliationOperationsBean/provideDeletionDetectionData encounter some problems: Multiple Matches Found
    java.lang.Exception: Multiple Matches Found
    Edited by: user11084273 on Sep 26, 2012 12:36 AM

    I believe this API expects only to match no more than one user on each of the criteria set in the paoAccountDataList (userValues) in your case, i.e. each entry in the map must give a unique identifier of one resource. This map is not a map of attributes of one account, which together identify one resource, as any one ambiguous value in the map will give this error. It appears at least one entry in you userValues map is ambiguous and matches multiple resources. I guess this all depends on what your initial select query was.

  • Java.lang.NoSuchMethodError: weblogic.rmi.extensions.WRMIOutputStream

    Hi,
    I'm trying to run examples.jdbc.datasource.simplesql with Weblogic 5.1sp8,
    but am hitting this problem when it executes:
    An exception was caught. javax.naming.NamingException [Root exception is
    weblogic.rmi.ServerError: A Rem
    oteException occurred in the server method
    - with nested exception:
    [java.lang.NoSuchMethodError: weblogic.rmi.extensions.WRMIOutputStream:
    method writeObject(Ljava/lang/Ob
    ject;)V not found]]
    An exception was caught. java.lang.NullPointerException:
    Any pointers would be appreciated.
    Thanks,
    -Triet

    Hi..
    I guess itzz more of the service pack problems.
    Jars built on the later version won't work in the previous version (service packs) of weblogic.
    Try building a jar on the oldest version (service pack) u have and then try deploying it to the later version , i think it won't give u any problems.
    Try it out and let me know if u face any problems

  • Java Language Specification error reports

    Well, I wanted to report a typo in The Java Language Specification, Third Edition (http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf), so from http://java.sun.com/docs/books/jls/ I clicked on the "feedback form" link (which points at http://developers.sun.com/contact/feedback.jsp?&category=doc&mailsubject=Java%20Language%20Specification%20Feedback). This was redirected to http://www.oracle.com/technetwork/community/join/overview/index.html which offers no such feedback form. Consider this sort-of-broken link as the first problem I'm reporting.
    The second problem is in the aforementioned pdf, section 4.8 (Raw Types), page 58, where on can read:
    "The type of the member(s) of Inner depends on the type parameter of Outer. If Outer is raw, Inner must be treated as raw as well, as their is no valid binding for T."
    This should be instead:
    "The type of the member(s) of Inner depends on the type parameter of Outer. If Outer is raw, Inner must be treated as raw as well, as there is no valid binding for T."
    I think a forum category should be created for just this: error reports about the documentation (pdfs, APIs, support web pages).
    Edited by: Urhixidur on 2011-09-08 09:23

    Your intentions are admirable, but you are probably wasting your time. This is a forum for Java development related questions and 99.5% of the visitors are not related to Oracle at all. most likely nothing will be done with your information.
    I think a forum category should be created for just this: error reports about the documentation (pdfs, APIs, support web pages).It is a good idea actually, but such a thing would need very tight moderation and then there is still the question of how to arrange that something is actually done with the reports.

Maybe you are looking for

  • HP Photosmart Premium c309g-m does not have a mirror image print option-help please

    After twice being dropped from HP chat support I have laned in this forum to get some help please. I need to be able to print mirror images from my printer and it simply is not a option-it's not a matter of turning on the option, it is not there at a

  • Change of hdd on 21,5" iMac the fan is out of control.

    After i change my hdd from 500 gb to 1000 gb. On my 21,5" iMac i5 SMC-version (system):          1.71f21 Boot ROM-version:          IM121.0047.B1F Lion install 10.7.4 Then were only two cables from the iMac to the hard drive. Power and data cable. Is

  • Essbase 11.1.2 configuration issues.

    HI We are trying to install and configure EPM 11.1.2 on RHEL5 LINUX. The installation of foundation services and essbase went great on the server. When we try to configure we see the below errors Hyperion foundation is greyed out even though this is

  • Error with ArrayIndexOutOfBoundsException in JHeadstart 10g??

    I need some help with the JHeadStart, Im tring to migrate a Oracle forms applications to a j2ee applications In the tutorial they say that i need to create a new workspace and a new JHeadStart project the problem is that i dont have that option in th

  • I am unable to activate my ipad mini

    When I insert my sim in my ipad to start it ...it could not complete configer please sugges what should I do