Attachments help - C# using Obect API

I'm in my first attempt at integrating GW functionality into a C# application. I am not an expert C# programmer either. Thus far I've been successful at getting logged into GW, creating a new mail message and sending it successfully. However adding code to attach a file to my message returns an exception from the GroupwareTypeLibrary with the unhelpful error message "Unknown Error". Below is my code. If I comment out the line:
objMessage.Attachments.Add("c:\reg.log",1,"reg.log ");
the program runs successfully, happily sending my mail to the recipent mailbox. I know the c:\reg.log file exists and I have permissions to it.
Any advice as to what I'm doing wrong would be of tremendous help, as I've already search and cruised all the forums on GW API I can find to no avail. Running GW 7.03 I think on client and server side.
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using GroupwareTypeLibrary;
namespace GWEmailTest
class Program
public static void Main()
GroupwareTypeLibrary.Application objApplication = new GroupwareTypeLibrary.Application();
GroupwareTypeLibrary.Account objAccount;
GroupwareTypeLibrary.Messages objMessages;
GroupwareTypeLibrary.Message objMessage;
GroupwareTypeLibrary.Folder objMailBox;
GroupwareTypeLibrary.Recipients objRecipients;
GroupwareTypeLibrary.Recipient objRecipient;
objAccount = objApplication.Login("dpuls", "", "password", "", "");
objMailBox = objAccount.MailBox;
objMessages = objMailBox.Messages;
objMessage = objMessages.Add("GroupwareTypeLibrary.Message",4," ");
objRecipients = objMessage.Recipients;
objRecipient = objRecipients.Add("dpuls","","");
objMessage.Subject.PlainText = "Here's the message from C#!.";
objMessage.BodyText.PlainText = "Here's the report you wanted.";
objMessage.Attachments.Add("c:\reg.log",1,"reg.log ");
objMessage.Send();

Markus,
Thanks so much for your quick reply. I appreciate your willingness to help me overcome my ignorance. Here's what I found:
objMessage = objMessages.Add("GW.MESSAGE.MAIL", 4);
results in a C# compiler error "no overload method for 'add' requires '2' arguments". This tells me the third paramater is required for the GroupwareTypeLibary COM object, so I added the third null parameter back in, eliminating the compiler error. Then I still got the same "unknown error" exception back from the COM library as before.
So I went back to my shotgun approach of trying variations on parameter passing (instance variables instead of literals, etc). I noticed at one point when I tried another test file that I got a compiler error on a string literal of the path\filename "c:\csharptest.txt". Aha, says I ......
To make a long story short, by happenstance, my "c:\reg.log" parameter gets read in C# as containing an escape sequence reference, i.e. "\r" and when I changed to another test file it read "c:\csharptest.txt" as an INVALID escape sequence "\c". The fix then was to correct the problem of the reading of escape sequences in my string literal by changing my line of code to :
objMessage.Attachments.Add(@"c:\reg.log","1","");
Problem solved! Thanks again for your help.
dennis puls
Originally Posted by Markus Colorado
I suppose the way you're adding a draft message to the collection is false.
>> objMessages = objMailBox.Messages;
>> objMessage = objMessages.Add("GroupwareTypeLibrary.Message",4," ");
The function "Add()" takes only 2 parameters, 'ClassName' + 'ObjType'.
'ClassName' stands for the sort/subtype of message you'd like to create.
'ObjType' stands for 'draft' or 'personal'
Try the following:
objMessages = objMailBox.Messages;
objMessage = objMessages.Add("GW.MESSAGE.MAIL", 4);
The rest should be fine; the code for adding the attachment seems OK.
Markus
"dpuls" <[email protected]> schrieb im Newsbeitrag
news:[email protected]...
>
> I'm in my first attempt at integrating GW functionality into a C#
> application. I am not an expert C# programmer either. Thus far I've
> been successful at getting logged into GW, creating a new mail message
> and sending it successfully. However adding code to attach a file to my
> message returns an exception from the GroupwareTypeLibrary with the
> unhelpful error message "Unknown Error". Below is my code. If I
> comment out the line:
> objMessage.Attachments.Add("c:\reg.log",1,"reg.log ");
>
> the program runs successfully, happily sending my mail to the recipent
> mailbox. I know the c:\reg.log file exists and I have permissions to
> it.
>
> Any advice as to what I'm doing wrong would be of tremendous help, as
> I've already search and cruised all the forums on GW API I can find to
> no avail. Running GW 7.03 I think on client and server side.
>
> ****************************
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.IO;
> using GroupwareTypeLibrary;
>
> namespace GWEmailTest
> {
> class Program
> {
> public static void Main()
> {
> GroupwareTypeLibrary.Application objApplication = new
> GroupwareTypeLibrary.Application();
> GroupwareTypeLibrary.Account objAccount;
> GroupwareTypeLibrary.Messages objMessages;
> GroupwareTypeLibrary.Message objMessage;
> GroupwareTypeLibrary.Folder objMailBox;
> GroupwareTypeLibrary.Recipients objRecipients;
> GroupwareTypeLibrary.Recipient objRecipient;
>
> objAccount = objApplication.Login("dpuls", "", "password", "",
> "");
> objMailBox = objAccount.MailBox;
> objMessages = objMailBox.Messages;
> objMessage = objMessages.Add("GroupwareTypeLibrary.Message",4," ");
> objRecipients = objMessage.Recipients;
> objRecipient = objRecipients.Add("dpuls","","");
> objMessage.Subject.PlainText = "Here's the message from C#!.";
> objMessage.BodyText.PlainText = "Here's the report you wanted.";
> objMessage.Attachments.Add("c:\reg.log",1,"reg.log ");
> objMessage.Send();
> }
> }
> }
> ****************************
>
>
> --
> dpuls
> ------------------------------------------------------------------------
> dpuls's Profile: NOVELL FORUMS - View Profile: dpuls
> View this thread: Attachments help - C# using Obect API - NOVELL FORUMS
>

