JPA EntityListener getting Principal

Hello,
I have created an EntityListener to set the audit columns when persisting
public void prePersist(Object o) {
if (o instanceof Auditable) {
String name = "SCM";
Auditable auditable = (Auditable)o;
AuditInformation info = auditable.getAuditInformation();
Date date = new Date();
info.setCreatedBy(name);
info.setCreationDate(date);
info.setLastUpdatedBy(name);
info.setLastUpdateDate(date);
public void preUpdate(Object o) {
if (o instanceof Auditable) {
String name = "SCM";
Auditable auditable = (Auditable)o;
AuditInformation info = auditable.getAuditInformation();
Date date = new Date();
info.setLastUpdatedBy(name);
info.setLastUpdateDate(date);
For the moment the name is hard coded. I want to use the name of the Principal
In a session bean is can easly get it using
@Resource EJBContext context;
public String getUserId() {
Principal principal = context.getCallerPrincipal();
if (principal != null) {
return principal.getName();
return "Anonymous";
But I don't realy know how to do this in my EntityListener
Does anyone have a good solution for this?
Regards,
Tim

That is what I'm doing now. I'm doing a JNDI lookup of "java:comp/EJBContext"
It is working well, but I was hoping to avoid the JNDI lookup.
Regards,
Tim

Similar Messages

  • Watched folder error - "Exception while getting principal from Directory manager"

    Hi! I've been having problems with a LiveCycle ES installation.
    I've configured a watched folder that starts a process with an Office
    Document, converts it to PDF and applies a Rights Management Policy.
    It runs on behalf of an Active Directory user.
    Sometimes it works flawlessly, but most of the time it fails, giving a
    ridiculously long failure log with the longest trace stacks I've ever
    seen in life... resumed:
    =======================
    ALC-DSC-600-000: com.adobe.idp.dsc.provider.service.scheduler.impl.SchedulerRuntimeException : Failure to invoke the job [watched_folder_endpoint_name]
    Caused by: ALC-FEP-011-000: com.adobe.idp.dsc.service.file.impl.FileProviderRuntimeException: Failed to get the context on behalf of user [username], domain [company_domain] for watch folder [watched_folder_endpoint_name]
    Caused by: | [com.adobe.idp.um.api.impl.AuthenticationManagerImpl] errorCode:16386 errorCodeHEX:0x4002 message:Exception while getting principal from Directory manager| [IDPLoggedException] errorCode:12801 errorCodeHEX:0x3201 message:Exception while getting principal from Directory manager
    chainedException:javax.ejb.TransactionRolledbackLocalException: null;
    CausedByException is:
    nullchainedExceptionMessage:null; CausedByException is:
    null chainedException
    trace:javax.ejb.TransactionRolledbackLocalException: null;
    CausedByException is:
    null
    =======================
    I vaguely suspect is the server's clock going out of sync with the domain controller's clock, but I tried everything I knew of about it with no consistent results.
    It's LiveCycle 8.0.1 SP2 installed on a Windows 2003 Server.
    Manual install, JBoss Clustered configuration (the second node is actually turned off for the time being)
    SQL Server 2005 as backend Database
    Users on Active Directory on a Windows 2003 Server -which is a "copy" of the main domain controller.
    Watched folder is in a mounted share of another Windows 2003 Server acting as fileserver.
    Any clue will be greatly appreciated!!

    Hello,
    sorry in advance for my english. i am beginning in Adobe LiveCycle and i think that you can help me : i want to configure a watched folder to automatically convert in pdf file and apply a right management policy. Can you tell me how you configure it ? many thanks in advance. regards

  • Getting principal data as null in Adapter Module

    Hello Everyone,
    I am trying to work with Attachments in my Module.
    The Scenario I have configured is that I have a Sender File Adapter, which picks up 2 files one as body and the second as attachment :
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    In my Module I want to put the content of the attachment file into the main payload but the following line of Code returns a null value
    Message msg = (Message)moduledata.getPrincipalData();
    I can see the data in this case is present as Supplementary Data but the Principal Data in the moduledata is null.
    Is this expected behavior in this case / all case where we would have attachments in the payload or something is wrong in the Configurations?
    Can somebody clear my doubt as to what is exactly contained in the Principal Data and what is contained in the Supplementary Data ?
    Any help will be greatly appreciated.
    Best Regards,
    Kanwaljit

    Hi Kanwaljit,
    I haven't tried to pull attachments, but I use the following code successfully to get the XI message. It looks equivalent to what you're doing. Have you already manipulated the message before this point, using another module. Maybe you've swapped the principal and supplementary data?
         public ModuleData process(ModuleContext moduleContext, ModuleData inputModuleData)
              throws ModuleException {
              Object obj = null;
              Message msg = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message) obj;
              } catch (Exception e) {
                   ModuleException me = new ModuleException(e);
                   throw me;
    I would look in the JavaDocs for the com.sap.aii.af.mp.module.ModuleData class to see what's available. This SAP Help page tells where to find the JavaDocs.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/32/43d84072378031e10000000a1550b0/content.htm
    Thanks,
    J Wolff

  • Getting principal from inside an EJB

    Hello,
    Just a quick question.
    How do I get the authenticated principal from inside an EJB in OC4J?
    thanks.
    Rudi
    null

    solved,
    public class MyEjbBean implements MyRemoteInterface {
    @Resource
    SessionContext context;
    public void busMethod() {
    Principal p = sessionCtx.getCallerPrincipal();
    }

  • How to get fixed results using JPA

    Hi
    I have a table with lot of rows, when I querry, it is taking a lot of time and I am displaying that many rows in UI in single table. So it is not scaling well.
    SO I am planing to show x number of row in on page. So for that to achieve, how do I querry the db (derby) using JPA to get first 25 rows, next 25 rows...
    I appricate any help
    thanks

    i think you can have a serial number column in your table and you keep track of that serial number. I mean pass it to your method along with the size of page. Lets say if the number starts from 0 then you can calculate the first page using starting number + page size, if your page size is 25 then you will get 0+25 =25 and you can use the result to query from database like;
    select * from myTable where rowNo<=25
    You can store this number (Now 25) in user's session and pass it to the method.

  • Org.apache.jackrabbit.api.security.principal.PrincipalManager not resolving in 5.6.1

    Hi,
    I am trying to add acl to the node dynamically.
    For a path "/content/dam/abc" folder I want to add read and write access to "testusers" group through the api.
    For this I am trying to create principal and privilages objects.
    I am using below code for getting Principal Manager. At compile time in maven it is compiling but the bundle is not getting activated once you install bundle in CQ.
    PrincipalManager pm = AccessControlUtil.getPrincipalManager(session);
    org.apache.jackrabbit.api.security.principal,version=[1.5,2) -- Cannot be resolved
    above error is coming in the bundle imports.
    -Maruthi

    Hi,
    I am trying to add acl to the node dynamically.
    For a path "/content/dam/abc" folder I want to add read and write access to "testusers" group through the api.
    For this I am trying to create principal and privilages objects.
    I am using below code for getting Principal Manager. At compile time in maven it is compiling but the bundle is not getting activated once you install bundle in CQ.
    PrincipalManager pm = AccessControlUtil.getPrincipalManager(session);
    org.apache.jackrabbit.api.security.principal,version=[1.5,2) -- Cannot be resolved
    above error is coming in the bundle imports.
    -Maruthi

  • Why JPA? What's the Point?

    I'm creating a hobby application to learn new technologies. I have been struggling with the JPA portion for months now. What I would like to know is, what is waiting at the end of the tunnel? If I continue struggling with JPA and finally learn it, what have I gained? How is an application that uses JPA better than one that uses SQL statements for database operations?

    Thank you C_Walker and BlueSmurf (is there any other color Smurf?) for taking the time to respond to me.
    First I believe that when an application gets to the point that C_Walker's four points come into play there will be JavaBean entity classes that contain more than just the @Entity and @Id annotations.
    Also, even in a relatively simple application JPA is not quite as easy to use as C_Walker are indicating.
    I am a little confused by point 3. In my hobby application I am assigning IDs in a non-portable way. I didn't think I had a choice, perhaps because I am using the Firebird database. Did I miss something in JPA? (Very likely.)
    I hope I understand you to be saying that once I learn JPA and get it implemented, my applications will be more easily scalable.
    I do have a question for you. If you were working on a small JSE desktop application where scalability was never going to be an issue, would you use JPA or JDBC?
    BlueSmurf wrote:
    ...because after three months I am still not able to reliably insert or update a record.What are the specific issues with inserting or updating a record?
    Specifically I have been plagued with database inserts and updates that work most of the time but not all of the time. Currently I can replicate a condition where an update will correctly modify foreign key fields in a record but not text fields. I know my entity object contains the updated text and my update code is being executed but the database record is not updated and no error messages are generated. Obviously I still don't understand how to update a record in the database. From what I have read on the Web I believe my confusion is common. Even C_Walker's example for updating records indicates using em.persist(). The Java EE 5 tutorial and articles on Sun Web sites don't indicate you need to call persist() to updated data, just commit the transaction. Perhaps not calling persist() is part of my problem.
    The intricacies of JPA appear to be much more complex than straight SQLPlease explain what complex intricacies you refer to.
    In my experience a properly crafted JDBC SQL statement will work. Using JPA a properly crafted query will not work if your entity class annotations are not correct. Updates may not work correctly if the entity annotations are not correct. Entities can become detached and un-managed even though I have not cleared or closed the EntityManager. Can I use container managed transactions or EntityManagers in helper classes in the EJB environment? Actually, I have already given up on container managed transactions. When a query returns entities with foreign entities, are the foreign entities automatically managed by the EntityManager? What is the correct way to insert a new foreign record? Do I create the foreign entity and relationship, then call persist() on it, or do I merge() the primary entity?
    There is a little more to using JPA for persistence than there is to using JDBC. It doesn't seem to make my job easier.
    What implementation of the Java Persistence API (JPA) are you using?
    Everything I am using is Sun. I am using the GlassFish server with TopLink. I hope the information in the book you have suggested applies. My application is also using Sun JavaServer Pages, JavaServer Faces, and DynaFaces. I don't know if using any of these technologies affects how I can use the JPA or not. I have seen references on the Web indicating it does. If that is true, that is one more JPA complexity to deal with that probably wouldn't apply with JDBC.
    If you have gotten this far in this message you are spending too much time reading messages on online forums. :-)
    Thanks again to both of you for your replies. You both seem very much in favor of JPA over JDBC. I'm off to buy a book then modify my application, again, based on some more articles I have read on the Web.

  • Command Execution fails only under heavy load and JPA cache store.

    Using...
    Coherence: 3.5.2
    Commad Pattern: 2.5.0
    I have a servlet that simply creates a simple POJO puts in the cache and then fires off a command that does additional formatting to the POJO.
    With JDBC cachestore I have no problem. It works fine.
    With JPA I get the bellow exception under heavy load only. I.e: If I send one-two requests. Everything works fine and my data is present in the database after 30 second write-behind. Once I bump up to 200 users I get the exception.
    I figure I'm running out of memory on the cache because of JPA enitites take more resources?
    2010-01-21 10:50:01.051/159.235 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=3): Failed to execute CommandExecutionRequest.Key
    {contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1158}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 10:50:01.051/159.235 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=3): (Wrapped: Failed request execution for ModelService service on Member(Id=3, Timestamp=2010-01-21 10:47:22.79, Address=xxxxxx:8088, MachineId=2616, Location=site:xxxxxx,machine:xxxxx,process:2
    560, Role=CoherenceServer)) java.lang.NullPointerException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
    ... 7 more
    Servlet
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     
              PrintStream out = new PrintStream(response.getOutputStream());
              NamedCache logCache = CacheFactory.getCache("ca.xxxxxx.model.Log");
              Log log = new Log(idGenerator.generateIdentity(), "This is a log...");
              // Do some work here...
              log.setStampOut(new Date());          
              logCache.put(log.getId(), log);
              CommandSubmitter commandSubmitter = DefaultCommandSubmitter.getInstance();                    
              commandSubmitter.submitCommand(contextIdentifier, new EncryptCommand(log));
              out.println("Log Id: " + log.getId() + " - Message: " + log.getMessage() + "++99");
              response.flushBuffer();
         }Command
    00000001 package ca.xxxxxx.coherence.command;
    00000002
    00000003 import java.io.IOException;
    00000004
    00000005 import com.oracle.coherence.patterns.command.Command;
    00000006 import com.oracle.coherence.patterns.command.ExecutionEnvironment;
    00000007 import com.tangosol.io.pof.PofReader;
    00000008 import com.tangosol.io.pof.PofWriter;
    00000009 import com.tangosol.io.pof.PortableObject;
    00000010 import com.tangosol.net.CacheFactory;
    00000011 import com.tangosol.net.NamedCache;
    00000012 import com.tangosol.util.InvocableMap;
    00000013 import com.tangosol.util.processor.AbstractProcessor;
    00000014
    00000015 import ca.xxxxxx.coherence.util.identity.sequence.Sequence;
    00000016 import ca.xxxxxx.coherence.util.identity.sequence.SequenceBlock;
    00000017 import ca.xxxxxx.model.Log;
    00000018
    00000019 @SuppressWarnings( { "unchecked" })
    00000020 public class EncryptCommand implements Command, PortableObject {
    00000021
    00000022      private Log log;
    00000023
    00000024      public EncryptCommand() {
    00000025      }
    00000026
    00000027      public EncryptCommand(Log log) {
    00000028           this.log = log;
    00000029      }
    00000030
    00000031      public void execute(ExecutionEnvironment executionEnvironment) {
    00000032
    00000033           NamedCache cache = CacheFactory.getCache("ca.xxxxxx.model.Log");
    00000034
    00000035           cache.invoke(log.getId(), new EncryptProcessor(log));
    00000036           
    00000037           //cache.put(log.getId(), log);
    00000038      }
    00000039
    00000040      public void readExternal(PofReader reader) throws IOException {
    00000041           this.log = (Log) reader.readObject(0);
    00000042      }
    00000043
    00000044      public void writeExternal(PofWriter writer) throws IOException {
    00000045           writer.writeObject(0, log);
    00000046      }
    00000047
    00000048 /*
    00000049      public String toString() {
    00000050           return String.format("LoggingCommand{%s, id=%d, message=%s}", super
    00000051                     .toString(), log.getId(), log.getMessage());
    00000052      }
    00000053 */
    00000054 } Processor
    00000001 package ca.xxxxxx.coherence.command;
    00000002
    00000003 import java.io.IOException;
    00000004
    00000005 import ca.xxxxxx.coherence.util.identity.sequence.Sequence;
    00000006 import ca.xxxxxx.coherence.util.identity.sequence.SequenceBlock;
    00000007 import ca.xxxxxx.model.Log;
    00000008
    00000009 import com.tangosol.io.pof.PofReader;
    00000010 import com.tangosol.io.pof.PofWriter;
    00000011 import com.tangosol.io.pof.PortableObject;
    00000012 import com.tangosol.util.InvocableMap;
    00000013 import com.tangosol.util.processor.AbstractProcessor;
    00000014
    00000015 public class EncryptProcessor extends AbstractProcessor implements PortableObject{
    00000016
    00000017      private static final long serialVersionUID = -6272835614833329999L;
    00000018      private Log log;
    00000019      
    00000020      public EncryptProcessor(){
    00000021           // deserialization constructor          
    00000022      }
    00000023      
    00000024      public EncryptProcessor(Log log){
    00000025           this.log = log;
    00000026      }
    00000027
    00000028      public Object process(InvocableMap.Entry entry)
    00000029      {
    00000030           Log log = (Log)entry.getValue();
    00000031           
    00000032           // Pretend we are encrypting. Proof that async processing is better.
    00000033           try
    00000034           {
    00000035                Thread.sleep(50);
    00000036           }
    00000037           catch(Exception ex)
    00000038           {
    00000039                System.out.println("Exception: " + ex.toString());
    00000040           }
    00000041           
    00000042           log.setMessage("!@#$%^&*()-_=+");
    00000043
    00000044           entry.setValue(log);
    00000045
    00000046           return log;          
    00000047      }
    00000048
    00000049      public void readExternal(PofReader reader) throws IOException {
    00000050           this.log = (Log) reader.readObject(0);
    00000051      }
    00000052
    00000053      public void writeExternal(PofWriter writer) throws IOException {
    00000054           writer.writeObject(0, log);
    00000055      }     
    00000056 }Edited by: user12249856 on Jan 21, 2010 8:12 AM
    Edited by: user12249856 on Jan 21, 2010 8:13 AM
    Edited by: user12249856 on Jan 21, 2010 8:14 AM
    Edited by: user12249856 on Jan 21, 2010 9:07 AM
    Edited by: user12249856 on Jan 21, 2010 10:15 AM

    Done look at the original thread logs are below... I'm thinking that the key is no longer in the cache at the point the processor fires?
    I can also assure you that there is only to instance of coherence running
    1- The actual cache server node
    2- The client, set to localstorage = false
    I ensure the cache server starts and then I start the client.
    Logs
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/tangosol-coherence-override.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2010-01-21 13:36:12.784/0.422 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "file:/xxxxxx/coherence/bin/test-cache-config.xml"
    2010-01-21 13:36:12.799/0.437 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "jar:file:/xxxxxx/coherence/lib/coherence-commandpattern-2.5.0.jar!/coherence-commandpattern-pof-cache-config.xml"
    2010-01-21 13:36:12.799/0.437 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/coherence-common-cache-config.xml"
    2010-01-21 13:36:13.159/0.797 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2010-01-21 13:36:16.409/4.047 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0xD3FB" with Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=4, SocketCount=2) UID=0x0A00004200000126522B95890A421F98
    2010-01-21 13:36:16.424/4.062 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=1): Service Management joined the cluster with senior service member 1
    2010-01-21 13:36:16.627/4.265 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForSequenceGenerators, member=1): Service DistributedCacheForSequenceGenerators joined the cluster with senior service member 1
    2010-01-21 13:36:16.643/4.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Service DistributedCacheForCommandPattern joined the cluster with senior service member 1
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "file:/xxxxxx/coherence/bin/test-pof-config.xml"
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/coherence-pof-config.xml"
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/coherence-common-pof-config.xml"
    2010-01-21 13:36:16.674/4.312 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence-commandpattern-2.5.0.jar!/coherence-commandpattern-pof-config.xml"
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPatternDistributedCommands, member=1): Service DistributedCacheForCommandPatternDistributedCommands joined the cluster with senior service member 1
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:SequencesService, member=1): Service SequencesService joined the cluster with senior service member 1
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService joined the cluster with senior service member 1
    2010-01-21 13:36:16.768/4.406 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=1): Started DefaultCacheServer...
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}
    MasterMemberSet
    ThisMember=Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    OldestMember=Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    RecycleMillis=120000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
    TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=xxxxxx:8088}, Connections=[]}
    ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
    InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
    DistributedCache{Name=DistributedCacheForSequenceGenerators, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=DistributedCacheForCommandPattern, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=DistributedCacheForCommandPatternDistributedCommands, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=SequencesService, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=ModelService, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    2010-01-21 13:36:47.534/35.172 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2010-01-21 13:36:47.346, Address=xxxxxx:8088, MachineId=2648, Location=site:xxxxxx.net,machine:xxxxxx,process:1912, Role=MortbayStartMain) joined Cluster with senior member 1
    2010-01-21 13:36:47.580/35.218 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior member 1
    2010-01-21 13:36:47.768/35.406 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service SequencesService with senior member 1
    2010-01-21 13:36:47.877/35.515 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:SequencesService, member=1): Service SequencesService: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:36:47.971/35.609 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCacheForCommandPattern with senior member 1
    2010-01-21 13:36:47.971/35.609 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Service DistributedCacheForCommandPattern: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:36:48.034/35.672 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Context Identifier{TestEncrypt} has been inserted into this member
    2010-01-21 13:36:48.034/35.672 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Creating CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Created CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Scheduling ContextExecutor for Identifier{TestEncrypt} to start
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Starting CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.080/35.718 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): CommandExecutor for Identifier{TestEncrypt} has been configured as DefaultContextConfiguration{managementStrategy=DISTRIBUTED}
    2010-01-21 13:36:48.080/35.718 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Recovering unexecuted commands for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): No commands to recover for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Registering JMX management extensions for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): No commands to execute for CommandExecutor Identifier{TestEncrypt}. (waiting for commands to be submitted)
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Started CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.424/36.062 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xxxxxx,port=8088,localport=3301]}
    2010-01-21 13:37:26.940/74.578 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service ModelService with senior member 1
    2010-01-21 13:37:26.940/74.578 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:37:27.362/75.000 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCacheForCommandPatternDistributedCommands with senior member 1
    2010-01-21 13:37:27.377/75.015 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPatternDistributedCommands, member=1): Service DistributedCacheForCommandPatternDistributedCommands: sending ServiceConfigSync containing 259 entries to Member 2
    2010-01-21 13:38:30.721/138.359 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1): Attempting recovery (due to soft timeout) of Daemon{Thread="Thread[WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore),5,WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore)]", State=Running}
    2010-01-21 13:38:34.268/141.906 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1): Terminating guarded execution (due to hard timeout) of Daemon{Thread="Thread[WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore),5,WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore)]", State=Running}
    2010-01-21 13:38:34.268/141.906 Oracle Coherence GE 3.5.2/463 <Error> (thread=Termination Thread, member=1): Write-behind thread timed out; stopping the cache service
    2010-01-21 13:38:34.284/141.922 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService left the cluster
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1223}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): java.lang.RuntimeException: Service has been terminated
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissingStorage(DistributedCache.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:34)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.invoke(DistributedCache.CDB:20)
         at com.tangosol.util.ConverterCollections$ConverterInvocableMap.invoke(ConverterCollections.java:2110)
         at com.tangosol.util.ConverterCollections$ConverterNamedCache.invoke(ConverterCollections.java:2565)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.invoke(DistributedCache.CDB:11)
         at com.tangosol.coherence.component.util.SafeNamedCache.invoke(SafeNamedCache.CDB:1)
         at ca.xxxxxx.coherence.command.EncryptCommand.execute(EncryptCommand.java:92)
         at com.oracle.coherence.patterns.command.internal.CommandExecutor.execute(CommandExecutor.java:889)
         at com.oracle.coherence.patterns.command.internal.CommandExecutor$3.run(CommandExecutor.java:960)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): Restarting Service: ModelService
    2010-01-21 13:38:34.502/142.140 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService joined the cluster with senior service member 2
    2010-01-21 13:38:34.518/142.156 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService: received ServiceConfigSync containing 259 entries
    2010-01-21 13:38:34.518/142.156 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): Restarting NamedCache: ca.xxxxxx.model.Log
    2010-01-21 13:38:34.549/142.187 Oracle Coherence GE 3.5.2/463 <Warning> (thread=DistributedCache:ModelService, member=1): Assigned 257 orphaned primary partitions
    2010-01-21 13:38:34.549/142.187 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:ModelService, member=1): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256,
    2010-01-21 13:38:34.643/142.281 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1224}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.643/142.281 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.705/142.343 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1225}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.721/142.359 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.784/142.422 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1226}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.784/142.422 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.846/142.484 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1227}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.862/142.500 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.924/142.562 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1228}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.924/142.562 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:35.002/142.640 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1229}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:35.002/142.640 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:35.065/142.703 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1230}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:35.065/142.703 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped:

  • How to put grouped results all on one line.

    I amt trying to get Principal, Interest, Principal YTD, Interest YTD from a transaction table to get them all on one line, but I can't seem to get it. I have a script here that can run without modification to see what I have here. The very last query is
    incorrect, as it puts each value on a separate line, but it demonstrates what I am getting so far. What I want is one account number with 4 columns, as above mentioned. Keep in mind, in this illustration, YTD is last year and forward:
    CREATE TABLE #a
    PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 450, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 100, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 351, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 102, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 850, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 200, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 880, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 855, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 203, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'P', 451, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 1, 'I', 99, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 352, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 101, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 353, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'P', 354, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 2, 'I', 103, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 851, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 199, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 881, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'P', 854, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES ( 3, 'I', 205, '2013-12-01')
    SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE
    FROM #a
    SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    -- Query to put this all these 4 columns on the same line, ending up with 3 lines.
    DROP TABLE #a

    Try the below query
    CREATE TABLE #a
     PMT_ID INT IDENTITY(1,1),ACCT_NO INT, PMT_TYPE CHAR(1), PMT_AMT MONEY, PMT_DATE DATE)
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 450, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 100, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 351, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 352, '2012-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 353, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 102, '2012-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 850, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 200, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 880, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 855, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 203, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'P', 451, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 1, 'I', 99, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 352, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 101, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 353, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 103, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'P', 354, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 2, 'I', 103, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 851, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 199, '2013-09-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 881, '2013-10-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 201, '2013-11-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'P', 854, '2013-12-01')
    INSERT INTO #a ( ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE ) VALUES  ( 3, 'I', 205, '2013-12-01')
    SELECT PMT_ID, ACCT_NO, PMT_TYPE, PMT_AMT, PMT_DATE 
    FROM #a
    SELECT ACCT_NO, SUM(PMT_AMT) TOT_PRINCIPAL_PAID
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_PRINCIPAL_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    SELECT ACCT_NO, SUM(PMT_AMT) TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I' 
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    select 
    T123.ANO,
    SUM(TOTAL_PRINCIPAL_PAID) TOTAL_PRINCIPAL_PAID,
    SUM(TOTAL_INTEREST_PAID) TOTAL_INTEREST_PAID ,
    SUM(TOTAL_PRINCIPAL_PAID_YTD) TOTAL_PRINCIPAL_PAID_YTD,
    SUM(TOTAL_INTEREST_PAID_YTD) TOTAL_INTEREST_PAID_YTD
    from
    SELECT ACCT_NO ANO
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID
    ,NULL AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL AS TOTAL_PRINCIPAL_PAID
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID
    ,NULL AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL         AS TOTAL_PRINCIPAL_PAID
    ,NULL         AS TOTAL_INTEREST_PAID
    ,SUM(PMT_AMT) AS TOTAL_PRINCIPAL_PAID_YTD
    ,NULL         AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'P'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO
    UNION
    SELECT ACCT_NO
    ,NULL         AS TOTAL_PRINCIPAL_PAID
    ,NULL         AS TOTAL_INTEREST_PAID
    ,NULL         AS TOTAL_PRINCIPAL_PAID_YTD
    ,SUM(PMT_AMT) AS TOTAL_INTEREST_PAID_YTD
    FROM #a
    WHERE PMT_TYPE = 'I'
    AND DATEPART(year,[PMT_DATE])=DATEPART(year,DATEADD(year,-1,GETDATE()))
    GROUP BY ACCT_NO)T123
    Group by T123.ANO 
    DROP TABLE #a

  • How to read Sender Interface name in adapter Module in PI 7.31

    Hello All,
    I am working on Adapter module .it accomplish to generate file with message id,message key ,sent time,received time,FromService(Business system names),toServiece(Business system name),sender interface name,receiver interface name .
    i got all details in my file by calling module data by method get principal data,but i am fail to get sender interface in that file .
    can you please guide me how to get sender interface name in adapter module.
    I am getting some information from this following blogs
    https://scn.sap.com/thread/1583665
    How to read Sender Interface name in Adapter module
    but i am facing same error what they faced.
    Please guide me to how to get sender interface name in adapter module.
    Thanks
    Ganesh

    Hi Ganesh
    Write a module in the sender adapter and use this piece of code
    Message mes = null;
    mes = (Message) inputModuleData.getPrincipalData();
    String SI = mes.getAction().getName();
    Also you can read the same by creating a UDF in message mapping
    Following is the code
    InputHeader inputHeader = container.getInputHeader();
    String SI = inputHeader.getInterface() ;

  • Xml payload in a single field

    Hi All,
    I hve a scenario like this ERP->XI->Monitoring system
    In the mapping, I need to assign the outbound payload (whole xml) to a field in the target
    message field since the (Target) Monitoring system wants to receive the whole xml message in single field.
    How can i achieve this?
    Thanks
    Deno

    try this.. some of the imports are not required.. however I just copied from my code..
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.service.trace.Trace;
    import java.util.Hashtable;
    //XML Parsing and Transformation classes
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import java.io.InputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.StringWriter;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    import com.sun.org.apache.xml.internal.serialize.OutputFormat;
    import com.sun.org.apache.xml.internal.serialize.XMLSerializer;
    import javax.xml.transform.*;
    import javax.xml.transform.Source;
    import javax.xml.transform.Result;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;     
    Object obj = null; //Handler to get principal data
              Message msg = null;// Handler to get message object
              String getXMLtoField = null;
              try {
                   obj = inputModuleData.getPrincipalData();
                   msg = (Message)obj;
                   XMLPayload xmlpayload = msg.getDocument();
                        DocumentBuilderFactory factory;
                        factory =DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
                        // parse the XML Payload
                        Document document = builder.parse((InputStream)
                        xmlpayload.getInputStream());
                        OutputFormat format = new OutputFormat(document);    // Serialize DOM
                        StringWriter stringOut = new StringWriter();    // Writer will be a String
                        XMLSerializer serial = new XMLSerializer(stringOut, format);
                        serial.asDOMSerializer();                       // As a DOM Serializer
                        serial.serialize(document.getDocumentElement());
                        String FileContent = stringOut.toString();
              return getXMLtoField;

  • Powershell CSOM Sharepoint online list permission

    I've been writing a script to connect to SharePoint online, create a document library and add some AD accounts to the permission. I've written all the code using snippets I have found through many searches but am having an issue with the permissions part.
    All of the code is taken from this page:
    http://jeffreypaarhuis.com/2012/06/07/scripting-sharepoint-online-with-powershell-using-client-object-model/
    The only change is i'm using the get principal fun instead of the get group, but not sure if that's what has done it. I'm very new to powershell.
    I keep getting an error when adding the user and permission type to roledefinitionbinding. The error is:
    Collection has not been initialized at line 0 char 0.
    The issue is when it runs $collRoleAssign.Add($principal, $collRdb) part and stop with the error above.
    I would really appreciate a hand with this before my PC get launched out of the window.
    Thanks Mark

    Hi,
    The following code snippet for your reference:
    var login = "[email protected]";
    var password = "xxxxxx";
    var siteURL=”https://SharePointOnlineSiteUrl”;
    ClientContext ctx = new ClientContext(siteURL);
    var securePassword = new SecureString();
    foreach (char c in password)
    securePassword.AppendChar(c);
    SharePointOnlineCredentials credentials = new SharePointOnlineCredentials(login, securePassword);
    ctx.Credentials = credentials;
    Web wsite = ctx.Web;
    ctx.Load(wsite, w => w.HasUniqueRoleAssignments, w => w.RoleAssignments.Include(roleAssigned => roleAssigned.Member.Title,
    roleAssigned => roleAssigned.RoleDefinitionBindings.Include(roleDef => roleDef.Name)));
    ctx.ExecuteQuery();
    RoleAssignmentCollection rac = wsite.RoleAssignments;
    if (rac != null && rac.Count !=0)
    Console.WriteLine("Unique Permissions: " + wsite.HasUniqueRoleAssignments);
    foreach (RoleAssignment ra in rac)
    Console.WriteLine("Group Name: " + ra.Member.Title);
    foreach (RoleDefinition rd in ra.RoleDefinitionBindings)
    Console.WriteLine("Permission: " + rd.Name);
    Console.ReadKey();
    More information:
    http://social.technet.microsoft.com/wiki/contents/articles/24087.associate-permission-levels-with-sharepoint-user-groups-using-the-client-side-object-model-in-netc.aspx
    Thanks,
    Dennis Guo
    TechNet Community Support
    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]
    Dennis Guo
    TechNet Community Support

  • Logging Native SQL queries

    Hi all,
    using JPA, i get all my data by ORM Instances, sometimes my pages are slow to load, i want to log JPA queries executed. I've search in JAS admin console without results.
    how can i enable Log queries and/or where can i list them?
    Regards,

    Logging depends on which JPA provider you are using.
    If you are using TopLink use the persistence.xml property "toplink.logging.level" = "fine".
    For EclipseLink use, "eclipselink.logging.level" = "fine".
    You could also enable the PerformanceProfiler.
    -- James : [http://www.eclipselink.org]

  • ALC-TTN-011-003: Bootstrapping failed for platform component [User Manager]

    I am trying  to upgrade to Adobe ES 8.2 from 7.2. Any help would be appreciated.
    When I am  trying to initialize the LiveCycle ES database, in Configuration Manager, as  depicted in <Upgrading to LiveCycle ES from 7.x fro JBoss> document, page  27, step 36, I got error: Failed on step 'Invoking component bootstrapper' of  task 'Bootstrapping UserManager'. ALC-TTN-103-000: Bootstrapping request failed  on server. Message from server: ALC-TTN-011-003: Bootstrapping failed for  platform component [User Manager]. The wrapped exception message reads: Failure to  loadConfiguration default. error:javax.ejb.EJBException: RuntimeException;  CausedByException is:
                 nullgetProvider failure: factory not initialized
    Here is what's in log  file:
    LiveCycle ES DATABASE initialization:
    2009-10-19 15:12:51,825 ERROR  [com.adobe.idp.um.businesslogic.bootstrapper.UMBootstrapperClient]  UserM:GENERIC_ERROR: [Thread Hashcode: 10899558] ***** Bootstrap FAILED to  complete *****
    2009-10-19 15:12:51,871 ERROR  [com.adobe.idp.um.businesslogic.bootstrapper.UMBootstrapperClient]  UserM:GENERIC_ERROR: [Thread Hashcode: 10899558] Bootstrap cannot recover from  error.| [com.adobe.idp.um.businesslogic.bootstrapper.BootstrapperManagerBean]  errorCode:8193 errorCodeHEX:0x2001 message:Failure to loadConfiguration default.  error:javax.ejb.EJBException: RuntimeException; CausedByException  is:
                nullgetProvider failure: factory not  initialized
    2009-10-19 15:13:33,645 WARN   [com.adobe.idp.common.errors.exception.IDPLoggedException]  UserM:GENERIC_WARNING: [Thread Hashcode: 4914621] |  [com.adobe.idp.storeprovider.jdbc.DBStoreFactory] errorCode:12290  errorCodeHEX:0x3002 message:getProvider failure: factory not  initialized
    2009-10-19 15:13:33,645 WARN   [com.adobe.idp.common.errors.exception.IDPLoggedException]  UserM:GENERIC_WARNING: [Thread Hashcode: 4914621] | [AuthenticationManagerBean]  errorCode:12801 errorCodeHEX:0x3201 message:Exception while getting principal  from Directory manager| [com.adobe.idp.storeprovider.jdbc.DBStoreFactory]  errorCode:12290 errorCodeHEX:0x3002 message:getProvider failure: factory not  initialized
    2009-10-19 15:13:33,645 INFO   [com.adobe.pdfg.internal.utils.EarProperties] ALC-PDG-001-000-Could not get  config properties : Exception in getting SystemContext
    http://help.adobe.com/en_US/livecycle/8.2/releasenotes.html
    Our  environment:
    OS: Windows  2003 sp2
    DB: MS SQL  Server 2005
    Upgrade  target: Adobe ES 8.2
    JBoss 4.0.3 SP1
    Scott Jiang

    I have encountered the same problem during the migration from Livecycle 7.2 to Livecycle ES. Rather than this, i have noticed some error when i started JBoss after copied 3 files from [ConfigurationManager]\export\.
    2010-07-05 21:50:00,102 ERROR [com.adobe.idp.dsc.startup.DSCStartupServlet] DSC Startup failed. Reason: Domain: dsc not found.
    2010-07-05 21:50:00,102 WARN  [com.adobe.idp.dsc.startup.DSCStartupServlet] Unable to start the DSCManager
    I am not sure whether this is a root cause or not.
    Any of you had an experience and have the resolution for solving this problem, please kindly help.
    Livecycle 7.2 env.
    Window 2003 SP2
    SQLServer 2000
    JBoss
    Livecycle form 7.2
    Livecycle form manager 7.2
    Livecycle reader extension 7.2
    Livecycle workflow 7.2
    Livecycle ES env.
    Window 2003 SP2
    SQLServer 2005
    JBoss
    Livecycle forms ES
    Livecycle reade rextension ES
    Livecycle process management ES
    Thank you for every help,
    Mac
    [email protected]

  • TOPLINK-38 ClassCastException if specifying toplink.cache.type. ENTITY

    Some background info:
    I am running a 10.1.3.3 OC4J standalone. On the same instance there is a resource adapter also using toplink JPA and get the entity manager from the factory instead of the container managed one. In my application, I also use an application managed EM. When deploying by myself, there is not issue. When it is deployed with the resource adapter, I would get the ClassCastException.
    If I removed the properties in the persistence.xml file that contains the "toplink.cache.type.<ENTITY>", the exception goes away and everything works fine. Following is my persistence.xml file.
    <persistence-unit name="oc4j" transaction-type="JTA">
    <provider>
    oracle.toplink.essentials.PersistenceProvider
    </provider>
    <jta-data-source>java:jdbc/OcmsXdmsDs</jta-data-source>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPAppUsage</class>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPUser</class>
    <class>oracle.sdp.xcapdatamodel.jpa.XCAPDocument</class>
    <class>oracle.sdp.xcapdatamodel.jpa.AppUsageSchema</class>
    <properties>
    <property name="toplink.session-name" value="xdms-multinode-session"/>
    <property name="toplink.logging.level" value="INFO"/>
    <!-- Optimize toplink caching -->
    <property name="toplink.cache.type.XCAPUser" value="None"/>
    <property name="toplink.cache.type.XCAPDocument" value="None"/>
    <property name="toplink.cache.type.XCAPAppUsage" value="Full"/>
    <property name="toplink.cache.type.AppUsageSchema" value="Full"/>
    </properties>
    </persistence-unit>

    Exception [TOPLINK-38] (Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))): oracle.toplink.essentials.except
    ions.DescriptorException
    Exception Description: Identity map constructor failed because an invalid identity map was specified.
    Internal Exception: java.lang.ClassCastException: oracle.toplink.essentials.internal.identitymaps.FullIdentityMap
    Descriptor: RelationalDescriptor(oracle.sdp.xcapdatamodel.jpa.AppUsageSchema --> [DatabaseTable(APPUSAGESCHEMA)])
    at oracle.toplink.essentials.exceptions.DescriptorException.invalidIdentityMap(DescriptorException.java:778)
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.jav
    a:293)
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.getIdentityMap(IdentityMapManager.java:716
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.acquireDeferredLock(IdentityMapManager.jav
    a:119)
    at oracle.toplink.essentials.internal.sessions.IdentityMapAccessor.acquireDeferredLock(IdentityMapAccessor.java:
    85)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:479)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneNormally(ObjectBuilder.java
    :451)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:421)
    at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:387)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.processItem(ReportQueryResult.java:220)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.buildResult(ReportQueryResult.java:182)
    at oracle.toplink.essentials.queryframework.ReportQueryResult.<init>(ReportQueryResult.java:98)
    at oracle.toplink.essentials.queryframework.ReportQuery.buildObject(ReportQuery.java:594)
    at oracle.toplink.essentials.queryframework.ReportQuery.buildObjects(ReportQuery.java:643)
    at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:804)
    at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
    at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:7
    46)
    at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2233)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
    at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:478)
    at oracle.sdp.xcapconfigmanager.JPAApplicationUsageImpl.loadXmlXsd(JPAApplicationUsageImpl.java:203)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.loadJPAAppUsage(XCAPConfigManager.java:447)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.loadApplicationUsages(XCAPConfigManager.java:402)
    at oracle.sdp.xcapconfigmanager.XCAPConfigManager.start(XCAPConfigManager.java:366)
    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:585)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.invokeLifeCycleOperation(ModelerBeanDeployer.java:315)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.startService(ModelerBeanDeployer.java:266)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.initializeServices(ModelerBeanDeployer.java:359)
    at oracle.sdp.jmxframework.ModelerBeanDeployer.preRegister(ModelerBeanDeployer.java:384)
    at com.sun.jmx.mbeanserver.BaseMetaDataImpl.preRegisterInvoker(BaseMetaDataImpl.java:83)
    at com.sun.jmx.mbeanserver.MetaDataImpl.preRegisterInvoker(MetaDataImpl.java:237)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:923)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:337)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:497)
    at oracle.oc4j.admin.jmx.server.state.ApplicationStateFilterMBeanServer.registerMBean(ApplicationStateFilterMBea
    nServer.java:349)
    at com.evermind.server.Application.registerApplicationMBeans(Application.java:2978)
    at com.evermind.server.Application.addJ2EEApplicationMBean(Application.java:1682)
    at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:201)
    at com.evermind.server.Application.setConfig(Application.java:438)
    at com.evermind.server.Application.setConfig(Application.java:339)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
    at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassCastException: oracle.toplink.essentials.internal.identitymaps.FullIdentityMap
    at oracle.toplink.essentials.internal.identitymaps.IdentityMapManager.buildNewIdentityMap(IdentityMapManager.jav
    a:289)

