1

fxml,hibernateを使用して、 Netbeans 7.3.1でJava fx アプリケーションを作成しました。Netbeans で実行した場合、およびdistフォルダーから jar ファイルを実行した場合は正常に動作します。データベース操作は問題ありません。しかし、私はアプリをポータブルな形で別のシステムにエクスポートしたいと考えています。そこで、ツールWixInno 5を使用してネイティブ バンドルを作成しました。しかし、作成したアプリは自分のシンテムや別のシステムでは動作しません。アプリケーションの実行中に例外を表示します。データベースのIPアドレスをlocalhost、127.0.0.1、および物理IPに変更して、何度か確認しました。しかし、動作しません。私の Java バージョンはJava 7 update 40 (jdk1.7.0_40) です。

これは、エラーを示すスクリーンショットへのリンクです: http://i.imgur.com/popokh.jpg

私のbuild.xmlには含まれています

<target name="-post-jfx-deploy">
       <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
                 nativeBundles="all"
                 outdir="${basedir}/${dist.dir}" outfile="${application.title}">
          <fx:application name="${application.title}" mainClass="${javafx.main.class}"/>
          <fx:resources>
              <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
          </fx:resources>
          <fx:info title="${application.title}" vendor="${application.vendor}"/>
      </fx:deploy>          
    </target>

そして、私の休止状態のcfgファイルには含まれています

<hibernate-configuration>
  <session-factory>
    <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/sample?zeroDateTimeBehavior=convertToNull</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">root</property>

    <mapping resource="entity/Sample.hbm.xml"/>
  </session-factory>
</hibernate-configuration>

アプリケーションが独立して動作するための追加の構成はありますか??

4

1 に答える 1