Inetgrating MDM Java API's with Java proxies on XI side

Hello friends
Can anyone help me on integrating MDM JAVA API's used for talking to MDM Server and the Javaproxies we generate from the XI side.I am having an application class inside the Java API's (it contains the main function)which triggers the functionality on the MDM side.But how to trigger it from the Java proxies side??I can get the different fields that I have to send  in the impl.java program of my generated proxy,but how to trigger the MDM Java API's from inside this.Also there is one problem I needed to pass the datatype fields from the Javaproxy(XI)side to the CRUDMAINTABLERecord program..Since importing the javaproxy package is giving me an error(I don't know why)I don't know how to pass these datatypes to the CRUD program.Please help me out on this urgently.Thank you all in advance.

Hi Deepthi,
I had used the below code for retrieving the workflow's id's
  RetrieveWorkflowsCommand RetriveworksFlows = new RetrieveWorkflowsCommand(connections);
RetriveworksFlows.setSession(session);
try{
    RetriveworksFlows.execute();
catch(Exception e)
WorkflowProperties[] workflowpro = RetriveworksFlows.getWorkflows();
WorkflowId[] workflowid = new WorkflowId[workflowpro.length];
for(int n=0;n<workflowpro.length;n++)
workflowid[n] = workflowpro[n].getId();
String workfloName = workflowpro[n].getLaunchType()+"";
System.out.println("id--"workflowid"name"+workfloName);
and for creating the workflow job id i had written the below code
CreateWorkflowJobCommand workflowjobcommand = new CreateWorkflowJobCommand(connections);
workflowjobcommand.setWorkflowId(workflowid[0]);
workflowjobcommand.setRecordIds(recordId);
workflowjobcommand.setSession(session);
try{
    workflowjobcommand.execute();
catch(Exception e)
then to start the workflow what  i  have to do .
please expain me

Similar Messages

  • Call a Java API inside a java mapping

    Hi,
    I have a web service in SAP PI 7.0 that recives a PDF coded in base64. I need to call an external Java API provided by a partner for extract its digital signature and return it as Web Service Response. It's possible to do the call to a Java API inside a Java mapping for doing this? What is necessari for doing this call?
    I think that I Need to install the Java libraries in SAP J2EE stack and import its inside the java mapping. Need I something else?
    can you show me any exemple?
    thanks.

    Hi,
    Put your jar files on your servers java path. Doing so you can have direct access into an udf for your libraries.
    Another option (for testing purposes is a good idea) is to attach to the scenario your jar file. Go to mapping objects, imported archives, and import your jar file there. By this way it will be visible only on the context of the software component and namespace where you put the file.
    Regards.
    roberti

  • How to use SessionManager (MDM 5.5 SP06 JAVA API 2) with TrustedConnection

    Hello MDM 5.5 SP06 JAVA API Experts,
    Is it possible to Use the SessionManager in conjunction with TrustedConnections ? The trusted connection is setup properly (adding the client IP to the allow.ip file on MDM-Server).
    I tried a lot but I didn't succeed with the new JAVA API 2 SessionManager functionality.
    I'm initializing a UserSessionContext object and set the field for trusted connections to true.
    Later I request an instance of SessionManager and call the createSession() method.
    Although I've set the trustedConnection (=true) field of UserSessionContext, I get an exception, if the password is not set correctly. Due to my understanding, the password should be ignored if the UserSessionContext --> trustedConnection field is set to true. Is this a bug or am I missing any important step ?
    I have also used several constructors of UserSessionContext but no chance.
    Could anyone use the SessionManager with trusted Connections ?
    Any help would be greatly appriciated.
    Best regards.
          public static void main(String[] args)
            Settings settings = new Settings();
            RepositoryIdentifier repId = new RepositoryIdentifier(settings.repository,
                                                                  settings.dbServer,
                                                                  settings.dbmsType);
            //Create a UserSessionContext
            //UserSessionContext sessionContext = new UserSessionContext("<servername>", "<repositoryName>", "<userName>");
            UserSessionContext sessionContext = new UserSessionContext( "<servername>", repId, "English [US]", "<userName>");
            sessionContext.setConnectionType(ConnectionTypes.LOCAL_POOL_CONNECTION);
            sessionContext.setRegionLocale(Locale.US);
            sessionContext.setTrustedConnection(true);
            //Get an instance of SessionManager
            SessionManager sessionManager = SessionManager.getInstance();
            //Create user session
            String userSession =
            sessionManager.createSession(sessionContext, SessionTypes.USER_SESSION_TYPE, "<any pwd !!!>");
            System.out.println("Created user SessionID: " + userSession);

    Hello Jitesh Talreja,
    thanks for your reply and hint. The trusted connection configuration on MDM server is already setup correctly.
    My concrete problem is to establish a trusted connection using the SessionManager.
    If I use the TrustedUserSessionCommand, everything works.
            CreateUserSessionCommand createUserSessionCommand = new CreateUserSessionCommand(connection);
            createUserSessionCommand.setRepositoryIdentifier(repId);
            createUserSessionCommand.setDataRegion(dataRegion);
            createUserSessionCommand.execute();
            session = createUserSessionCommand.getUserSession();
            state = STATE_SESSION_ESTABLISHED;
            try
                TrustedUserSessionCommand tuscTrustedUser = new TrustedUserSessionCommand(connection);
                tuscTrustedUser.setUserName(userName);
                tuscTrustedUser.setSession(createUserSessionCommand.getUserSession());
                tuscTrustedUser.execute();
                session = tuscTrustedUser.getSession();
             catch (com.sap.mdm.commands.CommandException e)
                /* In Case the Connection is not Trusted */
                System.out.println("Could not established trusted connection!!!");
                e.printStackTrace();
    But I want to make use of the SessionManager advantages see [MDM Java API Guide|http://help.sap.com/saphelp_mdm550/helpdata/en/47/9f23e5cf9e3c5ce10000000a421937/frameset.htm] -> API Structure and Basic Concepts

  • Unable to execute java api method with another user than OWF_MGR...

    Sorry if this question seems stupid but I just begin with oracle products... ;-)
    When i specify another user than the owf_mgr, as KWalker for instance, I get permission problems when I use Java API.
    But when I do the same via the web it is OK.
    Dis I miss a step in the installation?
    Thanks
    Roland

    You need to give the execute grant on wf_engine object of owf_mgr to Kwalker.

  • Java application communicate with java card applet without java card

    Can I write java application to communicate with java card applet without using java card?
    Can I send APDU to java card applet on computer(not install in java card)? If it's not, how can I write?
    Best Regard,
    Thanawan

    Your JCOP simulator implements a JCVM/JCRE according
    to specs. The CREF does that same thing excepts it's
    only simulates the API without crypto or third party
    applets. JCOP simulator is more then that. They are using thesame_ codebase for simulator and for oncard JCVM. Basically you are dealing with the same environment in both cases.

  • Is it possible to create java standalone programs with java ME 8

    Hi,
    Comparing java ME to java SE, I have the impression that midlets are similar to applets.
    When working with java SE, I usually make standalone programs.
    Now, I wonder if it is also possible to create also standalone programs for java ME, if the classes are only  using java ME API's.
    I already noticed that netbeans does not allow to build a project that does not contain a midlet, but maybe, it is possible to create a jar file
    using the javac and jar commands. Or is there a specific reason why netbeans does not allow to build a project without midlets?
    The reason for asking is, that I often make small tools in java that ae then called from a linux script. I imagine that this might be useful on the raspberry pi as well.
    Thanks in advance
    Jef

    Hi Jef -
    Comparing java ME to java SE, I have the impression that midlets are similar to applets.
    Sort of - similar life cycle methods - so conceptually, yes.
    Now, I wonder if it is also possible to create also standalone programs for java ME, if the classes are only  using java ME API's.
    In a way, yes. If you build an project, you will notice a JAD file and JAR file in the dist directory of the project.  JAD is the descriptor for a MIDlet - in mobile devices, the JAD
    file is loaded first to determine if the MIDlet has enough privileges to load and run, before the corresponding JAR file is downloaded.
    However, the JAD file can also be included in the Manifest of the JAR and the JAR copied to the embedded device manually and run there.
    I already noticed that netbeans does not allow to build a project that does not contain a midlet, but maybe, it is possible to create a jar file
    using the javac and jar commands. Or is there a specific reason why netbeans does not allow to build a project without midlets?
    You can build JAR files and include them into Java ME Embedded projects, but just like Applets, to use the Application Management System (AMS) on the Raspberry Pi, you must have a MIDlet to run.
    Perhaps you mean that you would like to launch the AMS and load a MIDlet from the command line on the Pi?
    If so, take a look at this section of the Getting Started Guide for the Raspberry Pi.
    Tom

  • Java Step Types with Java Virtual Machine higher than java-6u16?

    Documentation of Java steps says, that these steps are tested with java version 6 update 16. I am talking about the java step types that can be found in directory <TestStand Public>\TestStand 2010\Examples\Java. 
    If I install another java version, e. g. java 7, step "Start JVM" will exit with an error "-4" and error message "Could not launch JVM.". While Debugging source code of JavaCall.dll, I figured the failing code line out:
    "fpCreateJVM(&jvm,(void**)&env,&vm_args);" is the execution of function "JNI_CreateJavaVM" and returns error code -4.
    Till now I could not find out, why the jvm does not start. I guess -4 means "Insufficient memory to create the JVM." (http://zone.ni.com/reference/en-XX/help/370052J-01/tssuppref/infotopics/java_steps_errors/)
    Has anyone an advice for me?

    This post gave me a hint: http://stackoverflow.com/questions/3400292/jni-enomem-from-jni-createjavavm-when-calling-dll-that-us...
    Though my development computer has enough ram, jvm is started within the Teststand process which offers limited memory. I changed JavaCall.c and added parameter "-Xmx64m" to the jvm creation call. Now it works with jre 7.
    Because memory space Teststand offers to the jvm is different on different computers, an implementation would be nice that checks how much memory is available and then passes the calculated <MEM> as parameter "-Xmx<MEM>m". Here is an example implementation: https://forums.oracle.com/forums/thread.jspa?threadID=1546540

  • Using Java SE 6 with Java FX 2.2 on Mac OS X

    Hello,
    Has anyone tried using Java SE 6 with JavaFX 2.2 on Mac OS X?
    JavaFX 2.2 System Requirements doc states that "For Mac OS X, use Java SE 7 Update 6 for Mac OS X. JavaFX 2.2 has not been formally tested with Apple's Java SE 6 implementation for Mac OS and support is offered only when used with Java SE 7 Update 6 or later.".
    So I guess that means Java SE 6 may or may not work well with JavaFX 2.2 on Mac.
    For some 'bugs' in my app, they simply don't exist if I switch from Java 7 to Java 6?
    One such bug is mentioned in this thread: Re: Unable to play mp3 files with non-English alphabets/characters in the name
    Can people with experiences in this area please share your thoughts?
    Has Oracle done additional Java SE 6 and JavaFX 2.2 compatibility testings since the JavaFX 2.2 System Requirements doc was published (http://docs.oracle.com/javafx/2/system_requirements_2-2/jfxpub-system_requirements_2-2.htm)?
    Thanks.

    Java 6 on Mac is not supported officially and not going to be supported.
    Standalone JavaFX app might work as JDK 6 on Mac was used as dev platform before JDK 7 on Mac became available.
    But this was mostly on older Mac OS X version (up to 10.6) and you may easily hit something that was fixed in Java 7 to support JavaFX better.
    Webstart/Plugin will not work. You need JRE 7 from Oracle.

  • Will BPM Tasks JAVA API work with Weblogic+ Jdeveloper 11.1.1.6.0 ?

    Hi,
    I am working with the JAVA tasks API for working with BPM Human workflows that deals with programmatical interaction with BPM from ADF applications. The same is working fine in ver 11.1.1.4.0.
    My Question is that whether the same will be supported in the upcoming versions (may be 11.1.1.6.0) or do I need to change the approach by programmatically calling webservices provided as an out-of-box feature with my BPM.
    Much Appreicated !
    Regards.

    Hi,
    I am working with the JAVA tasks API for working with BPM Human workflows that deals with programmatical interaction with BPM from ADF applications. The same is working fine in ver 11.1.1.4.0.
    My Question is that whether the same will be supported in the upcoming versions (may be 11.1.1.6.0) or do I need to change the approach by programmatically calling webservices provided as an out-of-box feature with my BPM.
    Much Appreicated !
    Regards.

  • GSS API failing with java 1.6 but working with java 1.5 in jboss 3.2.6

    18:05:08,210 INFO [STDOUT] GSSException: No valid credentials provided (Mechanism level: Attempt to obtain new ACCEPT credentials failed!)
    18:05:08,210 INFO [STDOUT]      at sun.security.jgss.krb5.Krb5AcceptCredential.getInstance(Krb5AcceptCredential.java:87)
    18:05:08,210 INFO [STDOUT]      at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:111)
    18:05:08,213 INFO [STDOUT]      at sun.security.jgss.GSSManagerImpl.getCredentialElement(GSSManagerImpl.java:178)
    18:05:08,214 INFO [STDOUT]      at sun.security.jgss.GSSCredentialImpl.add(GSSCredentialImpl.java:384)
    18:05:08,214 INFO [STDOUT]      at sun.security.jgss.GSSCredentialImpl.<init>(GSSCredentialImpl.java:42)
    18:05:08,214 INFO [STDOUT]      at sun.security.jgss.GSSManagerImpl.createCredential(GSSManagerImpl.java:139)
    18:05:08,214 INFO [STDOUT]      at com.apple.ist.ds.server.impl.snkp.SSOTokenVerifier.credentialForService(SSOTokenVerifier.java:324)
    18:05:08,214 INFO [STDOUT]      at com.apple.ist.ds.server.impl.snkp.SSOTokenVerifier.initialize(SSOTokenVerifier.java:97)
    18:05:08,214 INFO [STDOUT]      at com.apple.ist.saci.iphonevpn.servlet.SACIIPhoneStartUpServlet.init(SACIIPhoneStartUpServlet.java:26)
    18:05:08,214 INFO [STDOUT]      at javax.servlet.GenericServlet.init(GenericServlet.java:256)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
    18:05:08,214 INFO [STDOUT]      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
    18:05:08,214 INFO [STDOUT]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    18:05:08,214 INFO [STDOUT]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    18:05:08,214 INFO [STDOUT]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    18:05:08,215 INFO [STDOUT]      at java.lang.reflect.Method.invoke(Method.java:597)
    18:05:08,215 INFO [STDOUT]      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    18:05:08,215 INFO [STDOUT]      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:149)
    18:05:08,215 INFO [STDOUT]      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    18:05:08,215 INFO [STDOUT]      at org.apache.catalina.core.StandardContext.init(StandardContext.java:5441)
    18:05:08,215 INFO [STDOUT]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    18:05:08,215 INFO [STDOUT]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    18:05:08,215 INFO [STDOUT]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    18:05:08,215 INFO [STDOUT]      at java.lang.reflect.Method.invoke(Method.java:597)
    18:05:08,215 INFO [STDOUT]      at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
    18:05:08,215 INFO [STDOUT]      at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:149)
    18:05:08,215 INFO [STDOUT]      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    18:05:08,215 INFO [STDOUT]      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:316)
    18:05:08,215 INFO [STDOUT]      at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:76)
    18:05:08,215 INFO [STDOUT]      at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:320)
    18:05:08,215 INFO [STDOUT]      at org.jboss.web.WebModule.startModule(WebModule.java:62)
    18:05:08,215 INFO [STDOUT]      at org.jboss.web.WebModule.startService(WebModule.java:40)
    18:05:08,215 INFO [STDOUT]      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
    18:05:08,215 INFO [STDOUT]      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
    18:05:08,215 INFO [STDOUT]      at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    18:05:08,215 INFO [STDOUT]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    18:05:08,215 INFO [STDOUT]      at java.lang.reflect.Method.invoke(Method.java:597)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:197)
    18:05:08,216 INFO [STDOUT]      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    18:05:08,216 INFO [STDOUT]      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:884)
    18:05:08,216 INFO [STDOUT]      at $Proxy20.start(Unknown Source)
    18:05:08,221 INFO [STDOUT] Caused by: javax.security.auth.login.LoginException: java.lang.NullPointerException
         at com.sun.security.auth.callback.TextCallbackHandler.handle(TextCallbackHandler.java:102)
         at org.jboss.security.auth.spi.UsernamePasswordLoginModule.getUsernameAndPassword(UsernamePasswordLoginModule.java:216)
         at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:131)
         at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:124)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
         at javax.security.auth.login.LoginContext$5.run(LoginContext.java:706)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeCreatorPriv(LoginContext.java:703)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:575)
         at sun.security.jgss.GSSUtil.login(GSSUtil.java:246)

    18:05:08,221 INFO [STDOUT] Caused by: javax.security.auth.login.LoginException: java.lang.NullPointerException
    at com.sun.security.auth.callback.TextCallbackHandler.handle(TextCallbackHandler.java:102)It seems you are providing username using a TextCallbackHandler (which is default for GSS-API). This is OK if you are writing a console program and the user can input the name in a command line prompt. If you are writing a server side program, there is no console, you need to write your own CallbackHandler to provide username.

  • Java API, problem with secondary keys using multi key creator

    Hi,
    I'm developing an application that inserts a few 100k or so records into a Queue DB, then access them using one of four Hash SecondaryDatabases. Three of these secondary dbs use a SecondaryMultiKeyCreator to generate the keys, and one uses a SecondaryKeyCreator. As a test, I'm trying to iterate through each secondary key. When trying to iterate through the keys of any of the secondary databases that use a SecondaryMultiKeyCreator, I have problems. I'm attempting to iterate through the keys by:
    1: creating a StoredMap of the SecondaryDatabase
    2: getting a StoredKeySet from said map
    3: getting a StoredIterator on said StoredKeySet
    4: iterate
    The first call to StoredIterator.next() fails at my key binding (TupleBinding) because it is only receiving 2 bytes of data for the key, when it should be getting more, so an Exception is thrown. I suspected a problem with my SecondaryMultiKeyCreator, so I added some debug code to check the size of the DatabaseEntries it creates immediately before adding them to the results key Set. It checks out right. I also checked my key binding like so:
    1: use binding to convert the key object to a DatabaseEntry
    2: use binding to convert the created DatabaseEntry back to a key object
    3: check to see if the old object contains the same data as the new one
    Everything checked out ok.
    What it boils down to is this: my key creator is adding DatabaseEntries of the correct size to the results set, but when the keys are being read back later on, my key binding is only receiving 2 bytes of data. For the one SecondaryDatabase that doesn't use a SecondaryMultiKeyCreator, but just a SecondaryKeyCreator, there are no issues and I am able to iterate through its secondary keys as expected.
    EDIT: New discovery: if I only add ONE DatabaseEntry to the results set in my SecondaryMultiKeyCreator, I am able to iterate through the keys as I would like to.
    Any ideas or suggestions?
    Thank you for your attention,
    -Justin
    Message was edited by:
    Steamroller

    Hi Justin,
    Sorry about the delayed response here. I have created a patch that resolves the problem.
    If you apply the patch to your 4.6.21 source tree, and then rebuild Berkeley DB, the improper behavior should be resolved.
    Regards,
    Alex
    diff -rc db/db_am.c db/db_am.c
    *** db/db_am.c     Thu Jun 14 04:21:30 2007
    --- db/db_am.c     Fri Jun 13 11:20:28 2008
    *** 331,338 ****
           F_SET(dbc, DBC_TRANSIENT);
    !      switch (flags) {
    !      case DB_APPEND:
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    --- 331,337 ----
           F_SET(dbc, DBC_TRANSIENT);
    !       if (flags == DB_APPEND && LIST_FIRST(&dbp->s_secondaries) == NULL) {
                 * If there is an append callback, the value stored in
                 * data->data may be replaced and then freed.  To avoid
    *** 367,388 ****
    -            * Secondary indices:  since we've returned zero from an append
    -            * function, we've just put a record, and done so outside
    -            * __dbc_put.  We know we're not a secondary-- the interface
    -            * prevents puts on them--but we may be a primary.  If so,
    -            * update our secondary indices appropriately.
    -            * If the application is managing this key's data, we need a
    -            * copy of it here.  It will be freed in __db_put_pp.
    -           DB_ASSERT(dbenv, !F_ISSET(dbp, DB_AM_SECONDARY));
    -           if (LIST_FIRST(&dbp->s_secondaries) != NULL &&
    -               (ret = __dbt_usercopy(dbenv, key)) == 0)
    -                ret = __db_append_primary(dbc, key, &tdata);
                 * The append callback, if one exists, may have allocated
                 * a new tdata.data buffer.  If so, free it.
    --- 366,371 ----
    *** 390,401 ****
                /* No need for a cursor put;  we're done. */
                goto done;
    !      default:
    !           /* Fall through to normal cursor put. */
    !           break;
    !      if (ret == 0)
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    --- 373,379 ----
                /* No need for a cursor put;  we're done. */
                goto done;
    !      } else
                ret = __dbc_put(dbc,
                    key, data, flags == 0 ? DB_KEYLAST : flags);
    diff -rc db/db_cam.c db/db_cam.c
    *** db/db_cam.c     Tue Jun  5 21:46:24 2007
    --- db/db_cam.c     Thu Jun 12 16:41:29 2008
    *** 899,905 ****
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    --- 899,905 ----
           DB_ENV *dbenv;
           DB dbp, sdbp;
           DBC dbc_n, oldopd, opd, sdbc, *pdbc;
    !      DBT olddata, oldpkey, newdata, pkey, temppkey, tempskey, tdata;
           DBT all_skeys, skeyp, *tskeyp;
           db_pgno_t pgno;
           int cmp, have_oldrec, ispartial, nodel, re_pad, ret, s_count, t_ret;
    *** 1019,1026 ****
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !      DB_ASSERT(dbenv, flags == DB_CURRENT || flags == DB_KEYFIRST ||
    !            flags == DB_KEYLAST || flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    --- 1019,1027 ----
            * should have been caught by the checking routine, but
            * add a sprinkling of paranoia.
    !       DB_ASSERT(dbenv, flags == DB_APPEND || flags == DB_CURRENT ||
    !             flags == DB_KEYFIRST || flags == DB_KEYLAST ||
    !             flags == DB_NOOVERWRITE);
            * We'll want to use DB_RMW in a few places, but it's only legal
    *** 1048,1053 ****
    --- 1049,1107 ----
                     goto err;
                have_oldrec = 1; /* We've looked for the old record. */
    +      } else if (flags == DB_APPEND) {
    +           /*
    +            * With DB_APPEND, we need to do the insert to populate the
    +            * key value. So we swap the 'normal' order of updating
    +            * secondary / verifying foreign databases and inserting.
    +            *
    +            * If there is an append callback, the value stored in
    +            * data->data may be replaced and then freed.  To avoid
    +            * passing a freed pointer back to the user, just operate
    +            * on a copy of the data DBT.
    +            */
    +           tdata = *data;
    +           /*
    +            * If this cursor is going to be closed immediately, we don't
    +            * need to take precautions to clean it up on error.
    +            */
    +           if (F_ISSET(dbc_arg, DBC_TRANSIENT))
    +                dbc_n = dbc_arg;
    +           else if ((ret = __dbc_idup(dbc_arg, &dbc_n, 0)) != 0)
    +                goto err;
    +
    +           pgno = PGNO_INVALID;
    +
    +           /*
    +            * Append isn't a normal put operation;  call the appropriate
    +            * access method's append function.
    +            */
    +           switch (dbp->type) {
    +           case DB_QUEUE:
    +                if ((ret = __qam_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           case DB_RECNO:
    +                if ((ret = __ram_append(dbc_n, key, &tdata)) != 0)
    +                     goto err;
    +                break;
    +           default:
    +                /* The interface should prevent this. */
    +                DB_ASSERT(dbenv,
    +                    dbp->type == DB_QUEUE || dbp->type == DB_RECNO);
    +
    +                ret = __db_ferr(dbenv, "DBC->put", 0);
    +                goto err;
    +           }
    +           /*
    +            * The append callback, if one exists, may have allocated
    +            * a new tdata.data buffer.  If so, free it.
    +            */
    +           FREE_IF_NEEDED(dbenv, &tdata);
    +           pkey.data = key->data;
    +           pkey.size = key->size;
    +           /* An append cannot be replacing an existing item. */
    +           nodel = 1;
           } else {
                /* Set pkey so we can use &pkey everywhere instead of key.  */
                pkey.data = key->data;
    *** 1400,1405 ****
    --- 1454,1465 ----
      skip_s_update:
    +       * If this is an append operation, the insert was done prior to the
    +       * secondary updates, so we are finished.
    +       */
    +      if (flags == DB_APPEND)
    +           goto done;
    +      /*
            * If we have an off-page duplicates cursor, and the operation applies
            * to it, perform the operation.  Duplicate the cursor and call the
            * underlying function.

  • Using Java 6 classes with Java 5

    I ran into a little problem with the portability of Java (ironic eh?) across computers. The program I wrote on my home computer uses GroupLayout for the GUI. However, much to my surprise, the computers at my school only had Java 5 installed so the program could not run (GroupLayout is a class found only in Java 6). Is there any way to somehow package the GroupLayout class into my program?

    C_Zhao wrote:
    I ran into a little problem with the portability of Java (ironic eh?) across computers.Not as ironic as you might think.
    The program I wrote on my home computer uses GroupLayout for the GUI. However, much to my surprise, the computers at my school only had Java 5 installed so the program could not run (GroupLayout is a class found only in Java 6). Is there any way to somehow package the GroupLayout class into my program?Technically, yes, but I'd imagine that rewriting your code to use a different layout manager (such as one of those available in J2SE 5) would be quicker / easier. In fact, I'm almost willing to guarantee that refactoring would be easier than repackaging.

  • Need to keep Java 5 updates with Java 6?

    I have Java 6 with 3 updates. Is it necessary to keep the 5 updates I have on my computer from Java 5? They take up quite a bit of space.

    Only if you want to use one. Some Java programs require that the program is run on a certain version.

  • Java and Reflection with java 1.5.06b

    My java programs no longer run after i upgraded to Java 1.5.06b.
    They rely heavily on java reflection, since the classes are loaded and instanced dynamically at runtime.
    I have set my classpath in my .tcshrc and it works on my linux/solaris boxes, but my intel mac book pro can't seem to do reflection. It can't find any of the classes dynamically.
    Is the Apple Java not completly compliant?, did the java 1.5.06 security fix screw up reflection ?
    MacBook Pro   Mac OS X (10.4.6)  

    Sorry it ran fine on my older 12 inch powerbook.
    The one i used before i switched over to the intel macbook pro

  • MDM ABAP API: Query with Multiple Parameters

    I would like to query MDM repository passing multiple parameters. I used the following code, however, it didn't work.
    If I pass only one parameter, it works fine.
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    * Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    * Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

    Hi,
    I see you are not clearing your local structure "ls_query".  This could be reason of problem,  try this and let us know the result:
    DATA lt_query                  TYPE mdm_query_table.
    DATA ls_query                 TYPE mdm_query.
    DATA lv_search_text       TYPE string.
    DATA lt_result_set            TYPE mdm_search_result_table.
    DATA ls_result_set           LIKE LINE OF lt_result_set.
    Fill query structure with FIRST parameter
        ls_query-parameter_code  = 'Name'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = 'BMW'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Fill query structure with SECOND parameter
        ls_query-parameter_code  = 'Model'.
        ls_query-operator        = 'CS'. 
        ls_query-dimension_type  = mdmif_search_dim_field.    
        ls_query-constraint_type = mdmif_search_constr_text.
        lv_search_text = '2009'.
        GET REFERENCE OF lv_search_text INTO ls_query-value_low.
        APPEND ls_query TO lt_query.
    CLEAR ls_query.
    Query on records (search for value 'BMW' model '2009' in table Products)
        CALL METHOD lr_api->mo_core_service->query
          EXPORTING
            iv_object_type_code = 'Products'                  
            it_query            = lt_query
          IMPORTING
            et_result_set       = lt_result_set.

Maybe you are looking for