Confused: multiple thread on multiple instances

I was trying to see if multiple threads, each running a different instance of a given class which has a (non-static) synchronized method will force a wait on each thread even though its a different instance. So, I put togeteher the following test class and am now more confused.
First the code.
package test;
import java.util.Date;
public class TestThreads implements Runnable{
     public TestThreads() {
     private synchronized void synchedMethod(long msToWait){
          String myThread = Thread.currentThread().getName();
          System.out.println(new Date() +" synchedMethod(" + msToWait +") " +myThread);
          try {
               wait(msToWait);
          } catch (InterruptedException e) {
               e.printStackTrace();
     public void run() {
          synchedMethod(1000);
     public static void main(String[] args) {
          Thread[] tt = new Thread[5];
          for (int i = 0; i < tt.length; i++) {
               tt[i] = new Thread(new TestThreads());
          for (int i = 0; i < tt.length; i++) {
               tt.run();
Now, in addition to my original unanswered question, why are all the threads showing as being the same?
Thank you;
nat

As already noted you must start() threads - run() is just a normal method call in the current thread.
To answer you question: each object has a distinct monitor lock. If every thread calls the synchronized method of a different instance then no thread will ever find that the lock of its instance is unavailable. Any Java language text that covers threading and synchronization will tell you this.

Similar Messages

  • Diff between Multiple Threading and Multiple instance.

    Hi ,
    what is the main diff between Multiple Threading and Multiple instance?
    Please give me the answer

    Satti4Java wrote:
    Hi ,
    what is the main diff between Multiple Threading and Multiple instance?The main difference (not "diff") is that the first one ends with the word "Threading" and the second one ends with the word "instance".
    Really. Seriously. Now if you had some industry standard phrases you were comparing, there might be a useful discussion. But those are just words strung together. If that's a homework question, I recommend you find a different teacher.

  • How multiple instances license is calculated?

    Hi
    I got bit confused about license. SQL Server license is per core based, for instance standard edition in 2 core physical machine is 2*$1793, correct me if I am wrong.
    1. Does cost remain same if I install additional instances on the same physical machine? 
    2. In case of multiple cluster instances.
    2. Does increasing node in cluster increases license cost? I believe so.
    Please refer Microsoft link, if possible.
    Thanks

    I think don’t need to buy multi license for multi instances on one server. You
    can run multiple instances of SQL Server 2005 on a single computer. Multiple instances are used by organizations that have several applications running on a server but want them to run in isolation so that any problem in one instance will not affect the other
    instances. In SQL Server 2005, you can now run multiple instances with the Workgroup, Standard, and Enterprise editions when they are licensed server/CAL or on a per-processor basis. Here is as list for Pricing and Licensing FAQ: 
    http://www.microsoft.com/sqlserver/2005/en/us/pricing-licensing-faq.aspx#,
    here is a thread about Licensing:
    Also http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/a5fd2fb7-dc2f-4736-85b9-1eb581e56a23
    http://www.microsoft.com/sql/howtobuy/default.mspx
    Raju Rasagounder Sr MSSQL DBA

  • How to use multiple instances of the same dll ?

    Hi,
    I'd like to use multiple instances of a jni dll . I have created
    different threads, in each thread, I have called System.loadLibrary(..),
    and I would like each thread to access a different instance of this
    library.
    Unfortunately, the loadLibrary function is effective only once so I
    can not find the way to do this.
    Can anyone help me on this ?
    Thanks.
    Francois.

    Hi, :)
    and I would like each thread to access a different
    instance of this library.In Win32, this is outright impossible. A DLL will only exist once in a process space.
    In Unix, or at least in Solaris, I think this is also not possible, as libraries are loaded by the dynamic linker, and it keeps tabs of which modules have already been loaded into the process space.
    I'm assuming your problem is that your native library has non-reentrant code.
    If so, there are two approaches you can take to this:
    1) If you have access to the source code for the native library, change it so that it is reentrant.
    2) If you do not, change your Java code so that access to the native code is made from whithin synchronize blocks.
    If your problem is of a different nature, I'll second the words of the previous poster and ask you what it is...
    Cheers,
    J.

  • Problem:Multiple instances of the same applet on a webpage...

    I have an applet which connects to a server to read an XML-file.
    I use Doucument to parse the XML-file like this:
    String xmlurl="http://www.somesite.com/somexmlpage.php";
    Document d =DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(xmlurl);
    (...read the XML-file...)
    This works fine.
    However, I need multiple instances of the same applet running at the same time on the same webpage.
    Now, with multiple applets running at the same time the parsing no loger works. If one applet is doing some parsing and a taskswitch takes place to let another applet run, the applet which is interrupted is not able to continue the parsing as it looses its "incoming data" when another applet reads from the server.
    How can different applets affect each other like this?
    And how can I fix the problem?
    Thanks in advance for any help!!

    However, I need multiple instances of the same applet running at the same time on the same webpage.
    Why? But okay.Because the the different applets show information about different items.
    Now, with multiple applets running at the same time the parsing no loger works. If one applet is doing some parsing and a
    taskswitch takes place to let another applet run, the applet which is interrupted is not able to continue the
    parsing as it looses its "incoming data" when another applet reads from the server.
    How did you determine that's what's happening?By printing out debuginformation.
    Each applet prints out a message (System.out.println) when it creates an instance of Document (ie. connects to the server) and the applet also prints out XML-information as the XML-file is processed.
    But, actually, I was a bit quick in my first post; The applet doesen't neccesarily loose its "incoming data", but the parser looses the data it is parsing. I can download the data from the server first, and then start parsing it. If a taskswitch happens while one applet is parsing, it looses its data, even if the data is allready downloaded.
    I see this since I see another applet making a printout, and when first applet starts again, the parser has lost track of its data.
    It works fine if only one applet is running. And everything is fine until the next applets starts; I can see this from the printout.
    Again, the appet prints out data as it parses the document. I see the next applet starting to work, and when the first one continues parsing again the printout shows that data is no longer there. It happens everytime the runtime switches to another applet, and it never happens if just one applet is running.
    Googeling a little tells me that DocumentBuilder.parse() isn't thread-safe, but this shouldn't have anything to do with it, should it?
    Each applet is a separate process, and not different threads in the same process, aren't they? (Not sure how the runtime treats multiple applets...)And secondly, the applets create their own instance of Document anyways.

  • Use of Multiple instances of the same browser...

    Hi folks,
    I have a question...
    I have inherited a large APEX application, it uses Oracle SSO to log in.
    We are migrating the application to a new set of servers and are running regression tests.
    The testers are logging in using IE6 and opening multiple instances of the application at the same time on both the oldTest and newTest servers.
    So at any one time, there can be:an application Admin user (username ADMINTEST123)  logged into the application on oldTest
    an application Admin user (username ADMINTEST123)  logged into the application on newTest
    an application standard user (username TEST123)  logged into the application on oldTest
    an application standard user (username TEST123)  logged into the application on newTestIs this supported?
    Could someone tell me or point me toward the documentation or thread that lists what is supported / unsupported for browser use with APEX and SSO?
    Thanks in advance,
    Gus..

    Hi lev,
    thanks but sorry, that doesn't really help me, I'm talking about users and their logins, not developers using different browsers while developing apex.
    Also, our users are locked down to IE6 for the foreseeable future.
    Hi Scott,
    I found the following quote from this web site http://aranea.zuavra.net/index.php/80/ about Cookie separation in modern browsers
    *4.3. Internet Explorer 6.0*
    Finally, Explorer is the one that introduces an interesting quirk. It too has separate settings per machine users, although it cannot make use of multiple profiles for the same user.
    The interesting thing is the way it handles session cookies. Normally, long term a.k.a. non-session cookies are stored on disk in the user preferences. However, Explorer has a setting called “browse in new process” which, if enabled, forces a new session with each new window. That’s right, this means that every time you open a new Explorer window it opens a separate process, even though the windows belong to the same user! And, in turn, these processes will NOT share their session cookies.
    Note: By “new window” I mean windows started from shortcuts, from Start Menu entries or by calling iexplore.exe directly somehow (from a file manager, for example). Windows started via Control+N or File/New window run in the same process and share session cookies. Also, please note that it’s a lot more likely for users to click their taskbar shortcut when they need a new window than it is to use the File menu or the Control+N shortcut.+
    Furthermore, ever since version 5.0 the setting cannot be changed manually, by the user. It is automatically determined by the browser based on how much RAM the machine has. Anything with at least 32 MB of RAM gets the “one window, one process” behaviour, which nowadays means almost all machines.
    I have tested the *"new window"* opening methods and found that for IE6 there is NO NEW PROCESS started when the user opens a new window in the following 3 ways:
    from an open window, File>New>Window
    from an open window, CTRL+N
    from an open window, right click>Open in New Window
    So from this can I conclude that from what you say and the results above we may get issues if users login and then open new windows in those ways?
    Thanks,
    Gus..

  • Problem with multiple instances of shared printers being installed on client computers when the spooler service is started

    Hello,
    We have Windows Server 2012 and clients using Windows 8.  We've been having some printer problems for awhile now that I haven't been able to figure out for the life of me.  The main problem is the fact that printers are installed on computers automatically
    once the drivers are installed.  The side-effect of multiple instances of each printer showing up is very annoying but I suspect fixing the initial problem will resolve this secondary one.
    Here is the rundown:
    We add the shared printers on logon to the clients using the GPO thus installing the drivers locally.
    Whenever the spooler on the client is restarted with the drivers installed, all of the
    shared printers that were previously installed get duplicated 5 more times (for a total of 6 instances of each shared printer) on the "Devices and Printers" page.  This happens
    all the time.
    Removing them only fixes the issue temporarily, as soon as the spooler or computer is restarted, it seems these shared printers are somehow found on the network and the duplicates return.
    Two of these printers are located on different clients, installed locally and shared while the other three are all installed on a server and shared through it.  The issue is the same on all of them.
    Cleaning the spooler completely (registry and files from C:\system32\spool) fixes the issue temporarily as well since, as soon as the drivers are reinstalled, the issue occurs again.
    I've tried many things (disabling the GPO, editing the GPO, printer shares, registry, etc.) and searched tirelessly online for a cause and solution but I'm stumped.  Does anybody have any idea what might be causing this problem and how to resolve it?
    Thanks for your time!
    Update #1: I just tried adding the NoNetCrawling option in the registry found in this article -> http://support.microsoft.com/kb/320138/en-us
    I couldn't find the same for Windows 8 unfortunately.  I also tried disabling network discovery and all other sharing options to no avail.
    Update #2: I tried isolating the computer to a different subnet and restarting the spooler and, sure enough, the issue didn't occur.  This proves that the issue is network share related.  Also, as soon as I change the IP back to the regular domain
    subnet one, the multiple printer instances re-appeared again.
    Update #3: I just tried doing the same thing but on the server where the printers are installed and shared and, sure enough, despite being in a different subnet, the issue occurred.  This leads me to believe there is a setting on this server at fault.
     Question is, which one?

    We have deployed a brand new Active Directory domain for a customer. ALL the servers without exception are Windows 2012 R2 and all clients are Windows 8.1 32bit VDI clients.
    The issue that we have is around network printers. 
    We are deploying 4 printers  from a Windows 2012 R2 Server via the print management/Deploy Printer and assigning that to a GPO. The printers are deployed to the Computers which should mean that the users get all 4 printers which they then should be allowed
    to set their default and personal settings for that printer.
    Our printers are deployed like this:
    1. Created security group
    2. Assigned VDI computers to the security group
    3. Created GPO to reflect security group
    4. Modify GPO to do security filtering based on computer group membership
    5. Deployed 4 x printers through Print Management to the GPO on a per machine basis
    However, on the users Devices and Printers screen we are not seeing the 4 printers. For some users
    they see duplicates of all 4 printers so e.g they can have upwards of 8 or more. Other users have no printers displayed whatsoever. The next time they log off or restart they then have a different amount of printers displayed.
    If they try and set the default then it will set and the next time they check the default may have moved to another printer even without logging off or back on.
    Now, where this gets strange is within an application such as MS Word 2013 or Notepad if they use the file and print menu the printers will be listed, even if the user has no printers displayed in Devices and Printers. If the users selects a printer then they
    can then print OK.
    If we check HKCU\Printers||Connections then the CORRECT 4 printers are showing as to what is being deployed via the GPO so I know that the Windows 8.1 terminals are receiving the correct printers from the GPO.
    To try and correct this over the course of the week we have deployed the printers via Group Policy Preferences to the user and then the PC to no avail. Currently we are using the Print management\Deployed Printers to deploy all 4 printers to the computer via
    the Computer GPO.
    I believe that this issue is related to the display somehow in Devices and Printers rather than a GPO or print server issue as we can see via the registry the clients are receiving the 4 correct mentioned printers as shown in the registry. 
    FYI: We only have around 30 users and all users are getting this problem. All users are receiving the same GPO's and have the same few apps installed, Office 2013, Adobe Reader etc.
    What we want is for the computers to receive all 4 printers. All users should be able to use all 4 printers but the user should be able to select their particular default, depending where they are located or what they are printing that particular day. Their
    particular default should persist after reboot. (We have 2 x Copiers and 2 x HP Laserjets) All users have redirected documents and desktop but the rest of the profile is on the VDI and persists after their reboot. The profile is not roaming as the user is
    assigned a particular VDI.
    After a week of scratching our heads with this we are open to suggestions and any would be appreciated.
    We have tried following the issues on this thread to no avail either as they still return.

  • Multiple Instances of OEDQ on a single server

    Hi,
    I am running a Linux Machine (Linux 2.6.18-308.1.1.0.1.el5), on which I have the latest version of Oracle 11g release 2 installed.
    I have an instance of oracle Enterprise Data Quality tool running on an apache-tomcat-7 server. Port 8080
    Now I have a requirement of Installing another instance of OEDQ on the same server, but a different APACHE_HOME directory and a different Port Number (8081).
    So the question is, Can we install multiple instances of OEDQ on a single server?
    If so, what are the prerequisites to be maintained.
    I did my bit of tries, but ended up having issues with some java errors.
    I have posted the error message below.
    SEVERE: Context initialization failed
    *org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemanager' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casedao' while setting bean property 'caseDAO';*
    The complete Error Log in the Catalina.out file is pasted below.
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /u100/app/PCEXDB/orpcexmt/oracle/loqate:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    May 13, 2013 12:50:08 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8081"]
    May 13, 2013 12:50:08 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8010"]
    May 13, 2013 12:50:08 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 792 ms
    May 13, 2013 12:50:08 AM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    May 13, 2013 12:50:08 AM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
    May 13, 2013 12:50:08 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/dndirector.war
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
    May 13, 2013 12:50:14 AM org.springframework.web.context.ContextLoader initWebApplicationContext
    INFO: Root WebApplicationContext: initialization started
    May 13, 2013 12:50:14 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing com.datanomic.director.startup.WebApplicationContext@2dfe88b8: display name [Root WebApplicationContext]; startup date [Mon May 13 00:50:14 CDT 2013]; root of context hierarchy
    May 13, 2013 12:50:16 AM com.datanomic.director.startup.WebApplicationContext loadBeanDefinitions
    INFO: Spring bean loading complete.
    May 13, 2013 12:50:24 AM org.springframework.web.context.ContextLoader initWebApplicationContext
    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemanager' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casedao' while setting bean property 'caseDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casedao' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casemetadata' while setting bean property 'caseMetadata'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at com.datanomic.director.startup.WebApplicationContext.refresh(WebApplicationContext.java:109)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casedao' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casemetadata' while setting bean property 'caseMetadata'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at com.datanomic.director.startup.WebApplicationContext.refresh(WebApplicationContext.java:109)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    ... 46 more
    Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
    ... 57 more
    May 13, 2013 12:50:24 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error listenerStart
    May 13, 2013 12:50:24 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [dndirector] startup failed due to previous errors
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [dndirector] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [dndirector] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [dndirector] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@623e20db]) and a value of type [java.lang.Class] (value [class oracle.sql.TypeDescriptorFactory]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [dndirector] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@da1c402]) and a value of type [java.lang.Class] (value [class oracle.sql.AnyDataFactory]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/docs
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/examples
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/manager
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/ROOT
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/host-manager
    May 13, 2013 12:50:25 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8081"]
    May 13, 2013 12:50:25 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8010"]
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 16882 ms
    Can someone please tell me what is going wrong here?

    Hi,
    Multiple instances of EDQ on a single server is technically possible provided the installer takes care to avoid port conflicts. It is not the case that there is a single port used by an EDQ server, for example.
    For various reasons, it is not officially supported; attempting to diagnose issues on custom installations on Tomcat is especially difficult and we do not provide documentation on this. In general, the requirement usually comes up for Dev/Test instances (as there is no performance advantage of using multiple instances on a single server), where we would recommend the use of virtualization where this is a requirement.
    Regards,
    Mike

  • Multiple instances of Crystal Reports Viewer possible in WPF?

    Hi, I've dragged and dropped three Crystal Reports Viewer controls on my WPF application. The goal is to be able to select up to 3 reports from a listbox and click run to generate the reports simultaneously. When I select just one report, it works fine. However when I select multiple reports it throws errors (object not found, etc). It seems there is a problem with multiple threads. Is it possible to have multiple instances of the Crystal Report Viewer display reports simultaneously? I am using version 13.0.9.1312 from the link below along with VS2013 C# WPF.
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Thanks,
    Syed

    I was able to quickly cobble together a two viewer app that looks like this:
    The code is like this:
    Public Sub New()
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument.Load("C:\tests\formulas.rpt")
            CrystalReportsViewer1.ViewerCore.ReportSource = crReportDocument
            Dim crReportDocument2 As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument2.Load("C:\tests\report1.rpt")
            CrystalReportsViewer2.ViewerCore.ReportSource = crReportDocument2
        End Sub
    For more details see the document WPF Project Using the Crystal Reports WPF Viewer in 8 Easy Steps
    Now a couple of things to keep in mind;
    1) The report engine is based on 3 Concurrent Processor License (CPL) model. Meaning you can process at most three reports at the same time. In my test, doing the above code for four reports worked, but the reports are very, very simple - and with saved data. What a "real" world reports will do, I am not sure. I do know that in a web app, the reports are queued up until one report is done and thus a CPL is freed up. You will also need to keep in mind any database connection limits, etc.
    2) There is also a Print Job limit. This by default is set to 75. In a nutshell, almost anything done with a report is a Print Job. E.g.; paging, zooming, drilling, searching, etc., etc. In addition subreports are considered to be Print Jobs. Thus a report with one subreport in a detail section that returns a thousand rows of data and therefore running 1000 subreports will error out.
    You can read more about Print Job limits here:
    Crystal Reports Maximum Report Processing Jobs ... | SCN
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Multiple instances of app server

