facebook

Enterprise Hibernate web on JBoss reqested

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #334745 Reply

    amir55
    Participant

    hi dear staff

    good day for all

    I just like to find a tutorial using myeclipse for spring for an enterprise example using hibernate not ejb but unfortunately not found even with latest full subscription with MYEclipse for Spring IDE.

    take care and a good luck in fast response

    Amir

    #334746 Reply

    Amir,

    The tutorials are just to help you get started and you should be able to get it working with minor changes. The sample applications that are given in tutorials will work after deploying on JBoss also.

    For latest tutorial on Hibernate, please refer the tutorials at menu Help > Help Contents > MyEclipse Learning center > Developing JPA,Hibernate & Spring Applications > Tutorials.

    Let us know if you see any issues.

    #334750 Reply

    amir55
    Participant

    hi dear sir

    The minor changes you have advised to make is the confusion to me for months. each change has its errors.

    So If one of your professional can make it for me even just the files without the java.

    Here is my last changes if you can kindly amend slightly of three projects

    1 – DeploymentHibernateService project has next two folders

    1.1 lib

    1.2 META-INF of two files
    1.2.1 application.xml

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <application xmlns=”http://java.sun.com/xml/ns/javaee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”5″ xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd”&gt;
    <display-name>DeploymentHibernateService</display-name>
    <module id=”myeclipse.1344806322781″>
    <web>
    <web-uri>DeploymentHibernateServiceWeb.war</web-uri>
    <context-root>/DeploymentHibernateServiceWeb</context-root>
    </web>
    </module>
    </application>

    1.2.2 jboss-app.xml

    <!DOCTYPE jboss-app PUBLIC “-//JBoss//DTD J2EE Application 1.4//EN”
    http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd”&gt;
    <jboss-app>
    <module>
    <har>DeploymentHibernateService.har</har>
    </module>
    </jboss-app>

    2 – DeploymentHibernateService.har project 2 has one folder
    src

    3 – DeploymentHibernateServiceWeb project 3 has
    src
    webRoot

    the error message now wen deploying is
    server/default/deploy/DeploymentHibernateService.ear/DeploymentHibernateService.har could not be opened, does it exist?

    Also i ask where to keep the jars in what project and java in what src

    I do request you kindly to sort this out simply with my great gratitude though I hope you can implement as the ejb for your users

    Amir

    #334761 Reply

    Amir,

    Can you please answer some queries to help us investigate further :
    1) Can you please share the version details of JBoss server you are using ?
    2) Can you please mention what exactly you are looking for ? Do you want to run an Hibernate application on Jboss server ?
    3) Can you please attach here the sample project to help us investigate further ?

    #334780 Reply

    amir55
    Participant

    hi dear sir

    I am so glad of you to answer me so swift in addition to you so kind support.

    I want to run a simplest pure hibernate enterprise to mimic the one for EJB on your MyEclipse tutorial.

    I use JBosss 4.2.2 the old one but fine for me so far.

    I use Myeclipse for spring version 10.1 as a full subscriber

    All I like to run a hello world or a simple message to send to a bean.

    first I like successful deployment as the .har project is not deployed along with the main one.

    second which of the three projects must host the jars or libraries ?

    third which can have java files.

    so far my application is blank just one index.jsp file

    thanks really and have a nice time

    Attachments:
    You must be logged in to view attached files.
    #334894 Reply

    Amir,

    It looks like a development query. I suggest you cross post to Hibernate forums https://forum.hibernate.org/ or development forums like http://www.stackoverflow.com as this is a Hibernate development query.

    Hope it helps.

    #334914 Reply

    amir55
    Participant

    hi dear Pradeep

    Thanks really for attention but I do believe it is the matter of MyEclipse IDE of how it runs an enterprise hibernate as it hosts an example of EJB.

    Would EJB queries go the ejb forums and jpa or jsf or else to forums. All is required kindly one slight change as you said of how to run a blank hibernate enterprise. Forget of any other queries that I can solve later.

    I sent you my blank enterprise for you for a one line change or less but where.?

    My app does not get the .har to get deployed along with the enterprise which consists of there projects

    take care and good luck

    Amir

    #334988 Reply

    Amir,

    I have escalated it to a dev team member. They will get back to you.

    Sorry for inconvenience caused.

    #335034 Reply

    support-tony
    Keymaster

    Amir,

    I’m sorry you’re having trouble with this but your situation is not clear to us.

    Can you link to the EJB tutorial that you are trying to modify to use Hibernate? How are you trying to modify it?

    The set of projects you sent appear to be empty of any source code and do not contain any projects with Hibernate capability. Please see Pradeep’s earlier response for pointers to Hibernate help.

    MyEclipse doesn’t provide any specific support for HAR archives, which is a JBoss specific format. It is not possible to add projects to an enterprise project (EAR) that are neither Web nor EJB projects, though each of those projects may be specified to have dependencies on other Java projects by going to the Projects tab of the Configure Build Path screen. In this way, you can have dependent projects packaged with the depending project (though you will have to ensure that deployment settings are set as desired, using the Web project properties page).

    However, I’m not sure that using dependent projects will enable you to use the HAR format archive for deployment. Instead, you may need to package your projects by hand (or with a build tool like Ant, which can be run from eclipse). I suggest you ask in the JBoss forums for more support, as there will be developers there with more experience of HAR.

    #335230 Reply

    amir55
    Participant

    Hi dear sir

    1 – 1 I do appreciate your response and I gather MyEclipse does not support any hibernate enterprise in any form as with EJB Let me know if I am wrong or else please guide me on which tutorial.. I am not bothered about .har but only on hibernate enterprise.

    2 – Yes my Enterprise sent to you was blank as my question about mere deployment only.

    3 – I followed the idea of using dependencies by creating two projects webProject1 to depend of webProject12 . It is fine in java compilation.

    but my simple question is that when using any bean definition in webProject1 -like in faces-config.xml or applicationContext.xm to run my application as a web

    I get error as unknown sources of those beans. i.e Is there a way to let my xml files read webProject12 beans or utilities or some daos etc without having to duplicate all of them in webProject1. Having said that most of the java files do exist in webProject2. if I have to duplicate them then what is the point of using dependencies.?

    I simply cap my question if we can use definitions of dependencies in our xml files using myeclipse for spring IDE in the light of above

    So many thanks with my utmost gratitude.

    Take care with a nice weekend

    Amir

    #335258 Reply

    support-tony
    Keymaster

    Amir,

    I’m still not clear about what you are trying to do. It’s unusual to make a web project a dependent of another web project, since they normally run as separate web applications on the server. However, as the web project is just a special kind of Java project, you can certainly make it a dependent of another web project, though only the classes and classpath resources will be deployed with the depending web application (provided the deployment preferences are set correctly).

    If you need some common source for two web projects, I suggest creating a Java project and have the two web projects dependent upon it. I’m not sure how you will set up spring configuration files, in that case, though that is probably more a question for a development forum, rather than a myeclipse support question. However, perhaps if you can attach the two projects as you now have them, we might be able to see how they can be adjusted to work as you want.

    #335347 Reply

    amir55
    Participant

    Hi dear

    Here is attached my simplest web I call it Subordinate to import another java project called Main. The Main has a bean.HeloWorld.java which I like to access via
    The Subordinate in its faces-config.xml

    Yes I could easily put the java bean inside the Subordinate but here no need for the Main anymore. I need the Main project as I need really one source project of all java classes which I can access anyone via any new web project without the need to copy them again. The reason for that is intended that when making any changes inside the source java classes would reflect on all webs which depemd on them.

    If you have any other idea to do the job then it is fine for me. I reaffirm the idea of my question is to have one source of all java in one container to be imported so that when I make changes to anyone, those web depend ices can feel the changes. Please make changes to mine as you like to do the purpose..

    I do not mind if you use enterprise or else but not EJB as I intend the use of hibernate

    So many thanks with my utmost gratitude

    Amir

    Attachments:
    You must be logged in to view attached files.
    #335349 Reply

    support-tony
    Keymaster

    Amir,

    Thanks for the sample projects. They seem to be set up correctly. I imported the projects into my workspace and the Subbordinate project was deployed correctly to my application server – the helloWorld bean was accessed correctly. With exploded deployment, the default is to put the classes from required projects to the classes folder (under WEB-INF) in the deployed application, and that is where the HelloWorld class was placed in my system. The deployment defaults can be changed using the the preferences, either for the workspace or for individual projects (for individual projects, go to the project’s properties and then to the Web page and the Deployment tab, where there is a link to the workspace preferences).

    You can have other projects that specify Main as a required project, so it seems that you actually have this set up the way you want. However, I may not have the same workspace deployment preferences as you have. If you have the deployment of required (also called dependent) Java projects set to “Ignore”, then you need to change that to one of the other settings or set the preference for the individual depending project).

    I’m sorry if I’ve misunderstood the problem. If so, please post again.

    #335402 Reply

    amir55
    Participant

    Hi dear Tomy

    I am afraid, I went to Projects -> Properties -. MyEclipse -> Web -> deployment -> but no link to found to workspace preferences as you instructed.

    I use Myrclipse for Spring ver 10.1 full subscriber . I usually keep my files in src but in deployment the classes go to /WEB-INF

    when using the web what is required is keep the web Subordinate classes along with where the Main classes are kept so it can be reached.

    But where java projects are kept under and how to set my web to keep its classes alongside those of java project. (Main) in my case.

    I wonder if you may kindly what settings you have so you could directly run my example so faces-config.xml managed bean could access HelloWorkd.java.

    I do appreciate your clear configuration steps compilable to my IDE with great gratitude.

    Amir

    #335404 Reply

    support-tony
    Keymaster

    Amir,

    This is a screenshot of the project properties page about deployment:

    The link to the workspace deployment preferences is given as “Configure workspace settings…”

    The workspace preferences page for deployment settings is also available by going to the MyEclipse preferences pages and going to the Java Enterprise Project->Web Project page then selecting the Deployment tab, as shown in the following screenshot:

    Ensure that the either the “Use Smart Deployment” or “Jar dependent Java project output and place in ‘lib’ directory” setting is selected. You can do this in the workspace settings, if you want set the default settings for projects, or in the project properties, if you want to set it for individual properties. To enable individual project settings for deployment, you will have to deselect the “Use default workspace settings” option on the deployment page of the project properties.

    Please let us know if this helps.

Viewing 15 posts - 1 through 15 (of 23 total)
Reply To: Enterprise Hibernate web on JBoss reqested

You must be logged in to post in the forum log in