I am working on some server files in jboss. The main file of data jboss/standalone/deployments/data.tar and data.war I just renamed to data1.tar and data1.war and come back site went down. Again I renamed with data.tar still not working. I am unable to to figure out.
How to fix this am not java programmer, could some one help me
You renamed the application - what did you expect exactly? The server took that as (a) uninstallation of the application under the old filename and (b) installation of an application under the new filename.
Don't fiddle around with things like this.
Related
hope you having a good day.
(Context of the problem ahead)
My problem is when installing JDeveloper suddenly appeared me an error log in the Oracle Universal Installer. Before this step of installation I passed an obstacle of the typically problem of the .zip file not founded (The error mentioned: Error to install Oracle JDeveloper). I changed the name of the .zip and then it seemed that I was on the right way of installing JDeveloper.
It's worth to highlight here, that I'm in Oracle Universal Installer. Because I can't still post images.
The problem here is that the file in fact exists and tells me that doesn't exists, it appears to indicate the path of the .zip file is: Disk2/stage/Components/oracle.ide.help.extras/12.2.1.4.0/DataFiles/filegroup1.jar
I already saw the .zip file without unzipping it and YES there's the .jar mentioned in the log:
I tried to download the same exact .zip file looking for if the file was missing in my .zip file, but I had the surprise that actually there it is.
So, if you have had the same problem I beg you to bring me help as needed as it is like from a colleague of you
I'm pendent of any response of you guys, hope you could help me. Beforehand, have a nice day.
This may sounds like a dumb question to some, but I am not a Java developer, we have moved a Java app from Rackspace server to AWS linux server and upgraded MySql from 5.2.x to 5.7.x. Some SQL statements are causing issues so I am trying to fix those inside the .java files. However, when I save the file, and use .sftp library from VSCode to push the changes to the linux server, then refresh the site, it does not reflect the changes. Is there anything else I need to be doing every time I make a change?
I was able to update some string in a .jsp file and that worked when I refreshed, so I am not sure why when I change a .java file, it does not reflect change.
The entire directory is confusing to me, I believe it was done so that all files, configs, tomcat files, etc. would be under one git folder so that it can just be dropped anywhere. I find a lot of sources state that a .war file would be created and you would place that file in the tomcat apps directory.
Here is the basic layout of the directory of the app
-www/live/njun
-build.xml
+lib
+scripts
+sql
+src
-tomcat(has some config files, scripts, webapps folder)
-web
-content
-index.jsp
-trampoline
-includes folders with .java files
-tickets
-ticketsMgr.java (this is the file I modified but I could not see any differences in app)
-index.jsp (this is one I modified and did reflect in browser)
-WEB-INF
-classes/com/njun
-lots of folder that have .Class files(although when I open them it's all gibberish characters)
This is the basic structure of what I am looking at.
I tried going to the /opt/tomcat/bin and > sh startup.sh - to restart tomcat. That didn't work.
I also ran the > sh startup.sh version inside of the tomcat folder above,
/tomcat/bin/sh startup.sh - that shows me some info where the home, base tmpdir, jre_home, etc. But that didn't work neither.
I am not being asked to make major modifications on this app, I figure I can manage the SQL errors myself. If we get to the point where we need enhancements done to this app, we would hire a Java developer.
Please let me know if I am missing something and I can provide.
Thanks in advance,
That's because a .java file is just source code. You need to compile it and upload the corresponding .class file generated when you compile the .java sources. How to compile and run a Java program. Or well, since it runs on a Tomcat instance, you might have a JAR or WAR file. But the idea is still the same, since those are just basically zip files that hold your .class files (among other stuff that's less relevant for your issue).
I have an application (DrawFBP) which has a Help facility. built using JavaHelp. I actually had it working for several years on the Eclipse IDE, but I had never tested it running in the jar file. The Help facility uses a number of html files, and some other stuff, and one informant said I can get them included on the jar file by putting them in a resources folder (src/main/resources) . This seems to have worked! After lots of restructuring, I got my Help facility working on the jar file, but it stopped working on the IDE. The IDE version is crashing on a FileNotFoundException referencing a file with extra levels of qualification - where do they come from? I am probably making several dumb errors - but help would be much appreciated! The project can be found on GitHub - https://github.com/jpaulm/drawfbp . The code and resources are there, but Git wants me to add all my code back in again - not sure why... TIA
Somehow got it working - the trick seems to be to include the resources in a folder called 'resources' under src/main. I will accept this answer - unless someone comes up with a better one!
I was doing my school project today when suddenly my java BlueJ crashed and both my current file and my backup file got deleted.
One of my most important classes(SignIn.java) got deleted(only the source code).
While executing, it still works as it is linked but i can't find the source code to make changes or print it. There is a file with #BACKUP which might help me.
Is there anyway i can retrieve it? I spent almost 6 hours on this class and it took a lot of work.
As you can see in their manual at page 42 the #backup file is always saved in the same directory so your #backup file should be gone.
If you versioned it with svn or alike in the Team menu you can get Project History.
Otherwise.... you can use some file recovery programs.
The most popular can search for source codes in many languages.
The advantage of this approach is that you will recover comments meanwhile you won't by decompiling.
If your source code is truly gone (non-recoverable) you can try to use a de-compiler against the .class file. Jad and FernFlower are two that I've used and work pretty well.
https://github.com/fesh0r/fernflower
http://www.javadecompilers.com/jad
I have an extremely simple web app for experimenting in java. I have the following java class defined:
UtilDate.java http://www.philbair.org/samples/UtilDate_java.jpg
And a JSP file as follows:
UtilDate.java http://www.philbair.org/samples/getdate_jsp.jpg
The tomcat folders/files look like this (this is not official syntax, just an abstract representation of the folder structure):
UtilDate.java http://www.philbair.org/samples/tree.jpg
mywebapp/WEB-INF/classes/com/udate/UtilDate.class
The jsp file is under the root 'mywebapp' folder (name is inconsequential), and all these are under the webapps folder in tomcat.
After compiling this java class (UtilDate.java), I restart tomcat to make sure it's not hanging on to any old cache stuff.
I get the following...
javax.servlet.ServletException: java.lang.NoClassDefFoundError: UtilDate
when I try to put the jsp page in the browser.
If I replace the uDate() method in the print statement of the jsp file with
out.print("hello");
I get the word hello on the browser output.
This is crude code for testing a simple web app. I am not looking for advice on best practices (although that advice is excellent from what I've seen on this site), I just want to know why this doesn't work. It worked once, and after recompiling the class, it stopped working. I can run the class on my command line and it works just fine (outputs the date as in the main method).
I'm running Windows 7, and tomcat 7.0.34. I'm not using eclipse, or netbeans, etc. at the moment. I'm using a simple text editor, compiling the java class with the command line javac, creating the web folders manually, and placing all the files where they belong myself instead of having maven or ant or anything else build it for me. No war file at the moment. Just working with the files right in the tomcat folders under webapps. I know there are more sophisticated and recommended ways of doing this, but it's only a test for my own understanding with nothing to shield me from what's going on.
Again, this worked once.
Thanks in advance for any help.
you forgot to add the statement package com.udate; at the top of your java class. Add and compile , you should be through