Failed to start application WAS 8.5.5.10 - websphere

My application failed to start with the below error on WebSphere Application Server 8.5.5.10 which was working on 8.5.5.5
[1/2/17 17:54:20:842 IST] 0000006f ecs W com.ibm.ws.ecs.internal.scan.context.impl.ScannerContextImpl scanJAR unable to open input stream for resource org/reflections/scanners/MemberUsageScanner$1.class in archive WEB-INF/lib/reflections-0.9.10.jar
java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
The application failes to start after deployment
The application failes to start when JVM starts
The same application is getting started manually from console.
When i put reflections-0.9.10.jar in shared library i am getting Failed to load webapp
Caused by: com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to load webapp: null
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:177)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:901)
... 73 more
Caused by: java.lang.RuntimeException
at org.objectweb.asm.MethodVisitor.visitParameter(Unknown Source)
at org.objectweb.asm.ClassReader.b(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
5.The application started when i move all the third party jars to shared libraries.

upgrade to 8.5.5.11, issue fixed in latest fixpack
http://www-01.ibm.com/support/docview.wss?uid=swg1PI60902
If you find any other solution in 8.5.5.10, please do let me know

The SystemOut.log file for the application server will indicate which version of the Java (JVM) is in-use. Verify whether the version of the class files in reflections-0.9.10.jar is greater than the version of the server JVM. The error you posted will occur whenever this condition is true.

Related

Java3D: JNI Error - java.lang.NoClassDefFoundError: javax/media/j3d/Canva s3D: Windows 7

OS: Windows 7 64-bit
Java: C:\Program Files\Java\jdk1.8.0_202 [Installed jdk-8u202-windows-x64.exe]
Java 3d: C:\Program Files\Java\Java3D\1.5.1 [Installed java3d-1_5_1-windows-amd64.exe]
Environment Varaibles:
JAVA_HOME C:\Program Files\Java\jdk1.8.0_202
JRE_HOME C:\Program Files\Java\jdk1.8.0_202\jre
PATH=%PATH%:C:\Program Files\Java\jdk1.8.0_202\bin;C:\Program Files\Java\Java3D\1.5.1\bin;C:\Program Files\Java\Java3D\1.5.1\lib;
And also copied j3d jars[j3dcore.jar, j3dutils.jar and vecmath.jar] to C:\Program Files\Java\jdk1.8.0_202\jre\lib\ext. j3dcore-ogl.dll to C:\Program Files\Java\jdk1.8.0_202\bin
Running the classic HelloJava3D Program and getting the below error. I can understand this is looking for Canvas3d class but that already present in one of the java3d jar file. Have come across similar thread in stackoverflow where they mentioned to check the classpath.Above i've shared the path which i set. Anything i missed out?
Java3D - Some classes not found but classpath is set correctly
But in my case its showing some JNI error is it because some architecture mismatch?
D:\JavaSample>java HelloJava3D
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/j3d/Canva
s3D
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.media.j3d.Canvas3D
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
One of the tool in my project is dependent on Java3d and i'm from c++ background and new to this project. I couldn't figure out what i am missing. Please suggest.

JavaFX 11 Error intializing QuantumRenderer when running custom JRE image on Windows

I have built my app with JavaFX 11 and now I need to distribute it. I have chosen to distribute it in two ways: cross-platform fat-jar (I know, I know, it is discouraged, but that is not the point) and platform specific image created with jlink.
I am building on Linux Mint 20.1. I am using Maven and creating runtime image with javafx-maven-plugin. I have JDKs for both platforms on my Linux machine and pointed to the corresponding jmods folder in pom.xml.
The built fat-jar works on both Linux and Windows where both have installed the latest Java SDK (11.0.12).
The image for Linux also works without problems.
However, the image for Windows does not run and the output of -Dprism.verbose=true is this:
B:\Data\sjsm\releases\1.0\sjsm-1.0-win\bin>sjsm-1.0-launcher.bat Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.ClassNotFoundException: com.sun.prism.d3d.D3DPipeline
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [B:\Data\sjsm\releases\1.0\sjsm-1.0-win\bin, C:\WINDOWS\Sun\Java\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\Program Files\Eclipse Foundation\jdk-11.0.12.7-hotspot\bin, C:\WINDOWS\system32, C:\WINDOWS, C:\WINDOWS\System32\Wbem, C:\WINDOWS\System32\WindowsPowerShell\v1.0\, C:\WINDOWS\System32\OpenSSH\, C:\Program Files\dotnet\, B:\xampp\php, B:\MinGW\bin, C:\Program Files\Microsoft SQL Server\120\Tools\Binn\, B:\Git\cmd, B:\Matlab R2020a\bin, B:\Microsoft VS Code\bin, C:\Users\User\AppData\Local\Microsoft\WindowsApps, B:\xampp\php, ., .]
at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
at java.base/java.lang.System.loadLibrary(Unknown Source)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(Unknown Source)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(Unknown Source)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit>(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Unknown Source)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(Unknown Source)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(Unknown Source)
... 1 more
Exception in thread "main" java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
I got the same response when I tried to run the project from source on Windows. (I copied the project to Windows, installed maven, and it would not even run with javafx:run, let alone jlink with javafx:jlink)
I have tried many links on Google and none of them works, People either have something missing in their installation (I have everything installed at least as far as I have found) or the issue pops up in a different situation (when packaging a fat-jar for example, or running their application from IDE).
What I have not tried so far is creating the image by hand from command line, since I have read many times that it is discourage compared to using a build tool like Maven.
What can I try next?
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path
Means you're definitely missing some dlls from your library path, although this could only be a part of the problem.
When you download javafx sdk for windows from this link, you get a zip with the following structure:
The bin folder contains all the natives you need to run JavaFx (on windows, or the platform you downloaded the sdk for)
Note that you don't always need all the natives, jfxwebkit.dll for example is only needed when you work with javafx-web.
You need to extract them somewhere and add the folder you extracted them in to the library path when you run the java program
java "-Djava.library.path=path_to_natives" -classpath "your_classpath" <Your main class>
I have managed to solve this. The javafx-maven-plugin expects in <jModsPath> a colon separated list of paths to ALL jmods, not just the standard oridinary JDK. It pulls what's missing out of maven repository I think but ignores all platform clasifiers.

Squirrel access to Phoenix/HBase

I got phoenix 4.0 running on hbase 0.98/hadoop 2.3.0 and was impressed by the command line tools.
In the second step I followed the description on the webpage to connect to phoenix using its bundled JDBC driver.
When I try to connect I get the Exception message (on Squirrel side)
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104)
... 5 more
Caused by: java.sql.SQLException: ERROR 103 (08004): Unable to establish connection.
at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:309)
at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:133)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:254)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1446)
at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131)
at org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167)
... 7 more
Caused by: java.io.IOException: java.lang.reflect.InvocationTargetException
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:416)
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:309)
at org.apache.phoenix.query.HConnectionFactory$HConnectionFactoryImpl.createConnection(HConnectionFactory.java:47)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.openConnection(ConnectionQueryServicesImpl.java:252)
... 12 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.hadoop.hbase.client.HConnectionManager.createConnection(HConnectionManager.java:414)
... 15 more
Caused by: java.lang.RuntimeException: Socket Factory class not found: java.lang.ClassNotFoundException: Class org.apache.hadoop.net.StandardSocketFactory not found
at org.apache.hadoop.net.NetUtils.getSocketFactoryFromProperty(NetUtils.java:142)
at org.apache.hadoop.net.NetUtils.getDefaultSocketFactory(NetUtils.java:122)
at org.apache.hadoop.hbase.ipc.RpcClient.<init>(RpcClient.java:1293)
at org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.<init>(HConnectionManager.java:664)
... 20 more
I double checked the jar files with classfinder to be sure that the class org.apache.hadoop.net.StandardSocketFactory IS in the classpath.
What can I do to get Squirrel connected with Phoenix?
Update:
I saw in the zookeeper log on the server side that the network communication started:
2014-05-28 06:24:29,411 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.NIOServerCnxnFactory: Accepted socket connection from /192.168.1.106:58172
2014-05-28 06:24:29,412 INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181] server.ZooKeeperServer: Client attempting to establish new session at /192.168.1.106:58172
2014-05-28 06:24:29,518 INFO [SyncThread:0] server.ZooKeeperServer: Established session 0x146413f6c3a000c with negotiated timeout 90000 for client /192.168.1.106:58172
I solved the problem replacing the downloaded binary version 4.0 of phoenix with the snapshot version 4.1 which I built by myown from the source version cloned via git from
http://git.apache.org/incubator-phoenix.git/
After the successful build I extracted the tarball from the assembly subdirectory and copied the following jars to hbase 0.98's lib dir
phoenix-core-4.1.0-incubating-SNAPSHOT.jar
phoenix-flume-4.1.0-incubating-SNAPSHOT.jar
phoenix-pig-4.1.0-incubating-SNAPSHOT.jar
In Squirrel I used just phoenix-4.1.0-incubating-SNAPSHOT-client.jar as a extra path to get the driver running.

