I have a Java 1.6.0 web application that I am developing using a Kepler Version 2 Eclipse development environment. I am using an Oracle Weblogic Server Administration Console 12c.
I'm running the app locally - and trying to debug it. Instead of stopping at any of the breakpoints I've set - I get the following error:
When I installed the application to Weblogic, I ran the Weblogic console and then installed the application by adding the ear file.
I thought I did everything exactly the same as previous web applications I've done this way - but I was always able to debug those applications.
Also - one other thing that is different. When make any changes and re-build the ear file - I actually have to delete and reinstall from the Weblogic console for the changes to take place. I'm thinking this might be related.
Any suggestions?
Thanks!
Have a jar file added to a build path in any of the projects that
include the classes in your project
Related
I have made a small maven based web application in VSCode and trying to deploy it on JBoss using the Redhat Server Connector Extension.
But the hot deployment of the class files does not work in simple running JBoss server.
But Hot deployment does work in debug mode as 'Hot Code Replace' by setting the property 'java.debug.settings.hotCodeReplace' to 'auto'.
My inputs are from below links:
https://devblogs.microsoft.com/visualstudio/hot-code-replacement-for-java-comes-to-visual-studio-code/
and other SO links like:
How do I get Java "hot code replacement" working in JBoss?
Hot deploy on JBoss - how do I make JBoss "see" the change?
But it couldn't help.
Can you suggest something more about how it is simply possible in running JBoss?
(PS: Auto Build feature in VSCode is already enabled.
And It works fine in eclipse).
Hot deployment of web applications in VSCode's integrated RedHat Server connector can occur in following ways:
Exploded war folder: A folder is extracted from the original war and deployed to JBoss using the Exploded option. Here, the static changes like change in jsps and HTML are automatically reflected in the running application.
Hot code Replacement: Hot code replacement (HCR) is a fast debugging technique in which the Java debugger transmits new class files over the debugging channel to another JVM.
HCR only works when the class signature does not change; you cannot remove or add fields to existing classes when using HCR. However, HCR can be used to change the body of a method.
(source: https://devblogs.microsoft.com/visualstudio/hot-code-replacement-for-java-comes-to-visual-studio-code/)
Maven Install/build: It is actually not a preferred technique which someone will want but it is useful also. In this technique, you run maven: install which builds the project again and install it onto the server again.
Currently, VSCode for java and the server connector extension are new as compared to already available IDEs like Eclipse. So, we might expect more powerful functionality in coming future.
Hi All IntelliJ IDEA experts,
I seek help (if possible please with screenshots) on how to configure IntelliJ IDEA 14 to just debug a Glassfish 3.1 EAR and WAR
App deployed externally. I mean mvn build and deploy via Glassfish
Admin console and only debug from IntelliJ .
I go to set a local debug config in Glassfish and it insists on deployment of artifacts (which I do not want to do via IntelliJ)
Reason for not deploying via IntelliJ is that 2 WAR files depend on the
EAR to be deployed before hand and currently I think IntelliJ (as of version 14) does not let you juggle / or manually sort the deployment order and sorts deployment artifacts by name-wise in the natural sort order (A limitation)
Please help with externally configured artifacts based debug configuration help!
Screenshots for local debug config attached herewith
Just setting local Glassfish debug configuration is enough. There is no difference if the wars/ears are deployed via IDEA or externally.
The message you refer to "No artifacts marked for deployment" is actually a warning, not an error (although the red color of the icon is confusing). ALthough it appears, it does not stops you from running the debug configuration (just hit OK when the message appears).
Delete password in admin configuration.
like this
i have tomcat project the directory structure is
previously i was using tomcat server, whenever i modified .java files i used to build the project and restarted the server in eclipse through plugin than the changes would have taken effect.
Now in my company they changed from tomcat to weblogic since i am new to it, i used to build war file every time and deploy manually to check the changes.
Can any one tell me how to do hot deployment in web logic. i googled it but it says i need to change project type to dynamic project, that i cant do since it already in development.
is their better way just make changes to java file build and no need to restart the server through eclipse in weblogic 12c.
Eclipse IDE luna
weblogic 12c server
project type : tomcat project structure
I think how you doing that is a little old fashioned. With eclipse luna, tomcat 5.0 - tomcat 8.0 is well supported. And take some effort to turn your project into a 'Dynamic Web Project', in that way you will benifit a lot from the experience of other people.
For hot redeploying, you can try JRebel, it reload your changed java class without reloading the whole applcaition.But it's a commercial software, and I don't know a good and free alternative yet.
I have developed a java webservice application that I have been running on my dev-computer and in the meanwhile been setting up a dedicated ubuntu based linux server.
I have installed oracle-jre, mysql and apache tomcat 7 on this linux server and
after reading documentation I understand that I can either copy the deployed project archive (.WAR) or I can simply copy the project folder, into the servers /webapps/ folder from my development computer. Then restart tomcat7 and it should automatically run the webapp.
On my dev-computer with Eclipse IDE the webservice works properly as expected, but I cannot access the POST URL methods at all on the server
e.g. localhost:8080/Webservice/rest/account/login
(The installation on the server seems to be O.K as the Apache examples all work properly.)
I cannot see any logs in the /logs/ directory, in fact the folder is completely empty, so I cannot debug whats actually happening. Why aren't logs writing to the Catalina.out file?
Am I deploying this correctly as explained above?
Do I need to configure Eclipse or any project settings to reflect the change from the eclipse IDE / dev-computer to the server? E.g Is there any real difference?
A lot of questions there, but I wanted to clarify as much as possible,
Cheers,
Oliver
I fixed this issue by reinstalling tomcat.
When starting JBoss from the servers view inside Eclipse Indigo SR2 with JBoss Tools 2.3.0 on my machine, everything runs fine.
I have copied all contents of my work folder containing Eclipse and JBoss-7.1.1.Final to a different machine.
Now, when I try to start the server, it fails with this message:
Starting JBoss 7.1.1 Runtime encountered an error. The archive: /jboss/jboss-modules.jar which is referenced by the classpath, does not exist.
I don't see anything referencing the jar in the runtime or server or project configurations. And the jboss-modules.jar is inside the root folder of the JBoss server, as expected. There are no deployments in the standalone.xml.
Both machines are running SuSe 12. .bashrc and .profile are empty.
The server starts fine from command line.
I have created a new runtime and a server using this runtime from scratch in Eclipse, but get the same error.
Any ideas are appreciated.
modules.jar is required to run JBOSS 7.1 Runtime, which is missing.
Go to Window > Preferences > Server > Runtime Environment > Default Classpath.
If you don't see any classpath in the right side menu,you can tweek the classpath setting by-
Change server to JBOSS 7.0 Runtime.
Again Change server to JBOSS 7.1 Runtime.
Delete and Add Server Again,
while Add new server,
Please Check the 2nd and 3rd checkboxes
-"Listen on all Interfaces to allow remote web connections"
-"Expose your management port as server's hostname"
now everything will run fine.
I have found the solution just now:
I have found the reference to the jboss-modules.jar in the launch configuration of the server under User Libraries. All attempts to delete it failed. After removing or resetting to defaults and applying, I started the server, received the same error and the .jar was in the launch cofig classpath again.
I actually had a project named jboss without any facets, just to have the JBoss files visible from the eclipse project browser. This project was closed.
After I opened it, the server started fine again.
I am still clueless about how the reference to the jboss-modules.jar from a project got into the launch config classpath and why it resisted removing attempts.
I know this is a late response but in case anyone needs a solution to this issue.
If you go to Window > Preferences > Servers > Runtime Environments > Default Classpath
You will see that the 'JBoss 7.0 Runtime' does not have 'modules../-[*/.jar]' dependency, which is where the jboss-modules.jar lives. After selecting the 'JBoss 7.0 Runtime' rather than the JBoss 7.1 Runtime, the error relating to the jboss-modules.jar went away, and the server starts without error.
My application also started without error. I am using JBoss 7.1.1.