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.  [ 2 posts ] 
Author Message
 Post subject: Running Hibernate through a shell script
PostPosted: Tue Oct 13, 2009 4:17 pm 
Newbie

Joined: Tue Oct 13, 2009 4:09 pm
Posts: 2
I've been assigned the task of seeing if it's worthwhile of moving some of our code to hibernate. I've been playing around with hibernate running through the Netbeans IDE with good results. My question is it possible to have a linux shell script that runs the code in the background?


Top
 Profile  
 
 Post subject: Re: Running Hibernate through a shell script
PostPosted: Tue Oct 20, 2009 11:57 am 
Newbie

Joined: Tue Oct 13, 2009 4:09 pm
Posts: 2
I have a project in Netbeans that uses hibernate. I create a linux shell script that puts the jar files in the classpath and run my main programs.

I get the following error:
jta.jar: line 1: PK: command not found
jta.jar: line 2: �%6javax/UT: No such file or directory
jta.jar: line 3: �%6javax/transaction/UT: No such file or directory
jta.jar: line 4: syntax error near unexpected token `��D'
jta.jar: line 4: `�c.(��D '
javassist.jar: line 1: PK: command not found
javassist.jar: line 2: Z�p5: command not found
javassist.jar: line 3:Y�p5��n�%META-INF/MANIFEST.MF���: No such file or directory
javassist.jar: line 4: �@F���Ґ~�lV�Q�����lF�k��gA!m��K�rM^����ƅ�V�]��Dz%��,��N+3: command not found
javassist.jar: line 5: �,�p�z�^~}A�r����M��*E���
��O64�FZiu�: No such file or directory
javassist.jar: line 5: -��ŞPK: command not found
javassist.jar: line 6: ��p5: command not found
javassist.jar: line 7: javassist/PK: No such file or directory
javassist.jar: line 9: syntax error near unexpected token `)'
javassist.jar: line 9: `w+�e2]�.ï¿½ï¿½í³›í»½ï¿½ï¿½ï¿½ï¿½ï¿½X*�{f�>y~�����ô‰¸Œ;"<pr�1��"nឈI��6��~<�EO�x��^L㙷��b΋��0��s/"�O*pv�ࡷA�t9D���7��0���B�iȘ`���▒���2���B��M���D��&^��[:h�M
�7!�U�Z3��Vr���9[��P�c��wj��,�)���Gb�&�� �▒X9B$�[�f,{
��h'
----------------------------------
StudyMastersDAO:getStudyMastersByDescription. Looking for description = ZTECH
----------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:213)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:473)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
at janus_hibernate_DAO.Janus_DAO.getSession(Janus_DAO.java:29)
at janus_hibernate_DAO.Janus_DAO.begin(Janus_DAO.java:37)
at janus_hibernate_DAO.StudyMastersDAO.getStudyMaster(StudyMastersDAO.java:85)
at janus_hibernate_DAO.StudyMastersDAO.getStudyMastersByDescription(StudyMastersDAO.java:37)
at multigen_extractor_hibernate3.Preload_ReseachSubjects.load_STUDYSITEID(Preload_ReseachSubjects.java:143)
at multigen_extractor_hibernate3.Preload_ReseachSubjects.preload_RESEARCHSUBJECTS(Preload_ReseachSubjects.java:34)
at multigen_extractor_hibernate3.Preload_ReseachSubjects.<init>(Preload_ReseachSubjects.java:24)
at multigen_extractor_hibernate3.Preload.<init>(Preload.java:26)
at multigen_extractor_hibernate3.Worker.doWork(Worker.java:42)
at multigen_extractor_hibernate3.Worker.main(Worker.java:36)
at multigen_extractor_hibernate3.Main.main(Main.java:22)
Caused by: java.lang.ClassNotFoundException: javax.transaction.Synchronization
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)



I guess it not as simple as adding the jar files to the classpath?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.