GlassFish 5.0 exception and port 4848 not responding - exception

Yesterday i downloaded GlassFish 5.0 and JDK9. When I'm trying to run server with asadmin start-domain GlassFish send to me exception
When I try to use "asadmin start-domainAfter" I got respond: "Remote server does not listen request on [localhost 4848]. Is the serwer up?"
Any can help me with this? I looked for solution at google, I tried kill process using port 4848, change port 4848 in domain.xml on another one, nothing helps.
It's my firts time with glassfish I don't know what to do. Anyone can help me?
I'm working at windows 7, InteliJ Ultimate 2017.2.4, JRE 1.8 and JDK 9.

GlassFish 5.0 not starting on JDK 9 is a known issue.
GlassFish 5.0 is certified only on JDK 8 (u144) as stated in the release notes:
https://javaee.github.io/glassfish/doc/5.0/release-notes.pdf

I use Windows 10 and I have installed JDK and JRE for version 9 and 8u141, 8u151, 8u144 (installed for test about this problem)
For exception I had had the same problem : the command "asadmin start-version" throw an exception.
Just check the version from CMD console :
C:\Users\xxxxx>**java -version**
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
Problem JAVA_HOME and PATH environment viariables are JDK8u151 ???
To solve the problem, the documentation advice that :
Alternatively, you can specifically set the Java path with the AS_JAVA property in the in the as-install/config/asenv.conf file.
C:\DEVENV\glassfish5\glassfish\config>dir
Le volume dans le lecteur C s’appelle OS
Le numéro de série du volume est 10BF-2BBE
Répertoire de C:\DEVENV\glassfish5\glassfish\config
08/09/2017 07:27 <DIR> .
08/09/2017 07:27 <DIR> ..
12/01/2018 17:44 3 516 asenv.bat
...
Consequently, I add the last line below :
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin
set AS_CONFIG=..\config
set AS_INSTALL=..
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DEF_NODES_PATH=..\nodes
set AS_DERBY_INSTALL=..\..\javadb
**set AS_JAVA=C:\Program Files\Java\jdk1.8.0_151**
Relaunch CMD console and start server with asadmin start-domain : it works properly....enjoy.

As mentioned above GlassFish 5.0 leverages new features in Java SE 8,
and is certified today on Java SE 8. Even though we have a lot of work
in front of us with the transition to the Eclipse Foundation, our
current intent is to certify Java SE 9 in an upcoming GlassFish 5
release.
JDK 9 should be supported in the next update, i.e. GlassFish 5.0.1
See end of https://blogs.oracle.com/theaquarium/java-ee-8-is-final-and-glassfish-50-is-released

If you are on a mac or linux machine, add the following to config/asenv.conf in your glassfish installation directory.
set AS_JAVA="path to your jdk 8"
For example, in Mac OS it will be
AS_JAVA="/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home"

Anyone having problems with NullPointerException, look out for your system PATH Variables. Be sure that they point to an acceptable JDK (As it was said before: GlassFish 5.0 is certified only to work on JDK 8u144). This NullPointerException is caused by using an incompartible JDK as mentioned here: https://docs.oracle.com/cd/E19226-01/820-7688/gipqi/index.html
In my case the PATH variable was correctly pointing to java8u144 bin, but my PATH also contained a pointer to C:\ProgramData\Oracle\Java\javapath. And someway an old version of java SDK was stored on \ProgramData\Oracle so GlassFish was using this old version of java as SDK.

Related

How to fix Kotlin REPL exception NoClassDefFoundError

I'm attempting to run the Kotlin REPL on my windows 10 machine, from the command line. I am receiving a java.lang.NoClassDefFoundError: org/jline/reader/LineReaderBuilder exception when running the command kotlinc
I have IntelliJ Ultimate 2019.1.3 installed, with the Kotlin plugin. I have the Kotlin standalone compiler also installed and I've added that location to my system path. I've tried to run the command from the standalone directory: "C:/Tools/kotlinc/bin" but no difference.
OS Name: Microsoft Windows 10 Enterprise
Version 10.0.16299 Build 16299
Kotlin version 1.3.40-release-123 (JRE 1.8.0_131-b11)
java version "1.8.0_131"
I expect the REPL to start without an exception. What could be causing the exception?
Thank you all!
It looks like that was a bug and it has been fixed with Kotlin plugin & kotlinc version 1.3.41 (released today).

No "sqlread" in Matlab 2019a Database Toolbox?