    Is it possible to run multiple instances of OracleAS 10g (listening on different ports) on a single Windows 2003 server? What issues would need to be addressed?
    Thanks.

    I see another thread on this subject. Thanks.

  • Running multiple instances of a service

    ello,
    is it possible (and not "tabooed") to run multiple instances of an application that is designed to be service?
    Im intending to use the Java Service Wrapper to have my app run as a service, but im wondering if it is possible to run multiple instances of my application wrapped in the wrapper.
    What about starting the service using command line arguments?
    This is some details of my scenario:
    Im developing a server that will run without threading - it will read client requests that have been saved by the clients into a database. Thus im going to have an infinite while loop that just keeps reading the db for unprocessed client requests.
    When it is noticed that the load has increased then more than one instance of the server will be necessary.
    if im using the java service wrapper to run my server as a service will it be possible to achieve the above?
    thanks.

    one more thing : if i make any changes in the wrapper.conf xml file for the java service wrapper will the config be automatically loaded?

  • Run Multiple Instances of Windows Store App

    We have a desktop app which we are considering porting to Windows Store. Our app allows the user to generate orders. If the user wishes to generate several orders simultaneously, they open several instances of our app.
    Is it possible to run multiple instances of a Windows Store app on Windows 10?

    Hi,
    Another thread in MSDN forum already answered this question:
    https://social.msdn.microsoft.com/forums/windowsapps/en-us/19b5bd94-d772-46b0-b5af-a1be475b0e16/multiple-instance-in-metro-app
    The app is still single instance, but it can now open multiple windows by calling
    CoreApplication.CreateNewView. This is demonstrated in the
    Multiple Views Sample
    Roger Lu
    TechNet Community Support

