App-V 5.0 connection group odd behavior

I am having some odd behavior with an application that I've packaged in App-V 5.0.  We are running App-V for RDS on Server 2012, and I'm on SP2.
The problem I'm having is with a program called SQL Tools 1.6 (a 3rd party tool, not from MS or Oracle).  It's a fairly straightforward program, and it runs fine on App-V 4.6.  But it requires an Oracle client to run.  On App-V 4.6, we have
the Oracle client installed locally on the server.  But with App-V 5, I wanted to make use of connection groups, so that we could use multiple Oracle versions, if necessary, and so that updating Oracle would be easier.  So I have a connection group
that contains SQL Tools and the Oracle client.
What is happening is that when I try to launch SQL Tools, I get an error saying it can't find OCI.DLL (which is in the Oracle path).  I took apart both packages, trying to make sure that the Oracle path variable was correct. I even added the Oracle
path to the SQL Tools package (I even tried hard-coding the local path to the Oracle package).  I always get the same error.  I also swapped the priority of the two packages, but it didn't help.  Then I tried launching a command prompt in the
context of the SQL Tools package.  When I checked the path variable, it was correct, and had the path to oci.dll.  Out of curiosity, I tried running SQL Tools, and it launched no problem.  Then I closed it and tried to launch it from the shortcut
on the desktop, and got the same error as before.  I've tried launching it from various places (desktop shortcut, direct path to the executable, a command prompt without specifying the context of the SQL Tools package, etc.), checking compatibility mode
and setting it to various settings (XP SP3, Windows 7, Run as Administrator on and off, etc.), but nothing seems to work except opening a command prompt in the context of the SQL Tools package, and then running SQL Tools from there.  As a workaround,
I created this short script that launches a command prompt in the context of the SQL Tools package, and then runs SQL Tools from that command prompt: 
$p = Get-AppvClientPackage -Name "SQL Tools 1.6"
$cmd = '"C:\ProgramData\App-V\BB0D9EC0-3876-42EB-A5E9-92A149D52FB5\37F941F9-B4BA-425F-9FB4-9B699843E767\Root\VFS\ProgramFilesX86\SQLTools 1.6\SQLTools.exe"'
Start-AppvVirtualProcess -FilePath cmd.exe -ArgumentList "/k $cmd" -AppvClientObject $p
It works, but I would rather not have to use this type of workaround for something that should work natively.
Any help would be greatly appreciated.
Thanks,
Sam

Hello,
What happens if you launch CMD instead of your tool when starting an application, and from that CMD you start sqltools.exe
So the command to start the application would be;
cmd.exe /c sqltools.exe
Nicke Källén | The Knack| Twitter:
@Znackattack

