- This topic has 16 replies, 2 voices, and was last updated 17 years, 4 months ago by Riyad Kalla.
-
AuthorPosts
-
chrisjMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
chrisjMemberThis message has not been recovered.
Riyad KallaMemberThis message has not been recovered.
chrisjMemberHi,
Deploying through eclipse and not my build file, as from 20/09/07.
I’ve just created many new Projects (added Struts and Hibernate to create a simple app.) in order to determine where the problem is as Myeclipse obviously can’t deploy Struts / Hibernate to OC4J without intervention.
The warnings in my original post go a long way to tell the story, when I deleted jta.jar, ojdbc14.jar from WEB_INF/lib my app basically worked. I’m going to double check, but can I suggest you try it yourself.!
Removing the these libraries seems to be affecting the hibernate side of things, which I’ll have to investigate …
At this point I’m thinking it might be worth while upgrading to the 6.0GA version, any ideas?
Chris
Riyad KallaMemberChris,
jta.jar is provided by the app server and *cannot* be deployed with your project. MYEclipse does not copy this file into your project or deploy it.Also the Oracle driver most likely needs to go into the app server’s /lib dir *if* you are using a configured data source. Again not a library MyEclipse provides.
So saying “MyEclipse cannot deploy a Hibernate/Struts project to OC4J” is misleading, it *can*, but if you go adding server libraries to the /lib dir that cause deployment problems, you are right, you can run into some brick walls along the way.
Let’s troubleshoot your Hibernate issue next that you mentioned. Can you give me some specifics? You said it’s related to the Oracle driver, how so? Are you setting up a JNDI data source in your hibernate config, or are you setting up a direct JDBC connection?
If the first, then the driver needs to go in the app server’s lib dir, if the 2nd, then you have to deploy the driver with the project.
chrisjMemberRiyad,
I took my saved simple app and listed out the contents of the war file.
04/10/2007 08:36 Page 1 C:\WORK\Java\OC4Jg\oc4j_extended_101300\j2ee\home\application-autodeploy\LibraryWebNine.war Name Path Book.class WEB-INF\classes\de\laliluna\tutorial\library\ BookListAction.class WEB-INF\classes\de\laliluna\tutorial\library\struts\action\ BookListForm.class WEB-INF\classes\de\laliluna\tutorial\library\struts\form\ SimulateDB.class WEB-INF\classes\de\laliluna\tutorial\library\ antlr.jar WEB-INF\lib\ commons-beanutils.jar WEB-INF\lib\ commons-digester.jar WEB-INF\lib\ commons-fileupload.jar WEB-INF\lib\ commons-logging.jar WEB-INF\lib\ commons-validator.jar WEB-INF\lib\ jakarta-oro.jar WEB-INF\lib\ jstl.jar WEB-INF\lib\ standard.jar WEB-INF\lib\ struts.jar WEB-INF\lib\ bookList.jsp jsp\ index.jsp index.jsp jsp\ Manifest.mf meta-inf\ ApplicationResources.properties WEB-INF\classes\de\laliluna\tutorial\library\struts\ struts-bean.tld web-inf\ struts-html.tld web-inf\ struts-logic.tld web-inf\ struts-nested.tld web-inf\ struts-tiles.tld web-inf\ struts-config.xml web-inf\ validator-rules.xml web-inf\ web.xml web-inf\ 27 file(s)
Then I went into myeclipse->add hibernate capabilities
on “Enable project for hibernate development”
I checked hibernate 3.1, myeclipse libraries, hibernate 3.1 core libraries and “add checked libraries to project build-path”.
To be honest either of the last two option produces the same result and if you click on “view and edit libraries” you’ll see why!
on “Create Hibernate XML configuration file”
I took the defaults
on “specify hibernate database connection details”
I used the oracle db driver and filled in the details, leaving “copy db driver jar(s) to project and add to buildpath?” unchecked, although this did produce a warning!
on”define sessionfactory properties”
i specified by package and checked java 1.4.I then redeployed, please bear in mind that this is ALL done through myelipse and its wizards. Here is a listing from the myeclipse generated war.
04/10/2007 08:57 Page 1 K\Java\OC4Jg\oc4j_extended_101300\j2ee\home\application-autodeploy\LibraryWebNin Name Path index.jsp bookList.jsp jsp\ index.jsp jsp\ Manifest.mf meta-inf\ struts-bean.tld web-inf\ struts-config.xml web-inf\ struts-html.tld web-inf\ struts-logic.tld web-inf\ struts-nested.tld web-inf\ struts-tiles.tld web-inf\ validator-rules.xml web-inf\ web.xml web-inf\ hibernate.cfg.xml WEB-INF\classes\ Book.class WEB-INF\classes...\library\ HibernateSessionFactory.class WEB-INF\classes...\library\ SimulateDB.class WEB-INF\classes...\library\ ApplicationResources.properties WEB-INF\classes\...\struts\ BookListAction.class WEB-INF\classes\...\action\ BookListForm.class WEB-INF\classes\de...\form\ antlr.jar WEB-INF\lib\ antlr-2.7.6rc1.jar WEB-INF\lib\ asm.jar WEB-INF\lib\ asm-attrs.jar WEB-INF\lib\ cglib-2.1.3.jar WEB-INF\lib\ commons-beanutils.jar WEB-INF\lib\ commons-collections-2.1.1.jar WEB-INF\lib\ commons-digester.jar WEB-INF\lib\ commons-fileupload.jar WEB-INF\lib\ commons-logging.jar WEB-INF\lib\ commons-logging-1.0.4.jar WEB-INF\lib\ commons-validator.jar WEB-INF\lib\ dom4j-1.6.1.jar WEB-INF\lib\ ehcache-1.1.jar WEB-INF\lib\ hibernate3.jar WEB-INF\lib\ jaas.jar WEB-INF\lib\ jakarta-oro.jar WEB-INF\lib\ jaxen-1.1-beta-7.jar WEB-INF\lib\ jdbc2_0-stdext.jar WEB-INF\lib\ jstl.jar WEB-INF\lib\ jta.jar WEB-INF\lib\ log4j-1.2.11.jar WEB-INF\lib\ standard.jar WEB-INF\lib\ struts.jar WEB-INF\lib\ xerces-2.6.2.jar WEB-INF\lib\ xml-apis.jar WEB-INF\lib\ 45 file(s)
As you can see the jta.jar has been added by myeclipse. I’m trying to do this using just myeclipse with as little intervention on my part as possible, so your sugestions are always welcome.
Chris
chrisjMemberHi,
For completeness here is the war listing when I click on the “copy jdbc driver and add to classpath” link from the hibernate 3.1 configuration screen.
04/10/2007 09:19 Page 1 K\Java\OC4Jg\oc4j_extended_101300\j2ee\home\application-autodeploy\LibraryWebNin Name Path index.jsp bookList.jsp jsp\ index.jsp jsp\ Manifest.mf meta-inf\ struts-bean.tld web-inf\ struts-config.xml web-inf\ struts-html.tld web-inf\ struts-logic.tld web-inf\ struts-nested.tld web-inf\ struts-tiles.tld web-inf\ validator-rules.xml web-inf\ web.xml web-inf\ hibernate.cfg.xml WEB-INF\classes\ Book.class WEB-INF\classes...\library\ HibernateSessionFactory.class WEB-INF\classes...\library\ SimulateDB.class WEB-INF\classes...\library\ ApplicationResources.properties WEB-INF\classes\...\struts\ BookListAction.class WEB-INF\classes\...\action\ BookListForm.class WEB-INF\classes\de...\form\ antlr.jar WEB-INF\lib\ antlr-2.7.6rc1.jar WEB-INF\lib\ asm.jar WEB-INF\lib\ asm-attrs.jar WEB-INF\lib\ cglib-2.1.3.jar WEB-INF\lib\ commons-beanutils.jar WEB-INF\lib\ commons-collections-2.1.1.jar WEB-INF\lib\ commons-digester.jar WEB-INF\lib\ commons-fileupload.jar WEB-INF\lib\ commons-logging.jar WEB-INF\lib\ commons-logging-1.0.4.jar WEB-INF\lib\ commons-validator.jar WEB-INF\lib\ dom4j-1.6.1.jar WEB-INF\lib\ ehcache-1.1.jar WEB-INF\lib\ hibernate3.jar WEB-INF\lib\ jaas.jar WEB-INF\lib\ jakarta-oro.jar WEB-INF\lib\ jaxen-1.1-beta-7.jar WEB-INF\lib\ jdbc2_0-stdext.jar WEB-INF\lib\ jstl.jar WEB-INF\lib\ jta.jar WEB-INF\lib\ log4j-1.2.11.jar WEB-INF\lib\ ojdbc14.jar WEB-INF\lib\ standard.jar WEB-INF\lib\ struts.jar WEB-INF\lib\ xerces-2.6.2.jar WEB-INF\lib\ xml-apis.jar WEB-INF\lib\ 46 file(s)
As you can see the ojdbc14.jar file is in the web-inf/lib, is this what you meant when you said
the Oracle driver most likely needs to go into the app server’s /lib dir
Carrying on with your questions, I’m setting up a direct JDBC connection, has myeclipse deployed the jar file to the correct destination?
Chris
Chris
-
AuthorPosts