OIM 11 g-error when creating a new job scheduler

Hi Experts,

I am trying to create a new scheduled task. I imported the work using the 'weblogicImportMetadata.sh '.
But when I click on the research of the task when a job is created using the user interface, I get the following error in the logs. Please let me know if anyone before this error before, and how it can be solved.

< 22 October 2012 19:59:22 CEST > < error > < oracle.adfinternal.view.faces.config.rich.RegistrationConfigurator > < BEA-000000 > < ADF_FACES - 60096:Server Exception during the PPR, #6
javax.servlet.ServletException: java.lang.AssertionError
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:341)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.help.web.rich.OHWFilter.doFilter (unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:447)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:447)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:122)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:109)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:176)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:111)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused by: java.lang.AssertionError
at org.apache.myfaces.trinidad.component.ChildArrayList.__removeFromParent(ChildArrayList.java:191)
at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayList.java:53)
at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayList.java:69)
at org.apache.myfaces.trinidad.component.ChildArrayList.add(ChildArrayList.java:33)
to oracle.iam.consoles.faces.render.canonic.UIValue$ UIEntitySelector.search (UIValue.java:1670)
to oracle.iam.consoles.faces.render.canonic.UIValue$ UIEntitySelector.access$ 2400 (UIValue.java:1467)
to oracle.iam.consoles.faces.render.canonic.UIValue$ EntitySelectorQueryListener.processQuery (UIValue.java:1787)
at oracle.adf.view.rich.event.QueryEvent.processListener(QueryEvent.java:67)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:675)
at oracle.adf.view.rich.component.UIXQuery.broadcast(UIXQuery.java:108)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:93)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:902)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:313)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:186)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
to weblogic.servlet.internal.StubSecurityHelper$ ServletServiceAction.run (StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.help.web.rich.OHWFilter.doFilter (unknown Source)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:447)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:447)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.PwdMgmtNavigationFilter.doFilter(PwdMgmtNavigationFilter.java:122)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.iam.platform.auth.web.OIMAuthContextFilter.doFilter(OIMAuthContextFilter.java:109)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:176)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:111)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.wrapRun (WebAppServletContext.java:3715)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3681)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

In weblogic .properties.

Assume that you have given:

metadata_from_loc = / abcd, efgh, MDSImport, db

Just remove/DB part and it should work...

metadata_from_loc = / abcd/efgh/MDSImport

When you import, you can either PurgeCache or restart them both... I prefer the restart...

However, the metadata for PurgeCache.sh are too quciker method... The fact is, sometimes it does not involve purging all hide... Restart the fact surely...

Metadata of *./PurgeCache.sh *.

./PurgeCache.sh is also equivalent to restart as far as all the related metadata changes are concerned...
We prefer to restart because the reboot is guaranteed to release all the related metadata cache...
Restart so better than PurgeCache...

Tags: Fusion Middleware

