-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: Hiben8ide and JGraph not found
PostPosted: Wed Aug 11, 2004 9:02 am 
Regular
Regular

Joined: Wed Nov 26, 2003 6:22 am
Posts: 76
Location: Stockholm
2.1.6, extensions 2.1.2

Using ANT

Target code:
Code:
<target name="hibern8ide" description="Run Hibern8IDE">
      <java jar="${hibernate.ext.home}/hibern8ide/hibern8ide.jar"
           fork="true"
           >
         <arg value="net.sf.hibern8ide.hibern8IDE"/>
         <classpath>
           <fileset refid="hibernate.ext"/>
           <path refid="hibernate.classpath"/>
           <path refid="driver.classpath"/>
         </classpath>
       </java>     
    </target>


Fileset declaration
Code:
<fileset id="hibernate.ext" dir="${hibernate.ext.home}/hibern8ide/lib" includes="**/*.jar"/>




hibern8ide:
[java] java.lang.NoClassDefFoundError: org/jgraph/JGraph
[java] Exception in thread "main"


I'm not alone with this problem, and I know it's a classpath problem, but JGraph is in my classpath here!! Yes, I've even opened the jgraph.jar with WinZip making sure there is a org/jgraph/JGraph.....

Any known problems with ANT and Hibern8ide in action?

Sincerely,

/C


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 11:23 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you don't show the complete stacktrace so no way to know where it actually goes wrong

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 12:18 pm 
Regular
Regular

Joined: Wed Nov 26, 2003 6:22 am
Posts: 76
Location: Stockholm
Sorry 'bout that.
Code:
Microsoft Windows 2000 [Version 5.00.2195]

