JavaNullPointer Exception in Appserver Log(Finance Sourcing and Contracts Module)

We are facing one exception in the app server log in our Dev, Test and UAT environments at the time of triggering emails.
Emails are getting posted to the concern person, but an exception log is getting generated in the App server Log.
We are unable to trace out whether this is a configuration issue or code issue.
Can someone help us in sorting out this problem. We have completed the UAT phase as well.
Our concern is this log should not get generated in PROD. Since the client DBA's are pushing us to check the code that we have written.
We are using the delivered method to trigger the emails. But getting the below exceptions in App server Log.
Please forward this message to any known finance DBA's or Know DBA's who can suggest something solution.
Thanks in advance.
PSAPPSRV.15807 (559) [08/22/13 19:59:22
.com (IE 8.0; WIN7) ICPanel](0) Rowset::Refresh in program AUC_ANALYZE_HD_CMP.GB
L.AUC_LINE_WRK.AUC_ANALYZE_PB.FieldChange flushes current or parent scroll
PSAPPSRV.15807 (559) [08/22/13 19:59:23
.com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): Creating SendMailException
PSAPPSRV.15807 (559) [08/22/13 19:59:23
.com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): SendMailException
PSAPPSRV.15807 (559) [08/22/13 19:59:23
.com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): SendMailException: Context:
Outbo
undEmail.Send method called
PSAPPSRV.15807 (559) [08/22/13 19:59:23
.com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): *SendMailException: Java
Exception*
*: java.lang.NullPointerException*
PSAPPSRV.15807 (559) [08/22/13 19:59:23
.com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): SendMailException: Detail Message
:JavaMail Error: java.lang.NullPointerException.\nStack
Trace:\njava.lang.NullPo
interException
at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:599)
at
com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.jav
a:780)
at
com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.jav
a:948)
*OR*
PSAPPSRV.1663 (4604) [07/31/13 02:41:50
com (IE 8.0; WIN7) ICPanel](0) (MCFSendMail): SendMailException: Context:
OutboundEmail.Send method called
PSAPPSRV.1663 (4604) [07/31/13 02:41:50
(MCFSendMail): SendMailException: Java Exception:
java.lang.NullPointerException
PSAPPSRV.1663 (4604) [07/31/13 02:41:50
(MCFSendMail): SendMailException: Detail Message:JavaMail Error:
java.lang.NullPointerException.\nStack
Trace:\njava.lang.NullPointerException
at
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:509)
at
com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:780)
at
com.peoplesoft.pt.mcf.mail.MCFOutboundEmail.send(MCFOutboundEmail.java:948)

First of all, you really, really want to edit your post and remove all the references to your organization smtp server, it's a piece of security hole that attacker can use.
For your issue, I'd recommand to read the following note, if not already done Master Note for Email failing With Various Errors. (Doc ID 624207.1) from My Oracle Support (paid support required).
Nicolas.

