Unable to create native thread in Normal Condition

I am trying to analyze the "OOM unable to create native thread" error that occurred in our application. I wrote a sample program which has to creates 5000 threads and monitored it using JConsole.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
* ThreadJvmMemory.java
* Created on June 1, 2007, 9:49 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author Administrator
public class ThreadJvmMemory extends Thread{
/** Creates a new instance of ThreadJvmMemory */
BufferedReader in = null;
public ThreadJvmMemory() {
public static void main(String args[]){
ThreadJvmMemory dummy = new ThreadJvmMemory();
dummy.waitTillEnter();
for(int i=0;i<5000;i++){
if(i%1000==0){
System.out.println(i);
dummy.waitTillEnter();
ThreadJvmMemory dummy1 = new ThreadJvmMemory();
dummy1.start();
public void run(){
//System.out.println("Here");
Object dummyObject = new Object();
try {
in = new BufferedReader(new InputStreamReader(System.in));
in.readLine();
} catch (IOException ex) {
ex.printStackTrace();
System.out.println("Came out of the thread");
public void waitTillEnter(){
try {
if(in==null)
in = new BufferedReader(new InputStreamReader(System.in));
in.readLine();
} catch (IOException ex) {
ex.printStackTrace();
I started the program using the following command line option..
"c:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Dcom.sun.management.jmxremote.port=9979 -Xmx512m -Xminf0.1 -Xmaxf0.1 -XX:MaxPermSize=256m -XX:PermSize=256m -XX:+<GCTYPE> -XX:+PrintGCDetails
where GCType will be UseTrainGC or UseSerialGC or UseParallelGC or
What i observe in all the cases, there are no more than 1000 threads getting created . After completion of 1000 threads garbage collector keeps running and no more threads get created. Since i have configured heapsize to be 512m, PermGenSpace to be 256 and default value for process sapece is 2gb, JVM would be able to create only 1000 threads as per the formula "NoOfThreads = Process space - (Heap + permGen+some for VM initialization)/Stack Size" (correct me if i am wrong). But why i am not getting OutOfMemoryError while creating native thread. Moreover i can observer non-heap (Perm Gen) space keep growing overtime. But there is enough space in all other spaces.So my doubts are
1. Actually when we will get OOM error saying unable to create Native thread. To be more specific when which space occupied i will get this error.
2. Is there any way to configure process space. IMO No ?? Confirm ??
3. Does any one tried using a a tool that analyzes verboseGC output of SUN JVM. If so can you give any pointer. I have read through GCPortal, but i havent fully deployed it.
Java version is 1.5.0
OS Windows 2k3
Snippet of GC Output
[GC [DefNew: 5208K->38K(5824K), 0.0072564 secs] 32049K->26879K(34636K), 0.0080451 secs]
[GC [DefNew: 5222K->24K(5824K), 0.0070320 secs] 32063K->26868K(34636K), 0.0078097 secs]
[GC [DefNew: 5208K->39K(5824K), 0.0082161 secs] 32052K->26883K(34636K), 0.0090173 secs]
[GC [DefNew: 5223K->27K(5824K), 0.0080766 secs] 32067K->26874K(34636K), 0.0089273 secs]
[GC [DefNew: 5211K->39K(5824K), 0.0071186 secs] 32058K->26886K(34636K), 0.0078970 secs]
[GC [DefNew: 5223K->25K(5824K), 0.0070952 secs] 32070K->26875K(34636K), 0.0078766 secs]
[GC [DefNew: 5209K->21K(5824K), 0.0069871 secs] 32059K->26872K(34636K), 0.0077657 secs]

I am trying to analyze the "OOM unable to create native thread" error that occurred in our application. I wrote a sample program which has to creates 5000 threads and monitored it using JConsole.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
* ThreadJvmMemory.java
* Created on June 1, 2007, 9:49 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author Administrator
public class ThreadJvmMemory extends Thread{
/** Creates a new instance of ThreadJvmMemory */
BufferedReader in = null;
public ThreadJvmMemory() {
public static void main(String args[]){
ThreadJvmMemory dummy = new ThreadJvmMemory();
dummy.waitTillEnter();
for(int i=0;i<5000;i++){
if(i%1000==0){
System.out.println(i);
dummy.waitTillEnter();
ThreadJvmMemory dummy1 = new ThreadJvmMemory();
dummy1.start();
public void run(){
//System.out.println("Here");
Object dummyObject = new Object();
try {
in = new BufferedReader(new InputStreamReader(System.in));
in.readLine();
} catch (IOException ex) {
ex.printStackTrace();
System.out.println("Came out of the thread");
public void waitTillEnter(){
try {
if(in==null)
in = new BufferedReader(new InputStreamReader(System.in));
in.readLine();
} catch (IOException ex) {
ex.printStackTrace();
I started the program using the following command line option..
"c:\Program Files\Java\jdk1.5.0_09\bin\java.exe" -Dcom.sun.management.jmxremote.port=9979 -Xmx512m -Xminf0.1 -Xmaxf0.1 -XX:MaxPermSize=256m -XX:PermSize=256m -XX:+<GCTYPE> -XX:+PrintGCDetails
where GCType will be UseTrainGC or UseSerialGC or UseParallelGC or
What i observe in all the cases, there are no more than 1000 threads getting created . After completion of 1000 threads garbage collector keeps running and no more threads get created. Since i have configured heapsize to be 512m, PermGenSpace to be 256 and default value for process sapece is 2gb, JVM would be able to create only 1000 threads as per the formula "NoOfThreads = Process space - (Heap + permGen+some for VM initialization)/Stack Size" (correct me if i am wrong). But why i am not getting OutOfMemoryError while creating native thread. Moreover i can observer non-heap (Perm Gen) space keep growing overtime. But there is enough space in all other spaces.So my doubts are
1. Actually when we will get OOM error saying unable to create Native thread. To be more specific when which space occupied i will get this error.
2. Is there any way to configure process space. IMO No ?? Confirm ??
3. Does any one tried using a a tool that analyzes verboseGC output of SUN JVM. If so can you give any pointer. I have read through GCPortal, but i havent fully deployed it.
Java version is 1.5.0
OS Windows 2k3
Snippet of GC Output
[GC [DefNew: 5208K->38K(5824K), 0.0072564 secs] 32049K->26879K(34636K), 0.0080451 secs]
[GC [DefNew: 5222K->24K(5824K), 0.0070320 secs] 32063K->26868K(34636K), 0.0078097 secs]
[GC [DefNew: 5208K->39K(5824K), 0.0082161 secs] 32052K->26883K(34636K), 0.0090173 secs]
[GC [DefNew: 5223K->27K(5824K), 0.0080766 secs] 32067K->26874K(34636K), 0.0089273 secs]
[GC [DefNew: 5211K->39K(5824K), 0.0071186 secs] 32058K->26886K(34636K), 0.0078970 secs]
[GC [DefNew: 5223K->25K(5824K), 0.0070952 secs] 32070K->26875K(34636K), 0.0078766 secs]
[GC [DefNew: 5209K->21K(5824K), 0.0069871 secs] 32059K->26872K(34636K), 0.0077657 secs]

Similar Messages

  • OutOfMemoryError: unable to create native thread

    Why do I get OutOfMemory exceptions even if there is plently of Memory.
    JVM settings are -Xms256M and -Xmx1024M.
    Debug at runtime (Runtime.totalMemory()) shows that it never got above 260M. Why does the JVM not grab some more memory -instead of throwing OutOfMemory exception.
    I am creating quite a lot of threads 800+ within a few minutes
    Any ideas?

    I googled a bit and one thing i came across was
    "In those hypothetical configurations, the error java.lang.OutOfMemoryError: unable to create new native thread would begin to saturate the JRun logs. To clarify the error text, the error message means that no more native, or OS, threads can be created for the JVM process, causing the JVM to throw an exception. The exception type is java.lang.outOfMemoryError, but I find that to be rather misleading since the resource limitation on the OS thread count, not memory usage. "
    So it looks like you're looking for OS specific settings rather than anything pure java.
    Note that a thread per socket is not necessary, even when not using NIO:
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.util.HashMap;
    import java.util.LinkedList;
    import java.util.List;
    import java.util.Map;
    import java.util.concurrent.Executors;
    import java.util.concurrent.TimeUnit;
    public class ForumQuestion { 
        // i'm assuming character based input
        static final List<Reader> readers = new LinkedList<Reader>();
        static final Map<Reader,StringBuffer> buffers = new HashMap<Reader,StringBuffer>();
        static final Map<Reader,Socket> sockets = new HashMap<Reader,Socket>();
        public static void main( String[] args ) throws IOException {
            // using single thread (for simplicity) to handle all sockets
            // the main trick is making sure that your thread(s) doing the reading
            // don't sit and "spin" around the inputStreams when they have nothing
            // at all waiting... wasting CPU. Here i just make the worker sleep
            // for 1000 nanos between attempts where it hasn't read anything. I'm
            // sure you can do better!
            Executors.newScheduledThreadPool( 1 ).scheduleWithFixedDelay( new Runnable() {
                public void run() {
                    checkStreams();
            }, 1000, 1000, TimeUnit.NANOSECONDS );
            // create server socket and use main thread to block waiting for connections
            ServerSocket serverSock = new ServerSocket( 1138 );
            System.out.println( "Accepting connections on port 1138" );
            while( true ) {
                Socket s = serverSock.accept();
                synchronized( readers ) {
                    Reader r = new BufferedReader( new InputStreamReader( s.getInputStream() ) );
                    readers.add( r );
                    buffers.put( r, new StringBuffer() );
                    sockets.put( r, s );
                    System.out.printf( "Connection: %s%n", s );
        private static void checkStreams() {
            // i've been lazy (over zealous) with the synchronization for simplicity. you'd want to
            // Do something cleverer than blocking accepts() while work is being done
            synchronized( readers ) {
                if ( readers.size() == 0 ) {
                    return;
                // carry on until no work was done for any incoming sockets
                while( true ) {
                    boolean workDone = false;
                    for( Reader r : readers ) {
                        try {
                            StringBuffer buff = buffers.get( r );
                            while( r.ready() ) {
                                char c = (char)r.read();
                                buff.append( c );
                                checkBuffer( r, buff, c );
                                workDone = true;
                        } catch( IOException e ) {
                            // do something here, client prob dead
                    // if no work done (no sockets had anything) then rest the thread
                    if ( !workDone ) break;
        private static void checkBuffer( Reader r, StringBuffer buff, char last ) {
            if ( last == '\n' ) {
                System.out.printf( "Read \"%s\" from %s%n", buff.toString().trim(), sockets.get( r ) );
                buff.delete( 0, buff.length() );
    Accepting connections on port 1138
    Connection: Socket[addr=/127.0.0.1,port=1776,localport=1138]
    Connection: Socket[addr=/127.0.0.1,port=1777,localport=1138]
    Read "hello" from Socket[addr=/127.0.0.1,port=1776,localport=1138]
    Read "hi" from Socket[addr=/127.0.0.1,port=1777,localport=1138]
    Read "we're two sockets, but only using one thread to read from both of us!!" from Socket[addr=/127.0.0.1,port=1776,localport=1138]
    Read "Oh! YAY!!!!" from Socket[addr=/127.0.0.1,port=1777,localport=1138]It's massively inferior to using NIO, but better than having thousands of dedicated threads

  • WS 6.1SP5 gives error "unable to create native threads"

    Hi All,
    We are using AM7.0 on Sun Java Web Server 6.1 SP5. This is running on T2000 with 8 GB RAM on Solaris 10. We have implemented all the recommendations given by amtune script except Stack Size (-Xss128K). amtune recommends Stack Size of 128K. But our Web Server doesn't run with 128K. We had to bump it up to 192K.
    After some time in our load test, we get following error in our logs:
    ERROR: ConsoleServletBase.onUncaughtException
    com.iplanet.jato.NavigationException: Exception encountered during forward
    Root cause = [java.lang.OutOfMemoryError: unable to create new native thread]
    at com.iplanet.jato.view.ViewBeanBase.forward(ViewBeanBase.java:380)
    at com.iplanet.jato.view.ViewBeanBase.forwardTo(ViewBeanBase.java:261)
    at com.sun.identity.console.base.AMViewBeanBase.forwardTo(AMViewBeanBase.java:135)
    at com.sun.identity.console.base.AMAdminFrameViewBean.forwardTo(AMAdminFrameViewBe an.java:111)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase. java:981)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.j ava:615)
    at com.iplanet.jato.ApplicationServletBase.doGet(ApplicationServletBase.java:459)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:787)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)
    at com.sun.mobile.filter.AMLController.doFilter(AMLController.java:163)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFil terChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain .java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 280)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java: 161)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    Root cause:
    java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:574)
    at netscape.ldap.LDAPConnSetupMgr.openConnection(LDAPConnSetupMgr.java:212)
    at netscape.ldap.LDAPConnThread.connect(LDAPConnThread.java:109)
    at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:1075)
    at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:946)
    at netscape.ldap.LDAPConnection.connect(LDAPConnection.java:858)
    Does anybody knows what this error is and how to tackle this problem ?
    Thanks in advance,
    Vivek

    Hi Sultal,
    Thanks for the response. I will try reducing the ms and mx options. BTW, following are my WS' JVM settings:
    <JAVA javahome="/usr/jdk/entsys-j2se" serverclasspath="/opt/SUNWwbsvr/bin/https/jar/webserv-rt.jar:${java.home}/lib/t
    ools.jar:/opt/SUNWwbsvr/bin/https/jar/webserv-ext.jar:/opt/SUNWwbsvr/bin/https/jar/webserv-jstl.jar:/usr/share/lib/ktse
    arch.jar" classpathsuffix="/opt/SUNWam/lib/xalan.jar:/opt/SUNWam/lib/xmlsec.jar:/opt/SUNWam/lib/xercesImpl.jar:/opt/SUN
    Wam/lib/dom.jar:/opt/SUNWam/lib/saaj-api.jar:/opt/SUNWam/lib/jaxrpc-api.jar:/opt/SUNWam/lib/jaxrpc-impl.jar:/opt/SUNWam
    /lib/jaxrpc-spi.jar:/opt/SUNWam/lib/saaj-impl.jar:/etc/opt/SUNWam/config:/opt/SUNWam/lib:/opt/SUNWam/locale:/usr/share/
    lib/mps/secv1/jss4.jar:/opt/SUNWam/lib/am_sdk.jar:/opt/SUNWam/lib/ldapjdk.jar:/opt/SUNWam/lib/am_services.jar:/opt/SUNW
    am/lib/am_sso_provider.jar:/opt/SUNWam/lib/swec.jar:/opt/SUNWam/lib/acmecrypt.jar:/opt/SUNWam/lib/iaik_ssl.jar:/opt/SUN
    Wam/lib/iaik_jce_full.jar:/opt/SUNWam/lib/mail.jar:/opt/SUNWam/lib/activation.jar:/opt/SUNWam/lib/am_logging.jar:/opt/S
    UNWam/lib/jaas.jar:/opt/SUNWam/lib/jax-qname.jar:/opt/SUNWam/lib/jaxm-api.jar:/opt/SUNWam/lib/jaxm-runtime.jar:/opt/SUN
    Wam/lib/jce1_2_1.jar:/opt/SUNWam/lib/jdk_logging.jar:/opt/SUNWam/lib/namespace.jar:/opt/SUNWam/lib/relaxngDatatype.jar:
    /opt/SUNWam/lib/xsdlib.jar:/opt/SUNWam/lib/jaxb-api.jar:/opt/SUNWam/lib/jaxb-impl.jar:/opt/SUNWam/lib/jaxb-libs.jar:/op
    t/SUNWam/lib/jaxb-xjc.jar:/opt/SUNWma/lib/wireless_rendering.jar:/opt/SUNWma/lib/wireless_rendering_util.jar:/opt/SUNWm
    a/lib/mobile_services.jar:/opt/SUNWma/lib/ccpp-1_0.jar:/opt/SUNWma/lib/ccpp-ri-1_0.jar:/opt/SUNWma/lib/jena-1.4.0.jar:/
    opt/SUNWma/lib/rdffilter.jar:/opt/SUNWma/lib/locale:/opt/SUNWam/lib/mobile_identity.jar:" envclasspathignored="true" na
    tivelibrarypathprefix="" debug="false" debugoptions="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n" dynamicr
    eloadinterval="-1">
    <JVMOPTIONS>-Ds1is.java.util.logging.config.class=com.sun.identity.log.s1is.LogConfigReader</JVMOPTIONS>
    <JVMOPTIONS>-DLOG_COMPATMODE=Off</JVMOPTIONS>
    <JVMOPTIONS>-Djava.security.auth.login.config=/opt/SUNWwbsvr/https-ndmseauqa01.ndc.nasa.gov/config/login.conf</JVMO
    PTIONS>
    <JVMOPTIONS>-Djava.protocol.handler.pkgs=com.iplanet.services.comm</JVMOPTIONS>
    <JVMOPTIONS>-Dcom.iplanet.am.serverMode=true</JVMOPTIONS>
    <JVMOPTIONS>-Djava.util.logging.manager=com.iplanet.ias.server.logging.ServerLogManager</JVMOPTIONS>
    <JVMOPTIONS>-Xmx3136M</JVMOPTIONS>
    <JVMOPTIONS>-Xms3136M</JVMOPTIONS>
    <JVMOPTIONS>-Xloggc:/opt/SUNWwbsvr/https-eauthws/logs/gc.log</JVMOPTIONS>
    <JVMOPTIONS>-server</JVMOPTIONS>
    <JVMOPTIONS>-Xss192K</JVMOPTIONS>
    <JVMOPTIONS>-XX:NewSize=392M</JVMOPTIONS>
    <JVMOPTIONS>-XX:MaxNewSize=392M</JVMOPTIONS>
    <JVMOPTIONS>-XX:PermSize=260M</JVMOPTIONS>
    <JVMOPTIONS>-XX:MaxPermSize=260M</JVMOPTIONS>
    <JVMOPTIONS>-XX:+DisableExplicitGC</JVMOPTIONS>
    <JVMOPTIONS>-XX:+UseParNewGC</JVMOPTIONS>
    <JVMOPTIONS>-XX:+CMSPermGenSweepingEnabled</JVMOPTIONS>
    <JVMOPTIONS>-XX:+CMSClassUnloadingEnabled</JVMOPTIONS>
    <JVMOPTIONS>-XX:+UseCMSCompactAtFullCollection</JVMOPTIONS>
    <JVMOPTIONS>-XX:CMSFullGCsBeforeCompaction=0</JVMOPTIONS>
    <JVMOPTIONS>-XX:SoftRefLRUPolicyMSPerMB=0</JVMOPTIONS>
    <JVMOPTIONS>-XX:+PrintClassHistogram</JVMOPTIONS>
    <JVMOPTIONS>-XX:+PrintGCDetails</JVMOPTIONS>
    <JVMOPTIONS>-XX:+PrintGCTimeStamps</JVMOPTIONS>
    <JVMOPTIONS>-XX:+UseConcMarkSweepGC</JVMOPTIONS>
    The error happens when the LWPs of the process goes beyond 500. In our load testing the server is getting hit 2000 requests per minute.
    I will reduce the mx and ms size, in the mean time, if you can take a look at any other thing that I need to do.
    One more thing, from where the native threads get allocated? (Heap/Perm/somewhere else)
    Regards,
    Vivek
    There is a certain limit for a number of threads that
    JVM can create. This limit depends on the OS and JVM
    options. You can try using XX:PermSize and
    -XX:MaxPermSize options as well as lowering -Xms and
    -Xmx options.

  • OutOfMemory : Unable to new native thread

    Let me start off by giving some background.
    We began experiencing this issue within the past month
    in our production environment, but cannot reproduce
    it in an isolated testing environment.
    I have performed extensive tests in regards to Heap Sizes
    and Thread Stack sizes in hopes of resolving this issue, but
    none have worked.
    Hardware/OS Settings
    OS for platform is Linux
    Distribution is RHAS 2.1
    Kernel version is 2.4.9-e.30enterprise SMP
    Box has 2 CPUs which are hyperthreaded
    ULIMIT settings
    core file size (blocks) 0
    data seg size (kbytes) unlimited
    file size (blocks) unlimited
    max locked memory (kbytes) unlimited
    max memory size (kbytes) unlimited
    open files 1024
    pipe size (512 bytes) 8
    stack size (kbytes) 8192
    cpu time (seconds) unlimited
    max user processes 8191
    virtual memory (kbytes) unlimited
    /etc/sysctl.conf , contains (effectively overrides the ulimt setting)
    fs.file-max = 65535
    /proc/sys/kernel/threads-max
    16383
    glibc version is 2.2.4
    Physical Mem : ~ 2 Gig
    Swap : ~ 4 Gig
    JVM Settings
    java version "1.4.2_03"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02)
    Java HotSpot(TM) Client VM (build 1.4.2_03-b02, mixed mode)
    -server -Djava.awt.headless=true -XX:+DisableExplicitGC -Xms1228m -Xmx1228m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -verbosegc -verbosegc -XX:+PrintGCDetails -Xloggc:/opt/logs/gc_log.txt
    Tests
    The way i understand it, the memory available for thread creation is:
    Physical Memory - "-Xmx" = ~ 800 MB (in our case)
    Also, the default stack size on linux is 512k, so a base line (with no other
    phyical memory usage than the JVM) is:
    800 * 1000 / 512 = ~ 1562 threads
    however, i when the error recurrs, i can do a :
    ps -ef | grep java | wc -l (each java thread is represented by a process on linux)
    and that # is way below 1562 (approx 90 or so)
    additionally, via java code at the time of the exception you can get
    the Mother Thread group:
            private static ThreadGroup getMotherThreadGroup()
              ThreadGroup mother = Thread.currentThread().getThreadGroup();
              while(mother.getParent() != null)
                   mother = mother.getParent();
              return mother;
         }and then get the # of threads in the group:
            Thread      currentThread = Thread.currentThread();
            ThreadGroup mother        = getMotherThreadGroup();       
         Thread[]    threads       = new Thread[mother.activeCount() + 5];          
            int threadCount;
            for (int count;;)
                count = mother.enumerate(threads,true);
                if (count < threads.length)
                    threadCount = count;
                    break;
                threads = new Thread[threads.length << 1];
            }  once again this # is way below 1562 (matches rougly to the 'ps' output)
    Additionally, I have modified the JVM parameters to indepdently reduce
    -Xms by 100 m and reduce the stack size to -Xss256k and neither of
    these resolve the issue.
    Questions
    What other OS level settings could be affecting the # of threads that can be created?
    What JVM settings could be affecting the # of threads that can be created?
    Are there ever Java threads present that will no be represented by the
    code in this post, or a 'ps' process listing?

    Some additional information, in regards to Linux and Maximum # of Threads.
    This bug entry in Redhat's Bug DB, provides some insight into the native
    thread threshold:
    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=70058
    From the Java Bug Database:
    On Redhat 7.2, the pthread library has a hard-coded thread limit, which
    is 1024. To increase this limit, you have to change PTHREAD_THREADS_MAX
    and recompile pthread library. See LinuxThreads FAQ. Hitting an
    OutOfMemoryError after 1014 threads on RH-7.2 is normal.
    The error on RH-9 looks strange. But when I tested on my RH-9 box, things
    work ok. The testcase runs until it has hit one of the system limits:
    + max user processes (use "ulimit -u" to adjust)
    + thread limit, this is calculated based on the amount of physical memory
    (you can change it by editing /proc/sys/kernel/threads-max)
    + virtual memory. 32bit Linux by default allows 2GB virtual address space
    in user application. Unless you specify a smaller stack size (-Xss96k
    will do it), java will run out of virtual space in about 4000 threads
    (default stack size is 512k, 2GB/512k = 4096, but notice that the
    virtual memory is also used for C heap, library image, data segments, et al.)
    Another Linux Thread explanation:
    Threads
    Limitations on threads are tightly tied to both file descriptor
    limits, and process limits.
    Under Linux, threads are counted as processes, so any limits to
    the number of processes also applies to threads. In a heavily
    threaded app like a threaded TCP engine, or a java server, you
    can quickly run out of threads.
    For starters, you want to get an idea how many threads you can
    open. The `thread-limit` util mentioned in the Tuning Utilities
    section is probabaly as good as any.
    The first step to increasing the possible number of threads is
    to make sure you have boosted any process limits as mentioned
    before.
    There are few things that can limit the number of threads,
    including process limits, memory limits, mutex/semaphore/shm/ipc
    limits, and compiled in thread limits. For most cases, the
    process limit is the first one to run into, then the compiled in
    thread limits, then the memory limits.
    To increase the limits, you have to recompile glibc. Oh fun!.
    And the patch is essentially two lines!. Woohoo!
    --- ./linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h.akl Mon Sep 4
    19:37:42 2000
    +++ ./linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Mon Sep 4
    19:37:56 2000
    @@ -64,7 +64,7 @@
    /* The number of threads per process. */
    #define POSIXTHREAD_THREADS_MAX 64
    /* This is the value this implementation supports. */
    -#define PTHREAD_THREADS_MAX 1024
    +#define PTHREAD_THREADS_MAX 8192
    /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level. */
    --- ./linuxthreads/internals.h.akl Mon Sep 4 19:36:58 2000
    +++ ./linuxthreads/internals.h Mon Sep 4 19:37:23 2000
    @@ -330,7 +330,7 @@
    THREAD_SELF implementation is used, this must be a power of two and
    a multiple of PAGE_SIZE. */
    #ifndef STACK_SIZE
    -#define STACK_SIZE (2 * 1024 * 1024)
    +#define STACK_SIZE (64 * PAGE_SIZE)
    #endif
    /* The initial size of the thread stack. Must be a multiple of PAGE_SIZE.
    Now just patch glibc, rebuild, and install it. ;-> If you have a
    package based system, I seriously suggest making a new package
    and using it.
    And two links that describe Linux/GLIBC changes and how they affect threads:
    http://www.jlinux.org/server.html
    http://www.volano.com/linux.html
    C Code for testing Native Thread Creation:
    /* compile with:   gcc -lpthread -o thread-limit thread-limit.c */
    /* originally from: http://www.volano.com/linuxnotes.html */
    #include <stdio.h>
    #include <unistd.h>
    #include <pthread.h>
    #define MAX_THREADS 10000
    int i;
    void run(void) {
      char c;
      if (i < 10)
        printf("Address of c = %u KB\n", (unsigned int) &c / 1024);
      sleep(60 * 60);
    int main(int argc, char *argv[]) {
      int rc = 0;
      pthread_t thread[MAX_THREADS];
      printf("Creating threads ...\n");
      for (i = 0; i < MAX_THREADS && rc == 0; i++) {
        rc = pthread_create(&(thread), NULL, (void *) &run, NULL);
    if (rc == 0) {
    pthread_detach(thread[i]);
    if ((i + 1) % 100 == 0)
         printf("%i threads so far ...\n", i + 1);
    else
    printf("Failed with return code %i creating thread %i.\n",
         rc, i + 1);
    exit(0);

  • Java.lang.OutOfMemoryError: unable to create new native thread on Win2000

    Dear all,
    I install a java server (SAP J2EE) on the windows machine and run into the following problem: the total number of threads cannot exceed 1200 (as i see this in the task manager)
    After it does reach this number no other tasks can be started. Thereafter i get java.lang.OutOfMemoryError: unable to create new native thread error .
    However the other machine where the same distribution of Win2000 Server is installed can easily coupe with more than 2500 theads. The same is true when the safe mode on the first machine is on: I can generate more than 1200 threads. So it seems the problem has something to do with Windows itself.
    I am really puzzled here, would really appreciate any help.
    Thanks in advance,
    Dimitry
    Surkov Dimitry
    [email protected]
    +49.1632.492618

    well, i do not supply any options when i start jvm, but it is not the course:
    it also happens with c programs. however in the safe mode it works. both for c and for java program.
    so it must be either some software (however memory is ok) or ...? i am lost. In some Unix system you can set the total number of threads allowed as an option in the kernal. But i guess this is not the case with windows.
    Thanks a lot for your reply,
    dimitry

  • Java.lang.OutOfMemoryError: unable to create new native thread

    Hi All,
    I have installed weblogic server 8 sp4 in production environment . I am facing problems with JVM issues .
    JVM is crashing very frequently with the following errro :
    ####<Jun 18, 2009 10:58:22 AM IST> <Info> <Common> <IMM90K-21> <SalesCom> <ExecuteThread: '24' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-000628> <Created "1" resources for pool "PIConnectionPool", out of which "1" are available and "0" are unavailable.>
    ####<Jun 18, 2009 11:00:09 AM IST> <Info> <EJB> <IMM90K-21> <SalesCom> <ExecuteThread: '23' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-010051> <EJB Exception occurred during invocation from home: payoutCheck.ejb.payoutCheck_s6v3so_HomeImpl@121a735 threw exception: java.lang.OutOfMemoryError: unable to create new native thread
    java.lang.OutOfMemoryError: unable to create new native thread
         at java.lang.Thread.start(Native Method)
         at payoutCheck.classes.MyThread2.MyThreadv(PayoutCheckBOImpl.java:249)
         at payoutCheck.classes.PayoutCheckBOImpl.genSP(PayoutCheckBOImpl.java:184)
         at payoutCheck.ejb.PayoutCheckSLSB.genSP(PayoutCheckSLSB.java:191)
         at payoutCheck.ejb.payoutCheck_s6v3so_EOImpl.genSP(payoutCheck_s6v3so_EOImpl.java:315)
         at payoutCheck.ejb.payoutCheck_s6v3so_EOImpl_CBV.genSP(Unknown Source)
         at payoutCheck.deligate.PayoutCheckBD.genSP(PayoutCheckBD.java:226)
         at ui.action.SearchAction.callFilter(SearchAction.java:378)
         at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:220)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    >
    The above mentioned is coming several times , anybody please help out to get rid of this issue.
    Thanks in advance ,
    Krikar.

    This only tells you that the JVM is running out of heap space. It doesn't tell you what is causing the problem. You likely have a memory leak, but you could also try increasing the max heap size of the JVM (-Xmx command line option). It would help to watch the % mem in use statistic, but only immediately after a garbage collection cycle (you can force a GC from the admin console). If the % mem in use after the GC is increasing over time, then that likely confirms you have a memory leak. Note that looking at that statistic during the server startup probably is irrelevant. You'd need to wait until the server finishes starting up, and likely processed a few messages (to load static data).
    If you get to the point of confirming that you have a memory leak, that requires doing detailed analysis with a Java profiler (JProfiler, JProbe, YourKit, etc.) to track down the source of the leak.

  • Help! Unable to create new native thread

    Ok I see this problem all over the web but most of the posts are many years old and still leave me a little confused.  Often at random times on the same tags like CFLDAP I get the error "Unable to create new native thread".  Then a few minutes later the same tag on the same page works just fine.
    I have 4GB of memory in this box with 1400 MB set as the maximum Java heap size by the way.
    Here are my arguments from the jvm.config file.
    # Arguments to VM
    java.args=-server  -Xmx1400m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{appli cation.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application. home}/../wwwroot/WEB-INF/cfform/jars,"C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\InterWeb-Prod\\includes\\classes"
    Here is a typical error that comes through.
    struct     
    Browser     Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4    
    DateTime    {ts '2010-06-23 10:07:44'}  
    Diagnostics unable to create new native thread null <br>The error occurred on line 122.
    GeneratedContent      
    HTTPReferer http://--------------------/index.cfm?FuseAction=HR.main    
    Mailto      interweb@--------------------- 
    Message     unable to create new native thread      
    QueryString fuseaction=ManagedLists.MailSubscriptions     
    RemoteAddress     192.168.250.124
    RootCause   struct    
    Message     unable to create new native thread      
    StackTrace          java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:597) at com.sun.jndi.ldap.Connection.<init>(Connection.java:208) at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:112) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2504) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:263) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:76) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82) at coldfusion.tagext.net.LdapTag.do_ActionQuery(LdapTag.java:839) at coldfusion.tagext.net.LdapTag.doStartTag(LdapTag.java:616) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at cfadfunctions2ecfm1473603830$funcADLOOKUPUSERNAME.runFunction(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\includes\adfunctions.cfm:122) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471) at cfadfunctions2ecfm1473603830$funcADLOOKUPMULTIPLEUSERNAMES.runFunction(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\includes\adfunctions.cfm:54) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:59) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:192) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2471) at cfdsp_managedlists2ecfm55598920.runPage(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\hr\managedlists\dsp_managedlists.cfm:232) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at cffbx_switch2ecfm2121232114.runPage(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\hr\managedlists\fbx_switch.cfm:23) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at cffbx_fusebox30_cf502ecfm1180471387._factor4(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\fbx_fusebox30_cf50.cfm:241) at cffbx_fusebox30_cf502ecfm1180471387._factor5(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\fbx_fusebox30_cf50.cfm:1) at cffbx_fusebox30_cf502ecfm1180471387.runPage(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\fbx_fusebox30_cf50.cfm:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2661) at cfindex2ecfm749274359.runPage(C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\InterWeb-Prod\index.cfm:23) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:273) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:86) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.CfmServlet.service(CfmServlet.java:175) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 ) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)  
    I could really use some help figuring this out.  We are getting random errors a few times a day and usually in places where we are using CFLDAP.
    Thanks,
    David

    Absolutely unbelievable that this has been going on for 4 YEARS and there are still NO definitive answers from Adobe!!
    There's no definite answer from Adobe, because there's no definitive single question.  These errors come up because - for any number of possible reasons - the JVM becomes overloaded.  And it's almost always down to an issue with the application code being run, and nothing to do with CF, per-se.  So what's Adobe supposed to do?  Come and fix your application for you?  There are plenty of diagnostic tools out there - some built into CF itself - which you could use to sort the problem out.  Or you could hire someone like Mike Brunt to come and have a look at your set up.  All it takes to fix these things is to actually do something about fixing it, rather than slamming one's fist on the desk saying "why doesn't Adobe do something!"
    I thought - and my knowledge in the area isn't expansive - the inability to allocate threads was down to the app being choked up: threads are a finite commodity, and if requests are queuing up faster than the JVM can clear them, you're gonna get errors eventually.  What causes this sort of thing?  More traffic than the server can process.  This could be because of server kit, or it could be due to code that doesn't scale to the requirement.  Usually the latter.  Basically one cannot polish a turd.
    I have a 24x7 production server that services 180,000 clients in 300 countries around the clock that cannot afford to be down for more than a few minutes at a time.
    I'm running Windows 2008 32-bit with 4GB of RAM because I have some graphics software that cannot tolerate a 64-bit OS.  Everything has been running fine for the past few months, but now it's starting to crash more and more frequently.  I have CF 8.0.1.195765 and Java 1.6.0_04
    How many concurrent requests for 180000 clients generate?  The number of clients matters less than how heavily the site is used.  But, to be honest, I get the impression the implication is "it's a busy site", in which case I think your hardware is a bit on the lean side.  Also, if it's a mission-critical app, running it on a single server is probably ill-advised, just from a fault-tolerance perspective even before one starts thinking about performance.
    If I was in your situation, I'd consider the following options:
    * upgrade your JVM to the most recent version (1.6.0_21?)
    * put more RAM in the box, and run a second CF instance on it.
    * get another box.
    * refactor the environment so the graphics software runs on a different box, upgrading the CF server to 64-bit (again, with more RAM)
    * run some diagnostics on the server, seeing what's taking up threads and where any bottlenecks might be
    * get an expert in to do the analysis side of things.
    * stop expecting Adode to fix "something".
    One of my other symptoms I have noticed is that any work done using RDP starts getting really really bogged down.  Opening Windows Explorer and searching for files can take minutes.  Restarting the CF service will sometimes fail to complete, and you have to wait a few minutes before the manual Start option appears in the dropdown.  Maybe coincidentally, the Performance Monitor will fail to add any of the ColdFusion metrics, for example Running Requests and Queued Requests, and the Event Monitor shows an error relating to an 8-byte boundary not being maintained.
    You don't, by any chance, store your client variables in the registry do you?  The only time I've seen this happen is when the CF box is munging the OS environment, and the only way I can think this could happen if it was clogging the registry.  Never store client variables in the registry.
    Adam

  • Error Code -17400; Unable to create thread

    Running TestStand 4.0.  Test sequence calls many sequences that run as new executions and runs fine for up to about 8 units testing simultaneously.  After that, I get a run-time error code -17400; Unable to create thread.  There are no other details available.  The steps that generate the error are able to create the new executions initially, but eventually fail once about 22 executions are running.  I am monitoring memory resources and there does not appear to be any issues.  Any troubleshooting suggestions?  Thanks.

    My test sequence has several test groups, each of which contain loops that create new threads (tests) for 48 UUTs.  Thus the number of running threads does get very high.  I was running into problems with Windows XP GDI Object resources once the number of threads reached about 200.  I then modified my program into smaller test groups to keep the number of threads at any time to less than 150.  GDI resources are no longer an issue, but the error -17400 unable to create thread happens after the first test group has completed and the second test group is just trying to run.  Note that the second test group runs fine if I skip the first test group, so the sequence itself should be okay.  I thought it might be a memory issue (even though there are no apparent memory issues seen in Windows Task Manager), so I set the "Unload after step executes" property for each of the new executions created.  That did not resolve the issue. 
    I am trying to create a simple sequence to duplicate the error without using any of the actual test sequences that require test hardware, but have not been successful thus far.
    Thanks for your replies and suggestions!

  • Error 1013000 loading application: Unable to Create Request Server Thread

    We are currently getting the following error "Error 1013000 loading application: Unable to Create Request Server Thread" when attempting to load more than 5 applications onto our new Essbase server. The O/S is Windows 2003 and we are running Essbase 6.5.5. Our old server, running Windows 2000, is not experiencing this problem.

    I think I've found the problem! It seems the server team didn't set up the swap file, hence, when physical memory started to run a little low on the box, the thread could not be created. FYI, we had already increased the SERVERTHREADS option in the Essbase.cfg file.

  • Unable to create IDOCs after client copy

    I'm unable to create IDOCs after a client copy.  I receive a SAPSQL_ARRAY_INSERT_DUPREC or insert of duplicate rows ABAP dump.
    Does anyone know what how to fix this.  Thank you in advance.
    Runtime Error          SAPSQL_ARRAY_INSERT_DUPREC
    Except.                CX_SY_OPEN_SQL_DB
    Date and Time          22.10.2007 16:50:51
    ShrtText
    The ABAP/4 Open SQL array insert results in duplicate database records.
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLEDI1" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    is especially useful if you want to keep a particular message.
    Error analysis
    An exception occurred. This exception is dealt with in more detail below
    . The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
    neither
    caught nor passed along using a RAISING clause, in the procedure
    "F09_IDOC_INSERT_WITH_NUMBER" "(FORM)"
    Since the caller of the procedure could not have expected this exception
    to occur, the running program was terminated.
    The reason for the exception is:
    If you use an ABAP/4 Open SQL array insert to insert a record in
    the database and that record already exists with the same key,
    this results in a termination.
    (With an ABAP/4 Open SQL single record insert in the same error
    situation, processing does not terminate, but SY-SUBRC is set to 4.)
    How to correct the error
    Use an ABAP/4 Open SQL array insert only if you are sure that none of
    the records passed already exists in the database.
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "SAPSQL_ARRAY_INSERT_DUPREC" CX_SY_OPEN_SQL_DBC
    "SAPLEDI1" or "LEDI1F09"
    "F09_IDOC_INSERT_WITH_NUMBER"
    If you cannot solve the problem yourself and you wish to send
    an error message to SAP, include the following documents:
    1. A printout of the problem description (short dump)
    To obtain this, select in the current display "System->List->
    Save->Local File (unconverted)".
    2. A suitable printout of the system log
    To obtain this, call the system log through transaction SM21.
    Limit the time interval to 10 minutes before and 5 minutes
    after the short dump. In the display, then select the function
    "System->List->Save->Local File (unconverted)".
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, select the Editor function "Further Utilities->
    Upload/Download->Download".
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    The exception must either be prevented, caught within the procedure
    "F09_IDOC_INSERT_WITH_NUMBER"
    "(FORM)", or declared in the procedure's RAISING clause.
    To prevent the exception, note the following:
    System environment
    SAP Release.............. "640"
    Application server....... "auaplxr3q"
    Network address.......... "128.197.135.5"
    Operating system......... "AIX"
    Release.................. "5.3"
    Hardware type............ "000B439ED600"
    Character length......... 8 Bits
    Pointer length........... 64 Bits
    Work process number...... 1
    Short dump setting....... "full"
    Database server.......... "auaplxr3q"
    Database type............ "ORACLE"
    Database name............ "Q63"
    Database owner........... "SAPR3"
    Character set............ "en_US.ISO8859-1"
    SAP kernel............... "640"
    Created on............... "Mar 22 2007 20:48:46"
    Created in............... "AIX 1 5 00538A4A4C00"
    Database version......... "OCI_920 "
    Patch level.............. "175"
    Patch text............... " "
    Supported environment....
    Database................. "ORACLE 9.2.0.., ORACLE 10.1.0.., ORACLE
    10.2.0.."
    SAP database version..... "640"
    Operating system......... "AIX 1 5, AIX 2 5, AIX 3 5"
    Memory usage.............
    Roll..................... 16128
    EM....................... 4189928
    Heap..................... 0
    Page..................... 0
    MM Used.................. 1469352
    MM Free.................. 2718056
    SAP Release.............. "640"
    User and Transaction
    Information on where terminated
    The termination occurred in the ABAP program "SAPLEDI1" in
    "F09_IDOC_INSERT_WITH_NUMBER".
    The main program was "SAPMSSY1 ".
    The termination occurred in line 108 of the source code of the (Include)
    program "LEDI1F09"
    of the source code of program "LEDI1F09" (when calling the editor 1080).
    Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
    the
    procedure "F09_IDOC_INSERT_WITH_NUMBER" "(FORM)" but was not handled locally,
    not declared in the
    RAISING clause of the procedure.
    The procedure is in the program "SAPLEDI1 ". Its source code starts in line 5
    of the (Include) program "LEDI1F09 ".
    Source Code Extract
    Line
    SourceCde
    78
    perform call_badi tables list_container_insert
    79
    using  control
    80
    ident.
    81
    Aufruf des Badi's für das einstreuen neuer Segmente
    82
    perform call_insert_badi tables list_container_insert
    83
    using control
    84
    ident
    85
    changing maxsegnum.
    86
    87
       free list_container_insert
    88
    FREE_RETURN = 1.
    89
    ELSE. " no other IDoc is open in create-mode
    90
    LOOP AT LIST_CONTAINER_CREATE WHERE MANDT EQ SY-MANDT
    91
    AND   DOCNUM EQ IDENT.
    92
    LIST_CONTAINER_CREATE-DOCNUM = DOCNUM.
    93
    MODIFY LIST_CONTAINER_CREATE.
    94
    ADD 1 TO MAXSEGNUM.
    95
    ENDLOOP.
    96
    if control-mestyp eq c_mestyp.
    97
    CALL FUNCTION 'FUNCTION_EXISTS'
    98
    EXPORTING
    99
    funcname           = c_func
    100
    EXCEPTIONS
    101
    FUNCTION_NOT_EXIST = 1.
    102
    IF syst-subrc IS INITIAL.  "Anwendungssystem
    103
    perform call_transform
    104
    tables list_container_create
    105
    using  control.
    106
    ENDIF.
    107
    endif.
    >>>>>
    INSERT EDID4 FROM TABLE LIST_CONTAINER_CREATE.
    109
    Aufruf des Badi's für das Anwendungsmapping einzelner Felder
    110
    perform call_badi tables list_container_create
    111
    using  control
    112
    ident.
    113
    perform call_insert_badi tables list_container_create
    114
    using  control
    115
    ident
    116
    changing maxsegnum.
    117
    118
      free list_container_create
    119
    FREE_RETURN = 0.
    120
    ENDIF.
    121
    122
    insert status records
    123
    124
    SYN_ERROR_IN = ' '.
    125
    CNTR_STATUS = 0.
    126
    REFRESH LIST_STATUS.
    127
    CLEAR LIST_STATUS.
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    2
    SY-TABIX
    1
    SY-DBCNT
    1
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    CPIC and RFC Control
    SY-MSGTY
    SY-MSGID
    SY-MSGNO
    000
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    13 FORM         SAPLEDI1                            LEDI1F09                              108
    F09_IDOC_INSERT_WITH_NUMBER
    12 FUNCTION     SAPLEDI1                            LEDI1U19                               33
    EDI_DOCUMENT_CLOSE_CREATE_TAB
    11 FUNCTION     SAPLEDIR                            LEDIRU01                              273
    IDOC_INBOUND_WRITE_TO_DB
    10 FORM         SAPLEDIN                            LEDINF01                              457
    ONE_IDOC_STORE
    9 FUNCTION     SAPLEDIN                            LEDINU05                              234
    IDOC_INBOUND_ASYNCHRONOUS
    8 FORM         SAPLEDIN                            LEDINV05                               19
    IDOC_INBOUND_ASYNCHRONOUS
    7 FORM         SAPMSSY1                            SAPMSSY1                              254
    XAB_RUN_DRIVER
    6 FUNCTION     SAPLSXAB                            LSXABU01                                9
    RFC_RUN_XAB_DRIVER
    5 FUNCTION     SAPLERFC                            LERFCU01                               59
    ARFC_EXECUTE
    4 FUNCTION     SAPLERFC                            LERFCU02                              229
    ARFC_DEST_SHIP
    3 FORM         SAPLERFC                            LERFCV02                               28
    ARFC_DEST_SHIP
    2 FORM         SAPMSSY1                            SAPMSSY1                               69
    REMOTE_FUNCTION_CALL
    1 MODULE (PBO) SAPMSSY1                            SAPMSSY1                               30
    %_RFC_START
    Chosen variables
    Name
    Val.
    No.      13 Ty.          FORM
    Name  F09_IDOC_INSERT_WITH_NUMBER
    CONTROL-MESTYP
    USERCLONE
    554544444222222222222222222222
    53523CFE5000000000000000000000
    C_MESTYP
    FIDCCH
    444444222222222222222222222222
    694338000000000000000000000000
    SY-XFORM
    IDOC_INBOUND_ASYNCHRONOUS
    444454444544545544454445522222
    94F3F9E2F5E4F139E382FEF5300000
    LIST_STATUS-STAPA2
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    C_FUNC
    IDOC_TRANSFORM
    444455544544542222222222222222
    94F3F421E36F2D0000000000000000
    SYST-REPID
    SAPLEDI1
    5454444322222222222222222222222222222222
    310C549100000000000000000000000000000000
    SY-UNAME
    Q63CLNT140
    533444533322
    1633CE414000
    %_DUMMY$$
    2222
    0000
    SY-MSGV1
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    SYST-SUBRC
    0
    0000
    0000
    ALE_IDOC_TO_APL_OK
    62
    33
    62
    LIST_CONTAINER_CREATE[]
    Table IT_20[9x1068]
    FUNCTION-POOL=EDI1DATA=LIST_CONTAINER_CREATE[]
    Table reference: 14
    TABH+  0(20) = 070000008036F5B8000000000000000000000000
    TABH+ 20(20) = 0000000E00000014000000090000042CFFFFFFFF
    TABH+ 40(16) = 0400002300000CA0000824C401000000
    store        = 0x070000008036F5B8
    ext1         = 0x0000000000000000
    shmId        = 0     (0x00000000)
    id           = 14    (0x0000000E)
    label        = 20    (0x00000014)
    fill         = 9     (0x00000009)
    leng         = 1068  (0x0000042C)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000048
    occu         = 8     (0x00000008)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x070000008036F610
    pghook       = 0x07000000802D86D0
    idxPtr       = 0x0000000000000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x00000010)
    lineAlloc    = 16    (0x00000010)
    store_id     = 23    (0x00000017)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    LIST_CONTAINER_CREATE
    1400000000000511747000000009E1BPADRML                     00000002#èXD63        070TST_QA140_1
    3333333333333333333333333333434544544222222222222222222222333333330E54332222222233355555433353
    14000000000005117470000000095120142DC0000000000000000000000000000238846300000000070434F11140F1
    CONTROL
    1400000000000511747640 64        2SAPQ63    LSQ63CLNT140
    3333333333333333333333233222222223545533222245533444533322222222222222222222222222222222222222
    14000000000005117476400640000000023101630000C31633CE414000000000000000000000000000000000000000
    G_MAXSYNERR
    1
    0000
    0001
    <%_TABLE_EDID4>
    ALE_DISPATCH_ERROR
    27
    33
    27
    ALE_IDOC_READY_FOR_APL
    64
    33
    64
    %_SPACE
    2
    0
    IDENT
    0000000000000001
    3333333333333333
    0000000000000001
    ALE_IDOC_TO_APL_ERROR
    63
    33
    63
    No.      12 Ty.          FUNCTION
    Name  EDI_DOCUMENT_CLOSE_CREATE_TAB
    IDENTIFIER
    0000000000000001
    3333333333333333
    0000000000000001
    NO_DEQUEUE
    X
    5
    8
    SYN_ACTIVE
    Y
    5
    9
    IDOC_CONTROL
    1400000000000511747640 64        2SAPQ63    LSQ63CLNT140
    3333333333333333333333233222222223545533222245533444533322222222222222222222222222222222222222
    14000000000005117476400640000000023101630000C31633CE414000000000000000000000000000000000000000
    SYNTAX_RETURN
    0
    0000
    0000
    INT_EDIDD[]
    Table IT_10[9x1062]
    FUNCTION-POOL=EDINDATA=G_T_DATA_RECORDS[]
    Table reference: 9
    TABH+  0(20) = 0700000080284B80070000008028530800000000
    TABH+ 20(20) = 000000090000000A0000000900000426FFFFFFFF
    TABH+ 40(16) = 0400000900000AA8000824C401000000
    store        = 0x0700000080284B80
    ext1         = 0x0700000080285308
    shmId        = 0     (0x00000000)
    id           = 9     (0x00000009)
    label        = 10    (0x0000000A)
    fill         = 9     (0x00000009)
    leng         = 1062  (0x00000426)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000039
    occu         = 8     (0x00000008)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x0700000080320D90
    pghook       = 0x07000000802E1508
    idxPtr       = 0x0000000000000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x00000010)
    lineAlloc    = 16    (0x00000010)
    store_id     = 17    (0x00000011)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    hsdir        = 0x0000000000000000
    ext2         = 0x07000000802852A8
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0x0700000080284B30
    delta_head   = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    NO_IGNORE
    2
    0
    EDI_IDOC_SYNTAX_ERROR_IN
    60
    33
    60
    DOCNUM
    0000000000511747
    3333333333333333
    0000000000511747
    EXCLUSIVE
    E
    4
    5
    SYNCHRONOUS
    S
    5
    3
    APL_TESTIDOC_CHECK_OK
    55
    33
    55
    FREE_RETURN
    0
    0000
    0000
    INT_EDIDD
    1400000000000000001000009E1BPADRML                  00000000##XD63        070TST_QA140_17  X00
    3333333333333333333333333434544544222222222222222222333333330054332222222233355555433353322533
    14000000000000000010000095120142DC0000000000000000000000000000846300000000070434F11140F1700800
    SUB_INT_ACK_POSITIVE
    14
    33
    14
    G_INSERT_OK
    2
    0
    LIST_CONTAINER_INSERT_TMP[]
    Table[initial]
    LIST_CONTAINER_INSERT_TMP
    0000000000000000000000000                              00000000##
    2223333333333333333333333333222222222222222222222222222222333333330022222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    %_ARCHIVE
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    No.      11 Ty.          FUNCTION
    Name  IDOC_INBOUND_WRITE_TO_DB
    PI_DO_HANDLE_ERROR
    X
    5
    8
    PI_NO_DEQUEUE
    X
    5
    8
    PI_RETURN_DATA_FLAG
    X
    5
    8
    PI_RFC_MULTI_CP
    0000
    3333
    0000
    PI_STATUS_MESSAGE
    000000000000000000000000000000000000000000000000000000000000
    2223333333333333333333333333333333333333333333333333333333333332222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    PE_IDOC_NUMBER
    0000000000000001
    3333333333333333
    0000000000000001
    PE_INBOUND_PROCESS_DATA
    140BAPI                                                  6
    3334454222222222222222222222222222222222222222222222222223222222222222222222222222222222222222
    1402109000000000000000000000000000000000000000000000000006000000000000000000000000000000000000
    PE_STATE_OF_PROCESSING
    0
    0000
    0000
    T_DATA_RECORDS[]
    Table IT_10[9x1062]
    T_LINKED_OBJECTS[]
    Table IT_11[0x100]
    FUNCTION-POOL=EDINFORM=ONE_IDOC_STOREDATA=LT_LINKED_OBJECTS[]
    Table reference: 10
    TABH+  0(20) = 000000000000000007000000802853F000000000
    TABH+ 20(20) = 0000000A0000000B0000000000000064FFFFFFFF
    TABH+ 40(16) = 0400000900002BB00010249401000000
    store        = 0x0000000000000000
    ext1         = 0x07000000802853F0
    shmId        = 0     (0x00000000)
    id           = 10    (0x0000000A)
    label        = 11    (0x0000000B)
    fill         = 0     (0x00000000)
    leng         = 100   (0x00000064)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000190
    occu         = 16    (0x00000010)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    hsdir        = 0x0000000000000000
    ext2         = 0x0700000080285390
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0x0700000080285340
    delta_head   = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    PC_CONTROL_RECORD
    1400000000000000000    30        2          LSQ63CLNT140
    3333333333333333333222233222222223222222222245533444533322222222222222222222222222222222222222
    14000000000000000000000300000000020000000000C31633CE414000000000000000000000000000000000000000
    %_VIASELSCR
    0
    4
    %_SPACE
    2
    0
    L_STATUS
    64
    33
    64
    L_ALE_SUCCESS_MESSAGE
    B1                  S005                                                  No filters
    4322222222222222222253332222222222222222222222222222222222222222222222222246266676772222222222
    21000000000000000000300500000000000000000000000000000000000000000000000000EF069C45230000000000
    ST_PREVIOUS_PARTNER_DATA-SYNCHK
    X
    5
    8
    C_TRUE
    X
    5
    8
    SYST-REPID
    SAPLEDIR
    5454444522222222222222222222222222222222
    310C549200000000000000000000000000000000
    C_ELEMENT_UNPROCESSED_IDOCS
    Unprocessed_IDocs
    56776667766544667222222222222222
    5E02F353354F94F33000000000000000
    ST_PREVIOUS_STATE_OF_PROCE
    0
    0000
    0000
    ST_INBOUND_PROCESS_DATA-EDIVR2
    6
    3
    6
    SY-MSGV4
    22222222222222222222222222222222222222222222222222
    00000000000000000000000000000000000000000000000000
    L_SYN_ACTIVE
    Y
    5
    9
    SY-XFORM
    IDOC_INBOUND_ASYNCHRONOUS
    444454444544545544454445522222
    94F3F9E2F5E4F139E382FEF5300000
    L_SYNTAX_RETURN
    0
    0000
    0000
    %_DUMMY$$
    2222
    0000
    SY-REPID
    SAPLEDIR
    5454444522222222222222222222222222222222
    310C549200000000000000000000000000000000
    No.      10 Ty.          FORM
    Name  ONE_IDOC_STORE
    IDOC_NUMBER_IN
    0000000000000000
    3333333333333333
    0000000000000000
    STATE_OF_PROCESSING_IN
    0
    0000
    0000
    INBOUND_PROCESS_DATA_IN
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    GT_NEW_IDOC_IDENTIFICATIONS[]
    Table[initial]
    G_LAST_IDOC_NUMBER
    0000000000000000
    3333333333333333
    0000000000000000
    SYST-REPID
    SAPLEDIN
    5454444422222222222222222222222222222222
    310C549E00000000000000000000000000000000
    CURRENT_CONTROL_RECORD_IN-DOCNUM
    0000000000000000
    3333333333333333
    0000000000000000
    CONV_ERROR
    2
    0
    C_TRUE
    X
    5
    8
    SY
    0000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000
    0002000000010009000000000000000000000000000100000001000000010000000000000000004C00000000000000
    STATUS_MESSAGE_IN
    000000000000000000000000000000000000000000000000000000000000
    2223333333333333333333333333333333333333333333333333333333333332222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    C_IDOC_SELECT_AND_WRITE_TO_DB
    5
    3
    5
    SY-REPID
    SAPLEDIN
    5454444422222222222222222222222222222222
    310C549E00000000000000000000000000000000
    STATUS_MESSAGE_IN-STAMID
    22222222222222222222
    00000000000000000000
    GT_NEW_IDOC_IDENTIFICATIONS
    0000000000000000
    3333333333333333222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    SPACE
    2
    0
    STATUS_MESSAGE_IN-STAMNO
    000
    333
    000
    RET_FLAG
    X
    5
    8
    G_RFC_CODEPAGE
    0000
    3333
    0000
    RSJOBINFO-JOBSUBRC
    0
    0000
    0000
    SY-XFORM
    IDOC_INBOUND_ASYNCHRONOUS
    444454444544545544454445522222
    94F3F9E2F5E4F139E382FEF5300000
    SY-LANGU
    E
    4
    5
    G_T_DATA_RECORDS[]
    Table IT_10[9x1062]
    LT_LINKED_OBJECTS[]
    Table IT_11[0x100]
    CURRENT_CONTROL_RECORD_IN
    1400000000000000000    30        2          LSQ63CLNT140
    3333333333333333333222233222222223222222222245533444533322222222222222222222222222222222222222
    14000000000000000000000300000000020000000000C31633CE414000000000000000000000000000000000000000
    %_DUMMY$$
    2222
    0000
    SWO_%OBJID
    2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    No.       9 Ty.          FUNCTION
    Name  IDOC_INBOUND_ASYNCHRONOUS
    IDOC_CONTROL_REC_40[]
    Table IT_3[1x524]
    FUNCTION-POOL=EDINFORM=IDOC_INBOUND_ASYNCHRONOUSDATA=IDOC_CONTROL_REC_40[]
    Table reference: 3
    TABH+  0(20) = 07000000802D876007000000802D449000000000
    TABH+ 20(20) = 0000000300000003000000010000020C000000E0
    TABH+ 40(16) = 0400000900001FE0000A249001000000
    store        = 0x07000000802D8760
    ext1         = 0x07000000802D4490
    shmId        = 0     (0x00000000)
    id           = 3     (0x00000003)
    label        = 3     (0x00000003)
    fill         = 1     (0x00000001)
    leng         = 524   (0x0000020C)
    loop         = 224   (0x000000E0)
    xtyp         = TYPE#000136
    occu         = 10    (0x0000000A)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 0
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x07000000802DB9D8
    pghook       = 0x0000000000000000
    idxPtr       = 0x0000000000000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 10    (0x0000000A)
    lineAlloc    = 10    (0x0000000A)
    store_id     = 9     (0x00000009)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = 0x0000000000000000
    hsdir        = 0x0000000000000000
    ext2         = 0x07000000802D88A0
    >>>>> 2nd level extension part <<<<<
    tabhBack     = 0x07000000802D8710
    delta_head   = 0000000000000000000000000000000000000000000000000000000000000000000000000000000
    pb_func      = 0x0000000000000000
    pb_handle    = 0x0000000000000000
    IDOC_DATA_REC_40[]
    Table IT_4[9x1063]
    FUNCTION-POOL=EDINFORM=IDOC_INBOUND_ASYNCHRONOUSDATA=IDOC_DATA_REC_40[]
    Table reference: 4
    TABH+  0(20) = 07000000802D880807000000802D896000000000
    TABH+ 20(20) = 00000004000000040000000900000427FFFFFFFF
    TABH+ 40(16) = 04000009000020500008249001000000
    store        = 0x07000000802D8808
    ext1         = 0x07000000802D8960
    shmId        = 0     (0x00000000)
    id           = 4     (0x00000004)
    label        = 4     (0x00000004)
    fill         = 9     (0x00000009)
    leng         = 1063  (0x00000427)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000138
    occu         = 8     (0x00000008)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 0
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x07000000802E1550
    pghook       = 0x07000000802D8860
    idxPtr       = 0x0000000000000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x00000010)
    lineAlloc    = 16    (0x00000010)
    store_id     = 12    (0x0000000C)
    shmIsReadOnly = 0     (0x

    Hi Rohan,
    Welcome to SDN!
    This error means that you're trying to duplicate a record on the DB... check the IDOC  number ranges... it might help
    Regards
    Juan
    Please reward with points if helpful

  • Unable to create : com.mysql.jdbc.Driver error with JDeveloper 10.1.3

    Hi all,
    I got this error when I tried to execute a simple JSF app. I am using JDeveloper 10.1.3 release edition. Please advice
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config>
    C:\JDeveloper10g\jdk\bin\javaw.exe -ojvm -classpath C:\JDeveloper10g\j2ee\home\oc4j.jar;C:\JDeveloper10g\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    2006-01-31 21:40:47.062 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war...
    2006-01-31 21:40:47.093 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms
    2006-01-31 21:40:47.093 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war
    2006-01-31 21:40:47.156 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar...
    2006-01-31 21:40:47.156 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources
    2006-01-31 21:40:47.171 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar
    2006-01-31 21:40:47.218 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear...
    2006-01-31 21:40:47.281 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j
    2006-01-31 21:40:47.359 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear
    2006-01-31 21:40:47.375 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war...
    2006-01-31 21:40:47.375 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp
    2006-01-31 21:40:59.296 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war
    2006-01-31 21:41:08.421 WARNING J2EE OJR0107 Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    06/01/31 21:41:08 SEVERE: ApplicationStateRunning.initConnector Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Jan 31, 2006 9:41:08 PM com.evermind.server.ApplicationStateRunning initConnector
    SEVERE: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    06/01/31 21:41:08 SEVERE: ApplicationStateRunning.initConnector Stack trace: oracle.oc4j.sql.DataSourceException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:2016)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnector(ApplicationStateRunning.java:1961)
         at com.evermind.server.ApplicationStateRunning.initConnector(ApplicationStateRunning.java:1220)
         at com.evermind.server.ApplicationStateRunning.initConnectors(ApplicationStateRunning.java:356)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:208)
         at com.evermind.server.Application.setConfig(Application.java:391)
         at com.evermind.server.Application.setConfig(Application.java:309)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1532)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:939)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.resource.ResourceException: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:106)
         at oracle.oc4j.sql.DataSourceUtils.getDataSourceConnectionPool(DataSourceUtils.java:322)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:1997)
         ... 11 more
    Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:247)
         at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:107)
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
         ... 13 more
    Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.mysql.jdbc.Driver
         Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils
         Loader: oc4j:10.1.3
         Code-Source: /C:/JDeveloper10g/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\JDeveloper10g\j2ee\home\oc4j.jar
    This load was initiated at current-workspace-app.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassLoader.java:2061)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1665)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1621)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1606)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:244)
         ... 15 more
    Jan 31, 2006 9:41:08 PM com.evermind.server.ApplicationStateRunning initConnector
    SEVERE: Stack trace: oracle.oc4j.sql.DataSourceException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:2016)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnector(ApplicationStateRunning.java:1961)
         at com.evermind.server.ApplicationStateRunning.initConnector(ApplicationStateRunning.java:1220)
         at com.evermind.server.ApplicationStateRunning.initConnectors(ApplicationStateRunning.java:356)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:208)
         at com.evermind.server.Application.setConfig(Application.java:391)
         at com.evermind.server.Application.setConfig(Application.java:309)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1532)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:939)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.resource.ResourceException: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:106)
         at oracle.oc4j.sql.DataSourceUtils.getDataSourceConnectionPool(DataSourceUtils.java:322)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:1997)
         ... 11 more
    Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:247)
         at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:107)
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
         ... 13 more
    Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.mysql.jdbc.Driver
         Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils
         Loader: oc4j:10.1.3
         Code-Source: /C:/JDeveloper10g/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\JDeveloper10g\j2ee\home\oc4j.jar
    This load was initiated at current-workspace-app.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassLoader.java:2061)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1665)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1621)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1606)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:244)
         ... 15 more
    06/01/31 21:41:08 WARNING: Application.setConfig Application: current-workspace-app is in failed state as initialization failedjava.lang.InstantiationException: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Jan 31, 2006 9:41:08 PM com.evermind.server.Application setConfig
    WARNING: Application: current-workspace-app is in failed state as initialization failedjava.lang.InstantiationException: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    2006-01-31 21:41:08.531 WARNING J2EE 0JR0013 Exception initializing deployed application: current-workspace-app. Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 29125 ms.

    I did what Manu suggested with no success. Alternatively, I registered the driver jar with embedded OC4J preferences > global > libraries. Still does not work. Please, note, that when I run JUnit tests against my BC4J application modules with JDBC URL as connection type, everything works just fine. The problem comes while running the JSF application when the application module is using JDBC DataSource as connection type.

  • Stack size for native thread attaching to JVM

    All:
    I have a native thread (see below, FailoverCallbackThread) that attaches to the JVM and does a Java call through JNI. The stack size for the native thread is 256KB.
    at psiUserStackBangNow+112()@0x20000000007a96d0
    at psiGuessUserStackBounds+320()@0x20000000007a8940
    at psiGuessStackBounds+48()@0x20000000007a8f60
    at psiGetPlatformStackInfo+336()@0x20000000007a9110
    at psiGetStackInfo+160()@0x20000000007a8b40
    at psSetupStackInfo+48()@0x20000000007a5e00
    at vmtiAttachToVMThread+208()@0x20000000007c88b0
    at tsAttachCurrentThread+896()@0x20000000007ca500
    at attachThread+304()@0x2000000000751940
    at genericACFConnectionCallback+400(JdbcOdbc.c:4624)@0x104b1bc10
    at FailoverCallbackThread+512(vocctx.cpp:688)@0x104b8ddc0
    at start_thread+352()@0x20000000001457f0
    at __clone2+208()@0x200000000030b9f0
    This causes stack overflow in Oracle JRockit JVM. (It does not cause overflow with Oracle Sun JDK.) Is there a recommended stack size for this use case for JRockit? Is there a way to compute it roughly?
    Platform Itanium 64 (linux)]
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    BEA JRockit(R) (build R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia64, )
    mp

    How do I found default heap size, stack size for the
    thread, number of threads per jvm/process supported ?The threads is OS, OS install and jvm version specific. That information is also not useful. If you create the maximum number of threads that your application can create you will run out of memory. Threads require memory. And it is unlikely to run very well either.
    The default heap size and stack size are documented in the javadocs that explain the tools that come with the sun jdk.
    and how the above things will vary for each OS and how
    do I found ? Threads vary by OS, and OS install. The others do not (at least not with the sun jvm.)
    If I get "OutOfMemoryError: Unable to create new native thread" Most of the time it indicates a design problem in your code. At the very lease, you should consider using a thread pool instead.
    I found in one forum, in linux you can create maximum
    of 894 threads. Is it true ?Seems high since in linux each thread is a new process, but it could be.

  • Unable to create the Mailbox Store. The database returned an error

    hi we have a new unity connection 10.51 install . trying to create a 2nd mailbax store and get the following error:
    Unable to create the Mailbox Store. The database returned an error.
    creates the store but i can't open it to mount it / enable it.

    Sadly, that did not resolve the problem. The app still terminated and generated an error. Any other suggestions?
    Here is the first portion of the error it generates:
    Process:         App Store [3200]
    Path:            /Applications/App Store.app/Contents/MacOS/App Store
    Identifier:      com.apple.appstore
    Version:         1.0.2 (63.1)
    Build Info:      Firenze-630100~1
    Code Type:       X86-64 (Native)
    Parent Process:  launchd [239]
    Date/Time:       2011-08-17 21:43:21.942 -0700
    OS Version:      Mac OS X 10.6.8 (10K549)
    Report Version:  6
    Interval Since Last Report:          23825 sec
    Crashes Since Last Report:           10
    Per-App Interval Since Last Report:  21 sec
    Per-App Crashes Since Last Report:   6
    Anonymous UUID:                      4133601A-34FD-472F-98E6-73E4DE9BFC06
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Crashed Thread:  0  Dispatch queue: com.apple.main-thread
    Application Specific Information:
    abort() called
    *** Terminating app due to uncaught exception 'NSImageCacheException', reason: 'Cannot lock focus on image <NSImage 0x10037c3c0 Size={0, 0} Reps=(
    )>, because it is size zero.'

  • Unable to create Metadata connection for Dictionary Provider

    Hi,
    I am getting the following error while I try to run a Web Dynpro Application;
    The initial exception that caused the request to fail, was:
       com.sap.dictionary.runtime.DdException: 'WD_RFC_METADATA_DEST' not properly defined! Unable to create Metadata connection for Dictionary Provider. Either the logical System Name 'WD_RFC_METADATA_DEST' has not been properly defined in the System Landscape Directory, or you are not using a MsgServerDestination (AppServerDestinations are not permitted for Metadata connections)
        at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:191)
        at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:146)
        at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:97)
        at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:79)
        at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:48)
        ... 37 more
    The JCo Connections are tested and pinged, they work fine.
    Can anyone please tell what the error could be?

    The details exception list is as below:
    com.sap.tc.webdynpro.services.exceptions.TypeNotFoundException: type com.dow.dc.model.types.Syuname could not be loaded: com.sap.dictionary.runtime.DdException: 'WD_RFC_METADATA_DEST' not properly defined! Unable to create Metadata connection for Dictionary Provider. Either the logical System Name 'WD_RFC_METADATA_DEST' has not been properly defined in the System Landscape Directory, or you are not using a MsgServerDestination (AppServerDestinations are not permitted for Metadata connections)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:250)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getDataType(DataTypeBroker.java:213)
         at com.sap.tc.webdynpro.progmodel.context.DataAttributeInfo.init(DataAttributeInfo.java:318)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initUnmappedAttributes(NodeInfo.java:687)
         at com.sap.tc.webdynpro.progmodel.context.DataNodeInfo.doInit(DataNodeInfo.java:238)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:671)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:674)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:754)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:289)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: com.sap.dictionary.runtime.DdException: 'WD_RFC_METADATA_DEST' not properly defined! Unable to create Metadata connection for Dictionary Provider. Either the logical System Name 'WD_RFC_METADATA_DEST' has not been properly defined in the System Landscape Directory, or you are not using a MsgServerDestination (AppServerDestinations are not permitted for Metadata connections)
         at com.sap.dictionary.runtime.ProviderFactory.internalGetProvider(ProviderFactory.java:191)
         at com.sap.dictionary.runtime.ProviderFactory.getProvider(ProviderFactory.java:146)
         at com.sap.dictionary.runtime.DdDictionaryPool.getProvider(DdDictionaryPool.java:97)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:79)
         at com.sap.dictionary.runtime.DdDictionaryPool.getDictionary(DdDictionaryPool.java:48)
         at com.sap.dictionary.runtime.DdBroker.getDataType(DdBroker.java:149)
         at com.sap.dictionary.runtime.DdBroker.getSimpleType(DdBroker.java:170)
         at com.sap.tc.webdynpro.services.datatypes.core.DataTypeBroker.getSimpleType(DataTypeBroker.java:242)
         ... 34 more

  • AM console - Unable to create Users

    I'm unable to create users under any organization through AM console. I'm getting the following error in amProfile_ldap.
    12/04/2006 10:19:03:585 AM CST: Thread[service-j2ee-2,5,main]
    WARNING: DirectoryServicesImpl.createUser(): Internal Error occurred. Unable to create User Entry
    com.iplanet.ums.UMSException: Unable to add the entry "uid=scott,ou=People,o=testorg,dc=test,dc=com"::null. Root exception is
    netscape.ldap.LDAPException: error result (65); Object class violation
    at netscape.ldap.LDAPConnection.checkMsg(LDAPConnection.java:4866)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2851)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2866)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2816)
    at com.iplanet.ums.DataLayer.addEntry(DataLayer.java:432)
    at com.iplanet.ums.PersistentObject.addChild(PersistentObject.java:722)
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.createUser(DirectoryServicesImpl.java:998)
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.createEntry(DirectoryServicesImpl.java:1490)
    at com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.createEntry(CachedDirectoryServicesImpl.java:349)
    at com.iplanet.am.sdk.AMObjectImpl.create(AMObjectImpl.java:1001)
    at com.iplanet.am.sdk.AMPeopleContainerImpl.createUsers(AMPeopleContainerImpl.java:190)
    at com.iplanet.am.console.user.model.UMCreateUserModelImpl.createUser(UMCreateUserModelImpl.java:356)
    at com.iplanet.am.console.user.UMCreateUserViewBean.createUser(UMCreateUserViewBean.java:490)
    at com.iplanet.am.console.user.UMCreateUserViewBean.handleBtnCreateRequest(UMCreateUserViewBean.java:368)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    12/04/2006 10:19:03:597 AM CST: Thread[service-j2ee-2,5,main]
    In CachedDirectoryServicesImpl.getAttributes(SSOToken entryDN, attrNames, ignoreCompliance, byteValues) (cn=dsameuser,ou=dsame
    users,dc=test,dc=com, o=testorg,dc=test,dc=com, [sunRegisteredServiceName], true, false method.
    12/04/2006 10:19:03:598 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getAttributes(): found all attributes in Cache.
    12/04/2006 10:19:03:598 AM CST: Thread[service-j2ee-2,5,main]
    DirectoryServicesImpl.getRegisteredServiceNames() Registered Service Names for entryDN: o=testorg,dc=test,dc=com are: [iPlanet
    AMSessionService, iPlanetAMAuthMembershipService, iPlanetAMAdminConsoleService, iPlanetAMAuthService, iPlanetAMPolicyConfigSer
    vice, iPlanetAMAuthLDAPMultiService, iPlanetAMUserService, iPlanetAMAuthAnonymousService, iPlanetAMAuthConfiguration, iPlanetA
    MAuthLDAPService, SunPortalDesktopService, sunAMAuthSAMLService, srapGatewayAccessService]
    12/04/2006 10:19:03:599 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN() - looping Organization DN for entry: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:600 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN(): found OrganizationDN: o=testorg,dc=test,dc=com for: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:631 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.doesEntryExist(): entryDN: uid=amAdmin,ou=People,dc=test,dc=com found in cache & exists: true
    12/04/2006 10:19:03:642 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN() - looping Organization DN for entry: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:642 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN(): found OrganizationDN: o=testorg,dc=test,dc=com for: o=testorg,dc=test,dc=com
    I'm really not sure what change caused this to happen. I can't import any user specific ldif files through DS console as well. I appreciate if somebody guides me how to correct this?
    Thanks in advance,
    lakshmi

    Lakshmi.Panala wrote:
    I'm unable to create users under any organization through AM console. I'm getting the following error in amProfile_ldap.
    12/04/2006 10:19:03:585 AM CST: Thread[service-j2ee-2,5,main]
    WARNING: DirectoryServicesImpl.createUser(): Internal Error occurred. Unable to create User Entry
    com.iplanet.ums.UMSException: Unable to add the entry "uid=scott,ou=People,o=testorg,dc=test,dc=com"::null. Root exception is
    netscape.ldap.LDAPException: error result (65); Object class violation
    at netscape.ldap.LDAPConnection.checkMsg(LDAPConnection.java:4866)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2851)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2866)
    at netscape.ldap.LDAPConnection.add(LDAPConnection.java:2816)
    at com.iplanet.ums.DataLayer.addEntry(DataLayer.java:432)
    at com.iplanet.ums.PersistentObject.addChild(PersistentObject.java:722)
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.createUser(DirectoryServicesImpl.java:998)
    at com.iplanet.am.sdk.ldap.DirectoryServicesImpl.createEntry(DirectoryServicesImpl.java:1490)
    at com.iplanet.am.sdk.ldap.CachedDirectoryServicesImpl.createEntry(CachedDirectoryServicesImpl.java:349)
    at com.iplanet.am.sdk.AMObjectImpl.create(AMObjectImpl.java:1001)
    at com.iplanet.am.sdk.AMPeopleContainerImpl.createUsers(AMPeopleContainerImpl.java:190)
    at com.iplanet.am.console.user.model.UMCreateUserModelImpl.createUser(UMCreateUserModelImpl.java:356)
    at com.iplanet.am.console.user.UMCreateUserViewBean.createUser(UMCreateUserViewBean.java:490)
    at com.iplanet.am.console.user.UMCreateUserViewBean.handleBtnCreateRequest(UMCreateUserViewBean.java:368)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.iplanet.jato.view.command.DefaultRequestHandlingCommand.execute(DefaultRequestHandlingCommand.java:183)
    at com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
    at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
    at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
    at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
    at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
    at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:807)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:580)
    12/04/2006 10:19:03:597 AM CST: Thread[service-j2ee-2,5,main]
    In CachedDirectoryServicesImpl.getAttributes(SSOToken entryDN, attrNames, ignoreCompliance, byteValues) (cn=dsameuser,ou=dsame
    users,dc=test,dc=com, o=testorg,dc=test,dc=com, [sunRegisteredServiceName], true, false method.
    12/04/2006 10:19:03:598 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getAttributes(): found all attributes in Cache.
    12/04/2006 10:19:03:598 AM CST: Thread[service-j2ee-2,5,main]
    DirectoryServicesImpl.getRegisteredServiceNames() Registered Service Names for entryDN: o=testorg,dc=test,dc=com are: [iPlanet
    AMSessionService, iPlanetAMAuthMembershipService, iPlanetAMAdminConsoleService, iPlanetAMAuthService, iPlanetAMPolicyConfigSer
    vice, iPlanetAMAuthLDAPMultiService, iPlanetAMUserService, iPlanetAMAuthAnonymousService, iPlanetAMAuthConfiguration, iPlanetA
    MAuthLDAPService, SunPortalDesktopService, sunAMAuthSAMLService, srapGatewayAccessService]
    12/04/2006 10:19:03:599 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN() - looping Organization DN for entry: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:600 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN(): found OrganizationDN: o=testorg,dc=test,dc=com for: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:631 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.doesEntryExist(): entryDN: uid=amAdmin,ou=People,dc=test,dc=com found in cache & exists: true
    12/04/2006 10:19:03:642 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN() - looping Organization DN for entry: o=testorg,dc=test,dc=com
    12/04/2006 10:19:03:642 AM CST: Thread[service-j2ee-2,5,main]
    CachedDirectoryServicesImpl.getOrganizationDN(): found OrganizationDN: o=testorg,dc=test,dc=com for: o=testorg,dc=test,dc=com
    I'm really not sure what change caused this to happen. I can't import any user specific ldif files through DS console as well. I appreciate if somebody guides me how to correct this?
    Thanks in advance,
    lakshmiWhat you need to do is to check directory logs in order to see what is the specific object class violation. If your AM instance was working before, something nasty should have happened in directory. Check logs and schema files.
    Regards

Maybe you are looking for

  • Underdelivery tolerance level automatic closing of PO

    Hi Gurus, We define 5% tolerance level for under and overdelivery, for example: for stock items, we have PO qty 100 pcs, during goods receipt, over delivery tolerance of 5% we can GR 105 pcs and marked as delivery completed, and in under delivery we

  • App not behaving as it should

    One of my apps is stuck in waiting mode for days now. It appears as though it got stuck during an update.

  • 5800: Software updater can't find phone

    So yeah, the Nokia Software Updater can't find my phone, and the "in-phone" updater gives me an Connection Error. Nokia PC Suite detects my phone just fine, although the Connection Center doesn't. I'm connecting through a USB directly to the computer

  • Need Help about 3D and revolving in illustrator

    I really need help about 3D, Please tell me that How i create 3D in illustrator i want to revolve text or shape around any object like this, any plugin? or other software required for this? if somebody know this it will be really help full    http://

  • Slow cd import

    I am having loads of problems and I can't seem to resolve them.  I'm not very tech minded so I would love some straight forward help.  My system is Windows Vista and I am using version 10.5.1.42 I have two issues 1. Importing CD is so slow - at least