Check Glassfish version on domain folder - glassfish-3

I've tried to check one way to discover the version of the glassfish server checking the domain folder but I didn't find it. I didn't find the version in domain.xml or another file. I know we can use "asadmin version" command to check the version, but I need to find it on the domain folder because the structure of my project and some limitations that there is. Do you know some way to check the version? One difference maybe, like one file that not exists in glassfish 3.0 domain folder but there is in glasshfish 4 domain folder...
Thank you so much!

You could check the index.html in the docroot of your domain folder. It contains the Glassfish Version.
The file is located in GLASSFISH_INSTALL/glassfish/domains/domain1/docroot
It should contain a line like
<title>GlassFish Server 3.1.1 - Server Running</title>
For Glassfish 4 it only contains a line like:
<title>GlassFish Server - Server Running</title>
So this is one option to distinguish.
If this is not specific enough, you can just parse the server.log file for the version. In the file GLASSFISH_INSTALL/glassfish/domains/domain1/logs/server.log you should find a string like:
GlassFish Server Open Source Edition 3.1.1 (12) startup time : Felix (6.971ms), startup services(2.353ms), total(9.324ms)|]
or
GlassFish Server Open Source Edition 4.1.1 (1) startup time : Felix (6.175ms), startup services(5.352ms), total(11.527ms)]]

Related

Apache Directory Studio- JRE Issue

When I am trying to run Apache Directory Studio in ubuntu, I am getting the Following error,
A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run ApacheDirectoryStudio. No Java virtual machine was found after searching the following locations: /data/Admin/Work/ApacheDirectoryStudio-linux-x86-2.0.0.v20130628/jre/bin/java java in your current PATH
Where can I specify the JRE location? Is that in conf.ini? Then How can I set it?
(I am unable to tag Apache Directory Studio in this question.)
In folder with Apache Directory Studio there is Apache Directory Studio.ini file where java path can be set.
I got the solution. I have copied JRE into my Apache Directory Studio Folder.
In Windows OS
Below worked for me.
Go to environment variables, by running below command in Run or Cmd
rundll32.exe sysdm.cpl,EditEnvironmentVariables
Add below (or your jdk directory) to User Path, in Environment variables
C:\jdk-13\bin
Hope that solves.
In folder with Apache Directory Studio there is Apache Directory Studio.ini file where java path can be set.
include the following lines:
-vm
/home/yourUser/Downloads/jre1.8.0_211/bin
change "/home/yourUser/Downloads/jre1.8.0_211/bin" for your path to jre 1.8
I have fixed this issue by adding below lines in Info.plist file
<string>-vm</string><string>/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/bin/java</string>
Reference : https://github.com/Homebrew/homebrew-cask/issues/51629
I faced this same issue. I got it resolved by manually adding below lines in C:\Program Files\Apache Directory Studio\ApacheDirectoryStudio.ini
-vm
C:/Program Files/Java/jdk-11.0.17/bin
Please remember the value is without quotes.

cannot upgrade to orchard 1.8

I'm moving my old website from orchard 1.5 to 1.8. I have done in several steps moving 1.5->1.6.1, 1.6.1-> 1.7.3, 1.7.3 to 1.8 following the documentation:
prepare the new installation, copy app_data, media directories, dirs from themes and modules, and the migrations up to 1.7.2 went fine and the site is running.
At this point I'm following the procedure in the same server (2008 r2), but after I switch the home directory of the site to the 1.8 dir to start the upgrade i obtain the error message:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /
Am I missing something? the site configuration is the same as 1.7.3, just switching directory
thanks,
luca
found the problem: I have to exclude the dependencies directory in the app_data while copying

Processing Java servlet 'javax.servlet' package not found

