I use WebSphere Application Server 8.5 with Eclipse Mars 4.5.2. My problem is when I open Eclipse a migration for my server runtime appears always.
Both entries are the same?
I also have the whole project in git so I could check what has changed after migration. The interesting thing is that only the date, which is the first line from the com.ibm.ws.ast.st.migration.prefs file, has changed.
Has someone a hint how I could stop this "unnecessary" cycling migration.
For solving the problem we changed two settings:
1) in the .classpath we replaced the following classpathentry:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/WebSphere Application Server v8.5 JRE">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
with:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
2) in the org.eclipse.wst.common.project.facet.core.xml file we removed the following line:
<runtime name="WebSphere Application Server v8.5"/>
Related
I would like to implement a Custom Realm by overriding the security classes but I'm getting an error:
AppservPasswordLoginModule cannot be resolved to a type
The import com.sun.appserv cannot be resolved
I followed the steps from this tutorial: https://computingat40s.wordpress.com/how-to-create-a-custom-realm-in-glassfish-3-1-2-2/
What I did:
I created a new java project
Added a new lib folder to my project.
Copied the security.jar(also tried with security-ee.jar) from $glassfish-installation-folder\glassfish\modules to lib folder
I added this line to my .classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="lib/security.jar" />
<classpathentry kind="output" path="bin"/>
</classpath>
I also tried to add the jar to build path using Eclipse GUI
NOTES: I'm not using MAVEN, I also tried to clean the project as it was mentioned in other answers
After making this steps Eclipse throws me an arror when I want to extend MyCustomModule with AppservPasswordLoginModule:
enter image description here
UPDATE!
I found the JAR that must be added to JAVA build path: glassfish-ee-api.jar
I solved the problem by creating a new library where I copied all the JARS from $glassfish-installation-folder\glassfish\modules
Photo
I installed Eclipse 2019-06 on a new workstation and imported our team's maven project. When running the "Update Maven Project" command, for all subprojects, some of the project files are edited, whereas they are not on my current workstation (with one exception). My station runs Eclipse Oxygen 4.7.0.
Is there a way to determine why these modifications occur on this station and not on others?
Is there a way to turn off these modifications so that our projects are unified?
The modifications are the following :
In the ".classpath" file, the lines with *** at the beggining are added
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>***
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test->classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>***
</attributes>
</classpathentry>
In the ".project" file, the "RiderProjectBuilder" buildcommand is added as well as the "RiderProjectBuilder" natures
<buildCommand>
<name>org.fusesource.ide.project.RiderProjectBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.fusesource.ide.project.RiderProjectNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
In the ".settings/org.eclipse.jdt.core.prefs" file, all the following lines are added
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
The exception I mentionned earlier concerns the line "org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning" which is also added on my workstation. It seems to be replicating an exception I configured for one subproject to all other subprojects, and it is also annoying.
Eclipse 2019-06 (4.12) releases notes on Workspace compatibility
Downward workspace compatibility is not supported. A workspace created (or opened) by a product based on Eclipse 4.12 will be unusable with a product based on an earlier version of Eclipse.
While individual projects could still be usable across different versions the paragraph above states that backward compatibility is not supported, meaning issues like the one you describe are expected to happen.
To turn off any unwanted modification as much as possible it's suggested to exclude IDE specific project files from git repositories.
Another option could be to normalize the IDE version across teams, i.e. make all team members use the same version.
Have been using Gradle with Eclipse on a multi-project development effort for over two years. During that time, every once in a while (maybe after changing branches too often) Eclipse gets confused. Deleting the projects (not their contents) and re-importing fixes it every time. Typically, I have needed to do this about once every two months. No big deal! Import is done within Eclipse via the Import->Gradle Project -> build model process.
I needed to do this again recently after upgrading to the latest packages. Now compilation and execution (running Unit Tests for instance) within Eclipse works fine; but debug has lost all the inter-project dependencies. I can no longer set a breakpoint on code in Project 2 and run something from Project 1 and have the source code display. Instead, I get the "Edit Source Lookup Path" window when the breakpoint is hit.
I have Eclipse Luna Release 2, version 4.4.2, Spring IDE 3.6.4.201503051146-RELEASE, and Gradle IDE 3.6.4.201503050952-RELEASE. My gradle wrapper is version 2.3.6, and I am on a Mac OS X 10.10.3
The previous .classpath files looked like:
<classpath>
<classpathentry kind="src" output="build/classes/main" path="src/generated/java"/>
<classpathentry kind="src" output="build/classes/main" path="src/main/java"/>
<classpathentry kind="src" output="build/resources/main" path="src/main/resources"/>
<classpathentry kind="src" output="build/classes/test" path="src/test/java"/>
<classpathentry kind="src" output="build/resources/test" path="src/test/resources"/>
<classpathentry exported="true" kind="src" path="/proj1.main"/>
<classpathentry exported="true" kind="src" path="/proj2.main"/>
<classpathentry exported="true" kind="src" path="/proj3.main"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry exported="true" kind="con" path="org.springsource.ide.eclipse.gradle.classpathcontainer"/>
<classpathentry kind="output" path="target"/>
which has three dependent projects then show up on the Java Build Path, Projects tab. Now, none show up but the projects appear under Gradle Dependencies on the Libraries tab (so compiling and running still works).
I imported the same way I have for over two years, so that is not it. Additionally, there are some new options on the Preferences->Gradle tab. I tried with "Remap Jars to Gradle Projects" and "Use Custom Tooling Model).
Does anyone know how to make it work the way it has been working? I really do not want to generate the eclipse files from the command line.
try cleanEclipse and also check the .bin directory and see if the class files are there as this is how gradle plugin use to debug.
Hope that helps.
I have an eclipse project with several jars for JPA / Hibernate. One of tham contains a META-INF/persistence.xml and I want to override that by defining my own persistence.xml. So I tried using my persistence.xml in src/persistence.xml also src/META-INF/persistence.xml but everytime it seems jar/META-INF/persistence.xml gets picked up.
I also tried editing .classpath file of eclipse projects and moved up classpathentry path="bin" higher up than the library included but still its not picking up my persistence.xml
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/rules"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="DROOLS/Drools"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/drools"/>
</classpath>
In the tutorial I read:
You will need to override these
defaults if you want to change them,
by adding your own persistence.xml in
your classpath, preceding the default
one in drools-persistence-jpa.jar
So I tried using my persistence.xml in src/persistence.xml also src/META-INF/persistence.xml but every time it seems jar/META-INF/persistence.xml gets picked up.
The persistence.xml should be located under META-INF/persistence.xml so the first attempt won't work. And when I look at your .classpath file, I don't see src as source path so the second attempt won't work either.
Try src/main/java/META-INF/persistence.xml instead.
Actually, your project layout really looks like a Maven layout and with Maven, resources typically go to src/main/resources or src/test/resources. But since you didn't mention what tutorial you're following, I can't confirm if this applies here.
Anyway, my suggestion should work.
Problem overview:
When using Eclipse Ganymede with the Web Tools Platform the project gets dependent on the exact JRE name I use. The name might be different on other developers machines, how is this problem best solved so that many developers may work together on the project?
Detailed problem description:
I'm using Eclipse Ganymede and Web Tools Platform (as it's part of Eclipse IDE for Java EE Developers) and I have created a Dynamic Web Project.
I have a single JRE installed, the Sun JRE for Java SE 6. In Eclipse I can choose:
Window / Preferences / Java / Installed JREs. And I can see a list of JRE's, each row has Name, Location and Type columns.
I only have one entry in the list, it has: Name=java-6-sun-1.6.0.07 Location=/usr/lib/jvm/java-6-sun-1.6.0.07 *Type=*Standard VM.
The problem is that the name of my JRE is specified in two Eclipse project meta-data files, they are .classpath and .settings/org.eclipse.jst.common.project.facet.core.prefs.
I want to check my project into version control for other developers to check out and work on, but I don't think that I can be sure that they have a JRE with the same exact name as I do.
Contents of the offending files:
.classpath: (The second to last classpathentry is the offending tag.)
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.apache.ivyde.eclipse.cpcontainer.IVYDE_CONTAINER/?ivyXmlPath=ivy.xml&confs=*">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-sun-1.6.0.07"/>
<classpathentry kind="output" path="target/eclipse/classes"/>
</classpath>
.settings/org.eclipse.jst.common.project.facet.core.prefs:
#Mon Feb 02 13:29:53 CET 2009
classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:java-6-sun-1.6.0.07/owners=jst.java\:6.0
eclipse.preferences.version=1
What's the best way to check in this project and let other developers check it out and run/change it?
Select the execution environment instead of the JRE to use. To do so, got to your project -> Properties -> Java Build Path -> Libraries. Select the "JRE System Library" element, click "Edit..." and select the Execution Environment of your choice (probably "JavaSE-1.6" for your example).
The .classpath file will then contain an entry like this:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>