Similar Questions

  • New to OAF - oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for HeaderTableEO line

    Hi I'm new to OFA. I am trying to create a master-details form based on the example given on Youtube (but using my own paintings).

    I have already defined in table colums.

    AM code is as follows:

    Public Sub CreateEmailHdrRow()

    {

    xxVmmcSendEmailDefHdrVOImpl vo = getxxVmmcSendEmailDefHdrVO1();

    String s = "Test";

    Line = vo.createRow ();

    If (!) VO.isPreparedForExecution ())

    {

    vo.setMaxFetchSize (0);

    }

    row.setAttribute ("EmailDefName", s);

    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    When I run, the error occurs at the level of line (rank rank = vo.createRow ();)

    Error message: oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for xxVmmcSendEmailDefHdrEO line.

    Any help is appreciated.

    Anjan,

    Please check that the type of the CreatedBy attribute is a number representing the id in FND_USER and not the actual text of the name of the user. Standard Oracle columns that use a number for this value not varchar.

    Kristofer Cruz

  • oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity.

    Hi all

    I get the following error when executing the Page create purchase orders. I extended the standard EntityObject class: Purchase Order Header to my EO custom, make one here to this EO origin.
    oracle.jbo.RowCreateException: Houston-25017: error when creating a new entity for CustomPurchaseOrderHeaderEO line

    Thank you

    Hi SumitSharma,

    Added the following line to the file Extended Entity Object.xml
    "DefClass ="oracle.apps.fnd.framework.server.OAEntityDefImpl"xx.oracle.apps"below the RowClass ="... "package line.

    This solved my error, but I can't do it this way is fair or unfair suggestions.

    Thank you

    Published by: 995022 on May 14, 2013 22:13

  • error when creating a new partition "the operation you selected will convert the selected disk from basic to dynamic disk...". »

    Original title: getting the error while creating a new partition

    here to create a new partition get the error "the operation you selected will convert the disc selected basic to dynamic disk... etc" Please help.

    I would like to join the screenshot of the error, how?

    Hello

    1 have had any changes made on the computer before the show?

    2. how many partitions are there currently on the computer?

    3. how many hard disks on the computer do you use?

    4. when exactly you get the error message?

    I suggest you refer to the article and try to follow the steps and check if you are able to create a partition:

    Create a new Partition on a hard disk in Windows 7

    http://TechNet.Microsoft.com/en-us/magazine/gg309170.aspx

    I also suggest you the link and attach a screenshot of the screen.

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/how-do-i-post-a-screen-shot-on-this-forum/c86de820-C620-401c-A804-9f6337cd3053

  • Error when creating a new DAC connection using the MSSQL connection type

    Hello

    I am trying to create a connection DAC, i.e. a new repository DAC in the SQL Server 2008 database.
    Version of the DAC: 10.1.3.4.1
    Database: SQL Server 2008


    I downloaded from the link below sqljdbc4.jar file and placed it in the D:\orahome\10gR3_1\bifoundation\dac\lib folder.
    [http://www.microsoft.com/en-us/download/details.aspx?displaylang=en & id = 11774]

    I entered all the details correctly to the name of the database, the database host, port of the database. I created a new file for authentication.

    I get error when I try to test the connection below.

    Driver MESSAGE: MSSQL not available!
    CLASS EXCEPTION: java.lang.IllegalArgumentException

    com.siebel.etl.gui.login.LoginDataHandler$ LoginStructure.testConnection (LoginDataHandler.java:512)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$ Executor.run (ConnectionTestDialog.java:290)

    : CAUSE:
    MESSAGE: com. Microsoft.SqlServer.JDBC.SQLServerDriver
    EXCEPTION CLASS: java.lang.ClassNotFoundException

    java.net.URLClassLoader$ 1.run(URLClassLoader.java:200)
    java.security.AccessController.doPrivileged (Native Method)
    java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:276)
    java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    java.lang.Class.forName0 (Native Method)
    java.lang.Class.forName(Class.java:169)
    com.siebel.etl.gui.login.LoginDataHandler$ LoginStructure.testConnection (LoginDataHandler.java:510)
    com.siebel.etl.gui.login.LoginDataHandler.testConnection(LoginDataHandler.java:386)
    com.siebel.etl.gui.login.ConnectionTestDialog$ Executor.run (ConnectionTestDialog.java:290)


    The error seems to be a problem of connectivity to SQL Server. I use the correct jar file?

    Please, help me to solve this problem. Appreciate the help given on this forum earlier.

    Thank you

    Add
    .\lib\sqljdbc4.jar
    at the end of the line beginning with SQLSERVERLIB in the file config.bat

    Pls correct brand

  • Error when creating a new paymentgroup

    Hello

    I've implemented a new method of payment by following the guide in the section which extends the payment process to support a new payment method, I followed all the steps to create and I created a new form handler that extends from GenericFormHandler to receive information on all groups of payment and selected the right , but when I try to create the code: "OnlineDebt onlineDebt = groupManager.createPaymentGroup (OnlineDebt.PAYMENT_METHOD_NAME) (OnlineDebt);" generated a nullpointerpxception.

    Anyone know why?

    groupManager - can be null.

    has you inject it into your formhandler?

  • My contacts are not displayed in her select a recipient option when creating a new email. They appear in my contacts.

    My contacts are not displayed in her select a recipient option when creating a new email. They appear in my contacts.

    I didn't know I was so vague with my information. However I understand it. I continued to try to export contacts from a previous e-mail program to a .csv file and few would go. I went back in my contacts Windows Mail, click on properties and noticed that the contacts had somehow hidden checked. I have then all selected and not the box and now they appear in the Select Recipient window.

    Thanks for responding
  • Error when creating custom text field

    HI Guyz,

    I am getting below error while creating a new custom UDF text field. All the world is facing this problem earlier?

    "Houston-COLUMN_UNAVAILABLE: no additional custom attributes of this type cannot be created"

    Swati - PÉAN

    The problem is finally solved.

    Yes, there are several udf to IOM. However, it stores the details in a table of the adf. Cleaning of the custom fields were created.

    TRUNCATE TABLE ADF_EXTENSION_COLUMN_USAGE;

    DELETE ADF_EXTENSIBLE_TABLE_USAGE;

    COMMIT;

    -Swati Pandey

  • Implementation error when creating new version BPA.

    Hi all

    When I try to create new version against BPA I get the error message below. The PAID field is defined as 'RÉCEPTION' at the EPS level. Please let us know why this error is coming and what should be done to remove this.

    Error.jpg

    Thank you

    GHG

    Hello

    This just a pop up message information that is intended to inform the user PAY field is null now and not as "RECEPTION", which corresponds to the value set at this level of BPA.

    If you want to PAY ON the field as 'Reception', please refresh the code ON PAY as 'Back' to the supplier site level, and then try and create a new version against BPA, you won't get this error.

    Waiting for your response.

    Kind regards

    Piyush Kudawale


  • Error when creating new features in 12 c

    Hi all

    I get an error while I am creating a new developer on my EM Express role in Oracle 12 c:

    ORA-65096: of invalid common name of the user or role

    ORA-06512: at "SYS." PRVTEMX_ADMIN', line 9796

    ORA-06512: at "SYS." "WRI$ _REPT_SECURITY ', line 314

    ORA-06512: at "SYS." DBMS_REPORT', line 744

    ORA-06512: at line 1

    No idea what I'm doing wrong

    Thank you very much in advance!

    Sorry, this area of the forum is not for EM Express or 12 c-specific questions, it's for the Oracle SQL Developer IDE/GUI

  • Error when creating new record in the jspx page.

    Hello! I have error when you try to post the new record in the jspx page (see: http://my.jetscreenshot.com/2677/20100820-oo8z-19kb)

    DB I trigger and in the EO primary key attribute I Type set to DBSequence.

    Where is the problem and what to do?

    Best regards, Debuger

    @Sireesha excellent point!

    @Debugger the reason why you get the error, it is you're missing an af:convertNumber, however, as said Jean Lou, why even put a DBSequence field on your screen?

    John

  • Error when create control LabVIEW FPGA CompactRIO

    I have error when you try to create a new model of LabVIEW FPGA CompactRIO control project. I tried with LabVIEW 2014 and 2014 SP1 update. This error always occurs.

    Please help me with this.

    Kind regards

    Thang Nguyen

    Hello

    I fix the problem by removing LabVIEW 2014 SP1 and reinstall again. After the reinstallation of LabVIEW, I create the project template.

    Kind regards

  • File system 512 error - cannot create a new folder

    Hello

    I can't create a new folder under libraries/photos. I have several folders and subfolders, but lately when I try to create a new folder directly in 'photos', I get a "file system 512 error." I can still create new folders in the existing folders, but not directly in the library/images directory. I am confused because I have done this several times before.

    I downloaded and ran an expensive registry fix program and have the latest Windows. Neither helped.

    All ideas are most appreciated. Thank you!

    Hi Alex

    You're right, I was assuming that the my images from your user account folders was in this library.

    OK, let's try again.

    Go to the images of C:\Users\Public\Public folder. Create a new folder in the folder public photo.

    Now go back to the photo library and see if this new folder appears here.

    Let me know.

    Thank you for using Windows 7

    Ronnie Vernon MVP
  • Error when creating a virtual machine

    Hello

    When I try to create a new virtual machine via the host customer I get following error message:

    Cause: TypeError: _deviceHelper is not defined

    Version: 2015.12.21

    Build: 3357452

    ESXi: 6.0.0

    The exception stack:

    toVirtualMachineConfigSpec @ https://XXXX/UI/scripts/main.js:60:10100

    createVM @ https://XXXX/UI/scripts/main.js:61:2446

    createVM @ https://XXXX/UI/scripts/main.js:67:13834

    $scope.wizardOptions.currentPage.onCommit @ https://XXXX/UI/scripts/main.js:52:16535

    onCommit @ https://XXXX/UI/scripts/main.js:120:23151

    onFinishClick @ https://XXXX/UI/scripts/main.js:120:24165

    .controller < / $scope.onFinish @ https://XXXX/UI/scripts/main.js:120:26196

    eb.prototype.functionCall/ < @ https://XXXX/UI/scripts/main.js:6:21837

    @ https://XXXX/UI/scripts/main.js:89:31513

    Me / this. $get < /k.prototype.$eval@ https://XXXX/UI/scripts/main.js:5:16488

    Me / this. $get < /k.prototype.$apply@ https://XXXX/UI/scripts/main.js:5:16702

    @ https://XXXX/UI/scripts/main.js:89:31493

    n.Event.Dispatch @ https://XXXX/UI/scripts/main.js:2:14412

    n.Event.Add/r.handle@ https://XXXX/UI/scripts/main.js:2:11234

    There is no license assigned to the host.

    Kind regards

    Patrick

    Note that at the time where the customer Host are just an experimental tool and should not be used in production environment, if you use the license free hypervisor that you really need to use the vSphere Client.

  • Error when creating a layer of text, when 2 + work plans are available in the document

    Hi, I met a weird error while trying to create a new text layer.

    When a single work plan is available in the document, the script works well and create a new empty text layer;

    When 2 or more work plans are available in the document, the script generates the layer, but she then gets stuck when trying to convert a text. The console says "the layer cannot contain text.

    Paste my code here with comments.

    #target photoshop
    
    
    //this script attempts to create a text layer above the selected layer contained into an artboard.
    //For some reason, it works on the first available artboard, but not on the other ones. The error is "The layer cannot contain text"
    
    
    //get active PS document
    var doc = activeDocument; 
    
    
    //get active artboard 
    var currentArtboard = getActiveArtboard();  
    
    
    //create new art layer in the current artboard
    var newLayer = currentArtboard.artLayers.add();
    
    
    //trying to convert to text layer. Fails when 2+ artboards are available int the document
    newLayer.name = "test";
    newLayer.kind = LayerKind.TEXT; 
      
      
    function getActiveArtboard() {  
        var key = false;
        var l   = doc.activeLayer;
        var p   = l.parent;
    
    
        try {  
            while (!key) {  
                doc.activeLayer = p;  
                var ref = new ActionReference();  
                ref.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));  
                key = executeActionGet(ref).getBoolean(stringIDToTypeID("artboardEnabled"));  
                if (key) {  
                    return p  
                }  
                p = p.parent;  
            } 
    
    
        } catch (e) {  
            alert('This layer is not contained within an artboard');  
            return undefined; 
        }  
    }  
    


    Any help is greatly appreciated. Thank you in advance!

    var doc = activeDocument;
    
    var currentArtboard = getActiveArtboard();
    
    function makeTextLayer() {
        var desc = new ActionDescriptor();
        var desc2 = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putClass(app.charIDToTypeID('TxLr'));
        desc.putReference(app.charIDToTypeID('null'), ref);
        desc2.putString(app.charIDToTypeID('Txt '), "text");
        var list2 = new ActionList();
        desc2.putList(app.charIDToTypeID('Txtt'), list2);
        desc.putObject(app.charIDToTypeID('Usng'), app.charIDToTypeID('TxLr'), desc2);
        executeAction(app.charIDToTypeID('Mk  '), desc, DialogModes.NO);
        return doc.activeLayer
    }
    
    var newLayer = makeTextLayer();
    
    newLayer.move(currentArtboard, ElementPlacement.INSIDE);
    
    function getActiveArtboard() {
        var key = false;
        var l = doc.activeLayer;
        var p = l.parent;
        try {
            while (!key) {
                doc.activeLayer = p;
                var ref = new ActionReference();
                ref.putEnumerated(charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt'));
                key = executeActionGet(ref).getBoolean(stringIDToTypeID("artboardEnabled"));
                if (key) {
                    return p
                }
                p = p.parent;
            }
        } catch (e) {
            alert('This layer is not contained within an artboard');
            return doc
        }
    }
    

Maybe you are looking for