Early watch in Netweaver Java system

Hi,
I want to setup Earlywatch alert for Netweaver Java Systems.
Can anyone give me complete procedure for it??

Hello Gaurav,
Refer to this thread: SAP EarlyWatch Alert for non-ABAP components
Regards,
Amit Barnawal

Similar Messages

  • Error while deploying IDM 7.1 user interface file on Netweaver Java AS sys

    Hi,
    I am in process of installing IDM 7.1 in my landscape.  I have done IC, RC in one system with windows 2003 + oracle.  On other system I have Netweaver 7.0 SP14 Java AS system.  I have configured as per SAP documentation. 
    While deploying IDM user interface 7.1 on SAP Netweaver Java system 7.0, I get following error in SDM:
    Loading archive 'E:\software\IDM\DATA_UNITS\IC_UIS_710\IDMIC00_0.sca'
    May 11, 2011 5:16:12 PM  Error: Unresolved dependencies found for the following SDAs:
    1.: development component 'tc/idm/wd/model'/'sap.com'/'MAIN_IDM710_C'/'3542284'/'0'
    dependency:
    name:     'tc/ddic/runtime/facade'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/wd/api'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'engine.j2ee14.facade'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/bl/logging/api'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/wd/legacy'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/bl/exception/lib'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/aii/base/offline/facade'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    dependency:
    name:     'tc/bl/jrfc/api'
    vendor:     'sap.com'
    There is no component either in SDM repository or in Deployment batch that resolves the dependency.
    Deployment will be aborted.
    May 12, 2011 11:04:09... Info: Loading archive 'E:\software\IDM\DATA_UNITS\IC_UIS_700\IDMIC00_0.sca'
    Please advise,
    Thanks,
    Digesh

    Hi,
    SMP : http://service.sap.com/swdc -> SAP NetWeaver and complementary products" SAP NW IDENTITY MANAGEMENT" SAP NW IDENTITY MANAGEMENT 7.1
    You would need to deploy the NW IDM IC 7.10 UIS FOR NW 7.00 component.
    Regards,
    Srikishan

  • The connectivity between ABAP and JAVA system is not working properly.

    Hi,
    I have Installed ECC5.0 ABAP system and Netweaver JAVA system with different SID's in single box. While Installing JAVA systen I have selected UME as ABAP system and Installation was success. Once I restart MMC the JAVA server process thowing an rc -11113.
    I have pasted trace file for Server process. Please send me any suggestions ASAP.
    [Thr 4500] JHVM_RegisterNatives: registering methods in com.sap.bc.proj.jstartup.JStartupFramework
    [Thr 4500] JLaunchISetClusterId: set cluster id 31689350
    [Thr 4500] JLaunchISetState: change state from [Initial (0)] to [Waiting for start (1)]
    [Thr 4500] JLaunchISetState: change state from [Waiting for start (1)] to [Starting (2)]
    [Thr 4180] Thu Apr 19 12:06:29 2007
    [Thr 4180] JHVM_RegisterNatives: registering methods in com.sap.mw.rfc.driver.CpicDriver
    [Thr 4180] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPConverters
    [Thr 4180] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPCharToNUCByteConverter
    [Thr 4180] JHVM_RegisterNatives: registering methods in com.sap.mw.jco.util.SAPNUCByteToCharConverter
    [Thr 4748] Thu Apr 19 12:06:30 2007
    [Thr 4748] JLaunchIExitJava: exit hook is called (rc=-11113)
    [Thr 4748] **********************************************************************
    ERROR => The Java VM terminated with a non-zero exit code.
    Please see SAP Note 940893 , section 'J2EE Engine exit codes'
    for additional information and trouble shooting.
    [Thr 4748] JLaunchCloseProgram: good bye (exitcode=-11113)
    Thanks,
    Suraj

    Hi,
    It clearly says the problem is with virtual memory. SO you need to change your virtual memory settings using configtool.
    See the relevant note.940893
    Make changes in the VM parameters for Bootstarp, Dispatched and the server nodes. Your -Xms should be less than equal to -Xmx.
    Restart the cluster then.
    It should work.
    Do reward good points.

  • Same system being shown multiple time in Solution for Early Watch Report

    Hi Gurus ,
    I have some satellite system configured to Solution Manager . Today I can see the same system entry multiple time in the
    Operations: Solution Monitoring -> Early Watch Alert.
    eg .,
    I have a system whose SID is ABC , i can see the ABC entry for todays date (i.e., 4 FEB 08) nearly 4 time .And this systems are not rescheduled for the next EWR (i.e scheduled for 11 FEB 08- since we have kept a period of 7 days )
    Please suggest
    Anthony

    Hi Anthony,
    There was an error, that EWA sessions for one systems were scheduled multiple times per week.
    Please check [SAP Note 1083108 - Duplicate EarlyWatch Alerts|http://service.sap.com/sap/support/notes/1083108]
    Search for SAP Notes with key words: EWA, multiple, duplicate.
    Application area: SV-SMG-OP
    What's the software configuration of your SolMan?
    Best regards,
    Ruediger

  • Early watch alert task not created in SDCCN in satellite system

    Hello Everyone,
    I am trying to configure EWA in solution manger 7.0 ehp1. I have added the system in SMSY, created RFC SM_SIDCLNTXXX_READ and SM_SIDCLNTXXX_TRUSTED in solution manger and also created RFC SM_SIDCLNTXXX_TRUSTED and SM_SIDCLNTXXX_BACK in satellite system sucessfully.
    The Early watch Alert in TA DSWP is showing me a red flag. The job  /BDL/TASK_PROCESSOR in satellite system is being sucessfully finished.
    The problem I am facing is I cannot find task Early watch Alert in SDCCN in my satellite system and can not create other RFC such as SAPOSS and SDCC_OSS
    Could anyone please suggest how should i go about it?
    Component version of my satellite system is
    ST-A/PI - 01M_SCM570
    ST-PI - 2005_1_700  00003

    Hello Sohrab
    1) The SDCCN task logs will be on the Done tab - You can also check the logs in SLG1 at the time, there could be more information there.
    Typically the refresh definitions will have nothing, except when there are updates, so it is not unusual to see no updates here each time the task runs. If there are service sessions the maintains package should pick them up with refresh service task.
    Is the SM_<SID>CLNT<nnn>_BACK RFC set as the master in SDCCN?
    One test you can make is create a Refresh session task on the satellite. This is the task that the Maint. Package should run.
    It will just be easier for testing. If the refresh session task does not create any EWA tasks for the service sessions outstanding, then there is a configuration issue.
    If it works, then the Maintenance task is failing before it can shcedule the  refresh session task.
    I realize I haven't offered a solution, but a way of finding out where it is failing. Once we isolate where it is failing, we reduce the possibilities of what it could be, and we should be left with the solution.
    So forget the Maintenace Package for Now. Lets see if you can pull the service sessions with a Refresh Session Task.
    You know in the SDCCN task logs errors in the logs are prefaced by what looks like a yellow lightening bolt.
    So if you see these in any of the logs, you are encountering an error, and you should copy it here.
    Hope this helps to move you forward.
    Regards,
    Paul

  • DB refresh on Netweaver 7.0 ABAP+JAVA system - Issue

    Dear Folks
    I am having an issue with starting the Java instance after system copy.
    This is the situation
    System QAS database was refreshed from system PRD.
    Both the systems are on NW 7.0 Ehp1 SP 18, in a HPUX/ORACLE environment.
    Our normal landscape is full of R3 systems so teh DBA's have been historically doing DB refresh by copying for teh Oracle fileystems and then renaming the schema and some post db refresh activities to get the DB in teh target system up and running. Pardon my terminologies I ma not a DBA. The abpove procedure has worked fine with R3 systems.
    But with the above mentioned Netweaver system ABAP instance is running fine after refresh while Java instance is not since SMSICM-> Goto-> HTTP Server -> DIsplay Data is showing
    HTTP Application Server Handler
    ABAP Server operational        = TRUE
    J2EE Server configured         = TRUE
    J2EE HTTP port                 =
    J2EE HTTPS port                =
    J2EE Server operational        = FALSE
    Default root access handler    = ABAP
    URL Prefix Table loaded        = TRUE
    There are no other dumps or errors in the system and teh startup logs do not show any error. I have looked up online and the System Copy Guide for 7.0 systems and I understand SAP recommends using sapinst. But I would like to know if there is a workaround to fix the j2ee instance.
    I have seen a few forumns where people have had similar issues but no solution.
    FYI, The the Instance_IDXXXXX in the SAP J2EE Engine- Config Tool in system QAS is that of PRD and there is no entry for the instance ID of the QAS system.
    I have tried changing all the entries that are pointing to PRD under Cluster_Data-> Instance.properties.IDXXXX to that of QAS and saved and restarted but no luck as the Instance_IDXXXXX of QAS does not show up in teh config Tool menu.
    All the properties files at teh OS level are pointing correctly to QAS, so I would liek to know if there is any way to change the config on eth DB level.
    Thanks in advance.
    sapkid

    Hi,
    When you go for ABAP+JAVA system refresh please always ose the JAVA export method .
    Take the JAVA export of the source system with the help of sapinst.Check the j2ee_admin and the ddic password of source system.
    then you need to get the offline backup of the Source system.
    then import it on the target system wth the help of sapinst and in the middle it shall promt you to restore from the backup of the source system.
    Always use this method as JAVA stores it file at file system level and in the database.So you need both the files .
    Thanks Rishi Abrol

  • Document for configuring Early watch alerts And issue tracking system

    Hello Experts,
    Iam on SAP Solution Manager 4.0 and need step wise step procedure document for configuring Early watch alerts and Issue tracking system in solman 4.0 . I hv checked Help site and other standard config docs by SAP but getting confused and things are not working ,so help shall be appreciated.
    My Email id is [email protected] .
    Requested to revert at earliest as iam in urgent need of it .Points guaranteed.
    Thanks and Regards,
    Somya

    Hi Somya,
    setting up EWA is explained in Application help of SAP Solution Manager.
    It would be helpful to know, what you have already done and what is causing problems for you.
    Prerequisite to process EWA is to configure all steps described in the Basic Settings of SAP Solution Manager Configuration guide (tx SPRO).
    The configuration of Issue Tracking is also described in the IMG (Basically, it's required to activate a BC Set).
    Path in IMG: Basic Settings -> Standard Configuration of Basic Settings -> Solution Manager -> Basic BC-Sets for Configuration -> Activate Issue Tracking BC Set
    Access the configuration guide:
    - run transaction SPRO
    - choose SAP Reference IMG
    - expand tree SAP Solution Manager -> Configuration -> Basic Settings
    - follow the steps under
    "Wizard-based Initial Configuration of Basic Settings", if your SolMan system has not been yet configured or
    "Standard Configuration of Basic Settings", if you have done already some configuration.
    Best regards,
    Ruediger Stoecker

  • RFC configuration for system monitoring / Early Watch reports

    Hello Basis Gurus:
    Please help me out.....
    The early watch reports in the solution manager of my system are failing consistently to execute.This is happening for all the 3 systems DEV,QAS,PRD.when i click on individual earlywatch reports it takes me to a screen which says  "data for this report is overdue.....go to your satellite system SDCCN to see why the data was not sent...."
    It says ...check the following things.....
    "The RFC connection for the SAP Solution Manager system is not working.
    The 'Task Processor' background job, which collects the session data, has been changed.
    Problems arose while data was being collected (see the detail log for the task that collects the session data).
    A periodic 'SDCC Maintenance Package' task has not been scheduled to check whether your SAP Solution Manager system requests session data."
    I can see the task processor job , and the periodic Maintenance package scheduled everyday and completed sucessfully.So is it the RFC which is causing the problem.
    Im SM59 of the solman, i can see system generated RFCs for the PRD,DEV,QAS and SND  (...3 for each of these systems...).
    say for PRD, these are the 3 RFCs.
    1.)SM_PRDCLNT<client#>_READ.
    2.)SM_PRDCLNT<client#>_TMW.
    3.)SM_PRDCLNT<client#>_TRUSTED.
    I am not sure which RFCs among the 3 for any given system does the solman use to communicate to the satellite systems.
    *The user id section in the Logon Data of any of these RFCs is blank.and the password says "is initial"...*is this correct.Does the user id have to be a communication type of user...
    PLeaase advise as to what could be going wrong..
    Regards.

    Hi,
    The system uses ABAP Connection (Connection Type 3) to connect to different Systems to execute Functional Calls.
    Now in your case, there are 3 different connections meaning your Basis Team has used 3 connections for different connection activities. This is totally a business dependent scenario.
    Now each time you create a RFC Connection, the system will need the following information to remotely call another system, they are:
    Host Details of Target System
    Logon Details to remotely login
    For RFC Connections the User Type has to be Communications User. But there are companies which use Dialog User Types as well to remotely login for some cases. When the User ID is created for an RFC User and a Password is assigned to it, this Password is considered as the Initial Password by the system. This Password is taken as the Initial Password in the RFC Connection as well.
    There can be cases where the system is Trusted and there is no need of a password, but an Username is mandatory in all cases. Remember if you set the system as Trusted, the password option gets deactivated and the connection wont work, if the system does not have the Trusted status.
    But in any case you must assign the Username alongwith the Client and Language Details in the RFC Connection for it to work.
    Hope this helps.
    /Manoj

  • Earlywatch Alert configuration for Java system

    Hi All,
    I have configured the Solution manager diagnostics for early watch
    alerts for a java system by following the guide "EWA for non-ABAP
    components" in note 976054.
    I am able to get the EWA reports manually, i.e by downloading
    the "service download" file from http://<host-name>:<port>/smd/services
    and uploading it in T-code DSA in Solution manager system and by
    generating the "word" file over there. But i require the automatic
    configuration to work. This automatic reports generation is not working presently.
    Is there any separate configuration to be done for the automatic report
    generation for Non-ABAP systems.
    Waiting for any one of your help,
    Points will be awarded for any useful solutions.
    Regards,
    Phani.

    Hi,
    Normally you have nothig to do, the report should be generated each week automatically. But you have some checks in  document attached to <b>SAP Note 976054</b> to see if everything is activated (SDCCN, NONE Destination, etc...).
    Regards,
    Stephan

  • EWA does not report security notes missing and java systems

    Hello guys,
    Our early watch report don't contain section 7.1 with security notes missing in the system.
    We have solution manager 7.0 with ST-SER 700_2008_1 SP4.
    What do we need to configure so that ewa reports security notes missing?
    Another doubt, how can I get the list of security notes missing in java stack system like portal?
    thanks.
    regards,
    Filipe

    hello Filipe
    Below is a line from the SAP note 888889.
    "In the SAP EarlyWatch Alert report, the "Service Preparation Check" unit complains that Note 888889 is not implemented.  As a result, the check for security-relevant notes can only be carried out partially in the "Security" section."
    Looks like that could be the reason for that.
    For JAVA stack there is no note concept.
    Thanks & regards
    bala

  • In ABAP+Java system installation

    Hi,
    I installed ABAP+Java system On that i installed XI 3.0 SR1.I after applying the J2EERTOS11_0-20000118.SAR patch on J2EE engine.This patch consist of lot of bugs.I just stopped the installation of patch.After again when i log on to J2EE engine with port 50000.Its showing no page dispaly on localhost.I checked the J2EE instance.J2EE instance running properly.Even i can't log in to SDM and J2EE administartor.
    Before patching I can able to log in.But now its loging failing.
    May be the error is at 50000 port.I installed everything on one Central instance.
    Need urgent reply.

    Hello,
    i think that you want to patch your j2ee-server. Therefore you have to download four parts for PATCH SP11.
    Support Packages and Patches > SAP NetWeaver > SAP NETWEAVER SAP NETWEAVER 04 > Java Server:
    J2EERT11_0-10001982.SAR (Part 4/4)
    SAPINST10_0-20000118.SAR
    J2EERTOS11_0-20000118.SAR
    CTRL<database>11_0-20000118.sar
    You have to download all these files and extract then in one folder - there you have to use the sapinst and install the patch.
    I hope i understood your requirement the right way.
    Regards,
    Andr'e

  • Early watch alert Dump:UNCAUGHT_EXCEPTION+ CX_DSVAS_API_CONTEXT_INSTANCE

    Hello All,
    I am facing issue while generating the early watch alert :
    In DSWP its showing ,DATA is available ;SAP earlywatch alert Session number :<>
    After processing button :  Start service processing
    Job schduling and getting failed Job Log:
    Job log overview for job:    SM:EXEC SERVICES 000000106120000 / 10520300
    Date       Time     Message text                                                                                Message class Message no. Message type
    02-06-2012 10:52:03 Job started                                                                                00           516          S
    02-06-2012 10:52:03 Step 001 started (program RDSMOPBACK_AUTOSESSIONS, variant &0000000000558, user ID BASISUSER)           00           550          S
    02-06-2012 10:52:03 MemSize Begin = 1368192   Bytes                                                                         DMD          000          I
    02-06-2012 10:52:05 Solution <000000106120000> "SID..." is being edited (Operations)                                       DSWP          438          S
    02-06-2012 10:52:05 <000000106120000> "SID..."(Operations)                                                                  DMD          000          I
    02-06-2012 10:52:05  ( EW_ALERT ) Session 2000000001331 for 02-13-2012 created (QDV)                                       DSWP          506          S
    02-06-2012 10:52:05 Difference "Create_Periodic_Services" = 278528                                                          DMD          000          I
    02-06-2012 10:52:05 Trying to perform session EC2000000001313                                                              DSWP          492          S
    02-06-2012 10:52:08 MODEL_KEY: SID <Installation Number> HANDLE: 6  MODEL_MODE: E  MODEL_VERSNR 00001 MODEL_CLASS: EWA Data Model      DMD          000          I
    02-06-2012 10:52:43 Internal session terminated with a runtime error (see ST22)                                             00           671          A
    02-06-2012 10:52:43 Job cancelled                                                                                00           518          A
    St22: Dump Log:
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_DSVAS_API_CONTEXT_INSTANCE
    Date and Time          02-06-2012 10:52:43
    Short text
         An exception occurred that was not caught.
    What happened?
         The exception 'CX_DSVAS_API_CONTEXT_INSTANCE' was raised, but it was not caught
          anywhere along
         the call hierarchy.
         Since exceptions represent error situations and this error was not
         adequately responded to, the running ABAP program 'SAPLDSVAS_PROC' has to be
         terminated.
    Please post your valubale suuggestions and how to proceed further.
    Thanks
    Nekkalapu

    HI Arjun,
    Earlier (upto jan15th ) its working fine no issues generating earlywatch alerts .
    After 15th onwards i am facing this issue i have not done any chnages in configuration part.
    As per your suggestion I have checked the below points:
    1)transaction AGS_UPDATE is up to date ?
    Answer:AGS_UPDATE is updated (ALL availeble updates are downloaded) and its showing green color 3 options .
    2)able to connect to your satellite system via Trusted RFC or able to create sessions?
    Answer: Yes its generating sessions probelm while running dswp t code genarating sessions only.
    3)RTCCTOOL showing all green ?
    Answer:
    Five are showing in red and two are showing green
    Red:
    Addon upgrade ST-A/PI 01N_700SOL
    ST-A/PI Addon Supportpackage SP01
    Proc. after addon impl.
    Switch on digital content verification
    ST-PI Support Packages
    Green:
    Addon ST-PI 2008_1_700
    Collectors and TCOLL
    Kindly please suggest how to proceed further.
    Thanks
    Nekkalapu

  • BW Early watch report ( SBIW )

    Hi All,
    We have received the early watch report for BW and in that It has mentioned to do SBIW ( IMG ) activity as follows:
    Upload customizing BW (SBIW)
    One part of table ROIDOCPRMS in every SAP source system controls the data transfer from the source systems
    to this system. Table ROIDOCPRMS contains the following information:
    maxsize - Maximum size of an IDoc packet in KB
    statfrqu - The number of packets that are transferred before statistical information is sent
    maxlines - Maximum number of records sent in one IDoc packet
    maxprocs - Maximum number of dialog work processes for each upload request used to send the data to the
    system
    The correct setup of this table is important for performance and stability of the upload process. We checked the
    setup of this table for all source systems connected to this system.
    SAP asks to change the entries and it has given recommendations. I hope this will increase the rate of Data Transfer from ERP to BW.
    My Questions :
    01. My question is they have mentioned to set this in the respective Source System. i.e. Should I set it in the Production System.
    02. one more thing. It is also required to create a transport request to do the above operation. for that case, should I create a Transport Request in the Production System. ? Is that generally ok ? how it is handled usually ??
    03. To execute SBIW Transaction, what authorization is required ? and how to check which authorization is required to execute SBIW ??
    Please throw me some light on this.
    Thanking you in Anticipation.
    Thanks & Regards
    L Raghunahth
    PS : If you know answer to any particular one also, please feel free to answer.

    Hi Raghunahth,
    Please see my answers below.
    01. My question is they have mentioned to set this in the respective Source System. i.e. Should I set it in the Production System.
    These settings are related to the respective source sytem. Yes these settings are to be done on production system
    02. one more thing. It is also required to create a transport request to do the above operation. for that case, should I create a Transport Request in the Production System. ? Is that generally ok ? how it is handled usually ??
    No transport request required. Check with your basis guy to carryout these settings.
    03. To execute SBIW Transaction, what authorization is required ? and how to check which authorization is required to execute SBIW ??
    Ask the basis guy to give acces rights to tcode SBIW on the source system.
    Hope this helps.
    Regards,
    Sreenivas.

  • How to access JDBC Resource registered in Sun Java System App Server ?

    I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. This Java application will be used in a standalone PC installed with Windows XP Professional with no LAN / WAN connection. Of course, Internet connection is available with the PC.
    I use JavaDB to store the data tables and the location of the database is D:\E-DRIVE\SAPDEV. Tomorrow, if I move this database to C:\SAPDEV or any network drive, I do not want to change the Java Source code. I want to use JNDI which, if I am not wrong, helps developers to avoid manual change of Java source code whenever the database location is changed. Changes have to be made only in the JNDI Name which contains all relevant information about the database in order to get connection no matter where the database SAPDEV is stored; it can be placed under D:\E-DRIVE directory or C:\ directory of the hard disk. To implement my intention, I started developing Java application as per the steps mentioned below:
    Step 1:
    To proceed, first, I sought the help of Sun Java System Application Server Admin Console. I created JNDI object for Connection Pool using the menu path Common Tasks->Resources->JDBC->Connection Pools.
    JNDI Name : ABAPRPY
    Resource Type : javax.sql.DataSource
    Datasource class : org.apache.derby.jdbc.ClientDataSource
    Description : ABAP Program Repository
    The Connection Pool creation has options for General, Advanced and Additional Settings tabs and I made all the settings relevant to the database I created in D:\E-DRIVE\SAPDEV.
    To confirm whether the above settings are correct, I pressed the Ping push button which is available in the General tab of the connection pool creation screen. The system responded with the message Ping Succeeded.
    Step 2:
    I created a JDBC Resource using the menu path Common Tasks->Resources->JDBC->JDBC Resources.
    JNDI Name : jdbc/SAPDEV
    Pool Name : ABAPRPY
    Description : Database Connection for SAPDEV database
    Status : Enabled
    I can see all the above settings recorded in the domain.xml which is placed in the folder
    C:\Sun\AppServer\domains\domain1\config
    Step 3:
    I have made sure that Sun Java System Application Server is up and running in the background with JavaDB server. I created a Java Program making sure the following JAR files are included in the classpath:
    appserv-admin.jar
    appserv-ee.jar
    appserv-rt.jar
    javaee.jar
    fscontext.jar
    Plus, the lib directory of JDK 1.6 & C:\Sun\AppServer\domains\domain1\config
    Source code of the program is as follows: I used NetBeans IDE to create my project file.
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.*;
    import javax.activation.DataSource;
    public class JNDILookup {
    public static void main(String[] args) {
    try {
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/sapdev>");
    } catch (NamingException ex) {
    Logger.getLogger(JNDILookup.class.getName()).log(Level.SEVERE, null, ex);
    When I attempted to compile the above program in NetBeans IDE ,no compilation error reported. But while executing the program, I got the following run-time error message:
    SEVERE: null
    javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/sapdev> [Root exception is java.lang.NullPointerException]
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at SAPConnect.JNDILookup.main(JNDILookup.java:21)
    Caused by: java.lang.NullPointerException
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
    ... 3 more
    Now, I want to come out of this situation; at the same time, I want to preserve the settings I have made in the Sun Java System Application Server Admin Console. That is, I want to programmatically access the data source using Connection Pool created in Sun Java System Application Server Admin Console.
    I request dear forum members to provide me an appropriate solution.
    Thanks and regards,
    K. Rangarajan.

    jay44 wrote:
    Bare in mind I am attempting the context.lookup() from inside the container (my code is in a session bean). I have accessed the server and have my bean "say hello" first to verify the bean works OK, then I call a method with this rather standard code:
    String jndiDataSourceName ="Second_EJB_Module_DataBase";
    Logger.getLogger(DynamicPU.class.getName()).log(Level.INFO,"Programatically acquiring JNDI DataDource: "+ jndiDataSourceName);
    InitialContext ctx;
    try {
    ctx = new InitialContext();
    ds =(DataSource)ctx.lookup("java:comp/env/jdbc/"+jndiDataSourceName);
    } catch (NamingException ex) {
    Logger.getLogger(DynamicPU.class.getName()).log(Level.SEVERE, null, ex);
    return "Exception generated trying to preform JDBC DataSource lookup. \n"+ex.toString();
    But when I run the code the server log shows the initial context is created Ok, but an exception is thrown becasue the resource name is not found:
    (and i have tried vriations of ctx.lookup("jdbc/"+jndiDataSourceName) etc etc
    You are fine here. It works in container because the InitialContext properties have been supplied already. That was the link I forwarded earlier. The InitialContext you create locally needs to locate the container JNDI. That is what the properties specify.
    Where I am confused is where you indicate the stack below is from the server log. So, you initiate a standalone (java main method) application, create an InitialContext, and you see the results in your app server log?
    LDR5010: All ejb(s) of [EJB_Module_1] loaded successfully!
    Programatically acquiring JNDI DataDource: Second_EJB_Module_DataBase
    The log message is null.
    javax.naming.NameNotFoundException: Second_EJB_Module_DataBase not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)...
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    This is strange since I can see this resource (a JDBC connection named Second_EJB_Module_DataBase) is configured on the server from the server's admin console.
    That is why you can obtain a lookup from within the container (app server).
    For this lookup to work it may be that one must map the name inside an ejb-jar.xml deployed with the application, but I have also read some resources like jdbc connection should have a default name. Does anyone know if my lookup() should work without using an ejb-jar.xml mfile to explcitly map the reource for my application?
    Both EBJ's and data sources can be referenced via JNDI. It's a remote lookup (that is normally optimized if it is running in the same JVM). You should not have any dependencies on a JDBC data source being set-up on ejb-jar.xml. That file can of course impact your EJB's. However, data sources are normally set-up on a container-specific basis (e.g., you probably did it through a console, but there is a spec somewhere about how to set up a data source via a resource the app server looks for; it varies from app server to app server). However, once you have that container-specific data source set-up, JNDI operates vendor-neutral. You should be able to take the code above and move it to JBoss or Weblogic or Tomcat or whatever (this is an ideal, in practice, the vendors sometimes put a data source in a name you would not expect, but again, you can use their JMX console to see what the JNDI name is).
    (As I stated above if I have to use a deployment discriptor to get at this JNDI datasource, then solution is not "programmatic" as newly configured datasources could not be accessed without redeploying the entire application).
    As JSchell alluded to, you will always have at least something vendor-specific. JNDI itself (the code you wrote) is totally portable. However, you have to set the various JNDI environment properties to a given vendor's spec. Ideally, you should not need a vendor's actual InitialContext application, but it's a possibility. Once you can safely cast to Context, you should be vendor-neutral (if not, demand your money back).
    So that is exactly where I am stuck, trying to get the lookup to work and wondering if it should work without and xml file mapping the resource for my app.
    What we ended up doing for standalone was to provide our own JNDI. If you look at the open source project JOTM, there are examples on how to use that with XBean (if integrating with Spring, as we did), you can easily set up a data source that runs standalone exactly as you get in the container. Another benefit is you get full JTA/JTS support and the ability to run XA transactions. (This might all be alphabet soup, but the app server gives it to you, and this is the way we ended up doing the same: JNDI + JTA + JTS + XA). It ends up the same application code uses a "vanilla" InitialContext and all we have to do is write one or two xml files (one for our app server, a couple for JOTM), and our actual code works the same.
    I still think you have a shot at getting to the container's JNDI, just not using their full-blown app server JAR.
    I think there must be a simple way to do this with an ejb-jar.xml, I am no expert in JNDI, I could be missing something simple, I will keep at it and post an answer here if I come up with it.
    Thanks, jayIt is simple to code. Getting it to integrate with your app server, yes, that can be challenging. But it has nothing to do with EJB's. Write a simple test. Using nothing but DataSource and InitialContext. Let us know where you get stuck.
    - Saish

  • Problem of authorization in java system

    Hi all
    I have a problem of authorization.
    I have two sap system: SAP ERP, SAP Netweaver 2004s (only java).
    In my sap ERP I have configured some web services.
    Now I would use those web services from my Netweaver , so I execute those step:
    From sap erp:
    Transaction soamanagerlogon on sap erp  u201CBusiness Administrationu201D  Tab Page  u201Cweb Service Administrationu201D link choose my WS  link u201COpen Web Service navigator for selected bindingu201D now appear a login screen.
    I have created a user u201Cprovau201D with role and group everyone in the java system.
    When I try to login with user u201Cprovau201D the error message u201CYou donu2019t have authorization u2026u201D appear
    I Would know if exist something to Know the authorization to use that service to add at the user u201Cpippou201D.
    Thank you for collaboration     
    Best regards
    giovanni

    HI Thulasi
    thank you for your response.
    I opened  my browser on http://<my ip>:50000/index.html of the java system, I have choose "User Management" and
    selected my user but I didn't find the role "WSnavigator" . The roles that I have in the java system are:
    Administrator     
    CAFAdmin          
    CAFDeveloper     
    CAFUIAdmin
    Everyone
    SAP_ARCH_SUPERADMIN
    SAP_ARCH_XMLDAS_VIEW     
    SAP_JAVA_NWADMIN_CENTRAL                    
    SAP_JAVA_NWADMIN_CENTRAL_READONLY
    SAP_JAVA_NWADMIN_LOCAL
    SAP_JAVA_NWADMIN_LOCAL_READONLY     
    SAP_JAVA_SUPPORT
    Must I choose this role from visual administrator?
    Thank you for collaboration.
    Best regards
    giovanni

Maybe you are looking for