I'm working with Eclipse Indigo and the Hibernate tools/plugins (3.4.0...) by JBoss Red Hat. For the purpose of reverse engineering of Hibernate value object classes I created several console configurations with the wizard that pops up when clicking on add in the Hibernate Configurations view.
Later when I wanted to regenerate the classes, some of the configurations had dissapeared. When I wanted to add a new configuration with the name of one of the now dissapeared configurations the wizard tells me that the configuration already exists.
Since I couldn't find out where these configurations are stored I'm unable to do anything about it.
Do I have to create a new configuration with a different name?
I have the same problem and finally I found the file in this directory:
.\WORK-SPACE\.metadata\.plugins\org.eclipse.debug.core\.launches\miConsoleConfig.launch
But is better to edit from eclipse. The console configuration is only visible in Hibernate perspective under tab Hibernate Configurations next to the package explorer.
Related
If I try to activate the "JPA Facet" for my Eclipse (Juno) project and point it to a user library containing the JPA libraries (in my case OpenJPA) I get the error:
"The class 'javax.persistence.Entity' is required to be in the selected libraries."
But this class is present there!
"Solution": The JPA libraries were contained in an Eclipse project folder. If I copy it somewhere outside and create another user library with them it works perfectly (although it has exactly the same content as the one before with the libraries located in the Eclipse project!). Seems like an Eclipse bug...
Just create a user library that contains the javax.persistence... JAR in it (It is located in Eclipse/plugins) and add this library at "JPA Implementation"
I'm using Spring Tool Suite (STS). The problem I was facing is that in the default installation the M2E-WTP plugin does not include the Optional component "m2e-wtp - JPA Configurator for WTP".
So I went to Help -> Eclipse Marketplace... and searched "m2e-wtp".
Click on the Installed button and it will become Change. Click on the Change button and select the optional component "m2e-wtp - JPA Configurator for WTP". Apply changes.
This solved for me.
I've been trying to merge few different projects in to a single one in eclipse. In this attempt I've tried this following steps which causes the context path to be generated differently(incorrectly?).
Core-Problem:
Copied a dynamic web project (Maven) in eclipse and paste as a new project
(Cloned-duplicate)
Add the project to embedded Tomcat server in
eclipse.
Go to Tomcat Server project in eclipse and open server.xml
Generated < Context > tag contains the following
<Context docBase="DuplicateApp" path="App" reloadable="true" source="org.eclipse.jst.jee.server:DuplicateApp"/>
I would've expected both 'path' and 'docBase' to point to DuplicateApp, which is the name of the cloned app, however it is appearing incorrect. Is this even expected behavior?
Quite a bit of searching confirms my learning that both 'path & 'docbase' should point to the name of the web application/war file name.
Additional Information:
Eclipse Juno Java EE version installed
M2E plugin installed in Eclipse
Tomcat version 7
pom.xml did not override war name - cross checked.
After desperately refreshing to find no answer to my post, found answer to my own question after few additional hours of slogging!
There seems to be a property named 'Web Project Settings' which can be accessed via Project > properties > 'Web Project Settings' where context root can be changed. Not sure how this get populated or where it is retained just as yet. But atleast this solves my problem!
I have an Eclipse Project which is attached to a Tomcat 6 using WST. For testing reasons I need to set some context parameters to override settings in the web.xml. The following Server Options are set: "Serve without publishing" as I want to run my application right from the project and "Publish contexts to separate XML files".
Now I can find the context fragment inside .metadata.plugins\org.eclipse.wst.server.core\tmp1\Conf\catalina\localhost and change them as needed. This works for some time, but after each Eclipse restart my context fragment is replaced with a fresh generated one - without the required parameters of course.
How can I prevent Eclipse from replacing my configuration? Or is there a way to add the necessary parameters to the generated context fragment?
Certainly changing stuff in the .metadata/.../wst.server is not a good idea - those directories are completely controlled by Eclipse.
If you look in your Eclipse 'Servers' project entry, you will see server.xml and context.xml - that is the place to change things. Eclipse copies those files to that .metadata directory - IF it isn't fouled up somehow.
I'm going to try to give as much detail as possible here, pardon me if some is irrelevant.
I have two projects in eclipse. Project 1: com.myworkplace.parent, with code in the package of the same name. Project 2: com.myworkplace.child, with code in package of the same name (I moved my code to that package, from the default package, if that makes a difference). Both are located in my workspace folder and structured the way you'd expect them to be, as far as I can tell.
I've added child to the build path of parent in eclipse using Java Build Path -> Projects -> Add. Parent's .classpath file contains the entry:
<classpathentry combineaccessrules="false" kind="src" path="/com.myworkplace.child"/>
I add a reference to a com.myworkplace.child.Child class in parent, import it, compile it with no errors, run and get:
java.lang.NoClassDefFoundError: com/myworkplace/child/Child
What gives?
Edit: The parent application is an RCP app, maybe OSGI (I really don't know much about RCP and related stuff.) Some googling leads me to believe it might have something to do with this.
Since your application is an RCP app there is a difference between the eclipse classpath that is used while you are editing code and the OSGi classpath that is used at runtime. It sounds like you need to add the com.myworkplace.child plugin to the list of dependencies of the com.myworkplace.parent plugin.
Open either plugin.xml or META-INF/manifest.mf in the parent project. Eclipse should open the PDE plugin editor (a form based editor for the underlying config files). Click the Dependencies tab at the bottom and add your child plugin to the "Required Plug-ins" list on the left hand section of the form. Alternately you could add the com.myworkplace.child package to the "Imported Package" list on the right. The difference between the two is beyond the scope of this answer, but you can read about that in the eclipse docs now that you (hopefully) are moving in the right direction.
We found that even doing all the proper things in the eclipse rcp project, we were still getting such errors. The solution was to delete the application's workspace directory (by default it would store workspace settings under .eclipse, but we've tweaked our code to use another dir that is not shared with other eclipse stuff).
When we removed this dir after a rebuild, our app worked. Apparently it was storing the classpath somehow along with other settings, but we didn't investigate the exact details.
(NOTE: This applies only if you've called the IWorkbenchConfigurer.setSaveAndRestore method passing a boolean value of 'true' - which means that your application will save and restore various rcp settings after a shutdown of the application and subsequent relaunch.)
If your code is running in an application server, you need to configure the Classpath correctly for that application server.
To do that, find your Servers tab, double-click it, click Open Launch Configuration in the new tab that appears in the main editing area, click the Classpath tab and ensure the Classpath there is correct.
I just downloaded the Springsource Tool Suite, and I created a simple bean configuration file called myDefinition.xml and placed it in the root directory of the Spring Project. However, the Spring Explorer is not showing any data. I'm using eclipse 3.5 and the latest SpringSource all-in-one installation.
Also, if I specify invalid property names in the configuration file, I get no error. Autocomplete, however, is working.
Thoughts?
In the Spring Explorer tab in Eclipse, right click on your project > properties. Then go to Spring > Beans Support and select the Config Files tab. You can then select files or scan a directory and that should add them. I haven't found a way to autoscan a directory so I don't have to do this whenever I add a new spring bean file. The beans that appear in that list are stored in the .springbeans file.
Just want to add that if you want to generate a diagram of a webflow of an existing project, you have to right-click said project in Eclipses Project Explorer and "Add Spring Project Nature" by using the Spring Tools entry of the context menu.
There currently (as of 2012-04-10) seem to be problems with the Spring Explorer view when using a purely annotation driven bean definition (i.e. using Java annotations to wire everything up instead of using XML files).
There is a workaround though, by providing a minimum XML file that declares scanning for components.
http://forum.springsource.org/showthread.php?118928-Spring-Explorer-with-Java-based-Web-Container-configuration
Unfortunately, this procedure is still flawed, missing some components.
Just to add Claudio030
Make sure you have JEE perspective selected for your project, otherwise it won't show in Java perspective.