Create UserFields second time

Hi SBO-Forum,
I wrote code to create user defined table and fields - that works fine first time (DI API, version 2004A, C#).
I don't wrote code to remove this tables/fields automatically ... I made it manually.
I cleared my entries from tables OUTB, CUFD.
Running the code second time, to create the user defined tables and fields again, will occur the followng message (err code = -1):
"[CUFD] ,
'[Microsoft][ODBC SQL Server Driver][SQL Server]
Invalid object name 'Cannot add Field'.'"
Are there any other tables to clean, so that I'm able to create table/fields for a second time?
Sincerely,
Peter

Now I restored my database and didn't changed anything manually.
If I'm running the sample 'MasterDataUDO.vb' ... everything is ok, also at second time.
But I can't run my own code creating table/fields ... also not at first time! (So the Subject of this post is wrong!).
Adding of fields will fail with the message:
"Invalid object name 'Cannot add Field'.'"
Belwo my C# code, any help is appreciated.
Peter
private bool AddField( string tab, string name, SAPbobsCOM.BoYesNoEnum must_exist, string descr, SAPbobsCOM.BoFieldTypes type, int size )
     SAPbobsCOM.UserFieldsMD oUserFieldMD = (SAPbobsCOM.UserFieldsMD)m_company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields);
     oUserFieldMD.Description = descr;
     oUserFieldMD.Name = name;
     oUserFieldMD.Type = type;
     oUserFieldMD.TableName = tab;
     if( type != SAPbobsCOM.BoFieldTypes.db_Date )
          oUserFieldMD.Size = size;
     oUserFieldMD.Mandatory = must_exist;
     if( must_exist == SAPbobsCOM.BoYesNoEnum.tYES )
          oUserFieldMD.DefaultValue = " "; // Not Null Field needs a default-value, otherwise error during creation of field
     try
          if( oUserFieldMD.Add() != 0 )
               m_company.GetLastError( out m_iErr, out m_sErr);
               m_gui.MessageBox( "Error Adding Field " + m_sErr, 0, "", "", "" );
               return false;
     catch( Exception ex )
          m_gui.MessageBox( ex.ToString(), 0, "", "", "" );
     System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldMD);
     return true;
Called from
AddField( "TIM_BE", "BE_ID", yes, "Liegenschaft", SAPbobsCOM.BoFieldTypes.db_Alpha, 8 );

