Not able to load .net DLL targeted for 64-bit platform only - javonet

Below is the exception being thrown:
com.javonet.api.NException: Could not load file or assembly 'file:///C:\downloads\UrlNomalization\Microsoft.Bing.HashUtil.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
at System.Reflection.RuntimeAssembly._nLoad(Unknown Source)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(Unknown Source)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(Unknown Source)
at System.Reflection.Assembly.LoadFrom(Unknown Source)
at SicsClrController.Engine.ClrEngine.LoadAssembly(Unknown Source)
at SicsClrController.Engine.ClrEngine.processCommand(Unknown Source)
at com.javonet.internal.BinaryStreamProtocol.executeCommand(Unknown Source)
at com.javonet.internal.GatewayManager.loadAssembly(Unknown Source)
at com.javonet.Javonet.<clinit>(Unknown Source)
at Hello.main(Hello.java:20)
My system settings:
IntelliJ IDEA 2020.2.2 (Ultimate Edition)
Build #IU-202.7319.50, built on September 14, 2020
Licensed to IntelliJ IDEA Evaluator
Expiration date: October 25, 2020
Runtime version: 11.0.8+10-b944.31 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 1971M
Cores: 8

Actually, my .net dll was blocked (since came from 3rd party) by windows, unblocking this file solved the issue.

Related

Issue in installing Jenkins when executing war file