Our shop just upgraded to Matlab 2019a, and I'm bumbling around the import of MySQL/MariaDB data (*.frm files). I found myself to the sqlread tutorial. I have yet to fully plumb the machinations behind the database command to set up a connection, but in messing around, I seem to have discovered that I don't have an sqlread function. This is odd, as I have the Database Toolbox:
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.6.0.1072779 (R2019a)
MATLAB License Number: ______
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Database Toolbox Version 9.1 (R2019a)
<...snip...>
>> help sqlread
--- sqlread not found. Showing help for stlread instead. ---
<...snip...>
>> which database
C:\Program Files\MATLAB\R2019a\toolbox\database\database\database.m
>> which sqlread
'sqlread' not found.
Why would this not be available?
TMW investigated and reported that sqlread becomes available after setting up a data source.
Unfortunately, the next road block that I'm confronting is setting up the data source.
My question about a simpler alternative to import MySQL data into Matlab still stands.
Thanks.

Squirrel-SQL throws class not found exception

I am running Squirrel-SQL version 3.9.0 using JDK 10 on MS-Windows 10. I have configured the Microsoft SQL server JDBC driver sqljdbc42.jar along with it's native DDLs to enable native kerberos authentication. But when I try to connect to my database, I get the message JDBC Driver class not found class java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter. How do you fix this issue?
I was able to fix this issue by placing the jaxb-api-2.3.0.jar into squirrel-sql-3.9.0/lib folder and restarting the application.
had same problem . i updgrated everything to last version of Squirel 4.5.1 (janvier 2023) & last JDK 19 & last driver SqlServer , but problem continue to occur
i found another post on StackOverflow who asked which repository had this jaxb jar
How do I resolve Could not find artifact javax.xml.bind:jaxb-api:pom:2.3.0-b161121.1438 in central (https://repo1.maven.org/maven2)?
this is the link to jaxb jar, i added it in lib/ under squirell directory , then it worked
https://maven.java.net/#nexus-search;gav~javax.xml.bind~jaxb-api~2.3.0-b161121.1438~~

how to deploy jbpm5.2 on tomcat 7 using mysql database?

Can anybody please help me with a link or document to run jbpm-5.2 on tomcat 7 using mysql as database ? Does jbpm deployment to tomcat require some other tool or repository or something else ? I am a complete novice to jbpm... Please help me.
Thanks in advance...
I had same problem and have posted a solution here (there is an ANT script referenced which can be downloaded):
http://ironclaws.wordpress.com/2012/06/18/jbpm-5-2-tomcat-7-mysql-ant-script-18-2/
To summarize what is required in order to install jbpm 5.2 onto tomcat 7 using the final full distribution:
Bitronix Transaction Manager : The distribution does not attempt to deploy / configure this despite the requirement. The above Ant installer will install Bitronix at the Tomcat Server level – advantageous as at this point BTM may be integrated into other projects on the platform.
The jBPM distribution is designed for JBoss AS server and the console / console-server packages include EL (expression language) libraries. These will conflict with those which are installed with Tomcat – the Tomcat EL should be preserved.
There is some confusion with respect to javassist jar in the config / config-server distributions.
The included jars should be dropped – and included into both config / config-server javassist-3.4.GA
The reason for this dependency is that Hibernate 3.4 is deployed as persistence layer in this distribution.
There is a conflicting dom4j library – dom4j-1.6.jar deployed with the console / console-server packages. This should also be removed.
It is not mentioned clearly that the parameter:
-Dreporting.needcontext=true needs to be passed to the Tomcat JVM in order to allow the gtw-server to correctly instantiate the report module loader.
For the ‘Demo’ it is important to configure the human-server persistence correctly, and additionally address the includeantruntime issue during starting of this service.

Errors on building the MySql JDBC driver from source

When I try to build the JDBC driver, from the source downloaded from here , I get many compilation errors. For example,
The type CallableStatement must implement the inherited abstract method CallableStatement.getCharacterStream(int)
in CallableStatement.java line 57
All these error indicate, I thought, that the driver is compatible with JDK 1.5, because the specified method wasn't part of the JDBC spec in JDK 1.5.
However, when I tried to build the driver with JDK 1.5, I got errors indicating that JDK 1.6 is required. For example,
The import java.sql.RowIdLifetime cannot be resolved
where RowIdLifetime is a class that wasn't part of JDK 1.5.
So, which one is it? JDK 1.5 or 1.6? Am I missing something when I try to build?
Having read the file connector-j.html that is bundled with the source, it looks like I need both:
If you are building Connector/J 5.1 make sure that you have both JDK 1.6.x installed and an older JDK such as JDK 1.5.x. This is because Connector/J supports both JDBC 3.0 (which was prior to JDK 1.6.x) and JDBC 4.0. Set your JAVA_HOME environment variable to the path of the older JDK installation.
Next time, I'll RTM before posting.