Idlj java compile problem from badly named interfaces in idl

I am trying to build a java client to communicate with an application using corba interfaces.
The large/complex idl I am using to build all the client stubs has interface names that seem to cause problems for the generated java. For example there is an interface in the idl called 'Device' as well as an interface called 'DeviceOperations'. This causes problems because idlj creates java interfaces with the word 'Operations' appended to it.
So I get a bunch of weird results in my generated java which has many compiler errors.
Unfortunately I cannot change the idl because it is not an application I work on directly.
Any suggestions?
Thanks!

My guess is that you are between a rock and a hard place unless you can 1) change the IDL or 2) change how the IDL is compiled. You have said you can't do the former, so maybe you can influence the latter (unfortunately for you, I suspect not). On the change you can, keep reading.
IDL only creates interfaces such as DeviceOperations if you compile the IDL using the Tie model. But you would definitely have a problems since 1) the IDL has an interface called Device and DeviceOperations and as a result will create java files Device.java and DeviceOperations.java and 2) the Tie model will want to create two interfaces, DeviceOperations.java and DeviceOperationsOperations.java. I suspect that the second interface compiled by the IDL compiler will be the winner the first one will be overwritten).
If you can, change the IDL compilation to that you do not use the Tie model. However, you said you have no ability to change the IDL, so you also may not have the ability to change how it is compiled, so I am not sure if this is practical advice. I can't imagine that this application ever successfully used both interfaces.