I'm using Jenkins 2.73.1 in Windows. when executing below command to install Jenkins,
java -jar jenkins.war
I get following error:
C:\Program Files (x86)\Jenkins>java -jar jenkins.war
Running from: C:\Program Files (x86)\Jenkins\jenkins.war
webroot: $user.home/.jenkins
[33mOct 28, 2017 12:01:28 AM Main deleteWinstoneTempContents
WARNING: Failed to delete the temporary Winstone file C:\Users\user\AppData\Local\Temp\winstone\jenkins.war
[0mOct 28, 2017 12:01:28 AM org.eclipse.jetty.util.log.Log initialized
INFO: Logging initialized #1490ms to org.eclipse.jetty.util.log.JavaUtilLog
Oct 28, 2017 12:01:28 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
[33mOct 28, 2017 12:01:28 AM org.eclipse.jetty.server.handler.ContextHandler setContextPath
WARNING: Empty contextPath
[0mOct 28, 2017 12:01:28 AM org.eclipse.jetty.server.Server doStart
INFO: jetty-9.4.z-SNAPSHOT
Oct 28, 2017 12:01:31 AM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
Oct 28, 2017 12:01:31 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: DefaultSessionIdManager workerName=node0
Oct 28, 2017 12:01:31 AM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
INFO: No SessionScavenger set, using defaults
Oct 28, 2017 12:01:31 AM org.eclipse.jetty.server.session.HouseKeeper startScavenging
INFO: Scavenging every 660000ms
Jenkins home directory: C:\Users\user\.jenkins found at: $user.home/.jenkins
Oct 28, 2017 12:01:33 AM org.eclipse.jetty.server.handler.ContextHandler doStart
INFO: Started w.#4bdeaabb{/,file:///C:/Users/user/.jenkins/war/,AVAILABLE}{C:\Users\user\.jenkins\war}
Oct 28, 2017 12:01:33 AM org.eclipse.jetty.server.AbstractConnector doStop
INFO: Stopped ServerConnector#7a5ceedd{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
Oct 28, 2017 12:01:33 AM org.eclipse.jetty.server.session.HouseKeeper stopScavenging
INFO: Stopped scavenging
Oct 28, 2017 12:01:33 AM hudson.WebAppMain contextDestroyed
INFO: Shutting down a Jenkins instance that was still starting up
java.lang.Throwable: reason
at hudson.WebAppMain.contextDestroyed(WebAppMain.java:390)
at org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:898)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:545)
at org.eclipse.jetty.server.handler.ContextHandler.stopContext(ContextHandler.java:873)
at org.eclipse.jetty.servlet.ServletContextHandler.stopContext(ServletContextHandler.java:355)
at org.eclipse.jetty.webapp.WebAppContext.stopWebapp(WebAppContext.java:1507)
at org.eclipse.jetty.webapp.WebAppContext.stopContext(WebAppContext.java:1471)
at org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:927)
at org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:271)
at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:569)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
at org.eclipse.jetty.server.handler.AbstractHandler.doStop(AbstractHandler.java:124)
at org.eclipse.jetty.server.Server.doStop(Server.java:523)
at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
at winstone.Launcher.shutdown(Launcher.java:307)
at winstone.Launcher.<init>(Launcher.java:167)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:294)
at Main.main(Main.java:132)
Oct 28, 2017 12:01:33 AM org.eclipse.jetty.server.handler.ContextHandler doStop
INFO: Stopped w.#4bdeaabb{/,null,UNAVAILABLE}{C:\Users\user\.jenkins\war}
Exception in thread "Jenkins initialization thread" java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
at hudson.WebAppMain$3.run(WebAppMain.java:249)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:560)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Oct 28, 2017 12:01:33 AM winstone.Logger logInternal
INFO: Winstone shutdown successfully
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:156)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:294)
at Main.main(Main.java:132)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:298)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:431)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at winstone.Launcher.<init>(Launcher.java:154)
... 7 more
[31mOct 28, 2017 12:01:33 AM winstone.Logger logInternal
SEVERE: Container startup failed
java.io.IOException: Failed to start Jetty
at winstone.Launcher.<init>(Launcher.java:156)
at winstone.Launcher.main(Launcher.java:354)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at Main._main(Main.java:294)
at Main.main(Main.java:132)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:298)
at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:236)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.server.Server.doStart(Server.java:431)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at winstone.Launcher.<init>(Launcher.java:154)
... 7 more
[0m
Can anyone help?
As per my analysis, Jenkins by default will try to use port number as 8080. You are facing this issue because the port number(8080) has been already occupied with the some other process like tomcat or oracle or something else.
This problem solved when I have passed my own port number while running the jenkins.war. It ran successfully and downloaded all the metadata. You can see the below command how am I passing the port,
for HTTP:
java -jar jenkins.war --httpPort=9090
for HTTPS:
java -jar jenkins.war --httpsPort=9090
Note: Initially I have even faced the ClassNotFountException. I din't get any exception when I tried with the new port number.
Well, there's a few things that I'm seeing in your stack trace that seem very likely to cause a problem. notably these two:
Exception in thread "Jenkins initialization thread" java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
and
java.io.IOException: Failed to start Jetty
Caused by: java.net.BindException: Address already in use: bind
Basically, there's two issues here, the first being that the port your Jenkins is trying to bind to is already in use, try and figure out what's using the port jetty would want to bind to (usually either 80 or 8080, if my memory serves).
The second is an issue saying it can't find a class for an exception it was trying to throw, I think.
I'm not sure how that'd happen, I'd free up the port and see if that issue goes away, and if not figure out why that class is missing from your classpath
(Solved)
Right, This errors occurs when you are trying to start the jenkins using java -jar jenkins.war on port 8080 (by default).
Exception in thread "Jenkins initialization thread"
java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad Caused
by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
first check the port 8080 using these steps >
Step 1:
Run command-line as an Administrator. Then run the below mention
command.
netstat -ano | findstr :yourPortNumber
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 8016
TCP [::]:8080 [::]:0 LISTENING 8016
take the PID (process identifier) : 8016 (it will be different in your system)
then execute this command after identify the PID (8016).
Step 2:
taskkill /PID typeyourPIDhere /F
again run netstat -ano | findstr :yourPortNumber and check either port is closed or not.
Happy Learning :)
Update the port as in java -jar jenkins.war --httpPort=9090.
I also faced the similar issue. Steps resolved the issue for me are below:
Check if Tomcat service is up and running. If not then please start it first.
in my case STS was using default tomcat. I have ended that process.
executed the command > java -jar jenkins.war -httpPort=9090
It worked for me.

Force neo4j-ce.exe (2.3.0) to use Java 8?