Similar Messages

  • When I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    when I try to access my original wifi name, I can't.. So I had to create a second one. the first one is still there after resetting numerous times. Any suggestions

    Hello Oddsbodkin,
    It looks like the creator of Netflix Desktop has a site for the project here:
    https://answers.launchpad.net/netflix-desktop/
    I would try posting your question there and see if anyone else has encountered this error and has a solution.
    Cheers, Patrick

  • Is it possible to create a second Guest network on a Time Capsule?

    I have found a few similar posts but they are pretty old and not exactly what i want. In the Time Capsule there is an option for a Guest network. Would it be possible to create a second guest network with the same time capsule? So that it would have internet but would be isolated from the other components on the system?

    Not exactly.....as things get tricky.  You could add another Apple router...but it would need to be configured in Bridge Mode to work correctly with the "main" router.
    A separate Guest Network feature cannot be enabled when the Apple router is set up to operate in Bridge Mode.
    This would apply to the "main" Time Capsule as well. So, you would need to insure that the Time Capsule was connected to a simple modem......not a modem/router combination device that is commonly offered by most Internet Service Providers.
    Check with your ISP to make sure that they provide you with a simple modem if you want to be able to use the Guest Network feature on any of the Apple routers.

  • HT4009 I'm attempting to down load an app by the name of hudmaniax,upon entering my password for purchase approval I'm prompted to re enter my password a second time followed up with a form to create a security form ...I.e  name of first school attended e

    I'm attempting to down load an app by the name of hudmaniax,upon entering my password for purchase approval I'm prompted to re enter my password a second time followed up with a form to create a security form ...I.e  name of first school attended etc etC.

    This is normal behaviour.  Apple have recently introduced increased security to protect you from fraudulent transactions.  Once you have answered the questions (remember your answers) you will only be asked for them occasionally in future.

  • I need to create a second back-up of iPhoto from Time Machine to a separate external drive.  The old iPhoto in TM will not open.  Please help!

    I need to create a second back-up of iPhoto from Time Machine to a separate external drive.  The old iPhoto in TM will not open.  Please help!  And thank you!

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • My key says "Error - key importing failed gpg: key 5D391D97 was created 55491 seconds in the future (time warp or clock problem)" The clock in the computer is f

    When I create a key and send it to the person I want to begin communicating with encryption, the other person gets this when importing the key: "Error - key importing failed
    gpg: key 5D391D97 was created 55491 seconds in the future (time warp or clock problem)"
    The clock is set properly. Can you assist me in solving this error? This happens in a PC computer running WIndows 7.
    Thank you
    Cecilia

    I created a different key and I have the same problem. I can send you the public key in case that helps solve the problem but you need to provide me with an email address because I cannot upload it here.
    Thank you for your assistance.
    Cecilia

  • Error While running the prgram in Second time...Frank Could u pls check th

    Hi,
    I am using JDeveloper 11g.
    I have created a web application using ADF Business Components. Here I created a Bar Graph. When I am running the first it works fine. But when I try to run the second time it is giving some errors like Error 500 - Internal Server Error.
    Kindly help me...
    Thanks in Advance
    Regards,
    Jithesh.

    Hi Timo,
    Thanks a lot for the response.
    I am searched as per your advise but still ma problem is there... I am not getting any proper solution for this
    In the setDomainEnv.cmd file I am unable to find the PermGen size as you said...In the file I got the following line.
    set MEM_PERM_SIZE=-XX:PermSize=48m
    Is this I hv to change or something else. I am attaching the same file contents. Kindly help me....
    set ORACLE_HOME=C:\Oracle\Middleware\jdeveloper
    set WL_HOME=C:\Oracle\Middleware\wlserver_10.3
    for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi
    set BEA_JAVA_HOME=
    set SUN_JAVA_HOME=C:\Oracle\Middleware\jdk160_05
    if "%JAVA_VENDOR%"=="BEA" (
         set JAVA_HOME=%BEA_JAVA_HOME%
    ) else (
         if "%JAVA_VENDOR%"=="Sun" (
              set JAVA_HOME=%SUN_JAVA_HOME%
         ) else (
              set JAVA_VENDOR=Sun
              set JAVA_HOME=C:\Oracle\Middleware\jdk160_05
    @REM We need to reset the value of JAVA_HOME to get it shortened AND
    @REM we can not shorten it above because immediate variable expansion will blank it
    set JAVA_HOME=%JAVA_HOME%
    for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsi
    set SAMPLES_HOME=%WL_HOME%\samples
    set DOMAIN_HOME=C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi
    set LONG_DOMAIN_HOME=C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain
    if "%DEBUG_PORT%"=="" (
         set DEBUG_PORT=8453
    if "%SERVER_NAME%"=="" (
         set SERVER_NAME=DefaultServer
    set POINTBASE_FLAG=false
    set enableHotswapFlag=
    set PRODUCTION_MODE=
    set doExitFlag=false
    set verboseLoggingFlag=false
    for %%p in (%*) do call :SET_PARAM %%p
    GOTO :CMD_LINE_DONE
         :SET_PARAM
         for %%q in (%1) do set noQuotesParam=%%~q
         if /i "%noQuotesParam%" == "nodebug" (
              set debugFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "production" (
              set DOMAIN_PRODUCTION_MODE=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "notestconsole" (
              set testConsoleFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "noiterativedev" (
              set iterativeDevFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "noLogErrorsToConsole" (
              set logErrorsToConsoleFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "nopointbase" (
              set POINTBASE_FLAG=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "doExit" (
              set doExitFlag=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "noExit" (
              set doExitFlag=false
              GOTO :EOF
         if /i "%noQuotesParam%" == "verbose" (
              set verboseLoggingFlag=true
              GOTO :EOF
         if /i "%noQuotesParam%" == "enableHotswap" (
              set enableHotswapFlag=-javaagent:%WL_HOME%\server\lib\diagnostics-agent.jar
              GOTO :EOF
         ) else (
              set PROXY_SETTINGS=%PROXY_SETTINGS% %1
         GOTO :EOF
    :CMD_LINE_DONE
    set MEM_DEV_ARGS=
    if "%DOMAIN_PRODUCTION_MODE%"=="true" (
         set PRODUCTION_MODE=%DOMAIN_PRODUCTION_MODE%
    if "%PRODUCTION_MODE%"=="true" (
         set debugFlag=false
         set testConsoleFlag=false
         set iterativeDevFlag=false
    @REM If you want to override the default Patch Classpath, Library Path and Path for this domain,
    @REM Please uncomment the following lines and add a valid value for the environment variables
    @REM set PATCH_CLASSPATH=[myPatchClasspath] (windows)
    @REM set PATCH_LIBPATH=[myPatchLibpath] (windows)
    @REM set PATCH_PATH=[myPatchPath] (windows)
    @REM PATCH_CLASSPATH=[myPatchClasspath] (unix)
    @REM PATCH_LIBPATH=[myPatchLibpath] (unix)
    @REM PATCH_PATH=[myPatchPath] (unix)
    call "%WL_HOME%\common\bin\commEnv.cmd"
    set WLS_HOME=%WL_HOME%\server
    set MEM_ARGS=-Xms256m -Xmx512m
    set MEM_PERM_SIZE=-XX:PermSize=48m
    set MEM_MAX_PERM_SIZE=-XX:MaxPermSize=128m
    if "%JAVA_VENDOR%"=="Sun" (
         if "%PRODUCTION_MODE%"=="" (
              set MEM_DEV_ARGS=-XX:CompileThreshold=8000 %MEM_PERM_SIZE%
    @REM Had to have a separate test here BECAUSE of immediate variable expansion on windows
    if "%JAVA_VENDOR%"=="Sun" (
         set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% %MEM_MAX_PERM_SIZE%
    if "%JAVA_VENDOR%"=="HP" (
         set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%
    @REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values
    if NOT "%USER_MEM_ARGS%"=="" (
         set MEM_ARGS=%USER_MEM_ARGS%
    set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME%
    @REM To use Java Authorization Contract for Containers (JACC) in this domain,
    @REM please uncomment the following section. If there are multiple machines in
    @REM your domain, be sure to edit the setDomainEnv in the associated domain on
    @REM each machine.
    @REM
    @REM -Djava.security.manager
    @REM -Djava.security.policy=location of weblogic.policy
    @REM -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy
    @REM -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl
    @REM -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl
    set EXTRA_JAVA_PROPERTIES=-Ddomain.home=%DOMAIN_HOME% -Doracle.home=%ORACLE_HOME% -Doracle.security.jps.config=%DOMAIN_HOME%\config\oracle\jps-config.xml -Doracle.dms.context=OFF -Djava.protocol.handler.pkgs=oracle.mds.net.protocol %EXTRA_JAVA_PROPERTIES%
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%
    set ARDIR=%WL_HOME%\server\lib
    pushd %LONG_DOMAIN_HOME%
    @REM Clustering support (edit for your cluster!)
    if "%ADMIN_URL%"=="" (
         @REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered
         set CLUSTER_PROPERTIES=-Dweblogic.management.discover=true
    ) else (
         set CLUSTER_PROPERTIES=-Dweblogic.management.discover=false -Dweblogic.management.server=%ADMIN_URL%
    if NOT "%LOG4J_CONFIG_FILE%"=="" (
         set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_FILE%
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %CLUSTER_PROPERTIES%
    @REM Clear the pre_classpath here in case an application template wants to set it before the larger pre_classpath is invoked below
    set PRE_CLASSPATH=
    set JAVA_DEBUG=
    if "%debugFlag%"=="true" (
         set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
         set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole...
    ) else (
         set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -da
    if NOT exist %JAVA_HOME%\lib (
         echo The JRE was not found in directory %JAVA_HOME%. ^(JAVA_HOME^)
         echo Please edit your environment and set the JAVA_HOME
         echo variable to point to the root directory of your Java installation.
         popd
         pause
         GOTO :EOF
    if "%POINTBASE_FLAG%"=="true" (
         set DATABASE_CLASSPATH=%POINTBASE_CLASSPATH%
    ) else (
         set DATABASE_CLASSPATH=%POINTBASE_CLIENT_CLASSPATH%
    set POST_CLASSPATH=
    set POST_CLASSPATH=%ORACLE_HOME%\modules\features\adf.share_11.1.1.jar;%POST_CLASSPATH%
    set POST_CLASSPATH=%POST_CLASSPATH%;%DATABASE_CLASSPATH%;%ARDIR%\xqrl.jar
    @REM PROFILING SUPPORT
    set JAVA_PROFILE=
    set SERVER_CLASS=weblogic.Server
    set JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%
    set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag%
    @REM -- Setup properties so that we can save stdout and stderr to files
    if NOT "%WLS_STDOUT_LOG%"=="" (
         echo Logging WLS stdout to %WLS_STDOUT_LOG%
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stdout=%WLS_STDOUT_LOG%
    if NOT "%WLS_STDERR_LOG%"=="" (
         echo Logging WLS stderr to %WLS_STDERR_LOG%
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stderr=%WLS_STDERR_LOG%
    @REM ADD EXTENSIONS TO CLASSPATHS
    if NOT "%EXT_PRE_CLASSPATH%"=="" (
         set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%;%PRE_CLASSPATH%
    if NOT "%EXT_POST_CLASSPATH%"=="" (
         set POST_CLASSPATH=%POST_CLASSPATH%;%EXT_POST_CLASSPATH%
    if NOT "%WEBLOGIC_EXTENSION_DIRS%"=="" (
         set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.ext.dirs=%WEBLOGIC_EXTENSION_DIRS%
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    @REM SET THE CLASSPATH
    set CLASSPATH=%PRE_CLASSPATH%;%WEBLOGIC_CLASSPATH%;%POST_CLASSPATH%;%WLP_POST_CLASSPATH%
    set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
    Jithesh.

  • Error While running the prgram in Second time..Frank Could u pls check this

    Hi,
    I am using JDeveloper 11g.
    I have created a web application using ADF Business Components in JSF pages(Created the Bar Graph). When I am running the first it works fine. But when I try to run the second time it is giving some errors like Error 500 - Internal Server Error.
    Kindly help me...
    Thanks in Advance
    Regards,
    Jithesh.

    So what do you find in the log files, or console output?
    --olaf                                                                                                                                                                                               

  • Unable to fetch data for the second time in an ADOBE form

    Hi All,
    I am creating a PDF form and its data is based on the output parameter of an interface, when i drag and drop an object from the data view into the body page twice, only the first time the value is getting printed and from the second time it is not printing any data.
    Kindly let me know if any one have solution for the same or if i am not clear any where.
    Thanks in advance.
    Warm Regards,
    Kasi Raaman.R

    The pbm is now solved

  • Unable to record audio from second time onwards on Ubuntu 8.04.

    Hi All,
    I have developed an audio recording application. The application provides the facility to record, save and play the audio using javax.sound API any number of times. The application works fine on MAC and Windows Systems. But when I run the same application on Ubuntu 8.04, for the first time, it works fine and file is recorded and played successfully. If I try to record the second time, the following exception is thrown:
    javax.sound.sampled.LineUnavailableException: line with format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian not supported.
         at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(DirectAudioDevice.java:506)
         at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:107)
         at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:139)
         at com.gtcocalcomp.screenrecorder.JRecorder.initiateAudioRecordingProcess(JRecorder.java:202)
         at com.gtcocalcomp.screenrecorder.JRecorder.<init>(JRecorder.java:79)
         at com.gtcocalcomp.interwrite.RecorderWindow.record(RecordPlayback.java:665)
         at com.gtcocalcomp.interwrite.RecorderWindow$5.mouseReleased(RecordPlayback.java:597)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:232)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.
    .EventDispatchThread.run(EventDispatchThread.java:110)
    If I close the application and restart, then again for the first time, it works fine and gives the above exception from there onwards.
    I tried several options like, making all the objects involved in starting the audio recording process to null, then calling System.gc() and creating every object a fresh but no success.
    Can anybody give me some idea/information/links to overcome this problem?
    Thanks in advance.

    Yes Captfoss, I am calling close() method on all of the lines. As I mentioned in my query that same code is working fine on MAC and Windows OS and the problem is coming only on Ubuntu System. I also tried by making all the objects involved as null, and creating all the objects a fresh, but still no results. When I checked by calling isOpen() method on TargetDataLine, only for the first time, its returning true, thereafter, in all my attempts, its returning false only throwing the exception mentioned in my query.
    I came across following link during my search regarding the issue which may provide some more information about this problem to you:
    http://osdir.com/ml/voip.sip-communicator.devel/2008-07/msg00058.html
    http://osdir.com/ml/voip.sip-communicator.devel/2008-07/msg00060.html
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4735740
    http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=3e32926bb8f4cffffffff8d3d67e0f0aabf3?bug_id=4365713
    Can you please suggest whether its an OS issue or is it an issue with JavaSound ?
    Is there any specific way to find and close any input line related to audio which are opened ?
    Thanks in advance.

  • The second time when i print the report the page appear cut in the right

    hi,
    I created a report in Report Builder 6i. When i print the report appear well, but when i try to print the same report second time in the right of the page appears cut.
    Why? What should I do to appear the entire page at the second print?
    Thx.

    Flattening and merging are very similar. The main difference is merging keeps the transparent areas, whereas flattening removes all transparent areas by giving it a white background. A good example of flattening is a jpg image.
    Since you have closed the file by closing photoshop, that means that the history is now gone, no way of undoing.
    So that leaves you with two choices.
    You can either recreate the whole document.
    Or you can make selections of areas you are keeping and moving them one at a time to new layers. Keep each object on a separate layer. Then redo the area behind those objects.

  • Can you merge two user accounts on macbook? my wife has created a user on her new macbook , then inadvertently created a second one when using the migration tool. 1st ac has her office 365 install, yet 2nd has her itunes database, docs and contacts.

    Can you merge two user accounts on a macbook? my wife has created a new user on her new macbook air then, inadvertently, created a second one when using the migration tool. 1st a/c has her office 365 install, while 2nd has her itunes database, docs and contacts. What is the best way forward to get everything into the one account? Not sure if the office 365 will allow another installation into the second account, otherwise would just do that and delete the first, if that is possible?

    There is no merge but you can move data from one account to another via the Shared folder. Data is copied from Shared. Watch your free space when copying. These are large files.  Do one at a time if you are on a small drive. After making copy, delete from other users before you start next copy.
    Office365 installs in the main Applications folder and is available for all users on the computer. Activation is tied to the drive not the User.

  • How do I create a second instance of oc4j in a standalone enviroment

    I am using OC4J standalone to deploy a sparql endpoint using jena, joseki, and the oracle jena adaptor. OC4J is running on the same server as my DEV and QAR databases. The current instance of OC4J is using a data source called "OracleSemDS" to connect to my DEV database. We are now ready to migrate the endpoint to QAR. As I was setting up the QAR endpoint, I discovered the the jena/joseki tools are hard-coded to use the "OracleSemDS" data source. Therefore, I cannot have 2 endpoints running in the same OC4J instance where one points to DEV and the other points to QAR.
    Therefore, I need to create a second instance of OC4J that specifies QAR as the "OracleSemDS" data connection. Can someone tell me how to do that?
    Thanks,
    Phil

    jphilb wrote:
    I am using OC4J standalone to deploy a sparql endpoint using jena, joseki, and the oracle jena adaptor. OC4J is running on the same server as my DEV and QAR databases. The current instance of OC4J is using a data source called "OracleSemDS" to connect to my DEV database. We are now ready to migrate the endpoint to QAR. As I was setting up the QAR endpoint, I discovered the the jena/joseki tools are hard-coded to use the "OracleSemDS" data source. Therefore, I cannot have 2 endpoints running in the same OC4J instance where one points to DEV and the other points to QAR.
    Therefore, I need to create a second instance of OC4J that specifies QAR as the "OracleSemDS" data connection. Can someone tell me how to do that?
    Thanks,
    Philgday Phil -- Melli Annamalai from the Oracle Server PM team pointed me to your question. I was an OC4J Product Manager before we bought out BEA and I swapped over to WLS -- so I have some information below that hopefully is of assistance to you.
    Since you are using OC4J standalone, the simplest way to get a second instance, is to just clone the existing, whole directory structure of your working OC4J instance into another directory, and configure/run it from that directory. To map the OracleSemDS to another target (QAR) you change the data-sources.xml file in the second instance. If you want to run them concurrently on the same server, you'll need to change the ports in the second instance so they have unique values: default-web-site.xml, rmi.xml, internal-settings.xml, jms.xml. These additional ports can be specified on the command line as a Java property string, albeit this is not a documented nor supported feature. See http://buttso.blogspot.com/2007/02/specifying-oc4j-standalone-ports-from.html for more information.
    Now as an example, assuming you have your OC4J you want to clone in the dev directory, and now want to create a second instance of OC4J in qar, I'd do this:
    cp -rp dev/* qar
    cd qar/j2ee/home/config
    vi data-sources.xml
    (edit any other files if needed to alter ports) ...
    cd ..
    java -jar oc4j.jar That should work, and should create the second instance using the current configuration (ie dev) as its basis (including deployed apps). Of course, you'll need to manage them independently from here as they really are just two separate OC4J standalone instances.
    Now what else you could potentially do is to create a secondary configuration file subset only which only changes the necessary files to support running the second instance. In this case, you'd make a copy of the j2ee/home/config/server.xml, j2ee/home/config/application.xml and j2ee/home/config/data-sources.xml files, renaming them to qar-server.xml, qar-application.xml and qar-data-sources.xml.
    Then do the following:
    1. In qar-server.xml file, you'd change the global-application application to point at qar-application.xml instead of application.xml:
    <global-application name="default" path="qar-application.xml" parent="system" start="true" />
    2. Change qar-application.xml so that it used the qar-data-sources.xml file:
    <data-sources path="qar-data-sources.xml" />
    3. Change qar-data-sources.xml file so it points to the qar database target.
    4. Start OC4J, telling it to use qar-server.xml instead of the default server.xml
    D:\java\oc4j-10135-prod\j2ee\home>java -jar oc4j.jar -config config/qar-server.xmlI think you could run into some concurrency problems if you try and run the two instances simulataneously, but in general it should be OK I think if you run them separately.
    Another solution here is look at how the application specifies/uses datasources. The hard coding of the data-source name into the applicaiton via a direct JNDI lookup works, but restricts the flexibility you as a deployer/administrator has.
    If the application used the Java EE resource-ref approach to look up and use the datasource, then the actual JNDI name of the datasource the application uses it totally abstracted from the actual physical name of the datasource that is created on the container -- so you'd have DEVDS and QARDS as physical datasources configured and running on OC4J -- and what happens is that as you deploy the application, you essentially map its lookup and use of OracleSemDS (which would need to change to a java:env/ namespace) to the physical datasource you want it to use (DEVDS or QARDS for example). You can easily alter this post deployment by changing the generated orion-application.xml file to point at the alternate physical datasource. Following that, you can also create separate deployment plans which map the app to the different datasources, then feed this in with the deployment operation so that the correct mapping to either DEVDS or QARDS is done during the deployment process.
    I don't know what scope you have to change the application so the above may not be possible -- you'd need to change the lookup code so that it uses the Java EE reference model and change the meta-inf/application.xml to add the corresponding resource-ref entry which declares the logical datasource name that needs to be mapped on deployment.
    Another approach here may be to use an application embedded datasource, where you put a data-sources.xml file into the application archive itself (along with an orion-application.xml file which references it) whereupon at deployment time, a datasource specific to the application will be created. In this manner, you'd have say two copies of the same application to deploy (DEV, QAR) which contain different data-sources.xml file. From memory, each application will have its own JNDI namespace so their datasources can co-exist with the same names, with application level data-sources overriding server level ones. Since you'll most likely want to keep the same context-root for the web modules (which has to be unique per server) you'll generally need to run just one of the applications at a time. I'd do this like this: deploy one, stop it, deploy the other, stop it, then start only the one you need to test. In that way, you'll have one copy of the application running (either DEV or QAR) and one datasource definition running within it.
    Here's some documentation links to get you going:
    Managing Application Lifecycle (start, stop): http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13978/adminclient.htm#BABHJAFE <-- describes admin_client.jar but general principles apply to ascontrol management of application.
    Packaging and Testing Applications: http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13979/packag.htm#BHCFBEEC
    Application Level DataSources: http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13975/datasrc.htm#CHDIBFHG
    Using Deployment Plans: http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13980/deployplan.htm#CHDFEFAE
    cheers
    -steve-

  • Error 1172, an error running a VI in the second time call of the DLL

    Hello All,
    I am a beginner in labVIEW.
    I have to write a test program in labVIEW which uses a DLL created by other programmer.
    I called the DLL from my labVIEW to control DIOs, a serial port, communicate with a slave device, perfrom a flashing task.
    While testing the program, I found that the program is OK if I use it just once, however, if I want to run it coninuously using a Do-While Loop, it failed with
    Error 1172.
    As far as I could understand, it seems that the DLL creates a log file in C:\ while it was called for the first time, and the process does not stop taking control of this log file even after the DLL is closed.
    Then when the DLL is called for the second time, it looks for the same log file to write new info but as it was taken control by the previous process, there comes an error.
    Please find the attached files.
    Hope there would be somebody who is able to help me to point out my mistakes in my vi or suggest me a solution for it.
    Thanks and Best Regards
    Aung
    (As the system does not accept the DLL attachment, I changed the extension to .pdf for the DLL File)
    Solved!
    Go to Solution.
    Attachments:
    I Basic Flasher.vi ‏60 KB
    Failure.xls ‏86 KB

    -message deleted -
    Message Edited by Ray.R on 11-17-2009 08:01 PM

  • Unable to do second time MIGO

    Dear friends,
    I have an issue at mu client's place wrt MIGO.
    A PO was created and partial inward of goods has happened.. now for the second time when goods have to be inwarded  an ABAP RUNTIME ERROR has occured as below:
    Overflow for arithmetical operation (type P) in program "SAPLJ1IEX"
    Please provide your valuable inputs and guide me to help resolve .
    thanks in advance
    nandu

    Is this dump seen only for Imports PO? Are you using CVD condition                    
    which are defined as "Fixed amount" rather than "Percentage" conditions?                                                                               
    Please check for the application of the following notes:                                                                               
    1040500 Dump in MIGO and J1IEX for Imports Purchase Order                             
    1125359 Excise duty rate not flowing in J1IEX and MIGO for Import PO                  
    This dump occurs typically for an imports PO, where the BED rate goes              
    beyond 999%...or runs into infinite decimals. You need to concentrate              
    on the formula given below, where the value for es_exitem-bedrate should           
    not exceed 999%...this would typically happen when the BED/CVD value               
    is higher than the excise base value...                                                                               
    es_exitem-bedrate = ( es_exitem-exbed /                                            
                          es_exitem-exbas ) * 100.                                                                               
    Kindly check in your system if BED value is greater than the excise base           
    value.  Please note that excise base cannot be smaller than the excise             
    amount/BED value. This will result in dump.  here is no solution for this. The only way to avoid the dump is by             
    nsuring that the base value is always more than BED/CVD value.

Maybe you are looking for