Maybe you are looking for

  • Fireface 800 issues!

    Hi my channel levels in logic pop to +6 max and distorting by themselves, accross all channels too. I shut off automation or wrote some to avoid any fader motion on but they still change by themselves regardless, same in the Fireface mixer., i will s

  • IDoc/ALE Data Transfer-Scenario

    Dear All, I want to transfer data from Master/Header table(Client 1) to the ZTable(Client 2) with the help of ALE plz suggest how. Thanks, RP

  • SAP NetWeaver Composition Environment 7.1

    Hi Can Any one provide any materials or links for the SAP NetWeaver Composition Environment 7.1 mail id : [email protected] I will be very thankfull for you if you provided some materials and links.. Thanks In Advance Regards Chandran S

  • FCE log and transfer goes from avchd to prores which then requires rendering down to AIC -- what's with that??

    Someone gave me a Sony camera (HDR-CX160) to try to get some footage out of... Log and Transfer worked fine, but the resulting files in Capture Scratch are ProRes.  When I add them to the timeline, it requires rendering (Lengthy rendering), presumabl

  • Problem Adding iCal Events Received via Email (used to work fine)

    My wife and I share iCal calendar events between our Mac's via email. A month or so ago I started getting this error when clicking on the link that comes with the iCal event email: "This calendar file is empty. No new events have been added to your i