Getting the error java.lang.UnsatisfiedLinkError - exception

I am getting java.lang.UnsatisfiedLinkError error when I try to run my code on 32-bit machine.
I have exactly same code on 64-bit machine. This works fine without any issues.
I have looked at all the symbols in my binaries, I have checked the library paths, etc.
I didn't find any issues with any of them.
Can you please check this and let me know how to proceed.
The error log is presented below.
Regards,
Narendra
Exception in thread "Data Adapter" java.lang.UnsatisfiedLinkError: com.abc.iot.analytics.auto.adapter.usb.DATAReader.getMYchannelsJNI()V
at com.abc.iot.analytics.auto.adapter.usb.DATAReader.MychannelsJNI(Native Method)
at com.abc.iot.analytics.auto.adapter.usb.MyAdapter.getMyChannels(MyAdapter.java:19)
at com.abc.iot.analytics.auto.adapter.usb.MyAdapter.readData(MyAdapter.java:34)
at iot.analytics.auto.adapter.AbstractDataAdapter.run(AbstractDataAdapter.java:42)
at java.lang.Thread.run(Thread.java:745)

Related

Getting an error "((System.IO.FileNotFoundException)(the specified module could not be found. (Exception from HRESULT: 0x8007007E)

I am getting an error while running a .Net application.
The main problem which I feel is due to the Oracle.Data.Access.I made the project build to 32 bit as it had some problem of oracle exception
"Could not load file or assembly 'Oracle.DataAccess,
Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342'
or one of its dependencies. The system cannot find the file specified"
Making my project to 32 bit actually solved this Oracle problem, but then the following error is thrown:
((System.IO.FileNotFoundException)(the specified module could not be
found. (Exception from HRESULT: 0x8007007E)
I am actually trying to write to a file in the function from where the exception is being thrown.The file location is defined in app.config
<printJobsSection outputRootPath="D:\ANKIT_print\">
<formatterTemplatesSection templateRootPath="D:\\Print NySag FeatureDEV\\" defaultFileNameFmt="{COUNTRY}_{DEBT}_{CUST}_{ATRNY}_{CREATED}_{TMPL}_{ID}.pdf">
Is this error due to 32 or 64 bit as my Windows 7 version is 64 bit and the project is built using 32 bit or something else
Please suggest the possible outcome of this error.

Calling createEntityManager in CORBA program causes exception: org.omg.CORBA.OBJECT_NOT_EXIST

I have a CORBA client-server program that is working perfectly. The client can get a servant and call methods remotely.
I would now like to make the server interact with a database using JPA. However everything goes wrong when I add this one line to the server code:
emf.createEntityManager();
The server builds, and it registers to the orbd without error. However when I run the client which tries to connect with the server I get the following exception:
Exception: org.omg.CORBA.OBJECT_NOT_EXIST:
Full exception and stack trace are:
Exception: org.omg.CORBA.OBJECT_NOT_EXIST: ----------BEGIN server-side stack trace----------
org.omg.CORBA.OBJECT_NOT_EXIST: vmcid: SUN minor code: 401 completed: No
at com.sun.corba.se.impl.logging.ActivationSystemException.errorInBadServerIdHandler(ActivationSystemException.java:239)
at com.sun.corba.se.impl.logging.ActivationSystemException.errorInBadServerIdHandler(ActivationSystemException.java:257)
at com.sun.corba.se.impl.activation.ServerManagerImpl.handle(ServerManagerImpl.java:604)
at com.sun.corba.se.impl.orb.ORBImpl.handleBadServerId(ORBImpl.java:1602)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.checkServerId(CorbaServerRequestDispatcherImpl.java:407)
at com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:182)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1700)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1558)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:940)
at com.sun.corba.se.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:198)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:712)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:471)
at com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1230)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:490)
at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:519)
Caused by: com.sun.corba.se.spi.activation.ServerNotRegistered: IDL:activation/ServerNotRegistered:1.0
at com.sun.corba.se.impl.activation.RepositoryImpl.getDBServerDef(RepositoryImpl.java:221)
at com.sun.corba.se.impl.activation.RepositoryImpl.getServer(RepositoryImpl.java:228)
at com.sun.corba.se.impl.activation.ServerManagerImpl.getEntry(ServerManagerImpl.java:350)
at com.sun.corba.se.impl.activation.ServerManagerImpl.handle(ServerManagerImpl.java:566)
... 12 more
To my mind, a call to createEntityManager is logically completely separate from the CORBA networking functionality, so I can't see how this could possible have an impact on the client connecting to the server.
The exception was coming from my EntityManagerFactory. It had nothing to do with the networking, but because I never ran the server until a client connected, no exception occurred until that point.
The exception output was not particularly useful. I found it helpful to comment out all the networking code and just run the server as a stand-alone program from development (much more useful error messages when something goes wrong).

Idea 12/Haxe2.10(win): why do I get AssertionError: Wrong node when I try to build a project?