  • Creating multiple instances for a single file in B2B

    Hi,
    I have a requirement to read the camt.053 file from the remote partner using Oracle B2B and send the file to oracle AIA and insert the data in the ERP database tables. I am able to read the file successfully through B2B using listening channel and send the data to AIA and insert the data in ERP tables but, if there is any error occured while inserting the data in the ERP tables it is creating multiple instances(6 message count) for the same file in B2B reports. where as it is creating only one entry in reports in case of successful insertion. I have not given any retry count in listening channel nor in the database adapter in SOA/AIA composite. I am confused from where B2B is retrying the message ? Do i need to set any system properties? Could you please guide me to resolve this issue?
    Regards,
    Nishanth.

    App message delivery is not retried in B2B, rather failed messages are delivered to the IP_IN_QUEUE. Please enable the logging for B2B engine in TRACE 32 mode and run a test to reproduce the behaviour. Post the log here or mail across to my id (in my profile).
    Regards,
    Anuj

  • How can I force TestStand to create multiple instance of an activex server instead of share the same reference?

    Hi, All:
         I am trying to migrate a application coded by VC++ to TestStand+CVI. This application opens multiple serial com ports and send commands to test targets, and get responses from these targets. The VC++ application creates multiple thread, and every thread create an activeX server instance which is responsible for opening serial port,sending test commands ,and getting response. It works fine as every thread has itsown activeX instance, so data and commands can be handled in the right serial port successfully.
         Yet when I works on TestStand, I got problems. I choose parallel model as the process model. I create a activeX object reference with AxtiveX/COM Adapter, and store the reference in a sequence local varialbe. If there is only 1 testsocket, It is OK. But if there are multiple test sockets, and communication between the application and test targets will be directly to the last test target. I try to popup a message within a execution to indicate the value of the activeX object reference, and all of them are identical. But this is not the behavior I want.
        So, is it possible to force TestStand to create independent instances of an activeX server? How can I make it work?
    Thanks

