0

I've created a runnable jar and I can start it either using "java -jar abc.jar" or using a jnlp:

<?xml version="1.0" encoding="utf-8"?>
<jnlp
  spec="6.0+"
  codebase="host"
  href="abc.jnlp">
  <information>
    <title>abc</title>
    <vendor>def</vendor>
    <homepage href=""/>
    <description>def</description>
    <description kind="short">def</description>
    <icon href="images/swingset2.jpg"/>
    <icon kind="splash" href="images/splash.gif"/>
    <association mime-type="application-x/swingset2-file"  extensions="swingset2"/> 
    <shortcut online="false">
      <desktop/>
      <menu submenu="My Corporation Apps"/>
    </shortcut>
  </information>
  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-esa -Xnoclassgc"/>
    <jar href="lib/abc.jar"/>
  </resources>
  <application-desc />
</jnlp> 

However, as soon as "Persistence.createEntityManagerFactory()" is called, the application freezes when started with jnlp. The "java -jar" started application does just fine.

The last log output is: [org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:132)] - opening new JDBC connection

What could be the problem? I've tried both approaches from the same pc and even the jnlp and jars are located at the pc and not on a remote server so connecting should defenitely be possible.

Markus
  • 2,174
  • 2
  • 22
  • 37
  • 2
    While frozen, open JConsole and get a threaddump of the application. It should provide some hints on where the deadlock is. JConsole is bundled with the JDK. Look in the installation folder. – Johannes Jun 11 '12 at 09:48
  • Probably a difference in the security model between the two launch styles. I expect the outgoing TCP connection for JDBC is getting blocked. – artbristol Jun 11 '12 at 10:26

0 Answers0