C:\src\avik2>ant hibern8ide -verbose
Apache Ant version 1.6beta3 compiled on December 5 2003
Buildfile: build.xml
Detected Java version: 1.4 in: C:\jdk\j2sdk1.4.2\jre
Detected OS: Windows 2000
parsing buildfile C:\src\avik2\build.xml with URI = file:///C:/src/avik2/build.xml
Project base dir set to: C:\src\avik2
[property] Loading Environment env.
[property] Loading C:\src\build.properties
Override ignored for property java.home
dropping C:\src\avik2\build\avik\WEB-INF\lib\ant-junit.jar from path as it doesn't exist
Build sequence for target `hibern8ide' is [hibern8ide]
Complete build sequence is [hibern8ide, junit2, bootstrap, cleanWork, build, makejar, deploy, start, bootstrap_sql, chec
k_javahome, generate, schemaupdate, cleanBuild, install, stop, reload, check_tomcathome, init, cleanMappings, list, usag
e, schemaexport, junit, deploywar, , schemaexport2]

hibern8ide:
     [java] Executing 'C:\jdk\j2sdk1.4.2\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java] 'C:\jdk\hibernate-extensions-2.1.2\hibern8ide\lib\bsh-2.0b1.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide
\lib\forms-1.0.3.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide\lib\jgraph.jar;C:\jdk\hibernate-extensions-2.1.2\hiber
n8ide\lib\looks-1.1.3.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide\lib\pf-joi-full.jar;C:\jdk\hibernate-2.1.6\hibern
ate2.jar;C:\jdk\hibernate-2.1.6\lib\ant-1.5.3.jar;C:\jdk\hibernate-2.1.6\lib\ant-optional-1.5.3.jar;C:\jdk\hibernate-2.1
.6\lib\c3p0-0.8.4.5.jar;C:\jdk\hibernate-2.1.6\lib\cglib-full-2.0.2.jar;C:\jdk\hibernate-2.1.6\lib\commons-collections-2
.1.1.jar;C:\jdk\hibernate-2.1.6\lib\commons-dbcp-1.2.1.jar;C:\jdk\hibernate-2.1.6\lib\commons-lang-1.0.1.jar;C:\jdk\hibe
rnate-2.1.6\lib\commons-logging-1.0.4.jar;C:\jdk\hibernate-2.1.6\lib\commons-pool-1.2.jar;C:\jdk\hibernate-2.1.6\lib\con
current-1.3.3.jar;C:\jdk\hibernate-2.1.6\lib\connector.jar;C:\jdk\hibernate-2.1.6\lib\dom4j-1.4.jar;C:\jdk\hibernate-2.1
.6\lib\ehcache-0.9.jar;C:\jdk\hibernate-2.1.6\lib\jaas.jar;C:\jdk\hibernate-2.1.6\lib\jboss-cache.jar;C:\jdk\hibernate-2
.1.6\lib\jboss-common.jar;C:\jdk\hibernate-2.1.6\lib\jboss-jmx.jar;C:\jdk\hibernate-2.1.6\lib\jboss-system.jar;C:\jdk\hi
bernate-2.1.6\lib\jcs-1.0-dev.jar;C:\jdk\hibernate-2.1.6\lib\jdbc2_0-stdext.jar;C:\jdk\hibernate-2.1.6\lib\jgroups-2.2.3
.jar;C:\jdk\hibernate-2.1.6\lib\jta.jar;C:\jdk\hibernate-2.1.6\lib\junit-3.8.1.jar;C:\jdk\hibernate-2.1.6\lib\log4j-1.2.
8.jar;C:\jdk\hibernate-2.1.6\lib\odmg-3.0.jar;C:\jdk\hibernate-2.1.6\lib\oscache-2.0.jar;C:\jdk\hibernate-2.1.6\lib\prox
ool-0.8.3.jar;C:\jdk\hibernate-2.1.6\lib\swarmcache-1.0rc2.jar;C:\jdk\hibernate-2.1.6\lib\xalan-2.4.0.jar;C:\jdk\hiberna
te-2.1.6\lib\xerces-2.4.0.jar;C:\jdk\hibernate-2.1.6\lib\xml-apis.jar;C:\jdk\tools\hibernate-tools.jar;C:\jdk\tools\comm
ons-logging.jar;C:\jdk\tools\log4j-1.2.8.jar;C:\jdk\necessity\jdbcpool-20011114.jar;C:\jdk\necessity\jstl.jar;C:\jdk\nec
essity\mysql-connector-java-3.0.8-stable-bin.jar;C:\jdk\necessity\standard.jar'
     [java] '-jar'
     [java] 'C:\jdk\hibernate-extensions-2.1.2\hibern8ide\hibern8ide.jar'
     [java] 'net.sf.hibern8ide.hibern8IDE'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
     [java] java.lang.NoClassDefFoundError: org/jgraph/JGraph
     [java] Exception in thread "main"

     [java] Java Result: 1


/C


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 11, 2004 3:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
dude - you are using -jar AND -classpath at the same time. That is not doable ...please read the java tool docs ;)

...put ALL jar's on classpath and specify the starting class.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Hi
PostPosted: Thu Aug 12, 2004 2:46 am 
Regular
Regular

Joined: Wed Nov 26, 2003 6:22 am
Posts: 76
Location: Stockholm
Hi Max, and thanks for taking on my problem.

Changed ANT to:

Code:
<java classname="net.sf.hibern8ide.hibern8IDE"
           fork="true"
           >
         <classpath>
           <fileset refid="hibernate.ext"/>
           <path refid="hibernate.classpath"/>
           <path refid="driver.classpath"/>
           <pathelement location="${dev.home}/junit_jars/ant-junit.jar"/>
         <pathelement location="${dev.home}/junit_jars/junit-3.8.1.jar"/>
         <pathelement location="${ant.home}/lib/ant.jar"/>
         </classpath>
       </java>     
    </target>


resulted in:
Code:
C:\src\avik2>ant hibern8ide -verbose
Apache Ant version 1.6beta3 compiled on December 5 2003
Buildfile: build.xml
Detected Java version: 1.4 in: C:\jdk\j2sdk1.4.2\jre
Detected OS: Windows 2000
parsing buildfile C:\src\avik2\build.xml with URI = file:///C:/src/avik2/build.xml
Project base dir set to: C:\src\avik2
[property] Loading Environment env.
[property] Loading C:\src\build.properties
Override ignored for property java.home
dropping C:\src\avik2\build\avik\WEB-INF\lib\ant-junit.jar from path as it doesn't exist
Build sequence for target `hibern8ide' is [hibern8ide]
Complete build sequence is [hibern8ide, junit2, bootstrap, cleanWork, build, makejar, deploy, start, bootstrap_sql, chec
k_javahome, generate, schemaupdate, cleanBuild, install, stop, reload, check_tomcathome, init, cleanMappings, list, usag
e, schemaexport, junit, deploywar, , schemaexport2]

hibern8ide:
     [java] Executing 'C:\jdk\j2sdk1.4.2\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java] 'C:\jdk\hibernate-extensions-2.1.2\hibern8ide\hibern8ide.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide\li