Tomcat 7 : Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file

I have installed tomcat7 in my windows xp pc and on starting the service, i cannot access localhost:8080 in my browser and found the following in tomcat7 log files.
2013-05-15 15:00:30 Commons Daemon procrun stderr initialized
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number
in class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Tomcat 7 requires a minimum of Java 6. The most likely cause is that you are trying to run Tomcat on Java 5 or earlier.
The alternative is that you have added something to your Tomcat install that has been compiled with a later version of Java that you are running. In this case, get a clean Tomcat install running first and then deal with the class version problem (either by running Tomcat with a later version of Java or by recompiling whatever it is you have added for Java 6 or earlier).

Error: Tomcat 7 Configuration as Windows Service via tomcat7.exe

I am attempting to run tomcat as a service. I am able to run it succesfully when I specify just a startpath or just jvmoptions. However, if I have both I am receiving the following error:
2013-04-25 11:34:01 Commons Daemon procrun stderr initialized
java.lang.ClassNotFoundException: org.apache.catalina.startup.Catalina
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:236)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:426)
The commands I am running are as follows:
service.bat install WebServices
tomcat7 //US//WebServices --Startup=auto --DisplayName="Web Services"
tomcat7 //US//WebServices --StartPath="C:\Program Files\engine"
tomcat7 //US//WebServices --JvmOptions="-Xmx4g;-XX:PermSize=2048m;-XX:MaxPermSize=2048m"
As I stated, the service starts fine if I don't run the JvmOptions line, and it successfully writes log files to my startpath directory. Then if I don't include startpath it will also run correctly, and it just won't output to the startpath. The error only occurs when both variables are set.
The issue was that when I was changing the start path and assigning variables it was losing track of catalina home. So I added
-Dcatalina.home=apacheInstallLoc;-Dcatalina.base=apacheInstallLoc
to my JvmOptions and everything worked.

Resources