数据库建表为什么一直不成功

gorgeous--youth 发布于 2015/07/25 15:17
阅读 671
收藏 0
 <delegator name="default" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" distributed-cache-clear-enabled="false">
        <!--  <group-map group-name="org.ofbiz" datasource-name="localderby"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/>-->
        <group-map group-name="org.ofbiz" datasource-name="localmysql"/> 
        <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>        <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>  
        <!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/> -->
    </delegator>
    <delegator name="default-no-eca" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main" entity-eca-enabled="false" distributed-cache-clear-enabled="false">
        <!-- <group-map group-name="org.ofbiz" datasource-name="localderby"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/> -->
        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>
        <!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/>  -->
    </delegator>


    <!-- be sure that your default delegator (or the one you use) uses the same datasource for test. You must run "ant load-demo" before running "ant run-tests" -->
    <delegator name="test" entity-model-reader="main" entity-group-reader="main" entity-eca-reader="main">
        <!-- <group-map group-name="org.ofbiz" datasource-name="localderby"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localderbyolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localderbytenant"/> -->
        <group-map group-name="org.ofbiz" datasource-name="localmysql"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localmysqlolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localmysqltenant"/>
        <!-- <group-map group-name="org.ofbiz" datasource-name="localpostnew"/>
        <group-map group-name="org.ofbiz.olap" datasource-name="localpostolap"/>
        <group-map group-name="org.ofbiz.tenant" datasource-name="localposttenant"/>  -->

    </delegator>

<datasource name="localmysql"
            helper-class="org.ofbiz.entity.datasource.GenericHelperDAO"
            field-type-name="mysql"
            check-on-start="true"
            add-missing-on-start="true"
            check-pks-on-start="false"
            use-foreign-keys="true"
            join-style="ansi-no-parenthesis"
            alias-view-columns="false"
            drop-fk-use-foreign-key-keyword="true"
            table-type="InnoDB"
            character-set="latin1"
            collate="latin1_general_cs">
        <read-data reader-name="tenant"/>
        <read-data reader-name="seed"/>
        <read-data reader-name="seed-initial"/>
        <read-data reader-name="demo"/>
        <read-data reader-name="ext"/>
        <read-data reader-name="ext-test"/>
        <read-data reader-name="ext-demo"/>
        <inline-jdbc
                jdbc-driver="com.mysql.jdbc.Driver"
                jdbc-uri="jdbc:mysql://localhost:3306/ofbiz?autoReconnect=true"
                jdbc-username="root"
                jdbc-password=""
                isolation-level="ReadCommitted"
                pool-minsize="2"
                pool-maxsize="250"
                time-between-eviction-runs-millis="600000"/><!-- Please note that at least one person has experienced a problem with this value with MySQL
                and had to set it to -1 in order to avoid this issue.
                For more look at http://markmail.org/thread/5sivpykv7xkl66px and http://commons.apache.org/dbcp/configuration.html-->
        <!-- <jndi-jdbc jndi-server-name="localjndi" jndi-name="java:/MySqlDataSource" isolation-level="Serializable"/> -->
    </datasource>还有两个也改了。并且还建了上面对应的三个数据库
该改的都已经改了,但是结果出现了下面的错误。

 [java] java.util.concurrent.ExecutionException: java.lang.NullPointerException
     [java] at java.util.concurrent.FutureTask.report(Unknown Source) ~[?:1.7.0_45]
     [java] at java.util.concurrent.FutureTask.get(Unknown Source) ~[?:1.7.0_45]
     [java] at org.ofbiz.base.concurrent.ExecutionPool.getAllFutures(ExecutionPool.java:85) [ofbiz-base.jar:?]
     [java] at org.ofbiz.entity.GenericDelegator.<init>(GenericDelegator.java:253) [ofbiz-entity-test.jar:?]
     [java] at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:33) [ofbiz-entity-test.jar:?]
     [java] at org.ofbiz.entity.DelegatorFactoryImpl.getInstance(DelegatorFactoryImpl.java:25) [ofbiz-entity-test.jar:?]
     [java] at org.ofbiz.base.util.UtilObject.getObjectFromFactory(UtilObject.java:200) [ofbiz-base.jar:?]
     [java] at org.ofbiz.entity.DelegatorFactory.getDelegator(DelegatorFactory.java:51) [ofbiz-entity-test.jar:?]
     [java] at org.ofbiz.entityext.data.EntityDataLoadContainer.loadContainer(EntityDataLoadContainer.java:274) [ofbiz-entityext.jar:?]
     [java] at org.ofbiz.entityext.data.EntityDataLoadContainer.start(EntityDataLoadContainer.java:238) [ofbiz-entityext.jar:?]
     [java] at org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:235) [ofbiz-base.jar:?]
     [java] at org.ofbiz.base.start.Start.startStartLoaders(Start.java:353) [ofbiz.jar:?]
     [java] at org.ofbiz.base.start.Start.start(Start.java:379) [ofbiz.jar:?]
     [java] at org.ofbiz.base.start.Start.main(Start.java:135) [ofbiz.jar:?]
     [java] Caused by: java.lang.NullPointerException

请问是怎么回事?


加载中
0
wangxi得
wangxi得
不能用 算了
g
gorgeous--youth
那要怎么搞?
返回顶部
顶部