IDL to JAVA - problem with enum, const assignment

Hi,
I have a problem with compile IDL to JAVA.
I want to compile foo.idl to java by command:
idlj foo.idl foo.idl:
    enum color {
      blue,
      red,
      green,
      yelow
    const color DEFAULT_COLOR = blue;But I get errors:
foo.idl (line 8):  The type of  is enumeration, but it should be primitive or string.
const color DEFAULT_COLOR = blue;
foo.idl (line 8):  Identifiers in constant expressions must be constants, not blue.
const color DEFAULT_COLOR = blue;I don't think that IDL file (foo.idl) is wrong, because I compile this file to c and python without errors.
Can you help me?

Let's take this one step at a time.
1. You have successfully configured ABAP/Java communication using template installer? See note 917590.
2. Did you assign the portal user appropriate portal roles?
3. Can you start a web query from 7.0 query designer?

Similar Messages

  • Problems with enums

    Hi, I am trying to build a card class where each card has a suit, rank and prime number. I am trying to do it with enums, but I am having problems initialising the class from my Deck. The Card class is like so:
    import java.util.Comparator;
    public class Card
         private final Rank rank;
         private final Suit suit;
         private final PrimeVal primeVal;
         public enum Rank
              Deuce(0),Three(1),Four(2),Five(3),Six(4),Seven(5), Eight(6),
              Nine(7), Ten(8), Jack(9), Queen(10), King(11), Ace(12);     
              private final Integer rankValue;
             Rank(int rankValue)
                 this.rankValue = rankValue;
             public Integer faceValue(){ return rankValue; };
         public enum PrimeVal
              Deuce(2),Three(3),Four(5),Five(7),Six(11),Seven(13), Eight(17),
              Nine(19), Ten(23), Jack(29), Queen(31), King(37), Ace(41);     
              private final Integer primeVal;
              PrimeVal (int primeVal)
                 this.primeVal = primeVal;
             public Integer primeVal(){ return primeVal; };
         public enum Suit
              Spades(0x1000), Hearts (0x2000), Diamonds(0x4000), Clubs(0x8000);
              private final Integer suitValue;
              Suit(int suitValue)
                   this.suitValue = suitValue;
              public Integer suitValue(){ return suitValue; };
         public Card(Rank rank, Suit suit, PrimeVal primeVal)
            this.rank = rank;
            this.suit = suit;
            this.primeVal = primeVal;
        public Rank rank() { return rank; }
        public Suit suit() { return suit; }
        public String toString() { return rank + " of " + suit; }
    }and my initialisation procedure in Deck is:
    static
             for (Card.Suit suit : Card.Suit.values())
                for (Card.Rank rank : Card.Rank.values() )
                    Deck.add(new Card(rank, suit));
        }This code is predominantly from a enum tutorial off of this site, my problem is, I am just learning, I don't know to keep the features and add in the prime number and get it to initialise correctly... which is why the constructor is wrong. Is this even a good way of doing it?
    Many thanks, Ron

    Kaj, thanks, i know I need a constructor, I just
    don't know how to add it in! That was the question,
    how to add it?
    Thanks, RonAre you kidding me?
    Here's your original code, trying to invoke the constructor:
    Deck.add(new Card(rank, suit)); You're passing 2 arguments to the Card constructor, but you need 3.
    Think.

  • Error thread java : problem with the function "resume 0x***"  (forum sun)

    One problem with the function of jdb occured when I tried to use it to
    pilot the processor with differents threads. In fact, I use a simple example with 2 threads.
    I stop the two threads with two breakpoint, and I want to resume one or the other (with the function "resume 0x****"), the one wich I resumed stop again on the breackpoint and I decide again to resume one or the other. All of that to obtain a tree of execution.
    I give you the code of the class and the code of jdb.
    CLASS: (it's just a object Room with a variable degre that I increment and decrement with two threads increase and decrease)
    public class Test{
         public static void main(String[] args){
              Room r = new Room();
              decrease de = new decrease(r);
              increase in = new increase(r);
              de.start();
              in.start();
    class Room {
         private volatile int degre=20;
         public void more(){
         degre += 4;
         public void less(){      
         degre -= 3;
    class decrease extends Thread{
    private Room room;
    public decrease(Room r){
              room =r;
    public void run(){
    try{ 
         while (!interrupted()){ 
              room.less();
    catch(InterruptedException e) {}
    class increase extends Thread{
    private Room room;
    public increase(Room r){
         room =r;
    public void run(){ 
         try{ 
              while (!interrupted()){
                   room.more();
    catch(InterruptedException e) {}
    JDB:
    Initializing jdb ...
    stop at Test:7Deferring breakpoint Test:7.
    It will be set after the class is loaded.
    runrun Test
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Test:7
    Breakpoint hit: "thread=main", Test.main(), line=7 bci=30
    7 in.start();
    main[1] stop at room:16
    Set breakpoint room:16
    main[1] stop at room:20
    Set breakpoint room:20
    main[1] resume
    All threads resumed.
    >
    Breakpoint hit: "thread=Thread-0", room.less(), line=20 bci=0
    20 degre -= 3;
    Thread-0[1] threads
    Group system:
    (java.lang.ref.Reference$ReferenceHandler)0x10d Reference Handler cond. waiting
    (java.lang.ref.Finalizer$FinalizerThread)0x10c Finalizer cond. waiting
    (java.lang.Thread)0x10b Signal Dispatcher running
    Group main:
    (decrease)0x146 Thread-0 running (at breakpoint)
    (increase)0x147 Thread-1 running (at breakpoint)
    (java.lang.Thread)0x148 DestroyJavaVM running
    Thread-0[1] resume 0x147
    Thread-0[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] print degre
    degre = 24
    Thread-1[1] resume 0x146 //It's here the problem, thread 0x146 have to stop on the //next breakpoint of decrease but nothing happen
    Thread-1[1] resume 0x147
    Thread-1[1]
    Breakpoint hit: "thread=Thread-1", room.more(), line=16 bci=0
    16 degre += 4;
    Thread-1[1] clear
    Breakpoints set:
    breakpoint Test:7
    breakpoint room:16
    breakpoint room:20
    PS: I tried many other examples with other class and other kind of breakpoints, but, in any cases, on thread doesn't manage to resume. When I try with general resume (no specification of the thread), It works but it isn't interresting for me because I want to decide wich thread continue his execution.

    Hi,
    I have read the FAQ of the JMF.
    The problem was the jar files of the JMF were not in the JRE\BIN\EXT
    folder of the Java runtime!
    now it works!
    thanks
    Reg

  • Problem with Unknown account assignment with limit order...reply soon...

    Hello All,
    i am facing problem in <b>confirming the limit order with unknown account</b> <b>assinment</b>.We are using Extended classic scenario with SRM version 5.00 and ECC 6.00. When creating shopping cart with unknown account assignments,  shopping carts is getting created fine but when processing goods receipt the system only prompts for distribution by cost center and we do not have the option to selected processing against other account assignment e.g. internal order or network. the Cost center is coming as gray.What i am expecting that as in known account assignment it asks for a drop down and user can select cost center or order the same should happened with unknown account assignment. we have not implemented any badi for the same.
    please help me out. <b><u>Is this a standard behavior of shop with limit order for unknown account assignment where it prompts for cost center only or do i need to implement any badi.</u></b>

    Hi
    <b>Related links/ SAP OSS Notes to check out -></b>
    Note 861889 - Limitations on limit and service PO's in case of ECS
    Note 1046593 - Limit PO - Unable to delete and create new item
    Note 966323 - Service Item: Not able to create PO in ERP backend
    Note 969077 - LIMIT:SC with Account Assignment Unknown and IR_IND checked
    Note 1000184 - Account assignment error when document transfer to back end
    Note 1052892 - Account Assignment not visible for Limit Shopping Cart
    Note 933618 - Multiple account assignments for limit item are lost
    Re: Limit PO(Item category D instead of B)
    SE 518 No account assignment exists for service li ne 0000000000
    Creating SC with Dummy Account Assignment
    Re: Account assignment on SRM
    Re: Problem on account assignment
    Re: Account details not coming while creating a Shopping Cart with Limit Item
    LIMIT SC
    <u>Other related details -></u>
    Use Screen variants (Transaction - SHD0) to change item overview and search result screens.
    BADI - There is one BADI to hide/show some SC item creation links, there is one BADI to control screen details of PO, CTR... but not SC (and not external screens).
    So, as usual, identify the template and change the HTML code in SE80.
    To implement a more complex logic, like the default check box, change the ABAP code (usually in the PBO), if required.
    Do let me know.
    Regards
    - Atul

  • Problem with BP. Assignment: Business partner person to user not unique

    I have a problem with a user. They have no BP assigned in PPOSA_BBP. We have found a BP in transaction BP.
    When we try the BBP_BP_OM_INTEGRATE the message BBP_UM_UI048 appear" Assignment: Business partner person to user not unique" .
    Any idea about how solve this??
    Best regards
    Jorge

    Hi
    Which SAP version are you using ?
    The user needs to be attached to the Org Plan. (PPOMA_BBP)
    Have you maintained the Contact person for this USer in the Org Plan. (PPOMA_BBP) ?
    Please check the consitency of this BP as well.
    Have you read the documenattion of the Transaction -> BBP_BP_OM_INTEGRATE ?
    If no, here it is..
    Transaction -> BBP_BP_OM_INTEGRATE
    Short text
    Object Synchronization and Repair
    Purpose
    This report enables you to run a consistency check for the integration of HR Master Data and Business Partner data. If not all data exists for the business partner, you can first synchronize data. When synchronization is run for organizational units, the basic data (name, description) and the address data is included; when synchronization is run for central persons, bank information is included in addition to the basic data and address data.
    Prerequisites
    To be able to run this report, integration between Organizational Management and SAP Business Partner must be active.
    Features
    This section contains information about the functions you can use to select and output data.
    Selection
    The following options enable you to restrict the selection of objects:
    Central Person
    In addition to selecting central persons created during integration between HR Master Data and Business Partner data, you can also select central persons who have been created locally. However, central persons created locally are not checked for consistency.
    Employee (object type P)
    This selection option is only available in HR systems. The corresponding central person is displayed together with the person. Both objects are kept consistent in the Basic Data, Address, and Bank Data columns.
    Positions
    Business Partners (Employee role)
    Users
    Organizational Unit(s)
    You can specify specific organizational units for the selection.
    Business Partner (Organizational Unit role)
    Note:
    The selection objects Position, Business Partner (Employee role), User, and Business Partner (Organizational Unit role) are only available if an implementation of BAdI HRALX_HRALXSYNC_BADI exists.
    Branch as of Organizational Unit
    This option enables you to select all objects in the structure for one or more organizational units. You can also restrict selection according to one of the following object types:
    Central Persons Only
    Employees Only
    Positions Only
    Business Partners Only (Employee role)
    Users Only
    Organizational Units Only
    Business Partners Only (Organizational Unit role)
    Include All Object Types
    Changes Since
    All organizational units and central persons for which changes have been made since the last time all objects were synchronized are read. When all objects have been synchronized successfully, a new change date is set.
    Note:
    If a selection has been made but the relevant input field remains blank, all objects of a particular object type are read from the database. This condition can lead to a long runtime, therefore, SAP recommends you also enter a restriction.
    Output
    The organizational units and central persons that have been found are displayed in a list that includes status data.
    To facilitate navigation, a hierarchical tree structure is displayed on the left-hand side of the object list. The branches are sorted according to the type of action that is to be executed.
    If an implementation of BAdI HRALX_HRALXSYNC_BADI exists, checks from this BAdI are executed in the External Checks branch.
    If you double-click on the folder icon in the navigation tree, all objects are displayed in the list.
    Note:
    Meaning of status display for data in the Basic Data, Address, and Bank Data columns:
    Icon Message Text Meaning
    Green traffic light Business partner does not need to be synchronized with HR object data All business partner data is consistent with HR object data.
    Yellow traffic light Business partner does need to be synchronized with HR object data Business partner exists. The business partner data is not consistent with the HR object data.
    Red traffic light Object data is new and must first be created for the business partner The business partner does not yet exist or the the business partner data is incomplete.
    No traffic light Object type does not include this type of data Check type is not relevant for this object.
    Activities
    To integrate business partners or to repair selected objects, you must select the relevant lines in the object list and choose Execute. Any errors that occur are displayed after synchronization.
    Hope this will help.
    Please reward suitable points, incase it suits your requirements.
    Regards
    - Atul

  • Problems with multi-account assignment in batch-input program

    Hi everybody!
    I'll create purchase orders with multi-account assignment via batch input.
    When processing dynpro SAPMM06E 0113 I get the message:
    "Batch-Input data for dynpro SAPMM06E 0113 are not available".
    But all data are already filled in the accounting fields. 
    There is no way to go back to the position overview.
    Here you can see the batch input coding of the multi-account assingment:
         PERFORM dynpro USING: 'X' 'SAPMM06E'        '0113',
                                ' ' 'BDC_CURSOR'      'EKKN-TWRKZ',
                                ' ' 'BDC_OKCODE'      '/00',
                                ' ' 'EKPO-WEPOS'      'X',
                                ' ' 'EKPO-WEUNB'      'X',
                                ' ' 'EKPO-VRTKZ'      wa_ekko_ekpo-vrtkz,
                                ' ' 'EKPO-TWRKZ'      wa_ekko_ekpo-twrkz.
          PERFORM dynpro USING: ' ' 'BDC_CURSOR'      'EKKN-ANLN1(14)',
                                ' ' 'BDC_OKCODE'      '/00',
                                ' ' 'EKPO-WEPOS'      'X',
                                ' ' 'EKPO-WEUNB'      'X',
                                ' ' 'RM06E-MKNTM(14)'  ekkn_menge2,
                                ' ' 'EKKN-ANLN1(14)'   wa_ekko_ekpo-anln1,
                                ' ' 'EKKN-ABLAD(14)'   wa_ekko_ekpo-ablad,
                                ' ' 'EKKN-WEMPF(14)'   wa_ekko_ekpo-wempf.
                               ' ' 'BDC_SUBSCR'      'SAPLKACB'.
    *(this is repeated for every accounting position)
         PERFORM dynpro USING: ' ' 'BDC_CURSOR'      'EKPO-VRTKZ',
                               ' ' 'BDC_OKCODE'      '=AB',
                               ' ' 'EKPO-WEPOS'      'X',
                               ' ' 'EKPO-WEUNB'      'X'.
    Regards,
    Anke
    Message was edited by:
            Anke Chittka

    Hi,
          1 .First record properly depen upon ur requirment,
          2. Test ur recorded code
          3. Note all OK-Code ( when u press any button) * this is important
          4. After that split ur recorded coding dep ur requirment (if u know all OK-Code u can split the recorded coding)
          5. call ur splided coding in ur prg.
    i am having coding for PO but this is Dep my requirment

  • Problems with client site assignment

    Hello,
    previously I did not have problems with clients on my test computers, both have WinXP SP3. I am testing migration scenarios. One computer is virtual, one is real computer. After successful migration to Win7, I decided to make another test and changed state
    of computers back to with WinXP installed, rejoined to domain, removed from SCCM, discovered again. And I pushed agent installation. Now both computers have problems, I see following in the LocationServices.log: "Failed to verify message. Sending MP [SCCMserver]
    not in cached MPlist".
    But agent was installed on both, has status Yes in the console, but Software Center is not installed.
    Please help.

    Hi,
    I did not find errors in the end of ccmsetup.log:
    File C:\WINDOWS\ccmsetup\{4D87A80B-6971-43EF-A59F-8088D214378A}\client.msi installation succeeded.
    Successfully deleted the ccmsetup service
    A Fallback Status Point has not been specified.  Message with STATEID='400' will not be sent.
    Deleted file C:\WINDOWS\ccmsetup\ccmsetup.xml
    CcmSetup is exiting with return code 0
    But across the log some errors:
    MSI: Action 16:10:48: SmsGenerateFailureMIF. 
    MSI: Action 16:10:51: CcmRegisterEndpointRollback. In the event of a failed installation, this action rolls back the changes from CcmRegisterEndpoint.

  • Java Problems with web access/Oracle

    I have a new problem I'm wondering if anyone has encountered. I use my G5 PPC to make input into a Government data base. It's been working for a couple of months (since I took on the assignment) but all of a sudden they started to make little 'fixes'. The result of which is that today I couldn't access it at all due to Java incompatibilities. Java 5.0 is being discontinued, so I tried downloading Java 6.0 from Apple and had too small a file, so I went to Sun and downloaded their version.
    Now when I try to sign on, I get the same "NOTICE...Updated 08/13/2009 at 1:50PM EST...
    If you receive an error message, "WEB CLIENT IS TOO OLD",
    please follow the instructions in the pink box below for Internet Users (Java and Jinitiator Users). "
    I dumped the cache as instructed in the pink box, no help. Can't find any Java receipts to delete. I have JarLauncher.app and Java Web Start.app both dated today in Core Services and I seem to have Java in three other places in the system folder. One is in the System>Library>Java>Extensions; One contains CodeResources, JavaScriptCore, Resources (all with todays date, but are all alias' and there is also a Versions folder, all of which seem to be Adobe, and the there are the following files found in the Frameworks folder, most appear to be alias' with the exception of the JavaVM which is 260 KB and the others with date and content noted below:
    JavaEmbedding.framework
    CodeResources
    JavaEmbedding
    Resources
    Versions
    JavaFrameEmbedding.framework
    CodeResources
    Headers
    JavaFrameEmbedding
    Resources
    Versions
    A
    Current
    JavaScriptCore.framework
    CodeResources
    JavaScriptCore
    Resources
    Versions
    A
    Current
    JavaVM.framework
    Classes
    CodeResources
    Commands
    Frameworks
    Headers
    Home
    JavaVM
    Libraries
    Resources
    Versions
    1.3
    1.3.1
    1.4
    1.4.1
    1.4.2
    1.5 {dated today} empty
    1.5.0 {dated Jan 14, 2009} Contains .jar files dated 29 May 2009
    1.6 (dated today} empty
    1.6.0 [this file is dated Jan 14, 2009 and does contain .jar files dated 27 May 2009-why older than 1.5.0?
    A dated today
    CodeResources 3 Apr 2009
    Commands - contains records dated 25 May 2009
    Frameworks - dated today
    Headers -dated today
    JavaVM - dated 3 Apr 2009
    Resources - dated today with mixed date contents
    Current - dated today 4KB alias
    CurrentJDK - dated today 4KB alias
    If anyone can point me in the right direction, I'd be really grateful. Unfortunately my contacts who are responsible for the database are all PC folks and don't have ready answers.

    Since you do have an Intel machine, you have one other option. You can try SoyLatte, which is a port of BSD Java for the Mac. It will run using X Windows instead of the Mac interface, so it won't be very pretty. There is no guarantee it will work either. Once you install it, you will have to go back in to Applications/Utilities/Java Preferences and set your default Java version to be this new version. Then, try the app again.
    I'll refrain from making the comments that I really want to make about Java. I guess it is a moot point anyway. With Sun going away I predict Java will follow. It will take a few years to flush Java out of IT's veins though. In the meantime, you may have to follow Little Saint's suggestion of VMWare/Parallels with Windows to run your Java app.

  • Adobe Interactive forms & WebDynpro for java problem with IE7 and IE8

    I have Interactive form ui-element in WebDynpro for java (ver. 7 SP 10) application. It works fine with IE6, but in IE7 (or IE8) it doesn't show that ui-element at all. We have tried to change IE7 security & advanced settings, but we have not made any progress. We have also tried to install/uninstall different Adobe reader versions etc.

    I know a little more about the problem now. After viewing the XML source I change the property of the inputfield.
    It was like this:
                <field name="verdipers_felt" y="130.7001mm" x="180.1801mm" w="101.6004mm" h="44.4501mm" locale="no_NO" access="ReadOnly">
    but i changed the access to be nonInteractive
                <field name="verdipers_felt" y="130.7001mm" x="180.1801mm" w="101.6004mm" h="44.4501mm" locale="no_NO" access="nonInteractive">
    now view2 shows the linebreak as in view1... Buut! when im going back to view1 from view2, the linebreaks gets converted into spaces
    thats pretty wierd, aint it?

  • Forte for JAVA: Problems with break points

    Dear all,
    I have the following problem:
    When setting breaks point within the code of my web application (servlets and JSP) the debugger does not seem to be able to find them and to stop where I would it to :o(
    When approching a portion of code that I know have a break point, I get the following message in the debugger window->
    Connecting to localhost.localdomain:11555
    Connection established
    Breakpoint reached at line ? in class org.corproware.strutsrelated.listener.DBPoolListener by thread main.
    Note the interrogation mark (?) instead of a valid line number.
    It looks like I have the same poroblem with a simple java "HelloWorld"
    Is their something I don't get or is it a known problem?
    Many thanks!

    Sorry mate, wrong forum. You shoud try Sun ONE Studio Forum isntead of this one. It is for UDS (Formerly known as Forte)

  • Java Problem with Web Application

    Hi Experts
    I have a new poblem of connexion with my tools ( Web A
    In fact when I execute my template, I have this error of communication:
    ERROR JAVA : INCOMING CALL IS NOT AUTORIZED
    I do a lot of thing like :
    Create RFC Destination in J2EE Engine.
    Create RFC Destination for the Portal.
    Maintain Portal Server Settings for the Portal
    Maintain Single Sign-On in the BI System
    Export BI Certificate to the BI System.
    Import BW Certificate to the Portal.
    Create BI System in the Portal.
    Configure User Management in the Portal
    Export Portal Certificate to the Portal
    Importing the Portal Certificate to the J2EE Engine
    Import Portal Certificate to BI System
    Set up Repository Manager for BI Documents and BI Metadata
    Maintain User Assignment in the Portal.
    Import SAP Basis Plug-In to BI System.
    Thanks

    Let's take this one step at a time.
    1. You have successfully configured ABAP/Java communication using template installer? See note 917590.
    2. Did you assign the portal user appropriate portal roles?
    3. Can you start a web query from 7.0 query designer?

  • Problem with DHCP self-assigned IP number

    Hi
    I have just purchased a 24" iMac running 10.5.3 it is on my home network with a pb12 (10.3.9), a mini (10.4.11) and a lacie nas drive all connected via a router to my broadband modem. The IP set up I'm using is 192.168.x.x on 255.255.255.0. The modem is set up as a DHCP server to give out addresses starting with 192.168.1.3 and so forth. All my original machines work fine with this system, but the iMac when it turns on it self assigns itself 169.254.x.x on 255.255.0.0 and thus won't play with the other computers of the internet. Even if I set the settings to manual and type in 192.168.1.8 on 255.255.255.0 with the router at 193.168.1.1 it still won't connect to the network.
    Does anyone have any thoughts on this problem?
    thanks for any help in advance.

    I have just noticed that when the imac is restarted it self assigns itself 169.254.x.x on 255.255.0.0 if I then talk out the network cable and click "renew DHCP Lease" a couple of times until the fields are blank, then plug back the cable and click "renew DHCP Lease" I then do get a 192.168.x.x on 255.255.255.0 setting?
    This works around the problem but doesn't solve it.
    Just did a second restart and this time is correctly assigned a 192.168.x.x IP address.
    On the third restart it is back to a 169.254.x.x IP number!!!
    Message was edited by: think.different

  • Java problem with opera 9.52 and konqueror-kde4

    I cannot get java working neither under opera neither under konqueror.:/
    For opera, I followed the instructions from this site: http://www.opera.com/support/search/view/459/ but the problem that each I start opera, java is not enabled.
    Under konqueror, I tried to give the right path in the java configuration of the browser but it does not seem to work (and it worked well under kde3, with the same path to java)
    Anyone any idea?

    True, same here ! I just uninstalled kdemod and went back to firefox and xfce4. This kde 4 is a bucket of s**t. They'd better get their act together if they want to make a difference.

  • [JAVA] problems with java and mysql

    Hi, i have already installed php + mysql and work's them fine, but i want to install java + mysql. I have downloaded eclipse and installed its, that's ok. I have download tomcat and, that's ok. I have download module jconnector and have copied the file .jar in the java home and set classpath. Run and compiled this source that's ok. At runtime the program ask: Impossible connection at the database, why ? It's the source of program:
    [JAVA]
    import java.sql.*;
    public class connessione {
    private String nomeDB; // Nome del Database a cui connettersi
    private String nomeUtente; // Nome utente utilizzato per la connessione al Database
    private String pwdUtente; // Password usata per la connessione al Database
    private String errore; // Raccoglie informazioni riguardo l'ultima eccezione sollevata
    private Connection db; // La connessione col Database
    private boolean connesso; // Flag che indica se la connessione � attiva o meno
    public connessione(String nomeDB) { this(nomeDB, "", ""); }
    public connessione(String nomeDB, String nomeUtente, String pwdUtente) {
    this.nomeDB = nomeDB;
    this.nomeUtente = nomeUtente;
    this.pwdUtente = pwdUtente;
    connesso = false;
    errore = "";
    // Apre la connessione con il Database
    public boolean connetti() {
    connesso = false;
    try {
    // Carico il driver JDBC per la connessione con il database MySQL
    Class.forName("com.mysql.jdbc.Driver");
    // Controllo che il nome del Database non sia nulla
    if (!nomeDB.equals("")) {
    // Controllo se il nome utente va usato o meno per la connessione
    if (nomeUtente.equals("")) {
    // La connessione non richiede nome utente e password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    } else {
    // La connessione richiede nome utente, controllo se necessita anche della password
    if (pwdUtente.equals("")) {
    // La connessione non necessita di password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente);
    } else {
    // La connessione necessita della password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente + "&password=" + pwdUtente);
    // La connessione � avvenuta con successo
    connesso = true;
    } else {
    System.out.println("Manca il nome del database!!");
    System.out.println("Scrivere il nome del database da utilizzare all'interno del file \"config.xml\"");
    System.exit(0);
    } catch (Exception e) { errore = e.getMessage(); }
    return connesso;
    public static void main(String [] args) {
    connessione a=new connessione("asta","root","");
    if(a.connetti())
    System.out.println("Connessione al database riuscita");
    else
    System.out.println("Connessione al database non riuscita");
    [JAVA]

    With this line I always pass the username and password also:
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB, useName, Password);
    Make sure you create your users in MySQL with the correct permissions

  • WD Java: Problem with Model out of other DC

    Hi, all!
    I' ve got 2 WD Development Components: One is hosting an Adaptive RFC-Model, the other one my UI. I put the model into its DCs Public Part and declared it as Child DC of the other one.
    After successfully building & deploying both DCs, I receive the following error:
    java.lang.NullPointerException
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:78)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getDataNode(MappedNodeInfo.java:199)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getStructureType(MappedNodeInfo.java:108)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.getStructureType(MappedNodeInfo.java:109)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initStructureType(NodeInfo.java:688)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.initAfterCompletedMapping(NodeInfo.java:676)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:83)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.initMapping(MappingInfo.java:121)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:117)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.doInit(MappedNodeInfo.java:207)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:654)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getCustomControllerInternal(Component.java:436)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:374)
         at com.sap.tc.webdynpro.progmodel.controller.Component.getMappableContext(Component.java:403)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.getDataNode(MappingInfo.java:79)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.initMapping(MappingInfo.java:121)
         at com.sap.tc.webdynpro.progmodel.context.MappingInfo.init(MappingInfo.java:117)
         at com.sap.tc.webdynpro.progmodel.context.MappedNodeInfo.doInit(MappedNodeInfo.java:207)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:654)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.init(NodeInfo.java:657)
         at com.sap.tc.webdynpro.progmodel.context.Context.init(Context.java:40)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:199)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:347)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:370)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:608)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Following some recommendations I already created a "Dummy"-WD Component with a "do nothing"-method in the Model-DC which I then call in the UI-DCs wdDoInit() to instantiate the model, but without any success.
    Has anybody got an idea?
    Thanks a lot in advance!
    Regards,
    Thomas

    Hi, Maksim!
    Thank you very much for your answer!
    Yes, it' s the full exception chain. Could you perhaps tell me where to start the error-search?
    Regards,
    Thomas

Maybe you are looking for

  • Macbook pro very slow few weeks after Mavericks update

    Hi, Please I am in need of assistance. I have noticed some significant performance degradation after my OS upgrade. Slower system, spinning wheels, hanging and once crashing and restarting. I used to be able to run many apps simultaneously while zipp

  • Adobe Photoshop CS6 Extended Student and Teacher Edition

    My daughter just took a photography class at her H.S. and used Photoshop in that class.  How close would anybody guess that Photoshop CS6 Extended Student and Teacher Edition is to what she used.  I don't know the version of what she used.....

  • How Can I Make a Text File that Lists Files in a Finder Folder?

    I would like to email lists of files in my various Finder folders. I have Mac OS X (10.4.6). Finder works nicely, but I cannot figure out how to save a list of file names. Can I get advice? Thank you.

  • PO Approval fundamentals help needed

    Hi friends I have some very basic query regarding Purchase order cancellation and approval process in Oracle 11i (11.5.10.2). pls consider the followings *1)* is it possible for a PO where its Approval Status = In Process while its closure status = C

  • Guest Account. Web Only??

    Hi How do I activate the guest account in Mountain Lion so that it is web only? Thanks, Paul