b\bsh-2.0b1.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide\lib\forms-1.0.3.jar;C:\jdk\hibernate-extensions-2.1.2\hiber
n8ide\lib\jgraph.jar;C:\jdk\hibernate-extensions-2.1.2\hibern8ide\lib\looks-1.1.3.jar;C:\jdk\hibernate-extensions-2.1.2\
hibern8ide\lib\pf-joi-full.jar;C:\jdk\hibernate-2.1.6\hibernate2.jar;C:\jdk\hibernate-2.1.6\lib\ant-1.5.3.jar;C:\jdk\hib
ernate-2.1.6\lib\ant-optional-1.5.3.jar;C:\jdk\hibernate-2.1.6\lib\c3p0-0.8.4.5.jar;C:\jdk\hibernate-2.1.6\lib\cglib-ful
l-2.0.2.jar;C:\jdk\hibernate-2.1.6\lib\commons-collections-2.1.1.jar;C:\jdk\hibernate-2.1.6\lib\commons-dbcp-1.2.1.jar;C
:\jdk\hibernate-2.1.6\lib\commons-lang-1.0.1.jar;C:\jdk\hibernate-2.1.6\lib\commons-logging-1.0.4.jar;C:\jdk\hibernate-2
.1.6\lib\commons-pool-1.2.jar;C:\jdk\hibernate-2.1.6\lib\concurrent-1.3.3.jar;C:\jdk\hibernate-2.1.6\lib\connector.jar;C
:\jdk\hibernate-2.1.6\lib\dom4j-1.4.jar;C:\jdk\hibernate-2.1.6\lib\ehcache-0.9.jar;C:\jdk\hibernate-2.1.6\lib\jaas.jar;C
:\jdk\hibernate-2.1.6\lib\jboss-cache.jar;C:\jdk\hibernate-2.1.6\lib\jboss-common.jar;C:\jdk\hibernate-2.1.6\lib\jboss-j
mx.jar;C:\jdk\hibernate-2.1.6\lib\jboss-system.jar;C:\jdk\hibernate-2.1.6\lib\jcs-1.0-dev.jar;C:\jdk\hibernate-2.1.6\lib
\jdbc2_0-stdext.jar;C:\jdk\hibernate-2.1.6\lib\jgroups-2.2.3.jar;C:\jdk\hibernate-2.1.6\lib\jta.jar;C:\jdk\hibernate-2.1
.6\lib\junit-3.8.1.jar;C:\jdk\hibernate-2.1.6\lib\log4j-1.2.8.jar;C:\jdk\hibernate-2.1.6\lib\odmg-3.0.jar;C:\jdk\hiberna
te-2.1.6\lib\oscache-2.0.jar;C:\jdk\hibernate-2.1.6\lib\proxool-0.8.3.jar;C:\jdk\hibernate-2.1.6\lib\swarmcache-1.0rc2.j
ar;C:\jdk\hibernate-2.1.6\lib\xalan-2.4.0.jar;C:\jdk\hibernate-2.1.6\lib\xerces-2.4.0.jar;C:\jdk\hibernate-2.1.6\lib\xml
-apis.jar;C:\jdk\tools\hibernate-tools.jar;C:\jdk\tools\commons-logging.jar;C:\jdk\tools\log4j-1.2.8.jar;C:\jdk\necessit
y\jdbcpool-20011114.jar;C:\jdk\necessity\jstl.jar;C:\jdk\necessity\mysql-connector-java-3.0.8-stable-bin.jar;C:\jdk\nece
ssity\standard.jar;C:\jdk\junit_jars\ant-junit.jar;C:\jdk\junit_jars\junit-3.8.1.jar;C:\jdk\apache-ant-1.6\lib\ant.jar'
     [java] 'net.sf.hibern8ide.hibern8IDE'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
     [java] java.lang.NoClassDefFoundError: net/sf/hibern8ide/hibern8IDE
     [java] Exception in thread "main"

     [java] Java Result: 1


I'm beginning to wonder if it's at all possible invoking hibern8ide from ANT...
Do you mean I have to put all hibern8ide-relatd classes on classpath by hardcoding them into the environment variable classpath? Lot of work each time you want to change configuration....

Sincerely,

/C


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 12, 2004 3:38 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
please check your stuff twice ;)

the class you are calling named net.sf.hibernate.hibern8IDE where as the real class is named net.sf.hibernate.Hibern8IDE (a captial letter as in normal classnames)

Regarding the classpath, then there is NO difference between the classes you need for your application and what hibern8IDE need EXCEPT the extra libraries found in the lib directory of hibern8IDE....that's just a single lib/**/* to add to your classpath.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Works
PostPosted: Thu Aug 12, 2004 12:26 pm 
Regular
Regular

Joined: Wed Nov 26, 2003 6:22 am
Posts: 76
Location: Stockholm
Hmm...

We have a saying ( and you that originates from Denmark probably understands it ) "Det f


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.