Similar Messages

  • Need help in using a API

    I am new to flash . And my doubt may seem very trivial. I hae
    a problem using the Flash administation API "getLiveStreams()" . I
    am supposed to get the list of all live streams. However in the
    client when i do
    nc.call("getLivestreams",responder); i don't get any return
    value . Do i need to set any variables before calling this ? or how
    should i parse the output after calling the function. Any inputs
    would be highly appreciated

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Update the billtopartysiteid for particular cart using plsql API

    Hi all,
    i need to update the billtoparty_site_id in the particular cart the using aso_quote_headers.pkg.
    its throws the Your cart has been updated by another member. We have reloaded it for you.
    an one plaease help me to update the billtiparty_site id for the particular cart.
    Regards,
    M.Soundrapandian.

    Please post the details of the application release, database version and OS.
    Please see if these docs help.
    Using TCA API's Including Examples [ID 201243.1]
    How to use the TCA API's in MOAC Environment ? [ID 412996.1]
    Unable To Update Credit_Hold Flag Through HZ_CUSTOMER_PROFILE_V2PUB.update_customer_profile API [ID 876320.1]
    Customer Interface Does Not Update All Expected Columns in the Customer Form [ID 153159.1]
    Need An Api To Update Collector To A Different Collector In The Customer Master. [ID 743875.1]
    If you still get the same error, please post the code you are using. Also, enable trace on the concurrent program, submit it and check the contents of the concurrent request log file.
    Thanks,
    Hussein

  • TS1506 I just updated my IOS to 7.1 and now I can't open Microsoft attachments - I used to always do it. Help - I use my iPad for work and now can't see any attachments.

    I just updated my IOS to 7.1 and now I can't open Microsoft attachments - I used to always do it. Help - I use my iPad for work and now can't see any attachments. I've tried opening straight into other apps and just get error messages, and I the mail preview there is just a grey screen telling me the file name and size. It worked fine until I did the IOS upgrade

    Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/TS1702
    Delete the app and redownload.
    Downloading Past Purchases from the iTunes Store, App Store and iBooks Store
    http://support.apple.com/kb/ht2519
     Cheers, Tom 

  • Add attachments using workflow api throwing error

    Hi,
    I am getting the following error when i am trying to add attachments using worklist API.
         Missing class: invokeBPEL.MetaData
         Dependent class: com.evermind.io.ClassLoaderObjectInputStream
         Loader: oc4j:10.1.3
         Code-Source: /D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at hw_services.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1620) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@10469011]
         at java.lang.ClassLoader.loadClassInternal (ClassLoader.java:319) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.lang.Class.forName0 (Native method) [unknown, by unknown]
         at java.lang.Class.forName (Class.java:242) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.io.ClassLoaderObjectInputStream.resolveClass (ClassLoaderObjectInputStream.java:33) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.io.ObjectInputStream.readNonProxyDesc (ObjectInputStream.java:1538) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readClassDesc (ObjectInputStream.java:1460) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readOrdinaryObject (ObjectInputStream.java:1693) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject0 (ObjectInputStream.java:1299) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at java.io.ObjectInputStream.readObject (ObjectInputStream.java:339) [jre bootstrap, by jre.bootstrap:1.5.0_06]
         at com.evermind.server.rmi.RMIProtocol$Version.unmarshallParameterDirectly (RMIProtocol.java:402) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol$Version_1_0.unmarshallParameter (RMIProtocol.java:471) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readObject (RMIProtocol.java:80) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIProtocol.readValue (RMIProtocol.java:161) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleMethodInvocation (ServerRmiMessageHandler.java:514) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.handleOrmiRequest (ServerRmiMessageHandler.java:272) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.ServerRmiMessageHandler.dispatchRequest (ServerRmiMessageHandler.java:241) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.processReceivedCommand (RMIServerConnection.java:176) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.handleCommand (RMIConnection.java:152) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands (RMIConnection.java:127) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIServerConnection.listenForOrmiCommands (RMIServerConnection.java:390) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.server.rmi.RMIConnection.run (RMIConnection.java:107) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run (ReleasableResourcePooledExecutor.java:303) [D:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar (from <code-source> in META-INF/boot.xml in D:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar), by oc4j:10.1.3]
         at java.lang.Thread.run (Thread.java:595) [jre bootstrap, by jre.bootstrap:1.5.0_06]
    Exception in thread "main"
    This is the code i used
         String userId = "oc4jadmin";
         String password = "welcome1";
         String sTaskId = "";
         IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFactory.REMOTE_CLIENT);
         System.out.println("Before getting TaskService");
         ITaskQueryService querySvc = wfSvcClient.getTaskQueryService();
         System.out.println("After getting TaskService");
         IWorkflowContext wfCtx = querySvc.authenticate(userId,password,"jazn.com",null);
         System.out.println("Last out");
         Predicate pred = new Predicate(TableConstants.WFTASK_STATE_COLUMN,Predicate.OP_EQ,IWorkflowConstants.TASK_STATE_ASSIGNED);
         List queryColumns = new ArrayList();
         queryColumns.add("TITLE");
         queryColumns.add("PRIORITY");
         queryColumns.add("STATE");
         queryColumns.add("TASKID");
         queryColumns.add("TASKNUMBER");
         List tasks = querySvc.queryTasks(wfCtx,
                   queryColumns,
                   null, //Do not query addtional info
                   ITaskQueryService.ASSIGNMENT_FILTER_MY_AND_GROUP,
                   null, //No keywords
                   pred, //No custom predicate
                   null, //No special ordering
                   0, //Do not page the query result
                   0);
         System.out.println("Task Size !!" +tasks.size());
         if (tasks != null)
         String[] taskList = new String[tasks.size()];
         for (int i=0; i< tasks.size(); i++)
         Task t = (Task)tasks.get(i);
         taskList[i] = t.getSystemAttributes().getTaskId();
         System.out.println("Found task: "+taskList);
         sTaskId = taskList[i];
         else
         System.out.println("Did not find any tasks");
         Task task = querySvc.getTaskDetailsById(wfCtx, sTaskId);
         //Add Attachments
         FileInputStream fs = new FileInputStream("D:/Test.txt");
         ITaskService itask = wfSvcClient.getTaskService();
         MetaData mdata = new MetaData();
         mdata.setMimeType("text/html");
         mdata.setContent("D:/Test.txt");
         mdata.setInputStream(fs);
         mdata.setName("Test Document");
         itask.addAttachment(wfCtx, sTaskId, mdata);
         if (task != null)
         System.out.println("Completing task: "+task.getTitle());
         wfSvcClient.getTaskService().updateTaskOutcome(wfCtx, task, "APPROVE");
    Kindly let me know how to solve this issue.
    Thanks,
    Gomathi

    hi,
    Actually i have used AttachmentType..MetaData is the class which i created for implementing AttachmentType as it is Interface Class. Here is the code of MetaData class.
    public class MetaData implements AttachmentType,java.io.Serializable{
         public String getBoundary() {
              // TODO Auto-generated method stub
              return null;
         public String getContent() {
              // TODO Auto-generated method stub
              return null;
         public InputStream getInputStream() {
              // TODO Auto-generated method stub
              return null;
         public String getMimeType() {
              // TODO Auto-generated method stub
              return null;
         public String getName() {
              // TODO Auto-generated method stub
              return null;
         public String getSystemVersionFlag() {
              // TODO Auto-generated method stub
              return null;
         public String getTaskId() {
              // TODO Auto-generated method stub
              return null;
         public String getURI() {
              // TODO Auto-generated method stub
              return null;
         public String getUpdatedBy() {
              // TODO Auto-generated method stub
              return null;
         public int getVersion() {
              // TODO Auto-generated method stub
              return 0;
         public void setBoundary(String arg0) {
              // TODO Auto-generated method stub
         public void setContent(String arg0) {
              String cont = null;
              cont = arg0;
         public void setInputStream(InputStream arg0) {
              InputStream sStream = null;
              sStream = arg0;
         public void setMimeType(String arg0) {
              String mime = null;
              mime = arg0;
         public void setName(String arg0) {
              String sname = null;
              sname = arg0;
         public void setSystemVersionFlag(String arg0) {
              // TODO Auto-generated method stub
         public void setTaskId(String arg0) {
              // TODO Auto-generated method stub
         public void setURI(String arg0) {
              // TODO Auto-generated method stub
         public void setUpdatedBy(String arg0) {
              // TODO Auto-generated method stub
         public void setVersion(int arg0) {
              // TODO Auto-generated method stub
    kindly tell me how can i solve this issue.
    Thanks,
    Gomathi
    Edited by: user647559 on Sep 23, 2008 10:05 PM

  • Calling an Oracle stored procedure using Toplink API - Please help

    Hi,
    We are evaluating Toplink as a possible data access layer in large service-oriented application. The ability to call db stored procedures from within business object layer is crucial for our architechture.
    I am trying to follow toplink application developer's guide examples on how to call stored procedures using toplink.
    I have the folling java code:
    call.setProcedureName("PR_ROMAN_TEST");
    call.addNamedArgument("IN_PARAM");
    call.addNamedOutputArgument("OUT_PARAM");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("IN_PARAM");
    Vector params = new Vector();
    params.addElement(new Integer(5));
    Number result = (Number) session.executeQuery(query, params);
    This generates the following SQL statement:
    BEGIN PR_ROMAN_TEST(IN_PARAM=>5, OUT_PARAM=>?); END;
    An attempt to execute it causes a
    java.sql.SQLException: Invalid column index.
    As I understand it, this exception is thrown because of the "?" in place of the out-parameter value holder.
    The SQL statement that I would want toplink to generate and execute should look like:
    DECLARE result number; BEGIN PR_ROMAN_TEST(IN_PARAM=>5, OUT_PARAM=>result); END;
    , but how do I achieve it and how do I capture the return value, all using toplink api?
    Please help
    Thank you in advance,
    Roman

    I read the conversation above. I am running into a similar kind of problem. I get the following error.
    <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Error Code: 6550Local Exception Stack: Exception [TOPLINK-4002] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.DatabaseException Exception Description: java.sql.SQLException: ORA-06550: line 1, column 38: PLS-00103: Encountered the symbol "NAME" when expecting one of the following:. ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like as between from using || The symbol "." was substituted for "NAME" to continue.ORA-06550: line 1, column 55: PLS-00103: Encountered the symbol "ID" when expecting one of the following:. ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 38:PLS-00103: Encountered the symbol "NAME" when expecting one of the following . ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like as between from using || The symbol "." was substituted for "NAME" to continue.ORA-06550: line 1, column 55:PLS-00103: Encountered the symbol "ID" when expecting one of the following: . ( ) , * @ % &' | = - + < / > at in is mod not range rem =>.. <an exponent (**)> <> or != or ~= >= <= <> and or like between || The symbol "." was subs Error Code: 6550 at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:227)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:733)
    at oracle.toplink.internal.databaseaccess.DatabasePlatform.executeStoredProcedureCall(DatabasePlatform.java:1605)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:649)
    at oracle.toplink.threetier.ServerSession.executeCall(ServerSession.java:506)at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:131)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall(CallQueryMechanism.java:115)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelectCall(CallQueryMechanism.java:194)
    at oracle.toplink.internal.queryframework.CallQueryMechanism.executeSelect(CallQueryMechanism.java:175)
    at oracle.toplink.queryframework.DirectReadQuery.executeNonCursor(DirectReadQuery.java:65)
    at oracle.toplink.queryframework.DataReadQuery.execute(DataReadQuery.java:73)
    at oracle.toplink.queryframework.ValueReadQuery.execute(ValueReadQuery.java:59)
    at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:493)
    at oracle.toplink.queryframework.ReadQuery.execute(ReadQuery.java:125)
    at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1958)
    at oracle.toplink.threetier.ServerSession.internalExecuteQuery(ServerSession.java:629)
    at oracle.toplink.threetier.ClientSession.internalExecuteQuery(ClientSession.java:392)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2246)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1086)
    at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1055)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate$2.readFromSession(TopLinkTemplate.java:181)
    at com.eplinc.common.persistence.toplink.SessionReadCallback.doInTopLink(SessionReadCallback.java:59)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.execute(TopLinkTemplate.java:110)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:178)
    at com.eplinc.common.persistence.toplink.TopLinkTemplate.executeQuery(TopLinkTemplate.java:172)
    at com.epl.outletteller.dao.toplink.TopLinkOIDGeneratorDAO.generateId(TopLinkOIDGeneratorDAO.java:45)
    The call I am making is as follows :
    public long generateId(String name, long outletId) throws DataAccessException {
    TopLinkTemplate tlTemplate = new TopLinkTemplate();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("AUTONUM.GET_NEXT_VALUE");
    call.addNamedArgument("autonum name");
    call.addNamedArgument("outlet id");
    call.addNamedOutputArgument("OUTPUT_1");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("autonum name");
    query.addArgument("outlet id");
    Object[] parameters = new Object[2];
    parameters[0] = name;
    parameters[1] = Long.toString(outletId);
    Number uniqueNumber = (Number)tlTemplate.executeQuery(query,parameters);
    return uniqueNumber.longValue();
    This is my Table AUTONUM_SETTING
    AUTONUM_NAME AUTONUM_TYPE START_VAL END_VAL INCREMENT_VALUE
    TRAN_NUM GLOBAL 1 999999 1
    TRACE_NUM OUTLET 1 999999 1
    Any help would be appreciated. Thanks

  • Need help in getting MDM relationship details using Java Apis

    Hi,
    Is it possible to search records which are in relationship using Java Apis? Suppose Record A is Parent record and Record B,C,D ... are child records.
    I have to search all the records which are in relationship with record A.
    Can any one send code snippet on this.
    Regards,
    Niraj

    Hi Niraj,
    You can use RetrieveRelationshipsCommand api to get the relationship child of the Anchor Record.
    RetrieveRelationshipsCommand command = new RetrieveRelationshipsCommand(connectionAccesor);
    command.setSession(session);
    command.setAnchorRecord(anchorRecord); / command.setAnchorRecordId(anchorRecordId); (use any of the two statements)
    command.setRelationship(relationshipId); //For child int type is 10, and for Parent_child int type is 5
    command.setMemberResultDefinition(resultDefinition);
    command.execute();
    //Get Member Records' resuld definition
    ResuldDefinition rd = command.getMemberResultDefinition();
    Hope this helps you.

  • Need help in developing a webdynpro application using UWL API

    Hi developers,
    Iam developing a new WebDynpro application for UWL using UWL API.the functionality is to dispaly the summary of UWL like number of unread items, total items.
    Iam getting the problem while deploying the application, iam getting warning while deployed the application.
    I have given all possible ways mentioned in the below forum link
    Re: Accessing PortalRuntime at runtime?
    The exact problem is coming at reference file.
    Please giude me how to move forward.
    1. Below is the error when given "tckmcbc.uwl~api" in the service entry
    deployed with warning :
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.container.DeploymentException: Clusterwide exception: Failed to prepare application local/UWLCountDemo for startup. Reason=Clusterwide exception: Failed to start dependent service ''tckmcbc.uwl~api'' of application ''local/UWLCountDemo''. Status of dependent component: STATUS_MISSING. Hint: Is the component deployed correctly on the engine?
    2.Below is the error  when i gave PORTAL:sap.com/tckmcbc.uwl~api in the sharing refernce entry
    Finished with warnings: development
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application local/UWLCountDemo and wait. Reason: Clusterwide exception: server ID 21763550:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application local/UWLCountDemo cannot be started. Reason: it has hard reference to resource tckmcbc.uwl~api with type application, which is not active on the server.
    Thanks in Advance
    Sekhar.
    Edited by: sekhar c on Mar 21, 2009 11:24 AM

    Please see Kenichi Unnai in his blog "How to use UWL API for NetWeaver BPM Tasks"
    How to use UWL API for NetWeaver BPM Tasks
    The .sca-file can be found on the sap service marketplace, afterwards you need to import the .sca-file, add the SC to your "MyComponents" and then you can select your necessary DC's.

  • Help needed in using JMX APIs

    Hi
    My requirement is to retrieve the JNDI Names of the JMSConnectionFactory and the JMSQueue using the Connection factory or Queue name. In short im trying out a feasibility of reading the JNDI values for queues from weblogic config.xml instead of reading them from a properties file.
    I developed a sample code using JMX APIs that will fetch the JNDI names of all the JMS destinations available for a particluar JMSServer.
    But is there any way to retrieve the JNDI names based on the queue names .. in general i will give queue name as input and i want the queue's JNDI name as output.
    My sample code is :
    import java.util.Iterator;
    import java.util.Set;
    import javax.management.ObjectName;
    import javax.management.QueryExp;
    import javax.management.Attribute;
    import javax.naming.Context;
    import weblogic.jndi.Environment;
    import weblogic.management.MBeanHome;
    import weblogic.management.RemoteMBeanServer;
    import weblogic.management.WebLogicObjectName;
    import weblogic.management.configuration.JMSQueueMBean;
    import weblogic.management.configuration.JMSServerMBean;
    import weblogic.management.configuration.JMSConnectionFactoryMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    import weblogic.management.runtime.JMSServerRuntimeMBean;
    import weblogic.management.configuration.JMSDestinationMBean;
    public class JMSAddQueue {// The name of the WebLogic domain, please change this to match the //// name of your installation specific domain name                  
    private static String weblogicDomain = "conciergetestdomain";// The name of the WebLogic server, please change this to match the //// name of your installation specific server name
    public static void main(String[] args) {
         try
              Environment env = new Environment(); 
              env.setProviderUrl("t3://localhost:7001");  
              env.setSecurityPrincipal("system");  
              env.setSecurityCredentials("weblogic");  
              Context ctx = env.getInitialContext();  
              MBeanHome home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);  
              ctx.close();  
      JMSServerMBean cf = (JMSServerMBean)home.findOrCreateAdminMBean("TESTSERVER","JMSServer", weblogicDomain);
    JMSDestinationMBean[] jdb = cf.getDestinations();
    System.out.println("** The JNDI name is : "+jdb[0].getJNDIName());
    catch (Exception e) {
    e.printStackTrace();
    }Is there any way to retrieve the JNDI names using the queue names ?
    Thanks
    Arun B

    I will send up an alert for you, Colin. Even though I use iTunes for Mac, troubleshooting it isn't my forté.

  • Help! How to use pay_element_link API

    Hi all,
    I am developing HRMS Interface to transfer employee element data from other system into EBS. And I want to use Pay element Link API to implement the requirement.
    The requirement is:
    1.     Using the primary key of NATIONAL_IDENTIFIER_NUMBER (ssn) check to see if the employee exists as an active employee in Oracle.
    2.     Validate that the Element is a valid element and retrieve the Benefit Type from the DFF (ELEMENT_INFORMATION11). If the element is invalid or does not have a Benefit Type defined, flag the record as ‘REJECTED’ and write the error to the log file and move to next record in staging.
    3.     If the employee has another active element assigned for the same Benefit Type, using the API’s terminate the existing element for that Benefit Type.
    4.     Using the API’s add the new element to the employee with the appropriate element entries.
    5.     Flag the status of the record in staging to ‘PROCESSED’.
    The step1 and step2 is logic adjustment. And I have finished them. Next I will finish 3,4 and 5. The fifth step is easy to approach. I can not do 3 and 4 for I do not konw how to use the pay_element_link_API. And I know the 3 wiil use PAY_ELEMENT_LINK_API.update_element_link, the 4 step will use PAY_ELEMENT_LINK_API.CREATE_ELEMENT_LINK. But the most difficult is I do not konw what to pass the parameter to update_element_link and create_element_link. I do not know the meaning of the two procedure's parameter.
    When the element has many entry values, how to import these entry value into the EBS. For example, an element names 'Retirement Plan' and the element has a input value names 'Amount' and the value is 80$. So I want to know how to import the 80$ into EBS by the API. Just means, the 80$ will pass to which one parameter in the create_element_link or update_element_link.
    Please give me some ideas. Thank you so much

    On troubleshooting the HR api's you can use the pyupip logging mechanism . This would allow you to pinpoint what stored procedure section is being executed when the error ocurred.
    set serveroutput on
    spool trace.log
    begin
    hr_utility.set_trace_options ('TRACE_DEST:DBMS_OUTPUT');
    hr_utility.trace_on;
    -- your code here
    hr_utility.trace_off;
    Exception
    when others then
    dbms_output.put_line(sqlerrm);
    hr_utility.trace_off;
    END;
    spool off

  • Require Help on delete /Replace API being used in one CR.

    Hi,
    I Need an API which would delete /replace the already existing attachment and update PO form with PO attachment from latest run of program.
    Presently I am using an API “fnd_webattch.DeleteAttachment” and then adding the latest attachment with fnd_webattch.add_attachment. fnd_webattch.DeleteAttachment is erroring out and so multiple attachment’s are getting added.
    (On commenting this API block , program is successfully completing)
    Kindly suggest if you are aware of any other API for deleting or replacing the latest attachment to PO form.
    Thanks
    Mahesh

    Thanks for the concern and address.
    I was ready to go grab the entity that was failing, but I can't seem to find the one that failed, or it's not failing any more - I'm not sure.
    I've been monitoring the table errors and there are a few popping up here and there.  ClientOtherError shows 26 errors on 56,329 different operations in the last 7 days.  That could be related to a lot of things though and isn't necessarily
    the exact problem I've been looking for.  For example - there may be a filter/query that is looking for something in the table that doesn't exist...  I'm not sure how every operation in the webapi will translate to the table stats.
    I'll post what I find and email if I find something exhibiting the same issue.
    Darin R.

  • I am new to adobeconnect.  Need help in using api integration

    I have registered a trail account for adobeconnect and using this to review all aspects of AdobeConnect.  I am not able to find any option to access the Webservice APIs with the trail account.  Can any body please let me whether the API is available with hosted instance and if so what are the access details.
    Thanks in advance.
    Madhava

    Your trial account is full functioning and you should be able to use the API's to test and develop on it. You can find the full API documentation at the developer center for Connect: http://www.adobe.com/devnet/adobeconnect.html

  • Using Windows API in my LabWindows CVI code

    Hi all.
    I would like any and all help. I am developing on LabWINDOWS 2010 and am trying to use the Windows API, particularly the multimedia APIs, in my CVI code. What I am trying to do is audio development, only it has to be in .NET or Visual C++ platform. I have developed the code and UIR, but when I build the solution it tanks on me. Of course when I use MS Visual C++ 2008 or 2010 there are no errors and I could use MS Visual C++ to develop my application, but the development of the user interface and the controls is much more straight forward with CVI and there are more controls to work with than there are with MS Visual C++. Most of the errors that I get are related to the following header files: "MMSystem.h", "devicetopology.h",  and the "endpointvolume.h". When I try and build a skelton project with no controls or indicators on the .UIR I get the errors like:
    "devicetopology.h"(2301,20) Missing parameter type.
    "devicetopology.h"(2301,40) syntax error; found '*' expecting ')'.
     "MMSystem.h"(151,1) Unrecognized declaration.
    "MMSystem.h"(850,96) syntax error; found 'identifier' expecting ')'.
    That is just a few of them, but they typically say the same thing. I have included the header files and libraries in my project, and  have made sure that they are in the CVI "sdk" directory. I have tried example code that have these header files and the result is still the same. I know that I should not have these type of issue, at least I don't think I should. Like I said I could use as much help as possible of figuring out what is the matter. Did I install the CVI improperly? Are there patches that I need to actually use windows APIs? I am attaching to this post my code and the code I downloaded from a LabWINDOWS forum. When I ran the code from the forum I got the same errors.   
    Thanks in advance.
    Attachments:
    AudioVolume.c ‏2 KB
    VISTAS-OpenAL.c ‏44 KB

    Humphreyy,
    thanks for the tip. I tried it but it did not work, the same errors were present. Are there any other suggestions. I have racked my brain to figure out why this is happening and have come up with nothing. I am also getting a "Warning" message concerning the "KsMedia.h" file that says "Warning: Excess characters in multibyte character literal ignored." The warnings trace back to the "typedef enum" section of that file. Could that be causing a ripple effect that produces the error I am seeing in the other header files I mentioned??
    I could really use your help and any more help that is available. I really don't want to use Visual C++, because this software is going to get more sophisticated and is to be used in NASA Langley's VISTAS simulator, an environment taylor made for National Instruments software.

  • How to do frequency division to a external signal use the api with vc

    i use the api and vc do frequency division.
    and i choose the function DAQmxCreateCOPulseChanTicks
    the problem is the parameter of sourceTermianl in DAQmxCreateCOPulseChanTicks
    i just do not how to use it, please help me ,thanks

        I can`t see your VI cause i've a lower version. I hope this VI to do what you want. 
    But now i have one question: Somebody knows why i get this message when i enable the disable diagram of the this vi? The message is attached, version is 8.0, winxp.
    Paul
    Mechatronic engineer
    Lima-Perú
    Attachments:
    FOURIER_TIME_SCALING.vi ‏25 KB
    msg.JPG ‏31 KB

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

Maybe you are looking for

  • Problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition

    I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is: "An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library' An error occurred executing a st

  • Lost Songs After Hard Drive Failure

    Recently, my laptop hard drive failed and needed to be replaced. I was able to recover much of the music that was loaded on the drive, but many did not make it. I'm not worried about the songs that were copied from CD, but the ones that were purchase

  • MAP update in PO at PGI

    Hi All, We have been trying to update Price in PO at the time of PGI using USEREXIT SAVE_DOCUMENT triggering BAPI_PO_CHANGE. It is failing because PO cannot be edited while PGI is under process/Outbound Delivery is being worked on. Can anyone please

  • Getting errors while creating model in webdynpro(using JAVA)

    hii , am using EJBs ....n while creating model in webdynpro, while trying to include jars of wrapper class and command bean in model its giving an error that the jars already exist in model classes.... plz help out....

  • The Other Section In Itunes

    My Other Section Is Very Large What Should I Do About It? It Is Taking Up a Pretty Good Chunk Pf Memory It's 9.14Gb What Should I Do To fix It