My OS is Win7 64 Enterprise.
I've just installed idea12 (ultimate), added Haxe plugin (0.5.6), installed haxe sdk 2.10win, also tried using 2.09win that comes with fdt.
When I try to build a project with Idea, I get following exception:
Internal error: (java.util.concurrent.ExecutionException) java.lang.AssertionError: Wrong node: [null]
java.util.concurrent.ExecutionException: java.lang.AssertionError: Wrong node: [null]
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:252)
at java.util.concurrent.FutureTask.get(FutureTask.java:111)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:231)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:105)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:81)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:41)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:60)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:169)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:94)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:105)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:26)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.AssertionError: Wrong node: [null]
at com.intellij.util.xmlb.BeanBinding._deserializeInto(BeanBinding.java:133)
at com.intellij.util.xmlb.BeanBinding.deserialize(BeanBinding.java:120)
at com.intellij.util.xmlb.XmlSerializer.deserialize(XmlSerializer.java:58)
at org.jetbrains.jps.haxe.model.module.JpsHaxeModuleType$1.loadProperties(JpsHaxeModuleType.java:26)
at org.jetbrains.jps.haxe.model.module.JpsHaxeModuleType$1.loadProperties(JpsHaxeModuleType.java:23)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:294)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.a(JpsProjectLoader.java:255)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.access$000(JpsProjectLoader.java:44)
at org.jetbrains.jps.model.serialization.JpsProjectLoader$2.call(JpsProjectLoader.java:225)
at org.jetbrains.jps.model.serialization.JpsProjectLoader$2.call(JpsProjectLoader.java:222)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:35)
... 7 more
This issue can't be in Haxe sdk as it compiles project fine under fdt (however, sdk-based autocomplete is not working, but I think it is not related to idea problem). Other project types (like java) are working fine with idea.
So, what shall I try to solve this issue? What does that exception mean?
Update: Installed idea 12.01 on WIN7 32 Professional, created new project - same exception happens. So, I conclude that this issue is not related to 32/64 bit OS or Java. This issue is not specific to idea version 12.00.
May be it is important that new project created by idea contains neither .hx classes, nor any build configuration files(like .hxml). I tried to create .hx main class and .hxml build for it, but idea still does not build project.
Changing run configuration to one of those files or to .swf result(built manually) or to cmd does not help(run option still not available).
I also tried to build with ant task, and it succeeded, but idea still can't build a project when I choose this option from menu.
The problem will be fixed in IDEA 12.0.2, thank you for reporting. As a workaround you can switch off 'Use external build' option in File | Settings | Compiler.
I cannot reproduce your error. Please try the usual reinstall, remove/add the Haxe SDK again, Invalidate Cache and restart (from the file menu).
If you can reproduce this problem with a fresh install, the best place for Idea support is their forum or create a new issue on their tracker http://youtrack.jetbrains.com/issues/IDEA?p=0&q=haxe
They have been very helpful to me in the past.

c3p0 - hibernate - mysql

hibernate 3.6.8 final
c3p0 jar that came with hibernate 3.6.8 package -> c3p0-0.9.1.jar
1
15
40
0
5
2
The app seems to be working fine, however I get massive log calls with the following stacktrace:
org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. Could not load com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1566)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2411)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2153)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:792)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor38.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:381)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:152)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1074)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1061)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1796)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:620)
Any information on how to remove that INFO log would be very much helpful thanks!
UPDATE: Is this a critical error? Or can should I just ignore it?
After a search on the web regarding this issue, I found some similar issues reported by several people. All of them point to a common problem: Threads. Basically, if you start new threads in your application (either in your code or by using a third party tool like Quartz, you have to make sure that all of the threads are stopped appropriately when the application is undeployed from the server. Here are some quotes from the searches:
Mikolaj Rydzewski wrote:
It looks like after webapp's instance has been undeployed, background quartz thread wants to do something and then exception occurs.
Another (and better explanation) on jspwiki.org:
It is possible that this is caused by Tomcat unsuccessfully reloading the web application. The app is unloaded, but all threads don't get shut down properly. As a result, when the threads try to run, they get clobbered by the fact that Tomcat has shut down its classloader, and an error is logged.
So, in order to solve this issue you have to make sure all threads started by your application will be stopped at application undeployment (or redeployment, it's the same). You can do this by registering a ServletContextListener to your application server and stopping your threads inside contextDestroyed(ServletContextEvent) method.
If you are using log4j, change your logging settings to something like this (the word ERROR replace INFO) :
log4j.rootLogger=ERROR, file, stdout
log4j.logger.org.hibernate=ERROR
They are located in the the log4j.properties file in yr project.
OK I switched to boneCP, c3p0 does not really seem to work for java6!!!

Groovy: deploying a war file

I have a groovy application running locally on my desktop.
Apparently it runs error free. At least all unit tests I wrote are fulfilled.
I want to deploy the application using a war file. For this I use the command
grails war
in the home directory of the application. When doing this I am getting the following exception:
Error executing script War: java.lang.NullPointerException
gant.TargetExecutionException: java.lang.NullPointerException
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.NullPointerException
at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy:289)
at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy)
at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy:282)
at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy)
at _GrailsWar_groovy$_run_closure5_closure25.doCall(_GrailsWar_groovy:258)
at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:256)
at _GrailsWar_groovy$_run_closure4.doCall(_GrailsWar_groovy:239)
at War$_run_closure1.doCall(War.groovy:38)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
... 10 more
Any hint why?
Thanks a lot in advance
I think you'll have to find the source of Gant.groovy and see what it's doing on that line. Apparently there is some problem caused by your project's specific configuration (since such a show-stopper bug would have been caught if it always occurred), but the error message does not contain much information.
Alternatively, you could try upgrading Grails to the latest version 1.1.1 if you haven't already.