Similar Messages

  • App-V 5.0 Connection Groups not syncing to Client

    Hi,
    i have installed an App-V Management Server and successfully created and published packages to a client.
    I
    then tried to create a Connection Group for some Internet Explorer
    Plugins, which works on the server (adding packages, assigning to a
    group, publishing), but fails to get synced on the client.
    The client is listing all packages, but no connection groups.
    App-V Management Server Version 5.0.1224.0
    App-V Client 5.0 SP1 - 5.0.1104.0
    I tried 5.0 SP2 Client before, but had the same problem...

    If you assigned the packages and CG to a user, you can open a browser on the client machine (with that user) and connet to the Publishing Server URL. This should return above XML.
    Note that changes on the Management Server by default take 10 minutes to get replicated to the Publishing Server - and then a sync-appvpublishingserver is required on the client to get the info down there.
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

  • App-V Server : Changing Connection Group Name through powershell.

    Hi,
    Is it possible to change the name of existing Connection group through powershell  ?
    I've tried using Set-AppvServerConnectionGroup but i was unable to change the name of existing group.
    Thanks,
    Sumit.

    Do this:
    $group = Get-AppvServerConnectionGroup -Name "Connection Group A"
    $group.name = "Connection Group B"
    Set-AppvServerConnectionGroup $group
    Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually
    answer your question). This can be beneficial to other community members reading the thread.
    This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or other MVPs.
    Twitter:
    @stealthpuppy | Blog:
    stealthpuppy.com |
    The Definitive Guide to Delivering Microsoft Office with App-V

  • App-V 5 Connection Groups on Client

    All,
    I am having an issue with a specific connetion group.  If my tech's remove the connection group and applications and do a sync from with powershell the connection group does not appear in the client console or in powershell.  If I run a get-appvclientconnectiongroup
    -all, i see that it is there but I get the following:
    Name               : Intranet
    IsEnabledToUser    : False
    The connection group is deployed to users and not to the machine. I do see in the operational log that the connection group was successfully configured.
    Virtual application connection group {guid} version {guid} was successfully configured
    In the client-catalog debug, there is a Package {guid}, version {guid} was not found in the user Catalog.
    Our current client is 5.0 SP1 HF 3, but I have also verified the same behavior happens with 5.0 SP2 HF 4 as well.
    My enviroment:
    Management/Publishing Server App-v 5.0 SP1 HF2
    Brian

    Thank you Ben but...
    Thats where I run into issues with the connection group.  If I remove the computer connection Group and packages using the commands above, the connection group(s) do not come back.  If I get-appvconnectiongroup -all, I can see that App-V
    does see the connention group, but does not enable it for the user.
    Name               : Intranet
    IsEnabledToUser    : False
    Brian

  • APP-V 5.0 SP3 Connection Group error

    Hi there, 
    After the upgrade whenever I try to publish a connection group this fails. It's a newly created connection group with 2 global published applications (which worked in app-v 5.0 sp1). 
    The error I get is: 
    Mandatory package {d2da0bdd-0613-4662-80ae-abf60f65a286}, version {9270b6bf-8681-4030-a1cc-904a105e5e1d} specified in connection group {43bbe1a4-6d83-4fc2-a916-68241f86d2c6}, version {957bb2b5-1c8e-450d-8cb3-783dfee6a240} has not been added to the computer
    or has not been entitled to the user.
    And after that: 
    Failed to create package group descriptor document from string.
     Group: {43bbe1a4-6d83-4fc2-a916-68241f86d2c6}, {957bb2b5-1c8e-450d-8cb3-783dfee6a240}
     Error code: 0x43E04109 - 0x14
    Any idea's? 

    Hi there, 
    It was my mistake and the way we published app connection groups in the past. In the past we published the applications directly through an connection group without publishing the applications themself. In app-v 5.0 sp3 I needed to publish the packages itself
    also.... 

  • IMac 21" late 09: Slow, screen flickering/tearing and odd behavior - the problem that puzzles everyone

    PLEASE HELP!
    My iMac 21" late -09, started acting a bit wierd a year ago. Things got worse rapidly, it got slower, the screen flickers/tears (see link below), short moments of lost internet connection, lost connection whit the keyboard (might be keyboard that is broken), almost overheats when gaming and odd behavior on some webbsites whit galleries and/or videos.
    Let's begin whit the screen: it's not vertikal lines or major distortions, just a subtle horisontal line that "wanders" from bottom to topp and some lagging from time to time. Looks like this: http://cl.ly/3i2W2o3S1D2T
    The wierd thing is that hi-res does not mean more "tearing". Yes the lagg and risk of tearing increases, but the connection seems to be: lots of movement=tearing. So a pixeld 240p video of people dancing can be way worse than a news debbate in1080p!?!
    Lost connection whit internet and keyboard rarely happens and is probably due to something else, but thought that was good to have in mind.
    Odd behavior: galleries ex: when browsing images on Facebook in fullscreen, the image sometimes jumps around in the beginning and when clicking on next the same picture might appear again or just nothing at all. When scrolling down overwiewing a gallery, the updating stops and you can't scroll down further. This problem appers mainly on FB, deviantart also acts a bit wierd but there is often small issues whit image sites. Doesn't help to switch browsers either!
    Videos: Youtube is horrible to use, stops loading, dosen't start loading, erases everything loaded (grey bar disapears and reloads), refuse to switch ressolution and suddenly stops the video like it was done! "ehh.. wasn't this 2min long? Not anymore, now its 34sec!". Mainly a Youtube problem but many similar sites can be a bit problematic to use.
    NO, it's not the HTML-5 problem or any standard flash issue and using a different browser dosen't help!
    Worst is the fact that most of these errors are not constant! One day your watching youtube or mabey a movie in VLC, a bit laggy, but almost no problem. Next day **** brakes lose and after 2hours of struggling you are ready to stabb yourself in the face!
    What i tried: Most easy buggfixes that might cause the above problems, updating most things, Switched from OS X SL to OS X ML, complete reinstall and some things i probably forgot by now. Then went to MacStore for repair, they didn't find anything wrong and said it worked fine after the standard diagnostic/repair program!?! Went home and everything was the same! Went a second time to MacStore, same result.
    So I'v reinstalled a few times and it seems to improve the Mac. But 2-3weeks later every error is back, even if I barely installed or downloaded anything!?!
    Any idea what this could be? Or is the graphic card broken and MacStore has a blind, inbred muppet as a technician?

    No I didn't. The first time i explained the problem thoroughly and thought that they just couldn't miss such a visual error. I was wrong. The second time the technician wasn't there so i showed the above clip to the salesstaff and explained everything onceagain. Later the technician called me and we talked for 10min.
    Btw, the problems always "manifests themselves", just varies between strenght and frequence.
    But all other issues aside, what could cause the tearing of the screen as seen int the above clip?

  • N8 apps make unwanted internet connection automati...

    Dear users,
    I have had my N8 for a week now. It's beautiful, but there is only one issue I cannot resolve.
    With my other Nokia's (also Vodafone as provider) I was able to set any internet connection manually by selecting "Always ask" in the phone's connection settings to prevent the phone from making expensive internet Vodafone connections, especially when being abroad.
    With my new N8, Vodafone has secured my internet connections (Vodafone Live), so I am not able to edit the connections anymore and make adjustments. I noticed that with many apps from the Ovi Store, my phone immediately selects Vodafone Live as an internet connection automatically, There is no way to change this or to prevent the app from making the connection to Vodafone Live. Even when my home Wifi network is in range.
    Anyone with the same problem? Is it a Vodafone issue? Is Vodafone trying to push users to use their internet connection by protecting the connection settings for Vodafone Live?
    Thank you so much...
    Joost
    Solved!
    Go to Solution.

    hi everyone,
    first of all i want to say im polish so... sorry for my english ;p
    im my language there is only one article about automatic connection forced by on n8-> http://translate.google.pl/translate?js=n&prev=_t&hl=pl&ie=UTF-8&layout=2&eotf=1&sl=pl&tl=en&u=http%...
    i figured out its propably by nokia ovi store.
    ive found that my n8 have the same problem as yours, i mean its connecting automatically to internet by network with priority #1 in INTERNET group. If its WiFi, nokia will connect by this WiFi if its Network Package Connection, nokia will connect by this one.
    Shutting down (by widget) scanning for WiFi or disconnecting gives no improvment, still connecting about 3 sec after disconnecting.
    Remove/Editing/Adding again connections
    gives no effect
    Restarting phone does not help. Widgets are offline.
    setting -> connectivity -> admin.setting -> package data -> when needed/when exist
    gives no effect
    Menu -> Settings -> Connectivity -> Settings -> Data use in home country
     Automatic/Always ask/WLAN only/Home network only
    gives no effect
    Menu -> Settings -> Connectivity -> Settings -> Switch to WLAN
    Only know WLANs/Manual
    gives no effect
    Any ideas ??
    FOUND IT !! Thank you ISMOK it was mail synchronising, after turning off every day it has stopped connecting.

  • Exceptions, odd behavior of streaming data to outputstream

    I have a servlet which writes mp3 data to the dataoutputstream of a servlet response object. For some reason, the servlet method writes the data out and gets an exception. Then the method/servlet is called again automatically and begins to write the data out again. The exception is below. In the end the mp3 is delivered to the client fine, however with server side exceptions and odd behavior.
    try {
              int len = 0;
              resp.setContentType("audio/mpeg");
              String filename = req.getParameter("file");
              File mp3 = new File(mediaDir + filename);
              byte[] buf = new byte[1024];
              FileInputStream fis = new FileInputStream(mp3);
              DataOutputStream o = new DataOutputStream(resp.getOutputStream());
              while( (len = fis.read(buf)) != -1) {            
                 o.write(buf, 0, len);            
              o.flush();
              resp.flushBuffer();
              o.close();
              fis.close();
           catch(Exception e) {
              System.out.println(e.getMessage());
              e.printStackTrace();
    null
    ClientAbortException:  java.net.SocketException: Connection reset by peer: socket write error
         at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)
         at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:403)
         at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)
         at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)
         at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
         at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:76)
         at java.io.DataOutputStream.write(DataOutputStream.java:90)
         at TrafficControl.streamAudio(TrafficControl.java:639)
         at TrafficControl.processRequest(TrafficControl.java:136)
         at TrafficControl.doGet(TrafficControl.java:61)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         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.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(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)thanks
    Edited by: black_lotus on 19-Feb-2009 3:08 PM

    There are some versions of some browsers (MS IE) that can call a servlet twice; they only look at the headers at the first request, in order to decide whether to display a "save or open" dialog, or some such reason. Try different browsers; also log the User-Agent header to see if it is "contype", which is present when the multiple request thing happens.
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;q293792
    "Connection reset" can also happen if the client closes the connection without reading the entire response. Occasional resets will happen as users cancel download.
    Not a source of exceptions but something you may still want to consider when sending large responses: by default, the servlet container will have to buffer the entire file in memory to find out its length. To save memory, either set content length before writing the data, or use chunked encoding (google should find details.) That way your write() actually streams data to the user.

  • Mail app intermittently fails to connect - internet accounts preferences cannot connect, then unable to verify name or password. Why?

    Running 10.10.2 on early 2011 MBP, 8 GB RAM.
    Mail app intermittently fails to connect - message: internet accounts preferences cannot connect, then unable to verify name or password.  No problem with iPhone to connect same 3 accounts. Have run Disk Utility and rebooted. What is happening?

    Same issue, too.  But I have nothing better to do than try to fix Apple problems that appear mysteriously and randomly; I'm sure you're the same way.
    The REAL REASON, which can no longer be overlooked, is that Apple's (probably underpaid sweatshop Chinese) employees build toys for grown-ups and do little more than that.  I wish I had never bought my Mac (2009) since few things about Apples are "intuitive" unless you've been an Apple cultist since Jobs introduced the first Mac.  Oh, and because things mysteriously stop working, something I don't recall happening with any of the PCs I've owned. 
    Apple's version of Excel is a total joke and on an update that I did not ask for, the "Save As" feature, a convention that was 30 years old and worked well, was removed in favor of "Duplicate, Rename, Save."  What 22 year-old Apple product manager was allowed to make this change? 
    I foolishly compounded my Mac purchase error by buying an iPhone 4S.  On that lovely ($200 Verizon-subsidized) product, I can no longer discover my home network, rendering my ($100) Airplay for outdoor music useless.  (But I probably can post a picture directly to Facebook or something!  More toyish behavior in which Apple specializes.)  Can I get support on these POS with a phone call?  No, I need to rely on a Aapl cultist to devise some esoteric key combo or a "jailbreak" on a Support board or blog site.
    I'm eligible for a phone upgrade on 8/13 and I'm counting the days.  Will upgrade to a good large-screen laptop asap as well and then throw the Mac out my office window.  Junk, just junk.  Apple's stock is at $433 from $700 and it's still overpriced.  How long will this rant last before it's sanitized by the Cupertino Big Brother? Maybe what the children who design product ought to do instead is BUILD BETTER STUFF.

  • Error when enabling the connection group with office 2013 and a plugIn

    Hi,
    I've created the office 2013 proplusVolume with ODT, published it globaly, Sequenced the plugin, with only the office 2013 as a published app-v package on the system, made the connection group with correct xml, but when I enable the connection group, I got
    the error:
    The connection group {xxx} version {xxx} could not be published because the
    virtual COM settings of the individual packages conflict. 
    Verify that the virtual COM settings are the same for all member packages and try again.
    The COM settings are made the same as the office package on the plugin package, but I still have the same error.
    The Deployment-, and user-XML have this values (as it was for the office originally):
      <COM Mode=”Integrated”>
            <IntegratedCOMAttributes
    OutOfProcessEnabled=”true” InProcessEnabled=”true” /> 
    <Objects Enabled=”false” />
    Why do I get this error?
    Why is it merly impossible to track down the realy error?
    What can i do to make this connection group work?

    Right now the catalog is pulling from the AppXManifests inside the AppV Packages. You can see these settings by renaming the AppV file to .ZIP and browsing those files (READ ONLY) to see the default COM settings. Simply changing the Deployment Config files
    is not enough. You will need to make sure the information is dynamically applied at publishing by specifying the -DynamicDeploymentConfiguration option when adding the package using the Add-AppvClientPackage cmdlet. You do not need to worry about the UserConfig
    file.
    If you are doing this in band with the management system, you would import this configuration in under Advanced Configuration for the package.
    Steve Thomas, Senior Consultant, Microsoft
    App-V/MED-V/SCVMM/Server App-V/MDOP/AppCompat
    http://blogs.technet.com/gladiatormsft/
    The App-V Team blog: http://blogs.technet.com/appv/
    The MED-V Team Blog: http://blogs.technet.com/medv
    The SCVMM Team blog: http://blogs.technet.com/scvmm/
    “This posting is provided "AS IS" with no warranties, and confers no rights. User assumes all risks.”

  • Connection Group is published as 2 seperate packages

    I have the weirdest issue in App-V 5.0
    we use Windows 7 SP1 Clients with App-V 5.0 SP1
    I add 2 applications to the App-V Server seperately :
    SQL Navigator 7 & Oracle 10.2
    they're both unpublished!
    I made a new Connection Group named SQL Nav 7 & Oracle 10.2 and added the 2 packages.
    when I publish the connection group ,the clients are getting the group ok for the first time.
    after they logoff and logon - the connection group "Breaks" and they get them as 2 seperate packages THOUGH THEY AREN'T PUBLISHED AS PACKAGES!
    there's nothing on the eventlog, I tried to sequence both of the packages again and - nothing. same result
    any ideas ?! :/
    Tamir Levy

    OK. thanks everyone
    some newer details:
    I the command Get-AppVClientConnectionGroups and I get no output
    when I ran Get-AppVClientConnectionGroups -All I got this output:
    GroupId            : 7419b9fa-d1b8-43b8-a83e-6e2183290899
    VersionId          : 3b40c4f1-3761-4aa2-9daf-961ce74e6278
    Name               :
    IsEnabledToUser    : False
    UserPending        : False
    IsEnabledGlobally  : False
    GlobalPending      : False
    InUse              : False
    InUseByCurrentUser : False
    PercentLoaded      :
    Priority           :
    didn't understand what's the difference... but I was able to remove the connection group and the packages manually
    then when I ran a manual sync via PowerShell I got this error:
    Sync-AppvPublishingServer : There were errors encountered when trying to publish connection groups from the server
    Operation attempted: RefreshPublishingServer.
    AppV Error Code: 070000000F.
    On the event viewer I see these errors now:
    EventID: 1008
    Category: Configure Package
    Package {55182fc7-3f23-42b6-ba89-5c90c3300d80} version {1e373fdb-9e0d-4160-9f81-d80374ab9130} failed configuration in folder 'C:\ProgramData\App-V\55182FC7-3F23-42B6-BA89-5C90C3300D80\1E373FDB-9E0D-4160-9F81-D80374AB9130' with error 0xA040132A-0x3.
    EventID: 19108
    Catogory: Publishing Refresh
    Failed to publish group due to the failure of the package.
    Group GUID: {7419b9fa-d1b8-43b8-a83e-6e2183290899}
    Group Version GUID: {3b40c4f1-3761-4aa2-9daf-961ce74e6278}
    Package GUID: {55182fc7-3f23-42b6-ba89-5c90c3300d80}
    EventID: 19106
    Catogory: Publishing Refresh
    Part or all groups publish failed.
     published: 0
     failed: 1
    Please check the error events of 'Configure/Publish Virtual Application Connection Group' before this message for the details of the failure.
     any help will be appreciated!
    Tamir Levy

  • Odd behavior when using custom Composite/CompositeContext and antialiasing

    Hi,
    I created a custom Composite/CompositeContext class and when I use it with antialiasing it causes a black bar to appear. I seems it has nothing to do with the compose() code but just that fact that I set my own Composite object. The submitted code will show you what I mean. There are 3 check boxes 1) allows to use the custom Composite object, 2) allows to ignore the compose() code in the CompositeContext and 3) toggles the antialiasing flag in the rendering hints. When the antialiasing flag is set and the Composite object is used the bar appears regardless of if the compose() method is executed or not. If the Composite object is not used the bar goes away.
    The Composite/CompositeContext class performs clipping and gradient paint using a Ellipse2D.Float instance.
    a) When the Composite is not used the code does a rectangular fill.
    b) When the Composite is used it should clip the rectangular fill to only the inside of a circle and do a gradient merge of background color and current color.
    c) If the compose() method is ignored then only the background is painted.
    d) When antialiasing is turned on the black bar appears, i) if you ignore the compose() method it remains, ii) if you do not use the Composite object the bar disappears (???)
    NOTE: the compose method's code is only for illustration purposes, I know that AlphaComposite, clipping and/or Gradient paint can be used to do what the example does. What I am trying to find out is why the fact of simply using my Composite object with antialiasing will cause the odd behavior.  Been trying to figure it out but haven't, any help is appreciated.
    Thx.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                for(int sy = src.getMinY(); sy < src.getMinY() + src.getHeight(); sy++) {
                    for(int sx = src.getMinX(); sx < src.getMinX() + src.getWidth(); sx++) {
                        int cx = sx - dstOut.getSampleModelTranslateX();
                        int cy = sy - dstOut.getSampleModelTranslateY();
                        if(!clippingShape.contains(cx, cy)) continue;
                        srcPixel = src.getPixel(sx, sy, srcPixel);
                        int ox = dstOut.getMinX() + sx - src.getMinX();
                        int oy = dstOut.getMinY() + sy - src.getMinY();
                        if(ox < dstOut.getMinX() || ox >= dstOut.getMinX() + dstOut.getWidth()) continue;
                        if(oy < dstOut.getMinY() || oy >= dstOut.getMinY() + dstOut.getHeight()) continue;
                        dstPixel = dstIn.getPixel(ox, oy, dstPixel);
                        float mergeFactor = 1.0f * (cy - 100) / 100;
                        dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                        dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                        dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                        dstOut.setPixel(ox, oy, dstPixel);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

    I got a better version to work as expected. Though there will probably be issues with the transformation to display coordinates as mentioned before. At least figured out some of the kinks of using a custom Composite/CompositeContext object.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TestCustomComposite2
    extends JFrame
    implements ActionListener {
        private JCheckBox useCompositeChk, useAntialiasingChk, useCompositeContextChk;
        private Shape clippingShape = new Ellipse2D.Float(100, 100, 100, 100);
        private MergeComposite composite = new MergeComposite();
        public TestCustomComposite2() {
            super("Test Custom Composite");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel cp = (JPanel) getContentPane();
            cp.setLayout(new BorderLayout());
            cp.add(new TestCanvas(), BorderLayout.CENTER);
            JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
            panel.add(useCompositeChk = new JCheckBox("Use Composite", true));
            useCompositeChk.addActionListener(this);
            panel.add(useCompositeContextChk = new JCheckBox("Use Composite Context", true));
            useCompositeContextChk.addActionListener(this);
            panel.add(useAntialiasingChk = new JCheckBox("Use Antialiasing"));
            useAntialiasingChk.addActionListener(this);
            cp.add(panel, BorderLayout.SOUTH);
            pack();
            setVisible(true);
        public void actionPerformed(ActionEvent evt) {
            useCompositeContextChk.setEnabled(useCompositeChk.isSelected());
            invalidate();
            repaint();
        private class TestCanvas
        extends JComponent {
            public TestCanvas() {
                setSize(300, 300);
                setPreferredSize(getSize());
            public void paint(Graphics gfx) {
                Dimension size = getSize();
                Graphics2D gfx2D = (Graphics2D) gfx;
                gfx2D.setColor(Color.GRAY);
                gfx2D.fillRect(0, 0, size.width, size.height);
                RenderingHints rh = null;
                if(useAntialiasingChk.isSelected()) {
                    rh = gfx2D.getRenderingHints();
                    gfx2D.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
                Rectangle r = clippingShape.getBounds();
                //gfx2D.setColor(Color.GREEN);
                //gfx2D.drawRect(r.x, r.y, r.width, r.height);
                gfx2D.setColor(Color.YELLOW);
                gfx2D.fill(clippingShape);
                Composite oldComposite = null;
                if(useCompositeChk.isSelected()) {
                    oldComposite = gfx2D.getComposite();
                    gfx2D.setComposite(composite);
                gfx2D.setColor(Color.ORANGE);
                gfx2D.fillRect(r.x, r.y, r.width + 1, r.height + 1);
                if(oldComposite != null)
                    gfx2D.setComposite(oldComposite);
                if(rh != null)
                    gfx2D.setRenderingHints(rh);
        public class MergeComposite
        implements Composite, CompositeContext {
            public CompositeContext createContext(ColorModel srcColorModel,
                                                  ColorModel dstColorModel,
                                                  RenderingHints hints) {
                return this;
            public void compose(Raster src,
                                Raster dstIn,
                                WritableRaster dstOut) {
    //            dumpRaster("SRC   ", src);
    //            dumpRaster("DSTIN ", dstIn);
    //            dumpRaster("DSTOUT", dstOut);
    //            System.out.println();
                if(dstIn != dstOut)
                    dstOut.setDataElements(0, 0, dstIn);
                if(!useCompositeContextChk.isSelected())
                    return;
                int[] srcPixel = null;
                int[] dstPixel = null;
                int w = Math.min(src.getWidth(), dstIn.getWidth());
                int h = Math.min(src.getHeight(), dstIn.getHeight());
                int xMax = src.getMinX() + w;
                int yMax = src.getMinY() + h;
                for(int x = src.getMinX(); x < xMax; x++) {
                    for(int y = src.getMinY(); y < yMax; y++) {
                        try {
                            // THIS MIGHT NOT WORK ALL THE TIME
                            int cx = x - dstIn.getSampleModelTranslateX();
                            int cy = y - dstIn.getSampleModelTranslateY();
                            if(!clippingShape.contains(cx, cy)) {
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                dstOut.setPixel(x, y, dstPixel);
                            else {
                                srcPixel = src.getPixel(x, y, srcPixel);
                                dstPixel = dstIn.getPixel(x, y, dstPixel);
                                float mergeFactor = 1.0f * (cy - 100) / 100;
                                dstPixel[0] = merge(mergeFactor, srcPixel[0], dstPixel[0]);
                                dstPixel[1] = merge(mergeFactor, srcPixel[1], dstPixel[1]);
                                dstPixel[2] = merge(mergeFactor, srcPixel[2], dstPixel[2]);
                                dstOut.setPixel(x, y, dstPixel);
                        catch(Throwable t) {
                            System.out.println(t.getMessage() + " x=" + x + " y=" + y);
            protected int merge(float mergeFactor, int src, int dst) {
                return (int) (mergeFactor * src + (1.0f - mergeFactor) * dst);
            protected void dumpRaster(String lbl,
                                      Raster raster) {
                System.out.print(lbl + ":");
                System.out.print(" mx=" + format(raster.getMinX()));
                System.out.print(" my=" + format(raster.getMinY()));
                System.out.print(" rw=" + format(raster.getWidth()));
                System.out.print(" rh=" + format(raster.getHeight()));
                System.out.print(" tx=" + format(raster.getSampleModelTranslateX()));
                System.out.print(" ty=" + format(raster.getSampleModelTranslateY()));
                System.out.print(" sm=" + raster.getSampleModel().getClass().getName());
                System.out.println();
            protected String format(int value) {
                String txt = Integer.toString(value);
                while(txt.length() < 4)
                    txt = " " + txt;
                return txt;
            public void dispose() {
        public static void main(String[] args) {
            new TestCustomComposite2();
    }

  • Remote App on IPod Touch Connect to ITunes on Win7

    Is anyone having a problem making the Remote APP on ipod touch connect to ITunes on Win7 over WiFi? Itunes sees it alright, asks for a Passcode which the ipod supplies, considers it and then says it is invalid. I'm open to suggestions.

    Yes it is, I click on the "Remote" button, type the passcode into iTunes, it thinks for a while then comes back and says "invalid passcode". The two are communicating or iTunes wouldn't show the "Remote" button or display the passcode entry window.

  • TS3297 My 2nd generation ipod touch is giving me the following error when I try accessing Itunes or the app store. "Cannot connect to the Store. A secure connection could not be established. Please check your date & time settings"  I am on a secure networ

    My 2nd generation ipod touch is giving me the following error when I try accessing Itunes or the app store. "Cannot connect to the Store. A secure connection could not be established. Please check your date & time settings"  I am on a secure networkl.

    Can't connect to the iTunes Store
    Make sure that time zone is correct in addition to date and time

  • How can I change the contacts app settings to view by groups?

    When I had an iPod Touch (3rd generation), I was able to sort my contacts by groups by using another app and then when I launched the default contacts app I could tap the "Groups" button and I saw a list of them (Family, Friends, Businesses, etc). That way, I could tap the group I wanted and only view those contacts. Now I'm using an iPhone (4th generation with iOS 6.1.2) and it is the most obnoxious contacts system in the world. I now have to unselect every group I don't want to see, and it's a pain-in-the-neck to get Facebook contacts assigned to groups as the app I use to assign contacts to groups isn't "permitted" to use those contacts that are from Facebook or those who don't have a Facebook link unless I add them and delete the old. I work with a nonprofit organization and I have a lot of contacts for various businesses through them but I shouldn't have to unselect 12 different groups just to view a single group. I've tried looking in settings and can't figure out how to change this. I must have over 100 contacts and this is a pain to deal with. Did Apple really think this was the best change they ever made to the contacts app? Considering they still haven't implemented the ability to assign contacts to groups...
    Another thought is why not also view contacts by business or "theme"? Such as, what if you have a large, extended family and might want to view just 1 section (like my cousins' family who have various last names due to marriage). This is why being able to view by group is so important to me but if I create 5 different groups for family and friends, that means I have to unselect 4 of them AND all the other groups for businesses, work, community, etc just to view the specific contacts. So, did Apple change this or am I just not seeing how to view them the way I want?

    I assume that you are in Germany ? Try going to the bottom of the Featured tab in the App Store app on your iPad and tap on your account id, tap on 'View Apple ID' on the popup and log into your account, and then select the Country/Region section and select Germany.

Maybe you are looking for

  • Pull Opportunity Contact Ship Address using Opportunity-Product History

    Hi, I am looking for a way to report opportunities and I need to be able to pull the opportunity contact's ship to address. I'm using the Opportunity-Product History view as it is the only one that has the custom fields that I need. Any ideas as I di

  • My Iphone gets hot and wont hold a charge for more than 8 hrs

    My Iphone 5c gets hot even when i dont have a protective case on it but it is worse when it is charging. The battery will only hold a charge for at most 8hrs, i have taken it into the store and they always say nothing is wrong with it. I find that ha

  • How to stop a popup if the session has expired??

    Hi I have a situation wherein i have my jsp page. in that i have a button on clicking it a pop up window will open to take a input parameter. Now what we want is that if the session is not valid than the pop up shud not open. Currrently what is happe

  • Errors upon erasing free space

    I have been experiencing particularly bizarre errors since switching to Mac. Two of the strangest are related to erasing free space. I wasn't aware that OS X could erase free space on its own, until I read the security guide, so I first purchased Shr

  • What data do I need to remove as I am getting alerts that my start-up disk is almost full?

    What data do I need to remove from my laptop as I am getting alerts that my start-up disk is almost full.  I have been deleting emails (I still have 4000+ in my inbox). Also, I have been unable to download software updates nor been able to download m