    Thanks for your comment, Dan.
          Yet I do get problems as none of us know how to program an activeX server so that it can be forced to be a single-instance or multiple-instance.
    As I mentioned earlier, there is existing application which is written by VC++ can create multiple instances of this activeX server, all I have to do is to create multiple threads, and initiate an instance of this server to contrl multiple test targets.
         My colleague said he creates the server with VC++ ATL, and cofigure it to be dual-interface and STA. And in the VC++ application side(client side), I use smart-pointer in threads to create an instance of the server:
     IMySerialServer pIMySerialServer;
      HRESULT hr = pIMySerialServer.CreateInstance("UUTCmd.MySerialServer");
      if(FAILED(hr))
       AfxMessageBox("Fail to create instance.");
    And then I got multple instances of the activeX server. Every thread can have itsown com port, can send/receive commands indepently. I have no idea how can I make it work on TestStand. Would you show me some reference documents or sample codes?
    Thank you
    Cipher

  • Multiple Instance Push Function Module

    All,
    I am referring to the service order tutorial as given in following link http://help.sap.com/saphelp_nwmobile71/helpdata/en/45/ac4bed74372733e10000000a155369/frameset.htm
    I have succefully created the Data Object/BAPI Wrappers and other objects. Everything works perfectly fine. Now I am trying to create a "Intance PUSH" function module in Mobile Server that will be called from backend to push the service orders. Till now using the same structure as in the tutorial I can send PUSH one instance. However I was wondering what if I have to PUSH Multiple instance at one shot.
    I am confused as to how should the structures for the same should look like. In the example given here, the customer node and equipment node do not have the order ID parameter in it. So when I have to push the same, how will the system know which instance of customer/equipment belongs to which instance of orderheader.
    If any one can clarify the same it will be really great.
    Regards,
    Shubham