Similar Messages

  • E-Sourcing and Contract Generation

    Hi Gurus,
    Can we implement E-Sourcing application only now and Contract Generation next year?
    Or do we have to have the initial setup from hardware perspective completed now?
    Thanks
    JS

    Hi JS,
    Typically Contract Generation is recommended to be running on a seperate dedicated server.
    As you might be aware its MS Word or MS Office service running on the server.
    You can certainly include in your hardware design now and install the MSI or the executable provided along with ESOURCING software at a later time. There are certain system properties that needs to be set up or turned on at the time of installing the word service.
    Parankush

  • Difference dot sourcing and importing module

    Hi,
    Please clarify the difference between dot sourcing a function and importing a module.
    http://mikepfeiffer.net/2010/06/how-to-add-functions-to-your-powershell-session/
    Note: is there a way to import all my functions in one go so I can load them on a new pc?
    J.
    Jan Hoedt

    dot sourcing runs the script in the global scope.
    Import-Module loads an assemble or module file.
    They are not in any way similar although theey can both be used to accomplish certain things.
    Start by reading the manual on what a module is.
    help about_modules
    Now look at how dot sourcing works.  A file loaded with dot sourcing is not executed but remains in memory.  A function in a PS1 and all variables will not remain in memory if you "run" the script without dot sourcing.
    search for "dot sourcing" and read almist any of the many blog articles on how to use it.
    \_(ツ)_/

  • BC data source and functional module

    Hi Gurus
    I know that we can extract data via functional module in case of generic extractor but when we use business content data source ( for ex.0MAT_PLANT_ATTR) is it possible to use functional module to extract the data?
    How can we find the functional module? my requirement is I need to enhance this data source with few more attributes.
    Pl help. also advise where I need to write the code?

    You can see if it FM based or not, in RSA2, or, in table ROOSOURCE (on the source system).
    In general, it is not possible/advisable to change the BC extractor FMs.
    Right way to go about is to use enhancements. For this case 0MAT_PLANT_ATTR, if the other attributes are coming from same material tables, you may be able to get those by enhancing the extract structure.
    If not, you can enhance the extract structure, and write the code in the user-exit provided for extending master data extraction (function EXIT_SAPLRSAP_002 - check its documentation in SE37).

  • Change Logs for RFQ and Contract

    Hi all
    Where in ME43 (display RFQ) and ME33K (display Contract) do I see the option for Header/Item changes?
    Thanks in advance!

    Hi,
    For both ME43 and ME33K, you can observe the changes, after entering into the overview screen at main menu:
    Header/ Item> statistics> Changes.
    Regards,
    Narayana.

  • Allow Non-Administrator accounts to create event sources and write to event logs

    We are setting up BizTalk 2013 in Windows Server 2012 and one of the requirements is to allow the service account to create sources and write in event logs (Application) of the BizTalk servers. We have found what it seems to be a simple solution for this
    without giving service accounts local admin rights.
    Give Full control for the following registry keys to the service accounts or groups to allow creating of event sources and write to event logs:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security
    Note: when changing permissions for EventLog key, the child keys will inherit the permissions by default except Security key which must be done manually.
    Initial tests using a .net test app seems to work as expected. New event sources are being created in the event logs and writing to the event logs after that works perfectly.
    The above method has been deployed in production and this is the most suitable solution for us.

    Hi Keong6806,
    Thanks a lot for posting and sharing here.
    Do you have any other questions regarding this topic? If not I would change the type as 'Discussion' then.
    Best Regards,
    Elaine
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Logging with whereabouts using open source and freeware

    You can find the html version of this at:
    http://www.acelet.com/whitepaper/loggingWithWhereabouts.html
    Logging with whereabouts using open source and freeware
    The purpose of logging is to find out what had happened when needed. When the
    time comes to read log messages, you want to know both the log message and its
    whereabouts (class name, method name, file name and line number). So you need
    to hard code whereabouts.
    But hard coded whereabouts are very difficult to maintain: when you modify your
    source code, line number changes; when you copy and paste a line, its class name
    and method name change. If whereabouts are wrong, you introduce bugs in your logging
    logic and the log messages are useless at the best.
    This article shows you an example of using freeware Redress tool to rectify whereabouts
    programmatically in your Makefile or Ant build file. So your whereabouts are always
    correct for both Java and JSP source file.
    Redress tool is part of SuperLogging at http://www.ACElet.com. SuperLogging also
    provides an open source wrapper Alog.java, which redirects log method calls to
    your favorite logging package. Redress tool can rectify whereabouts information
    on all Alog's method calls in your application. So, if you call Alog's log methods,
    these calls will be rectified by Redress.
    JDK 1.4 introduces a new utility package java.util.logging. The example in this
    article is based on JDK logging. Log4J is a cousin of JDK logging. Log4J users
    should have no difficulties to modify this example for Log4J. Both JDK logging
    and Log4J are excellent logging software for single JVM.
    Note: Redress tool rectifies method calls on Alog, not JDK logging. You need to
    call Alog instead of JDK logging in your application.
    Source code of Alog.java
    The following is the source code of Alog's JDK logging version. It serves as an
    library file and should be on your CLASSPATH:
    * Copyright Acelet Corp. 2000. All rights reserved
    * License agreement begins >>>>>>>>>> <br>
    * This program (com.acelet.opensource.logging.Alog) ("Software") is an
    * open source software. <p>
    * LICENSE GRANT. The Software is owned by Acelet Corporation ("Acelet").
    * The Software is licensed to you ("Licensee"). You are granted a
    * non-exclusive right to use, modify, distribute the Software for either
    * commercial or non-commercial use for free, as long as: <br>
    * 1. this copyright paragraph remains with this file. <br>
    * 2. this source code (this file) must be included with distributed
    * binary code.<br>
    * NO WARRANTY. This comes with absolutely no warranty. <p>
    * <<<<<<<<<< License agreement ends <p><p>
    * The purpose of releasing this open source program is to prevent vendor
    * lock in. <p>
    * You can code your program using this class to indirectly use Acelet
    * SuperLogging (com.acelet.logging). If later you want to swith to other
    * logging package, you do not need to modify your program. All you have
    * to do is: <p>
    * 1. modify this file to redirect to other logging packages. <br>
    * 2. replace existing com.acelet.opensource.Alog with your modified one. <br>
    * 3. you may have to reboot your EJB server to make the changes effect.<br>
    * <p>
    * This program is just a wrapper. For detail information about the methods
    * see documents of underline package, such as com.acelet.logging.Logging.
    * <p>
    * Visit http://www.ACElet.com for more information.
    * <p>
    * This file is a modified for using JDK logging as an EXAMPLE.
    * <br>
    * You can use Redress tool to keep your whereabouts information
    * always correct. See http://www.ACElet.com/freeware for detail.
    * <p>
    * Please see http://www/ACElet.com/opensource if you want to see the
    * original version.
    package com.acelet.opensource.logging;
    import java.util.logging.*;
    public final class Alog {
    * Log level value: something will prevent normal program execution.
    public static int SEVERE = 1000;
    * Log level value: something has potential problems.
    public static int WARNING = 900;
    * Log level value: for significant messages.
    public static int INFO = 800;
    * Log level value: for config information in debugging.
    public static int CONFIG = 700;
    * Log level value: for information such as recoverable failures.
    public static int FINE = 500;
    * Log level value: for information about entering or returning a
    * method, or throwing an exception.
    public static int FINER = 400;
    * Log level value: for detail tracing information.
    public static int FINEST = 300;
    static Logger logger;
    static {
    logger = Logger.getLogger("");
    public Alog() {
    public static void alert(String subject, String message) {
    public static void error(String text, int level, String fullClassName,
    String methodName, String baseFileName, int lineNumber) {
    String[] para = {lineNumber + "", baseFileName};
    logger.logp(getLevel(level), fullClassName, methodName, text, para);
    public static Level getLevel(int levelValue) {
    if (levelValue == SEVERE)
    return Level.SEVERE;
    else if (levelValue == WARNING)
    return Level.WARNING;
    else if (levelValue == INFO)
    return Level.INFO;
    else if (levelValue == CONFIG)
    return Level.CONFIG;
    else if (levelValue == FINE)
    return Level.FINE;
    else if (levelValue == FINER)
    return Level.FINER;
    else if (levelValue == FINEST)
    return Level.FINEST;
    else
    return Level.ALL;
    public static void log(String text, int level, String fullClassName,
    String methodName, String baseFileName, int lineNumber) {
    String[] para = {lineNumber + "", baseFileName};
    logger.logp(getLevel(level), fullClassName, methodName, text, para);
    public static void sendMail(String to, String from, String subject,
    String text) throws Exception {
    public static void sendMail(String to, String cc, String bcc, String from,
    String subject, String text) throws Exception {
    Test program
    The simple test program is Test.java:
    import com.acelet.opensource.logging.Alog;
    public class Test {
    public static void main(String argv[]){
    Alog.log("Holle world", Alog.SEVERE, "wrongClassName", "wrongMethod",
    "wrongFileName", -1);
    How to run the test program
    1. Compile Alog.java (JDK 1.4 or later, not before):
    javac Alog.java
    2. Download freeware Redress tool from http://ACElet.com/freeware.
    3. Run Redress tool:
    java -cp redress.jar Test.java
    4. Check Test.java. The Alog.log method call should be rectified.
    5. Run test program:
    java Test
    You should see log message with correct class name and method name.

    Hi;
      I found this code and would like to share it with you :
    JCoDestination destination = JCoDestinationManager
      .getDestination(DESTINATION_NAME2);
      JCoFunction function = destination.getRepository().getFunction(
      "RFC_FUNCTION_SEARCH");
      if (function == null)
      throw new RuntimeException("RFC_FUNCTION_SEARCH not found in SAP.");
      function.getImportParameterList().setValue("FUNCNAME", "*");
      function.getImportParameterList().setValue("GROUPNAME", "*");
      try {
      function.execute(destination);
      JCoTable funcDetailsTable = function.getTableParameterList()
      .getTable("FUNCTIONS");
      int totalNoFunc = funcDetailsTable.getNumRows();
      if (totalNoFunc > 0) {
      for (int i = 0; i < totalNoFunc; i++) {
      System.out.println("Function Name: "
      + funcDetailsTable.getValue(i));
      } catch (AbapException e) {
      System.out.println(e.toString());
      return;
      System.out.println("RFC_FUNCTION_SEARCH finished");
    It is working and retrieving FM.
    Regards
    Anis

  • Robocopy Log Shows All Files Copied but Folder Properties Different on Source and Target

    Hi,
    I'm replacing an old 2003 R2 server with a 2012 R2 server and moving data to it. I used robocopy to migrate data. No users are currently accessing the source so there are no open files by users.
    The source folder is:
    27.9 GB with 194,490 files and 14,273 folders.
    Robocopy copied the data and reported no errors but the destination folder only has:
    24.6 GB with 181,487 files and 14,167 folders.
    I ran robocopy twice more. Each time, the log shows that it skipped 14,273 directories and 194490 files.
    So robocopy believes the source and destination directories are in synch. But the properties of the directory show me different numbers. Any ideas? I need to move a few more TB of data and be confident that everything copied.
    Here's the command I'm running:
    robocopy \\server-old\d$\data \\server-new\d$\data /E /COPYALL /DCOPY:T /R:5 /W:3 /TEE /V /LOG:D:\Logs\log1.log
    Thanks,
    Greg

    Hi,
    Thanks for your post.
    As far as i know, system Volume Info and Recycler are NOT transferred when you use robocopy to transfer all the files/folders from one drive to another.
    And Robocopy has switch "/MIR" which you can use to Mirror a complete directory tree if required.
    https://technet.microsoft.com/en-us/library/cc733145.aspx?f=255&MSPPError=-2147217396
    Regards.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Difference between Tuxedo Logs and Appserver Logs

    Hello
    What is the difference between Tuxedo Logs and Appserver Logs? What are the scenarios to look into Tuxedo Logs and Appserver Logs?
    Thanks

    The application server log keep the application informations and trace.
    The tuxedo log keep the application server management informations and trace.
    Nicolas.

  • SQL Server replication and size differences of source and destination databases

    I set up snapshot replication for a DB between two SQL instances.  On the source instance, the DB shows as 106612.56MB with 34663.75MB as available free space.  I expected that the replica would then end up being 71948.81MB (106612.56 - 34663.75
    because it wouldn't replicate the white space).  The resultant replica database is showing as 35522.94MB.  The required data appears to be present in the replicated DB as the SSRS reports that use it are able to find the data they look for.  But
    why the large discrepancy in size between the source and replicated DB?  The replicated DB is less than 1/2 the size of the source DB.  I've searched around and can't seem to find any explanation.  I realize this isn't mirroring so the DBs will
    not be identical in size but I did not expect to see such a large difference between the two.  I am replicating all almost all articles (tables, stored procs, etc.) with the exception of a handful of stored procedures and user-defined functions that either
    reference invalid column names in a table (vendor bug) or reference another DB that is not present on the replica's instance.  I would expect these 4-5 articles can not account for a 37000 MB size difference between the two DBs.
    Please note that this has nothing to do with transaction log size.  I am specifically talking about the database size and am not looking at the size that combines both DB and TxLog size.
    Any insight?

    Another factor could be that on the publisher the data is distributed through pages, paragraphs and extents. Depending on your fill factor and the amount of deletes and your datatype, there could be space in the pages, paragraphs and extents which have not
    been reclaimed.
    During the bcp process which is part of the snapshot application process on the subscriber all the data will be in the tables in a contiguous fashion. I would suspect this would be why you have the difference in space usage.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • Workspace Credential Conflict between Logged-in User and the Authenticated User

    Hi there,
    I am running LiveCycle ES Update1 SP2 with Process Management component on WIN/JBoss/SQL Server 2005.
    I have been encountering user credential conflicts from time to time, but it has not been consistent and the problem manifested in various ways, such as:
    - problem when logging in with error "An error occurred retrieving tasks." on the login screen
    - user logs in successfully but is showing somebody else queue(s) with his/her own queue with no task in there
    - fails to claim task from group queue.
    The stacktrace from the server.log file I collected from a production system shows the exception below.
    Has anybody else encountered the similar problem?
    It looks to me that it doesn't log out cleanly and some kind of caching is done on the authenticated session and is not cleaned up properly on user logout.
    2009-07-10 15:05:13,955 ERROR [com.adobe.workspace.AssemblerUtility] ALC-WKS-005-008: Security exception: the user specified in the fill parameters (oid=F0FA390C-AECC-BB19-F0D7-6CA13D6CBF83) did not match the authenticated user (oid=F25892EE-80CE-8C24-E40D-881F631AA8BE).
    2009-07-10 15:05:13,955 INFO  [STDOUT] [LCDS] [ERROR] Exception when invoking service 'remoting-service': flex.messaging.MessageException: ALC-WKS-005-008: Security exception: the user specified in the fill parameters (oid=F0FA390C-AECC-BB19-F0D7-6CA13D6CBF83) did not match the authenticated user (oid=F25892EE-80CE-8C24-E40D-881F631AA8BE).
      incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)
        operation = submitWithData
        clientId = F3D2CDD0-330F-F00B-C710-5AF3F7CB4138
        destination = task-actions
        messageId = 7E385A6B-E4E6-3A81-CD6A-630DF4FAE5BB
        timestamp = 1247202313955
        timeToLive = 0
        body = null
        hdr(DSEndpoint) = workspace-polling-amf
        hdr(DSId) = F3C38977-171B-7BED-3B16-F3A5FE419479
      Exception: flex.messaging.MessageException: ALC-WKS-005-008: Security exception: the user specified in the fill parameters (oid=F0FA390C-AECC-BB19-F0D7-6CA13D6CBF83) did not match the authenticated user (oid=F25892EE-80CE-8C24-E40D-881F631AA8BE).
        at com.adobe.workspace.AssemblerUtility.createMessageException(AssemblerUtility.java:369)
        at com.adobe.workspace.AssemblerUtility.checkParameters(AssemblerUtility.java:561)
        at com.adobe.workspace.tasks.TaskActions.callSubmitService(TaskActions.java:788)
        at com.adobe.workspace.tasks.TaskActions.submitWithData(TaskActions.java:773)
        at sun.reflect.GeneratedMethodAccessor941.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:421)
        at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)
        at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495)
        at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882)
        at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
        at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
        at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
        at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
        at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
        at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
        at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:315)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at com.adobe.workspace.events.RemoteEventClientLifeCycle.doFilter(RemoteEventClientLifeCycle .java:138)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja va:159)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P rotocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
    Kendy

    I am having the same server issue and i cant get hold of SP3 to fix it. can anyone tell me how to fix this problem or provided a link where i can get SP3 from? Ive spent most of the day on the phone to Adobe Support and they have been unable to provide me with a link to the service pack.

  • Dynamic source and destination tables

    Hi all
    I've got to import 142 tables from csv into SQL 2008 on a regular basis.
    I was looking at building a 142-part SSIS package to do this, then thought there must be a dynamic way of doing it.
    Is there any way of dynamically changing the source and and destination tables?
    The csv filenames will remain identical, the SQL tables will be the same names but with "_Staging" at the end of them (e.g. SRSection.csv will always go into SRSection_Staging).
    I can then write MERGE statements to update the main tables from the staging data.
    Any help on this would be greatly appreciated.
    I get the the feeling I would need a FOREACH LOOP container but I'd really aprreciate a step-by-step guide if you can.

    Please check this :- http://sql-bi-dev.blogspot.com/2010/07/dynamic-database-connection-using-ssis.html  
    STEP1:
    To begin, Create two tables as shown below in on of the environment:
    -- Table to store list of Sources
    CREATE TABLE SourceList (
       ID [smallint],
       ServerName [varchar](128),
       DatabaseName [varchar](128),
       TableName [varchar](128),
       ConnString [nvarchar](255)
    GO
    -- Local Table to store Results
    CREATE TABLE Results(
       TableName  [varchar](128),
       ConnString [nvarchar](255),
       RecordCount[int],
       ActionTime [datetime]
    GO
    STEP 2:
    Insert all connection strings in SourceList table using below script:
    INSERT INTO SourceList
    SELECT 1 ID,
    '(local)' ServerName,
    --Define required Server
    'TestHN' DatabaseName,--Define DB Name
    'TestTable' TableName,
    'Data Source=(local);Initial Catalog=TestHN;Provider=SQLNCLI10.1;Integrated Security=SSPI;Auto Translate=False;' ConnString
    Insert as many connections as you want.
    STEP 3:
    Add new package in your project and rename it with ForEachLoopMultipleServers.dtsx. Add following variable:
    Variable
    Type
    Value
    Purpose
    ConnString
    String
    Data Source=(local);
    Initial Catalog=TestHN;
    Provider=SQLNCLI10.1;
    Integrated Security=SSPI;
    Auto Translate=False;
    To store default connection string
    Query
    String
    SELECT '' TableName,
    N'' ConnString,
    0 RecordCount,
    GETDATE() ActionTime
    Default SQL Query string.
    This can be modified at runtime based on other variables
    SourceList
    Object
    System.Object
    To store the list of connection strings
    SourceTable
    String
    Any Table Name.
    It can be blank.
    To store the table name of current connection string.
    This table will be queried at run time
    STEP 4:
    Create two connection managers as shown below:
    Local.TestHN: For local database which has table SourceList. Also this will be used to store the result in Results table.
    DynamicConnection: This connection will be used for setting up dynamic connection with multiple servers.
    Now click on DynamicConnection in connection manager and click on ellipse to set up dynamic connection string. Map connection String with variable
    User::ConnString.
    STEP 5:
    Drag and drop Execute SQL Task and rename with "Execute SQL Task - Get List of Connection Strings". Now click on properties and set following values as shown in snapshot:
    Result Set: Full Result Set
    Connection: Local.TestHN
    ConnectionType: Direct Input
    SQL Statement: SELECT ConnString,TableName FROM SourceList
    Now click on Result Set to store the result of SQL Task in variable User::SourceList.
    STEP 6:
    Drag and drop ForEach Loop container from toolbox and rename with "Foreach Loop Container - DB Tables". Double click on ForEach Loop container to open Foreach Loop Editor. Click on Collection  and select
    Foreach ADO Enumerator as Enumerator. In Enumerator configuration, select User::SourceList as ADO object source variable as shown below:
    STEP 7: Drag and drop Script Task inside ForEach Loop container and double click on it to open Script Task Editor. Select
    User::ConnString,User::SourceTable as
    ReadOnlyVariables and User::Query as
    ReadWriteVariables. Now click on Edit Script button and write following code in Main function:
    public void Main()
    try
    String Table = Dts.Variables["User::SourceTable"].Value.ToString();
    String ConnString = Dts.Variables["User::ConnString"].Value.ToString();
    MessageBox.Show("SourceTable = " + Table +
    "\nCurrentConnString = " + ConnString);
    //SELECT '' TableName,N'' ConnString,0 RecordCount,GETDATE() ActionTime
    string SQL = "SELECT '" + Table +
    "' AS TableName, N'" + ConnString +
    "' AS ConnString, COUNT (*) AS RecordCount, GETDATE() AS ActionTime FROM " + Dts.Variables["User::SourceTable"].Value.ToString() +
    " (NOLOCK)";
          Dts.Variables["User::Query"].Value = SQL;
          Dts.TaskResult = (int)ScriptResults.Success;
    catch (Exception e)
          Dts.Log(e.Message, 0,
    null);
    STEP 8:
    Drag and drop Data Flow Task and double click on it to open Data Flow tab. Add OLE DB Source and Destination. Double click on OLE DB Source to configure the properties. Select
    DynamicConnection as OLE DB connection manager and
    SQL command from variable as Data access mode. Select variable name as User::Query. Now click on
    columns to genertae meta data.
    Double click on OLE DB Destination to configure the properties. Select Local.TestHN as
    OLE DB connection manager and Table or view - fast load as
    Data access mode. Select [dbo].[Results] as Name of the table or the view. now click on
    Mappings to map the columns from source. Click OK and save changes.
    Finally DFT will look like below snapshot:
    STEP 9: We are done with package development and its time to test the package.
    Right click on the package in Solution Explorer and select execute. The message box will display you the current connection string.
     Once you click OK, it will execute Data Flow Task and load the record count in Results table. This will be iterative process untill all the connection are done. Finally package will execute successfully.
    You can check the data in results table:
    Here is the result:
    SELECT *
    FROM SourceList
    SELECT *
    FROM Results
    Regards, Pradyothana DP. Please Mark This As Answer if it solved your issue. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://www.dbainhouse.blogspot.in/

  • JAX-WS Client throws NULL Pointer Exception in NW 7.1 SP3 and higher

    All,
    My JAX-WS client is throwing an exception when attempting to create a client to connect to the calculation service. The exception is coming out of the core JAX-WS classes that are part of NetWeaver. (see exception below)
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContextExistingPort(SAPServiceDelegate.java:440)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatchContext(SAPServiceDelegate.java:475)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:492)
         at com.sap.engine.services.webservices.espbase.client.jaxws.core.SAPServiceDelegate.createDispatch(SAPServiceDelegate.java:484)
         at javax.xml.ws.Service.createDispatch(Service.java:166)
    I have done some research and it appears that as of NetWeaver 7.1 SP3 SAP stopped using the SUN JAX-WS runtime and implemented their own SAP JAX-WS runtime. I also took the time to decompile the jar file that contained the SAPServiceDelegate class which is throwing the null pointer exception. (see method from SAPServiceDelegate below)
        private ClientConfigurationContext createDispatchContextExistingPort(QName portName, JAXBContext jaxbContext)
            BindingData bindingData;
            InterfaceMapping interfaceMap;
            InterfaceData interfaceData;
            bindingData = clientServiceCtx.getServiceData().getBindingData(portName);
            if(bindingData == null)
                throw new WebServiceException((new StringBuilder()).append("Binding data '").append(portName.toString()).append("' is missing!").toString());
            QName bindingQName = new QName(bindingData.getBindingNamespace(), bindingData.getBindingName());
            interfaceMap = getInterfaceMapping(bindingQName, clientServiceCtx);
            interfaceData = getInterfaceData(interfaceMap.getPortType());
            ClientConfigurationContext result = DynamicServiceImpl.createClientConfiguration(bindingData, interfaceData, interfaceMap, null, jaxbContext, getClass().getClassLoader(), clientServiceCtx, new SOAPTransportBinding(), false, 1);
            return result;
            WebserviceClientException x;
            x;
            throw new WebServiceException(x);
    The exception is being throw on the line where the interfaceMap.getPortType() is being passed into the getInterfaceData method. I checked the getInterfaceMapping method which returns the interfaceMap (line above the line throwing the exception). This method returns NULL if an interface cannot be found. (see getInterfaceMapping method  below)
       public static InterfaceMapping getInterfaceMapping(QName bindingQName, ClientServiceContext context)
            InterfaceMapping interfaces[] = context.getMappingRules().getInterface();
            for(int i = 0; i < interfaces.length; i++)
                if(bindingQName.equals(interfaces<i>.getBindingQName()))
                    return interfaces<i>;
            return null;
    What appears to be happening is that the getInterfaceMapping method returns NULL then the next line in the createDispatchContextExistingPort method attempts to call the getPortType() method on a NULL and throws the Null Pointer Exception.
    I have included the code we use to create a client below. It works fine on all the platforms we support with the exception of NetWeaver 7.1 SP3 and higher (I already checked SP5 as well)
          //Create URL for service WSDL
          URL serviceURL = new URL(null, wsEndpointWSDL);
          //create service qname
          QName serviceQName = new QName(targetNamespace, "WSService");
          //create port qname
          QName portQName = new QName(targetNamespace, "WSPortName");
          //create service
          Service service = Service.create(serviceURL, serviceQName);
          //create dispatch on port
          serviceDispatch = service.createDispatch(portQName, Source.class, Service.Mode.PAYLOAD);
    What do I need to change in order to create a JAX-WS dispatch client on top of the SAP JAX-WS runtime?

    Hi Guys,
    I am getting the same error. Any resolution or updates on this.
    Were you able to fix this error.
    Thanks,
    Yomesh

  • The source and target structure have a different number of fields

    Hi,
    I am new to workflow and I am trying to create an attachment in Workflow (SAP ECC 6.0) and pass it through to a User Decision (User Decision works fine) however the workflow is failing on the attachment step with u2018The source and target structure have a different number of fieldsu2019. The bindings check ok. Please see details below.
    I have used document u2018Creating Attachments to Work Items or to User Decisions in Workflowsu2019 by Ramakanth Reddy for guidance. Thanks in advance.
    1) Workflow containers (SWDD)
    WORKITEMID (import)
    ZSWR_ATT_ID (export)
    SOFM (export)
    2) Task Container (PFTC)
    1 Import parameter defined u2013 WORKITEMID (swr_struct-workitemid)
    2 Export parameters defined
    - SOFM (Ref. obj. type SOFM)
    - ZSWR_ATT_ID  (swr_att_id-doc_id)
    Binding task -> Method
    Binding for 1 parameter (import) defined
    Task <- Method
    Binding for 2 parameters (export) defined
    3) Z  BOR object created with a Method, Method Parameters and Event (SWO1)
    1 import parameter defined
    2 export parameters defined
    Method calls FM SSF_FUNCTION_MODULE_NAME, CONVERT_OTF, SCMS_XSTRING_TO_BINARY and SAP_WAPI_ATTACHMENT_ADD
    Workflow is triggered by FM SAP_WAPI_CREATE_EVENT, Return_code = 0
    Event_id = 00000000000000000001
    Test results
    A) Triggered by ABAP/ FM SAP_WAPI_CREATE_EVENT - SWI2_DIAG results
    Work item  14791: object <z bor object name> method <method name> cannot be executed. The source and target structure have a different number of fields (this message is repeated 3 times). Error handling for work item 14791. No errors occurred -> details in long text (message is repeated 3 times).
    Message no. WL821, OL383, WL050 in long text
    B) Z BOR Test method <execute>
    Enter workitem id.
    Runtime error - Data objects in Unicode programs cannot be converted. The statement "MOVE src TO dst" requires that the operands "dst" and "src" are convertible. Since this statement is in a Unicode program, the special conversion rules for Unicode programs apply.                                        
    In this case, these rules were violated.   
    Program                             SAPLSWCD                
    Include                                LSWCDF00                
    Row                                    475                     
    Module type                        (FORM)                  
    Module Name                      MOVE_CONTAINER_TO_VALUE           
    C) Z BOR Test method <debugging>
    Enter workitem id.
    SAP_WAPI_ATTACHMENT_ADD, return_code = 0, message_lines  = Attachment created            
    both  swc_set_element container work ok
    Runtime error occurs after end_method executed. Data objects in Unicode programs cannot be converted.
    D) Workflow test
    Enter workitem id <execute>
    Task started> Workflow log> Status = Error
    Workflow errors in Attachment step (however Office document can be viewed in details for step).

    Problem has now been resolved. Problem was related to use of swr_att_id structure and swc_set_element statement in BOR program - problem resolved by only setting w/f container to swr_att_id-doc_id.

  • SQL ENTERPRISE: The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database

    The error below makes absolutely no sense! I'm using Enterprise Core...yet I'm being told I can't use remote data sources:
    w3wp!library!8!03/05/2015-19:08:48:: i INFO: Catalog SQL Server Edition = EnterpriseCore
    w3wp!library!8!03/05/2015-19:08:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: , Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "The edition of Reporting
    Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.;
    Really? This totally contradicts the documentation found here:
    https://msdn.microsoft.com/en-us/library/ms157285(v=sql.110).aspx
    That article says remote connections are completely supported.
    ARGH! Why does this have to be so difficult to setup?!?

    Hi jeffoliver1000,
    According to your description, you are using Enterprise Core edition and you are prompted that you can’t use remote data sources.
    In your scenario, we neither ignore your point nor be doubt with what you say. But actually we have met the case before that even though the SQL Server engine is Enterprise but the reporting services is still standard. So I would recommend you to find the
    actual edition of reporting services you are using. You can find Reporting Services starting SKU in the Reporting Service logs ( default location: C:\Program Files\Microsoft SQL Server\<instance name>\Reporting Services\LogFiles). For more information,
    please refer to the similar thread below:
    https://social.technet.microsoft.com/Forums/en-US/f98c2f3e-1a30-4993-ab41-acbc5014f92e/data-driven-subscription-button-not-displayed?forum=sqlreportingservices
    By the way, have you installed the other SQL Server edition before?
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

Maybe you are looking for