Similar Messages

  • Java compiling problem, very important ??

    Hi,
    When I will compile my java code (see source) I get the following message
    java.lang.NullPointerException
    at table1.main(table1.java:95)
    The problem is in line 95 : values[k] = (String)vals.nextElement();
    What have I done wrong ?????
    When any one has a solution, thanks in advance
    regards, mkasel
    source:
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class table1 {
    public static String MY_SEARCHBASE = "l=ASA";
    public static String MY_FILTER = "cn=*";
    // Specify which attributes we are looking for
    public String MY_ATTRS[] = {"sn", "telephoneNumber","givenName"};
    Enumeration vals;
    Hashtable list= new Hashtable();
    public static void main (String args[]){
    try {
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, "ldap://scd2ldap.mens.net:389/ou=ICN,o=MENS,c=FR ");
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results =ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while ( results != null && results.hasMore() ) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + "," + MY_SEARCHBASE;
    System.out.println (/*"Distinguished Name is " +dn*/);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    // Has no attributes
    if (ar == null) {
    System.out.println(" Entry "+ dn );
    System.out.println(" has none of the specified attributes\n");
    } else {
    // Has some attributes
    // Determine the attributes in this record.
    Hashtable elements=new Hashtable();
    for (int i=0; i<MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS<i>);
    if (attr != null) {
    vals=attr.getAll();
    String[]values=null;
    int k=0;
    while(vals.hasMoreElements()) {
    values[k] = (String)vals.nextElement();
    k++;
    elements.put(MY_ATTRS<i>,values);
    list.put(dn,elements);
    // End search
    // end try
    catch(Exception e) {
    e.printStackTrace();
    System.exit(1);
    P.S. IMPORTANT <> means []

    Hi again,
    I didn't understand you well, could you tell me what I
    have to change in the code to solve the problem
    Thanks,
    mkasel
    Well it is very simple
    String[]values=null;
    you have a pointer that can point to a string array but currently is pointing to null
    values[k] = (String)vals.nextElement();
    Now you try to access the String array but it doesn't point to an array of strings but to null that's why you get a java.lang.NullPointerException.
    You first have to let the pointer point to an array for example by creating a new String array like:
    values = new String[100];
    in your case the best thing to do is get the amount of elements you have in your enumeration and use that instead of 100

  • Total Java compiler problem confusion

    I am seeking some help and advice from those of you who use Java either as their first choice language or use it most of the time.
    I am using Microsoft Visual J++ 6.0 after being given it free. I have also just done a Java programming home course. I can program in C++ so the learning curve was not too steep. I currently use Microsoft Visual C++ 6.0 for my C++ programming. This is why I am keen to use the MS Java program because the setup is very similiar and I like using it.
    My problem comes into play when after completing the course I now try and type in the programs and compile them. They do not work, in fact I have had to make changes to the program to get it to work.
    Now have I been taught incorrectly how to program in Java or is it simply the MS Java program which is not setup correctly? I have been told the MS program I am using uses only Java 1.1 and the current one is 1.4.1.
    This is the program I was given as an example to follow and is supposed to work and is a Java program.
    import java.io.*;
    public class Class1
         public static void main (String [] args)
                   throws IOException
                   int num1, num2, sum;
                   System.out.println ("Input a number: ");
                   num1 = Course_io.readInt();
                   System.out.println ("Input another number: ");
                   num2 = Course_io.readInt();
                   sum = num1 + num2;
                   System.out.println ("The total is " + sum );
    The error I get is, "Undefined name 'Course_io' (j0049)
    Why? Have I not set up the compiler correctly or is the MS Vis J++ 6 compiler just a waste of time. If so, then why is it still available to purchase in shops?
    I don't want to know how to get the program to work, rather what the problem is with compilers etc...
    Sorry for the huge post but I would really appreciate some help on this frustrating matter.
    Thanks,
    Pk

    let me modify ur code:
    import java.io.*;
      public class Class1 {
       public static void main (String [] args) throws IOException {
       int num1, num2, sum;
       //added declaration
       BufferedReader in = new BufferedReader(
                              new InputStreamReader(System.in)); 
       System.out.println ("Input a number: ");
       num1 = Integer.parseInt(in.readLine()); 
       //num1 = Course_io.readInt();
       System.out.println ("Input another number: ");
       num2 = Integer.parseInt(in.readLine()); 
       //num2 = Course_io.readInt();
       sum = num1 + num2;
       System.out.println ("The total is " + sum );
    }tnks to robert for input procedure

  • Is it possible to call the java compiler javac from runtime

    Hi, can someone tell me if it is possible to call javac from runtime. I need to do this because the class I need to compile must be filled with some data given by the user. I plan to write the class code in a file, let the user write some code lines at runtime, add this lines to the file and then call javac in order to compile the file and check if the user wrote his lines properly. I wonder if this makes sense, thanks for reading this and for your help.

    You can try using the exec method in the class java.lang.Runtime, but here are some traps to watch out for when using it:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Bootup problems, from bad to worse--HELP

    Yesterday my iBook appeared not to wake from sleep, and from that point on I have had trouble booting up the machine. Sometimes it boots up but freezes after one or two operations in the Finder; sometimes I hear the HD but the backlight never comes on, and eventually I either force-restart or force-shutdown; and now, I either get no backlight or a screen with two or three broad bands of black & grey with uneven, crayon-like borders between them--yikes.
    Here's what I've tried:
    - boot in safe mode (worked once; I ran disk utility which verified the disk and fixed permissions for two files)
    - reset PRAM
    - boot to OSX CD (holding C at startup; didn't work--I'm not certain it's a bootable CD but I think so)
    - remove AirPort card
    - remove additional memory card (which may not leave enough to run Tiger)
    If it weren't for the freezes I'd have thought this was a display problem (I've already had both of the iBook display problems with this machine, both repaired under the extended repair program). But now I'm thinking it's a hard disk problem.
    I'm about to try to mount the disk in target disk mode on another machine.
    The good news is that I have backed up this disk, the bad news is that my latest backup is about 2 or 3 months old. Sigh.
    Any advice??
    iBook (late 2001)   Mac OS X (10.4.7)   G3, 600 Mhz

    Hi Alex,
    It sounds as if your ibook is suffering from the dreaded logic board failure that runs right across the line of G3 ibooks.
    It is caused by the solder deteriorating which provides the graphics chip contact with the logic board and thus causing it to come loose.
    Do you find pressing on the left hand side of the ibook makes it start up as normal or by pressing underneath on the left?
    If it does make it work then it sounds as if you have this failure.
    You can fix this by putting a shim underneath the graphics chip forcing it to make contact correctly. But this doesn't always work perfectly.
    Try that pressing on the left and see what happens. Other wise you may be able to ring apple customer relations to ask if they would repair your ibook as an exception. Apple ran a repair scheme to sort this problem (http://www.apple.com/support/ibook/faq/) but as your ibook is late 2001 it is out of the 3 years warranty apple covered it for.
    I Hope that helps!
    Boid

  • RTPPlayerApplet.java compiling problem

    Hi !
    I'm newbie in JMF. I tried to compile RTPPlayerApplet.java
    (http://java.sun.com/products/java-media/jmf/2.1.1/samples/samples/SimplePlayerApplet.java)
    but cant find package rtp . I've installed JMF 2.1.1e everyfing works fine except that example ..........
    Here's my errors :
    RTPPlayerApplet.java:49: package rtp does not exist
    import rtp.*;
    ^
    RTPPlayerApplet.java:77: cannot resolve symbol
    symbol : class ParticipantListWindow
    location: class RTPPlayerApplet
    ParticipantListWindow videogui = null;
    ^
    RTPPlayerApplet.java:78: cannot resolve symbol
    symbol : class ParticipantListWindow
    location: class RTPPlayerApplet
    ParticipantListWindow audiogui = null;
    ^
    RTPPlayerApplet.java:182: cannot resolve symbol
    symbol : class ParticipantListWindow
    location: class RTPPlayerApplet
    videogui = new ParticipantListWindow(videomgr);
    ^
    RTPPlayerApplet.java:185: cannot resolve symbol
    symbol : class ParticipantListWindow
    location: class RTPPlayerApplet
    audiogui = new ParticipantListWindow(audiomgr);
    ^
    Note: RTPPlayerApplet.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    5 errors
    Can some help me out?
    Thanks.

    Solution:
    delete all references of
    ParticipantListWindow
    and delete import *.rtp.
    because rtp package is not existing in 2.1 ver

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

  • Searching Java Compiler from Sun

    Hello
    I have Download the JAVA SDK 1.4 Standard from SUN. I have find 4 demo Java Applications but no JAVA Compiler.
    Now someone how I can get the full Java compiler with all librarys and Documentation?
    Kind regards
    Sven

    If you install the JDK1.4 you should have the compiler. You'll see it under {JAVAHOME}\bin. To compile a java file, you'll have to use javac.
    The API documentation is a seperate download.

  • Exception in thread "main" java.lang.Error: Unresolved compilation problem

    The following code:
         public boolean find(MusbachJ_Person person,BstNode node)
              //p.l(person);p.l(node.intData);
              if(node.intData.compareTo(person)==0)
                   return true;
              if( node.leftNode != null ) find(person,node.leftNode );
              if( node.rightNode != null ) find( person, node.rightNode);
              else
                   return false;
         }returns the following compilation error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         This method must return a result of type boolean
         at MusbachJ_TreeNode.find(MusbachJ_TreeNode.java:32)
         at MusbachJ_PeopleTree.main(MusbachJ_PeopleTree.java:91)
    But I don't understand, the else statement is right there, what more does it want? Thanks! :)

    John_Musbach wrote:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: Unresolved compilation problem is an error that you'll only ever see if you're using an IDE. If you used the javac compiler, then you would have seen that the code doesn't even compile.
    The reason (as others have pointed out) is, that some paths through your method don't return a value.
    I'll re-write your code in the code-style that I usually use, because then it might be easier for you to see the problem:
    public boolean find(MusbachJ_Person person,BstNode node)
         if(node.intData.compareTo(person)==0) {
              return true;
         if( node.leftNode != null ) {
              find(person,node.leftNode );
         if( node.rightNode != null ) {
              find( person, node.rightNode);
         else {
              return false;
    }There are two prolbems. I'll spell out the first and let the other one for you to find:
    1.) you don't do anything with the return-values of the find-methods you are calling. What do you want to do with them?
    2.) What do you return if the current node is not the one that you want and you've got a right node?

  • Invoking the java compiler from programs

    HI, I'm a high school java student in the AP Java course. A project that I have been interested in for a while is making a simple IDE, but to do this I need to compile and run programs from within my program.
    What I have tried:
    The method Compiler.compileClasses("name of file i wanted to compile");
    The method System.loadLibrary(System.getProperty("java.compiler"));
    The JavaCompiler class in javax.tools. this is my source code.
    import javax.tools.*;
    public class CompileTest
         public static void main(String[] args)
              String fileToCompile ="Test.java";
              JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
              int compilationResult =     compiler.run(null, null, null, fileToCompile);
              if(compilationResult == 0)
                   System.out.println("Compilation is successful");
              else
                   System.out.println("Compilation Failed");
    After this threw NullPointerExceptions I put the line System.out.println(ToolProvider.getSystemJavaCompiler()); and the output was null.
    Any help would be appreciated.
    Also, if anyone knows how to run the subsequent class file, that would also be a big help

    To run the program, load the class file with a classloader, which will give you a Class object. You then use reflection to find the public static void main(String[] args) Method object, then use Method's invoke method to call main.
    You should deal with any exceptions from the program so that it doesn't break your IDE.
    It would probably be a good idea to run the program in its own classloader which you could trash after it finishes running so you don't leave resources hanging around.
    And finally you probably need to deal with the case where the program calls System.exit(). That could be tricky. (translation, I haven't the foggiest idea how to handle it but I'm sure its possible).
    Also there is the issue of background threads (non daemon and daemon) running after main completes. What ya gonna do?
    Runtime.exec() is looking mighty attractive right now.
    Bruce

  • How to read data from Linux named pipes using java?

    In linux box I want to get data from a named pipe(created using "mkfifo <filename>".
    How I can read the incoming data from the named pipe?

    there are some caveats though: if i remember correctly, when you reach the end of data in a fifo it will look like end-of-file and that may confuse some classes. So your mileage may vary

  • Behaviour of AXIS with Spring and Java, in response to bad webservice call

    This is a stretch, but I wonder if you can help me - I'm new to this, and working in a project that has already been configured to work with Axis.
    We have a Java project built with the Spring framework, in order to provide webservices for access via SOAP. As I understand it (ie not very well!) Axis works to accept these SOAP messages from the client and transform them into calls on our Java methods, and do the reverse with the responses - cool! Which is excellent, and it works well with the config files we have already set up.
    But I have two problems/questions, which may well be related�
    2) In trying to test what exactly happens in which case, I sent some test messages to the service, and found that I could send incorrect parameter names, and sometimes the service still gets called! Axis seems to match the data it recieves to the parameters of the method in some clever way that I don�t understand. Sometimes this works, sometimes it shows a type error. But it seems to depend what parameter I rename as to what exactly happens, so the results are (superficially, at least) unpredictable! I'm sure this behaviour is configurable in some way, but I can't seem to find out how this is done. I'd like to make it so that missing parameters are passed into the method as nulls (as is happening now), but that badly named, duplicated or extraneous parameters are refused, with a specific errormessage stating what the issue is. Similarly, I'd like to reply with an explanatory message if a parameter is passed wth an incorrect type, rather than just a message "org.xml.sax.SAXException: Bad types" that does not detail which parameter is problematic.
    1) The client can receive a "500" response, with an "Internal Server Error" message, although I'm having trouble figuring out exactly when this happens. I'd like to be able to configure what message they receive, in order to give them more information about what they got wrong.
    I just don't know where to start with this - I'm sure there must be ways of configuring all this!
    As much info about an example of what I'm looking at as seems sensible follows. Please forgive me if I've used incorrect terminology somewhere! :)
    Thanks a heap,
    Tracey
    ======================
    So, let's say I have a Java class called DiaryService, with a method called createDiary that takes the appropriate data and returns a confirmation/error message - it starts like this :
        public String createDiary(final String library,
                final BigDecimal companyCode, final Date diaryDate,  final Date actionedDate,
         final String diaryMessage) throws RemoteException And another called GetDiary that returns a Diary as a SOAP bean which looks like this :
        public DiarySoapBean getDiary(final String library,
                final BigDecimal companyCode, final Date diaryDate) throws RemoteExceptionAxis very helpfully lets me access the createDiary and getDiary, by sending XML messages like this example:
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ns1:createDiary soapenc:root="1" xmlns:ns1="http://localhost:8080/morph_zta/services/DiaryService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <library xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">ZRMORPHTA</library>
    <companyCode xsi:type="xsd:Decimal" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">1</companyCode>
    <diaryDate xsi:type="xsd:date" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">2007-01-01Z</diaryDate>
    <actionedDate xsi:type="xsd:date" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">2007-01-01Z</actionedDate>
    <diaryMessage xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"/>Blah blah blah</diaryMessage>
    </ns1:createDiary>
    </soapenv:Body>If I rename a parameter, the service may get called, with some other data in that parameter or not, or may not get called at all and the user get a "SAXException: Bad types" error message. I would like it to return a message stating that the parameter is not expected.
    If I duplicate a parameter, the first occurrence appears to be used, and the next ignored. I would like it to return a message saying tnat the extra parameter is not expected.
    If I add gibberish parameters, I get a "No such operation" message. I would like to be able to tell which parameters are incorrect.
    We have entries like this in web.xml:
        <listener>
            <listener-class>
                   org.apache.axis.transport.http.AxisHTTPSessionListener
         </listener-class>
        </listener>
        <servlet>
            <display-name>Apache-Axis Servlet</display-name>
            <servlet-name>axis</servlet-name>
            <servlet-class>
                   com.workingmouse.webservice.axis.SpringAxisServlet
         </servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>/servlet/AxisServlet</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>*.jws</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>axis</servlet-name>
            <url-pattern>/services/*</url-pattern>
        </servlet-mapping>     And these bits in our server-config.wsdd :
        <!-- Global config options -->
        <globalConfiguration>
            <parameter name="adminPassword" value="admin"/>
            <parameter name="attachments.Directory" value="./attachments"/>
            <parameter name="attachments.implementation"
                    value="org.apache.axis.attachments.AttachmentsImpl"/>
            <parameter name="sendXsiTypes" value="true"/>
            <parameter name="sendMultiRefs" value="true"/>
            <parameter name="sendXMLDeclaration" value="true"/>
            <parameter name="axis.sendMinimizedElements" value="true"/>
            <requestFlow>
                <handler type="java:org.apache.axis.handlers.JWSHandler">
                    <parameter name="scope" value="session"/>
                </handler>
                <handler type="java:org.apache.axis.handlers.JWSHandler">
                    <parameter name="scope" value="request"/>
                    <parameter name="extension" value=".jwr"/>
                </handler>
        <handler name="acegiAuthenticationHandler" type="java:{our}.AcegiAuthenticationHandler"/>
            </requestFlow>
         <responseFlow>
              <handler name="OutgoingSOAPMessageViewer" type="java:{our}.OutgoingSOAPMessageViewer"/>
         </responseFlow>
        </globalConfiguration>
        <!-- Handlers -->
        <handler name="LocalResponder"
                type="java:org.apache.axis.transport.local.LocalResponder"/>
        <handler name="URLMapper"
                type="java:org.apache.axis.handlers.http.URLMapper"/>
        <handler name="Authenticate"
                type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
        <!-- Axis services -->
        <service name="AdminService" provider="java:MSG">
            <parameter name="allowedMethods" value="AdminService"/>
            <parameter name="enableRemoteAdmin" value="true"/>
            <parameter name="className" value="org.apache.axis.utils.Admin"/>
            <namespace>http://xml.apache.org/axis/wsdd/</namespace>
        </service>
        <service name="Version" provider="java:RPC">
            <parameter name="allowedMethods" value="getVersion"/>
            <parameter name="className" value="org.apache.axis.Version"/>
        </service>
        <!-- Global config options -->
        <transport name="http">
            <requestFlow>
                <handler type="URLMapper"/>
                <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
            </requestFlow>
        </transport>
        <transport name="local">
            <responseFlow>
                <handler type="LocalResponder"/>
            </responseFlow>
        </transport>
        <service name="DiaryServices" provider="Handler" style="rpc">
            <parameter name="handlerClass" value="com.workingmouse.webservice.axis.SpringBeanRPCProvider"/>
            <parameter name="springBean" value="diaryServices"/>
            <parameter name="springBeanClass" value="uk.co.trisystems.morph.ta.diary.soap.DiaryService"/>
            <parameter name="allowedMethods" value="createDiary getDiary"/>
            <parameter name="scope" value="application"/>
            <beanMapping qname="ns:diary" xmlns:ns="urn:DiaryService" languageSpecificType="java:uk.co.trisystems.morph.ta.diary.soap.DiarySoapBean"/>
        </service>Cheers
    Tracey Annison

    Hi,
    I have solved the problem, I forgot a parameter in the select, so java tells the an error. But now I have another problem. The procedure doesn't execute the order by. I pass the couple column_name order_type in a string as ("provider_description desc") dinamically but the procedure doesn't execute the ordering. Why?
    Thanks, bye bye.

  • Java function call from Trigger in Oracle

    Moderator edit:
    This post was branched from an eleven-year-old long dead thread
    Java function call from Trigger in Oracle
    @ user 861498,
    For the future, if a forum discussion is more than (let's say) a month old, NEVER resurrect it to append your new issue. Always start a new thread. Feel free to include a link to that old discussion if you think it might be relevant.
    Also, ALWAYS use code tags as is described in the forum FAQ that is linked at the upper corner of e\very page. Your formulae will be so very much more readable.
    {end of edit, what follows is their posting}
    I am attempting to do a similar function, however everything is loaded, written, compiled and resolved correct, however, nothing is happening. No errors or anything. Would I have a permission issue or something?
    My code is the following, (the last four lines of java code is meant to do activate a particular badge which will later be dynamic)
    Trigger:
    CREATE OR REPLACE PROCEDURE java_contact_t4 (member_id_in NUMBER)
    IS LANGUAGE JAVA
    NAME 'ThrowAnError.contactTrigger(java.lang.Integer)';
    Java:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ThrowAnError" AS
    // Required class libraries.
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import com.ekahau.common.sdk.*;
    import com.ekahau.engine.sdk.*;
    // Define class.
    public class ThrowAnError {
    // Connect and verify new insert would be a duplicate.
    public static void contactTrigger(Integer memberID) throws Exception {
    String badgeId;
    // Create a Java 5 and Oracle 11g connection.
    Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    // Create a prepared statement that accepts binding a number.
    PreparedStatement ps = conn.prepareStatement("SELECT \"Note\" " +
    "FROM Users " +
    "WHERE \"User\" = ? ");
    // Bind the local variable to the statement placeholder.
    ps.setInt(1, memberID);
    // Execute query and check if there is a second value.
    ResultSet rs = ps.executeQuery();
    while (rs.next()) {
    badgeId = rs.getString("Note");
    // Clean up resources.
    rs.close();
    ps.close();
    conn.close();
    // davids badge is 105463705637
    EConnection mEngineConnection = new econnection("10.25.10.5",8550);
    mEngineConnection.setUserCredentials("choff", "badge00");
    mEngineConnection.call("/epe/cfg/tagcommandadd?tagid=105463705637&cmd=mmt%203");
    mEngineConnection.call("/epe/msg/tagsendmsg?tagid=105463705637&messagetype=instant&message=Hello%20World%20from%20Axium-Oracle");
    Edited by: rukbat on May 31, 2011 1:12 PM

    To followup on the posting:
    Okay, being a oracle noob, I didn't know I needed to tell anything to get the java error messages out to the console
    Having figured that out on my own, I minified my code to just run the one line of code:
    // Required class libraries.
      import java.sql.*;
      import oracle.jdbc.driver.*;
      import com.ekahau.common.sdk.*;
      import com.ekahau.engine.sdk.*;
      // Define class.
      public class ThrowAnError {
         public static void testEkahau(Integer memberID) throws Exception {
         try {
              EConnection mEngineConnection = new EConnection("10.25.10.5",8550);
         } catch (Throwable e) {
              System.out.println("got an error");
              e.printStackTrace();
    }So, after the following:
    SQL> {as sysdba on another command prompt} exec dbms_java.grant_permission('AXIUM',"SYS:java.util.PropertyPermission','javax.security.auth.usersubjectCredsOnly','write');
    and the following as the user
    SQL> set serveroutput on
    SQL> exec dbms_java.set_output(10000);
    I run the procedure and receive the following message.
    SQL> call java_contact_t4(801);
    got an error
    java.lang.NoClassDefFoundError
         at ThrowAnError.testEkahau(ThrowAnError:13)
    Call completed.
    NoClassDefFoundError tells me that it can't find the jar file to run my call to EConnection.
    Now, I've notice when I loaded the sdk jar file, it skipped some classes it contained:
    c:\Users\me\Documents>loadjava -r -f -v -r "axium/-----@axaxiumtrain" ekahau-engine-sdk.jar
    arguments: '-u' 'axium/***@axaxiumtrain' '-r' '-f' '-v' 'ekahau-engine-sdk.jar'
    creating : resource META-INF/MANIFEST.MF
    loading : resource META-INF/MANIFEST.MF
    creating : class com/ekahau/common/sdk/EConnection
    loading : class com/ekahau/common/sdk/EConnection
    creating : class com/ekahau/common/sdk/EErrorCodes
    loading : class com/ekahau/common/sdk/EErrorCodes
    skipping : resource META-INF/MANIFEST.MF
    resolving: class com/ekahau/common/sdk/EConnection
    skipping : class com/ekahau/common/sdk/EErrorCodes
    skipping : class com/ekahau/common/sdk/EException
    skipping : class com/ekahau/common/sdk/EMsg$EMSGIterator
    skipping : class com/ekahau/common/sdk/EMsg
    skipping : class com/ekahau/common/sdk/EMsgEncoder
    skipping : class com/ekahau/common/sdk/EMsgKeyValueParser
    skipping : class com/ekahau/common/sdk/EMsgProperty
    resolving: class com/ekahau/engine/sdk/impl/LocationImpl
    skipping : class com/ekahau/engine/sdk/status/IStatusListener
    skipping : class com/ekahau/engine/sdk/status/StatusChangeEntry
    Classes Loaded: 114
    Resources Loaded: 1
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 0
    Errors: 0
    .... with no explanation.
    Can anyone tell me why it would skip resolving a class? Especially after I use the -r flag to have loadjava resolve it upon loading.
    How do i get it to resolve the entire jar file?
    Edited by: themadprogrammer on Aug 5, 2011 7:15 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:21 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:22 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:23 AM
    Edited by: themadprogrammer on Aug 5, 2011 7:26 AM

  • Compiling problem related to library conflict

    Hi everybody,
    As I used JDeveloper 10.1.3.0.3 to compile my program, I encounted a compiling problem.
    In my user library, I have a class named Number.
    In J2SE 1.5, there is also a class named Number at java.lang.Number.
    So as I compiled the program, the compiler always tried to find the java.lang.Number first, then I got the compiling errors related to the class java.lang.Number.
    I have added the jar file of my own package in the classpath, but I still got the compiling error.
    But If I directly use JDK instead of JDeveloper to compiler the program, there is no such kind of problem.
    Can somebody help me with that.
    I really apprecaite your help.
    William

    Looks like I've been dumbed down by Java simpliciy. I'm referencing some source code that calls a function from this particular library. When I am compiling my code that makes the same call, I assume I need that library to be called out for the linker (link.exe). Do I also need any other libraries that this library calls and so on? How do I determine that the extent of what I need. The source code I'm referncing does include a make file. This was to create and exe file. Is it possible that I can edit this and have it make a dll instead?

  • Removing compiler problem markers

    Does anybody know why I keep getting a pop up window that is
    telling me it can't find a marker id at some location number? I am
    getting one of these messages about every other time I save and
    compile and it is getting RATHER ANNOYING!!! What does it mean and
    how do I eliminate it???
    Thanks in advance for helping me lower my blood pressure!!!
    Have an Ordinary Day...
    KomputerMan ~|:-)

    Yes, I am now getting the same error - but slightly different
    wording
    Removing compile problem markers (Time of error: blah blah
    blah...)
    The details section states:
    An internal error occurred during "Removing compiler problem
    markers".
    java.lang.NullPointerException
    I'm able to compile the same code with no problem from the
    command line on a Linux box. Running the clean comand doesn't fix
    this unfortunately.
    Some background info: I'm running a FDS project against a
    JBoss server on a windows XP machine.
    So, I deleted my project and shut down flex builder. Then
    removed the project files (.actionScriptProperties, .project, &
    .flexProperties) and removed the project folder from the flex.war
    folder in the jboss server. Restarted Flex Builder and created a
    new project the same way the project was built. And wa-la the
    problem is gone.
    So, something has gone bad with the project, but I am not
    sure what because a look a the previous project files and they all
    seem normal. I was having problems with the project trying to
    create the "Output Directory" early, but a rebuild of the project
    seemed to fix that too.
    hope this helps.
    --Andy

Maybe you are looking for

  • Standard user cannot install apps

    I have setup a Mac Mini in my office for several people to use, with me as Admin and others as Standard account.  The problem is, when someone wants to install an app, they always get a prompt to input the Admin's username and password.   From my res

  • Is it possible to import the failure cases from another test plan in MTM ?

    Hi, Is it possible to import the failure cases from another test plan? For example, I have created a new test plan with ID 1002. Now I want to import the failure cases from test plan with ID 1001.  Is there anyway to do this? Thanks, Leslu

  • Default country dial-in numbers

    We have about 50 users of Webex video conferencing and some are overseas (UK). Even though we have set, and they have set, their LOCALE to be UK, the default numbers that go out in the invite are US numbers. Since this is totally silly (as all UK inv

  • Number of tables in from clause

    Hi, Can anyone tell me how many number of tables can we have in from clause in oracle.

  • Help needed.. Changed HD, 'broken' DVD reader, working recovery disks.. how to?

    Hello all, hope someone can help me here. I have a Toshiba Satellite p300-19f, win vista 32 in dotation.  Long story short, the computer has served me well for roughly 3 years now. All at a sudden, on startup when on windows charging page (with win l