    The backend key added by the DOE is a 'generated' field (and therefore internal to the DOE). This is why it is not exposed in the instance push FM.
    When you do not switch on automatic keymapping, the DOE creates this generated field, and fills it after calling GetDetail in the case of a delta download or a key push (since getdetail itself is called per instance, resolution is simple).
    If you switch on automatic keymapping, DOE will try to find existing backend fields in the child which match the root keys. (i.e. by name and type), and use these to resolve the children. If it cannot find such fields in the child that match the root keys, it will again generate fields on its own. And again these generated fields will be filled by the DOE after calling GetDetail during a delta load or key push.
    However, in the case of Instance Push, the only way to let the DOE resolve child instances is to send a field from the backend itself (i.e. not generated), which can be used to resolve the child instances (because GetDetail is not called in this case)
    If you do multiple instance push with the example given without changes, I am not sure if resolution will happen.
    An alternative to automatic keymapping is 'explicit keymapping' where you yourself decide which backend field in the child maps to which backend KEY in the parent (at all levels).
    Edited by: Arjun Shankar on Oct 1, 2009 1:36 PM

  • Create multiple instance in a database

    is it possible to create multiple instance in a database.if possible then is it possible to activate many instance at a time.(in personal edition)

    Instance in Oracle refers to the Oracle database "engine" - a collection of processes using a shared memory area, accessing a physical Oracle database.
    Multiple instances are possible on the same platform for different physical databases. But not a Good Idea..
    Multiple instances on different platforms are for the same physical database using Oracle Real Application Clusters, aka Oracle RAC.
    Thus your question does not make a lot of sense. My guess is that you are in fact refering to an Oracle session instead as this is "in the database" as you refered to.
    Each client that connect to Oracle, creates/establishes an Oracle session. A single client uses one (usually the default) or more sessions (usually used by a multi-threading client).
    By default, the Oracle Instance supports multiple Oracle (client) sessions. Including Personal Oracle. In the past, Personal Oracle limited (via the Listener) the number of remote clients (i.e. clients on other platforms) that can connect. I would assume that this is still the case. I however do not recall that there were a limit imposed on the number of local sessions that could be created - the limiting factor here is afterall the power and resources available by the PC. It's very unlikely that a common PC will be able to support a Personal Edition Oracle instance and 100's of local client sessions at the same time.
    If you do mean instance as per the strict Oracle definition - why would you want to create two Oracle instances (each with its own physical database) on a PC? That does not make sense on a large db server platform. It makes even less sense on a small PC platform.
    Each Oracle instance has overheads (processing and memory). Each physical Oracle database has overheads (system space, temp space, redo, logs, etc). Why duplicate these overheads?
    On a single platform - what can two Oracle instances (less capable because of reduced resources availability) do what a single Oracle instance cannot do faster and better and more effectively? Thus is it not a Good Idea to run multiple instances on a single platform. (exceptions acknowledged)

Maybe you are looking for