I'm running Neo4j 2.3.0 on Win 7 x64.
The computer is configured to use Java 8:
>java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
and yet, my extension throws Unsupported major.minor version 52.0:
java.lang.UnsupportedClassVersionError: org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper :
Unsupported major.minor version 52.0
EDIT Neo4j is finding/using some other version of Java:
16:24:56.199 [qtp1471980130-55] ERROR c.t.neo4j.plugins.GremlinPlugin - java.vendor=Oracle Corporation
16:24:56.209 [qtp1471980130-55] ERROR c.t.neo4j.plugins.GremlinPlugin - java.version=1.7.0
I have JAVA_HOME and my path variables set correctly for generic Java usage (not sure whether Neo4j can use some other env variables?)
Here's the log:
Error saving DB location
java.io.FileNotFoundException: .dblocation (Access is denied)
2015-10-25 12:47:57.115+1100 INFO [o.n.s.d.LifecycleManagingDatabase] Successfully started database
2015-10-25 12:47:57.355+1100 INFO [o.n.s.CommunityNeoServer] Starting HTTP on port 7474 (8 threads available)
2015-10-25 12:47:58.145+1100 INFO [o.n.s.m.ThirdPartyJAXRSModule] Mounted unmanaged extension [com.thinkaurelius.neo4j.plugins] at [/tp]
2015-10-25 12:47:58.365+1100 INFO [o.n.s.w.Jetty9WebServer] Mounting static content at /webadmin
2015-10-25 12:47:58.545+1100 INFO [o.n.s.w.Jetty9WebServer] Mounting static content at /browser
Oct 25, 2015 12:47:59 PM com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
com.thinkaurelius.neo4j.plugins
Oct 25, 2015 12:47:59 PM com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class com.thinkaurelius.neo4j.plugins.GremlinPlugin
Oct 25, 2015 12:47:59 PM com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
Oct 25, 2015 12:47:59 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Oct 25, 2015 12:48:00 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Oct 25, 2015 12:48:00 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
Oct 25, 2015 12:48:00 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.19 02/11/2015 03:25 AM'
2015-10-25 12:48:01.095+1100 INFO [o.n.s.CommunityNeoServer] Remote interface ready and available at http://localhost:7474/
Oct 25, 2015 12:48:19 PM com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException
SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container
java.lang.UnsupportedClassVersionError: org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONMapper : Unsupported major.minor version 52.0
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.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 com.thinkaurelius.neo4j.plugins.GremlinPlugin.execute(GremlinPlugin.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.neo4j.server.rest.web.CollectUserAgentFilter.doFilter(CollectUserAgentFilter.java:69)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:620)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540)
at java.lang.Thread.run(Unknown Source)
The exe artifact for Neo4j community edition comes with it's own JDK - don't remember which version is shipped.
The most easy way to fix this is uninstall the Neo4j and download the zip variant. This way will use your system's JVM.

UnsatisfiedLinkError & no such method (jogl, gluegen, jogamp)

