Menu

WARN Message

Help
2004-01-02
2004-01-05
  • Ricardo Lopes

    Ricardo Lopes - 2004-01-02

    After doing some mayor hacks in the xml file to make it work, because version 1.1 is not very compatible with mysql jdbc connection string i get the following message in the stdout:

    12266 [main] WARN  pt.moredata.dataentry.SwingDataEntryController  - DataSource
    is null, DAO Manager will be initialiazed later.

    My xml file is the following:
    --- BEGIN OF XML FILE ---
    <?xml version="1.0" encoding="UTF-8"?>

    <dataSource id="ninja">
    <jdbc driver="com.mysql.jdbc.Driver">
    <subProtocol name="mysql">
    <hostName>//127.0.0.1</hostName>
    <port>3306/</port>
    <dataBaseName>test</dataBaseName>
    <server name="127.0.0.1">
    <property name="TRACE" value="3"/>
    <property name="TRACEFILE" value="c:/temp/trace.out"/>
    <property name="PROTOCOLTRACE" value="2"/>
    <property name="PROTOCOLTRACEFILE" value="c:/temp/ptrace.out"/>
    </server>
    </subProtocol>
    </jdbc>
    <userName>root</userName>
    <password>god</password>
    <debug>true</debug>
    </dataSource>
    --- END OF XML FILE ---

    The / in the hostname and port were used to make the connection string compatible with mysql, because oltp generated:

    jdbc:mysql:127.0.0.1:3306test

    and mysql use:

    jdbc:mysql://127.0.0.1:3306/test

    The table pj_test exists

    What could cause that WARN message ???

    And some other thing were is the code for the file ExemploPaulo ??? in the moredata-src.jar are the sources for the other classes but not for this one.

     
    • Paulo Carmo

      Paulo Carmo - 2004-01-05

      Hello,

      The class ExemploPaulo.class was included in the jar by mistake, pleas see the example pt.moredata.dataentry.DataEntryDemo insteaded.
      The warning is because the way the SwingDataEntryController constructor is called in the class ExemploPaulo. If the constructor is invoked without a DataSource object the init method displays a warning message, this can be ignored.
      The DataEntryDemo do not have this problem since the SwingDataEntry constructor is called with a DataSource object.

      The configuration file used by this example (and by the DataEntryDemo class) is a old one, there is a new configuration file (version 1.2) that will be used by the demos in release 1.0.2 of java-oltp.
      The new configuration file do not have problems with mysql because the connection string is written in a single line. There is a example in the package pt.moredata.connection called dataSource_1_2.xml. I don't know if this files are included in the jar but there is a copy in the CVS repository : http://javaoltp.moredata.pt/
      The DataEntry generated by the netbeans module already use the version 1.2 since version 0.48 i think.

      Regards,
      Paulo Carmo

       

Log in to post a comment.