Not a very common implementation, but using Processing as a Java Servlet has been discussed in previous posts before (1, 2). I have been developing a program in Processing to use as a Java servlet. However, when I have code (such as like the first linked example) in a Processing sketch, I get the error message
The package 'javax.servlet' does not exist. You might be missing a library.
I have Tomcat 5.5 service running on XP, and my environment variables are as follows
CLASSPATH = C:\tomcat\common\lib\servlet-api.jar
CATALINA_HOME = C:\tomcat
JAVA_HOME = C:\Program Files\Java\jdk1.6.0_21
JRE_HOME = C:\Program Files\Java\jre6
I have been trying to diagnose why the javax.servlet packages are not recognized by Processing for many hours and there is nothing online that seems to yield an explanation other than fixing the environment variables to recognize the tomcat libraries. I have also tried to put the servlet-api.jar and jsp-api.jar files in Processing as a kind of custom Processing library but they are not recognized there either, nor when I try to run the program within the tomcat/webapps folder.
I also have tried
javap -classpath my;class;path javax.servlet.Servlet
on the cmd and it gave me the same error.
I'm not that good with Tomcat yet so please forgive me if this is a result of my unfamiliarity. If anyone more knowledgeable than I can shed some light as to why Processing cannot recognize this package would be tremendous. Thanks so much~
CLASSPATH = C:\tomcat\common\lib\servlet-api.jar
This is the problem . Your classpath should be one level up i.e
CLASSPATH = C:\tomcat\common\lib\
This should work fine.
Right Click on MyComputer->Properties->Advanced->Environment Variables->
Set a new user variable name as classpath and give the variable value where your servlet-api.jar file is located (applicable for tomcat webserver), for example:->
variablename: classpath
variablevalue: D:\Tomcat\lib\servlet-api.jar
Now you can run your disassembler to find out the servlet class and interface information
If you are not able to load the servlet package, try setting the environment variable CLASSPATH to .;C:\tomcat\common\lib\servlet-api.jar. That should help.
Ok!.. i bought a new laptop and was faced the same problem, well i hope this would fix the issue on your windows 10 device as well.
First of all know that the error is just due to incorrect or incomplete path or classpath. After Installing Tomcat and JDK set the environment variable as follows(Location may vary as per your installation):
JAVA_HOME = C:\Program Files (x86)\Java\jdk1.7.0_80
JRE_HOME = C:\Program Files (x86)\Java\jre7
CATALINA_HOME = C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0
PATH = C:\Program Files (x86)\Java\jdk1.7.0_80\bin; C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\bin;
CLASSPATH = C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\lib\servlet-api.jar; C:\Program Files (x86)\Java\jdk1.7.0_80\lib\tools.jar; JAVA_HOME\lib
make sure that your classpath directs the mentioned jar files, as javax is included in it(try using winrar for checking the inner contents).
After saving the setting, Test using javap javax.servlet.Servlet
Well if you still face any issue please share the error message and screenshot.
Probably because Tomcat is not in the Java Build Path. Try add Tomcat to your library
1) Right-click on your project folder > Build Path > Configure Build Path
2) Click on Library tab > click Add Library button
3) Select Server Runtime > click Next button
4) Select your server > click Finish button

compilation problems after setting classpath in tomcat 5.5

I have installed Tomcat 5.5 in windows vista home basic. I have set classpath to
"C:\program files\apache software foundation\tomcat 5.5\common\lib\servlet-api.jar".
now there are two problems.
1. I could not compile my servlets. It says package javax.servlet.* dosenot exist.
2. I could not connect with local host in chrome nor in explorer.
these errors are appearing inspite of server instance running.
Classpath to java sdk and tomcat are different. is it the matter of concern.
Please help.
I have invested considerable amount of time figuring out the problem.
thanx in advance.
I could not compile my servlets. It says package javax.servlet.* dosenot exist.
It means that the classpath for javac is not been correctly specified. It should go like so:
javac -cp .;"/path with spaces/to/servlet-api.jar" com/example/YourServlet.class
Note that you need to surround a path with spaces by doublequotes.
I could not connect with local host in chrome nor in explorer. These errors are appearing inspite of server instance running.
Then you used the wrong domain/port. When running Tomcat at the local machine, the domain should at least be localhost. The actual port can be determined in Tomcat/conf/server.xml file. It defaults to 8080, but can be changed during the Windows setup wizard. The final URL should look like http://localhost:8080. If you use port 80 which is the default HTTP port, then the :80 part can be omitted from the URL.
Classpath to java sdk and tomcat are different.
The %CLASSPATH% environment variable is worthless. Use -cp argument. If you want to avoid long typing/remembering everytime, consider using a .bat file with the command, or a build tool like Ant, or an IDE like Eclipse.
The %JAVA_HOME% environment variable is however important. Tomcat needs to know it in order to have access to the toolset to compile JSP files. The %JAVA_HOME% should point to the installation directory of the JDK.
I have set classpath to "C:\program
files\apache software
foundation\tomcat
5.5\common\lib\servlet-api.jar"
If this means CLASSPATH environment variable, you're learning a valuable lesson: it's worthless. javac.exe and java.exe ignore it; so do all Java EE app servers like Tomcat; so do all IDEs like IntelliJ.
You'll have to add servlet-api.jar to your CLASSPATH using javac.exe -cp every time you compile in a command shell, or add it to your IDE project CLASSPATH, or set it up in Ant.
If you can't connect to localhost using Chrome or Explorer, it probably means that you haven't packaged or deployed your app properly. Make sure you create a valid WAR file and put it in the Tomcat 5.x /webapps directory to deploy.