I wrote a program using Processing(which uses jogl and gluegen), and am using PApplet to run it in a java application in NetBeans.
I am unable to run my program (by running the jar) outside the IDE - neither on my local windows 64-bit machine using command line, nor on a external linux server (which is where I would like to run the program) using X11 forwarding
I previously was able to run the program via command line on my windows machine, but ran into trouble after testing on the linux server. I think there may have been some issues with paths or something after I downloaded the linux versions of the same jars
This is the error I receive from the linux machine:
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: jogamp.common.jvm.JVMUtil.initialize(Ljava/nio/ByteBuffer;)Z
at jogamp.common.jvm.JVMUtil.initialize(Native Method)
at jogamp.common.jvm.JVMUtil.<clinit>(JVMUtil.java:58)
at com.jogamp.common.os.Platform$1.run(Platform.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at com.jogamp.common.os.Platform.<clinit>(Platform.java:179)
at javax.media.opengl.GLProfile.<clinit>(GLProfile.java:82)
at processing.opengl.PJOGL.initSurface(PJOGL.java:250)
at processing.opengl.PGraphicsOpenGL.initPrimary(PGraphicsOpenGL.java:6310)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1653)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Thread.java:724)
this is the error I get from trying to run the jar on my machine using command line:
java.lang.NoSuchMethodError: com.jogamp.common.nio.Buffers.slice2Float(Ljava/nio
/Buffer;[FII)Ljava/nio/FloatBuffer;
at jogamp.opengl.ProjectFloat.<init>(ProjectFloat.java:181)
at jogamp.opengl.ProjectFloat.<init>(ProjectFloat.java:167)
at jogamp.opengl.ProjectFloat.<init>(ProjectFloat.java:163)
at javax.media.opengl.glu.GLU.<init>(GLU.java:164)
at processing.opengl.PJOGL.<init>(PJOGL.java:218)
at processing.opengl.PGraphicsOpenGL.createPGL(PGraphicsOpenGL.java:1744
)
at processing.opengl.PGraphicsOpenGL.<init>(PGraphicsOpenGL.java:518)
at processing.opengl.PGraphics3D.<init>(PGraphics3D.java:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at processing.core.PApplet.makeGraphics(PApplet.java:1919)
at processing.core.PApplet.size(PApplet.java:1771)
at processing.core.PApplet.size(PApplet.java:1742)
at noblis.farag.MySketch.setup(MySketch.java:132)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Animation Thread" java.lang.RuntimeException: com.jogamp.co
mmon.nio.Buffers.slice2Float(Ljava/nio/Buffer;[FII)Ljava/nio/FloatBuffer;
at processing.core.PApplet.makeGraphics(PApplet.java:1944)
at processing.core.PApplet.size(PApplet.java:1771)
at processing.core.PApplet.size(PApplet.java:1742)
at noblis.farag.MySketch.setup(MySketch.java:132)
at processing.core.PApplet.handleDraw(PApplet.java:2361)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:240)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
Any idea about why I can run it in the IDE but not outside? or any way to package it so that it can run outside the IDE?
thanks

JBoss Profiler not showing up in JBoss

I am trying to run JBoss Profiler(jboss-profiler-2.0.0.Beta5) on my JBoss AS5.0 for a web application made on RF3.3
I followed all the steps mentioned in the JBoss profiler user guide:-
Copy jboss-profiler.jar to jbossas/bin
• Copy jboss-profiler.properties to jbossas/bin
• Edit jboss-profiler.properties in jbossas/bin to include the classes to be profiled
• Copy jboss-profiler-plugins.jar to jbossas/bin
• Edit run.conf (Unix) or run.bat (Windows) in jbossas/bin to include JBoss Profiler in JAVA_OPTS
• Copy jboss-profiler.sar to jbossas/server/<conf>/deploy
• Boot application server
Include the following in JAVA_OPTS
-javaagent:jboss-profiler.jar -Djboss-profiler.properties=jboss-profiler.properties
Post this I started my JBoss AS.The MBean is getting registered and I am able to see the MBean also..During startup I observe that Profiler is taking entry as IP(say 10.10.10.10) and port 5400 whereas I had specified 8080 in the jboss-profiler.props file.
Now when I navigate to 10.10.10.10:8080/jboss-profiler I get 404 page not found.
When I navigate to 10.10.10.10:5400/jboss-profiler I get exception as:-
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.jboss.remoting.transport.socket.ServerThread.createServerSocketWrapper(ServerThread.java:907)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:489)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
Caused by: java.io.StreamCorruptedException: invalid stream header: 47455420
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:97)
at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:7
at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:5
at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:179)
at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:162)
at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:46)
... 7 more
When I tried running the command java -jar jboss-profiler-client.jar from commandprompt it says
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://localhost:5400/]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:579)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.remoting.Client.invoke(Client.java:536)
at org.jboss.profiler.client.cmd.Client.main(Client.java:281)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:192)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:827)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:569)
... 5 more
Can anyone PLEASE GUIDE ME HOW TO SETUP PROFILER....
The same doubt is also posted on JBoss forum.
https://community.jboss.org/message/743228#743228

Deploying JRuby war file to Tomcat in Windows

I have a JRuby on Rails application I am trying to deploy to an existing Tomcat 7 installation with a war file created by warbler. When I drop the war file in the webapps directory it creates a directory with the war contents. I am able to access the static html (public) files however I am not able to access any of the dynamic ruby generated urls and get a 404 response.
My guess is that Tomcat doesn't know how to execute or handle the ruby files. Is there something I need to do to tell Tomcat to execute those as scripts?
In my catalina log file I see the following:
INFO: Deploying web application archive C:\Program Files\Apache
Software Foundation\Tomcat 7.0\webapps\myapp.war Mar 22, 2012 10:50:41
PM org.apache.catalina.startup.ContextConfig webConfig SEVERE: Unable
to determine URL for WEB-INF/classes
javax.naming.NameNotFoundException: Resource /WEB-INF/classes not
found at
org.apache.naming.resources.BaseDirContext.listBindings(BaseDirContext.java:733)
at
org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.java:546)
at
org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
at
org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:825)
at
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:300)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Mar 22, 2012 10:50:43 PM
org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI:
urn:org.jruby.rack is already defined
probably something with your paths or JRuby. See this http://www.digitalsanctum.com/2007/07/24/jruby-deploying-a-rails-application-on-tomcat/ site.

Resources