Where to get this Java.exe file for a SQL Developer installation

I just installed Oracle 11g, and tried to start Oracle SQL developer so as to start writing queries.
It is asking me:
Enter the full pathname for the java.exe file .
Where do I find this? I did a global search for java.exe and am sure did not get some Oracle related pdf files. Also my Oracle is installed out of users/vas.
I found my java.exe that worked for SQL Developer at C:\ORACLE11G\product\11.2.0\client_1\jdk\bin where C:\ORACLE11G is my Oracle Home. The client that I have installed is 11.2.0.
Hope this helps.
I encountered the following message repeatedly when trying to start SQL Developer from my installation of Oracle Database 11g Enterprise: Enter the full pathname for java.exe.
No matter how many times I browsed to the correct path, I kept being presented with the exact same dialog box. This was in Windows 7, and the solution was to right-click on the SQL Developer icon and select "Run as administrator". I then used this path: C:\app\shellperson\product\11.1.0\db_1\jdk\jre\bin\java.exe
You need to install JAVA SDK
and give the path upto bin directory which contains the java.exe file.
example - c:/programfiles/java/jdk/bin
Hhere is what what I did to fix it:
Prerequisite
Make sure JDK is installed (Not JRE).
Make sure Oracle is installed
After
Open the file ..\sqldeveloper\sqldeveloper\bin\sqldevloper.conf and add the following line to set jdk path:
SetJavaHome C:\Program Files\Oracle\11g\product\11.1.0\client_1\jdk
If it dont allow you to save the file, copy whole sqldeveloper folder to a different location where you have write access to modify this file.
Run sqldeveloper.exe (from the new place if you moved the folder out from oracle folders) as administrator and enter the jdk path that comes with your oracle installation: e.g. C:\Program Files\Oracle\11g\product\11.1.0\client_1\jdk\bin
You have to give the path to jdk ...typically C:\Program Files\Java..
Still if it is asking you for the path then
Check this http://www.shellperson.net/oracle-sql-developer-enter-the-full-pathname-for-java-exe/
Please provide full path >
In mines case it was E:\app\ankitmittal01\product\11.2.0\dbhome_1\jdk\bin\java.exe
From : http://www.javamadesoeasy.com/2015/07/oracle-11g-and-sql-developer.html
[Context]
In a virtual machine of WinXP.
My "java.exe" was in the Oracle11g folder, under the path "C:\Oracle11g\product\11.2.0\dbhome_1\jdk\bin\java.exe".
Hope it helps!!
If you have Java installed, java.exe will be in the bin directory. If you can't find it, download and install Java, then use the install path + "\bin".
If you don't want to install Java or you just want to get started writing queries quickly, then use SQL*Plus, which is the command line too.
It's not pretty, but will get you started quickly and there is Oracle documentation on it.
you can enter the jdk path required as th full path for java.exe in sql developer for oracle 11g.
I found the jdk at the following path in my system.
c:\app\sony\product\11.0.0\db_1\jdk
Use any JDK installation as long as it is NOT 64bit.
The easiest way to find out if it is 64bit installation is to check the folder it resides into.
e.g.
C:\Program Files\... is for 64 bit programs
C:\Program Files (x86)\... is for 32 bit programs
You must install the latest Java SE Development Kit (note not the Java SE Runtime Environment ) and provide the path ex C:\Program Files\Java\jdk1.6.0_41
you should browse to where java installed, then go to bin directory which contains the java.exe file.
example - C:\Program Files\Java\jdk1.6.0_03\bin\java.exe
but you should run your SQL Developer as Administrator
If you are asked to enter the full pathname for the JDK, click Browse and find it. For example, on a Windows system the path might have a name similar to C:\Program Files\Java\jdk1.7.0_51.

Resources