Error while issuing a state in Postgres Corda 4.6 OS - corda

Following are the error I got when trying to initiate a state in Corda 4.6OS using Postgres:
"net.corda.core.CordaRuntimeException: com.esotericsoftware.kryo.KryoException: java.lang.UnsupportedOperationException: net.corda.nodeapi.internal.persistence.CordaPersistence, which is a closeable resource, has been detected during flow checkpointing. Restoring such resources across node restarts is not supported. Make sure code accessing it is confined to a private method or the reference is nulled out."

unfortunately with just this information it's hard to know what exactly happened.
Here's some examples of what could be happening.
look carefully through the stacktrace, if you're getting an unsupported runtime exception or other exceptions from code that's not in your control look around and make sure you're using packages / resources that line up with the cordapp template.
For example I had something like this for a couple hours because I was using the wrong junit package in my imports and the tests weren't initializing properly so you can get errors like this one and it won't be obvious at all why unfortunately.
Here's a link to the cordapp template, try to carefully check your flow / state to make sure all the imports are reasonable and you're using the right packages / gradle dependencies.
https://github.com/corda/cordapp-template-java
https://github.com/corda/cordapp-template-kotlin
good luck

Related

Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.1:verify (verify)

When i am trying to build the project using maven ,getting this error .Can any one help me sort this out?
Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.1.1:verify (verify)
The Apache Karaf feature verification fails. You don't provide any useful information, so it's hard to tell what's going wrong, but the most common cause is that an OSGi bundle's requirement can not be satisfied. It's either a missing package or a missing service, and in both cases, you need to add a dependency to a bundle providing a capability that can match the requirement.

Getting exception when instantiating AlternatorDBClientV2

When I am trying to create a new instance of AlternatorDBClientV2 I am getting below exception.
java.lang.NoSuchMethodError: com.amazonaws.transform.JsonErrorUnmarshaller: method ()V not found
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.init(AlternatorDBClientV2.java:106)
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.(AlternatorDBClientV2.java:100)
at com.michelboudreau.alternatorv2.AlternatorDBClientV2.(AlternatorDBClientV2.java:95)
I am using 0.12.0 version of alternator.
any idea why this exception is occurring.
Thanks!!
I recently ran into this as well.
JsonErrorUnmarshaller is a class internal to Amazon's SDK, and if you take a look in the jar's source, they apparently changed the constructor to take some arguments recently.
That means that the line at https://github.com/mboudreau/Alternator/blob/master/src/main/java/com/michelboudreau/alternatorv2/AlternatorDBClientV2.java#L106 would fail, as it calls new JsonErrorUnmarshaller().
I'm afraid you might need to configure local DynamoDB. Alternator hasn't been updated in 2 years, there's going to be incompatibilities.

Guice, Peaberry and ServletModule

I am having an issue getting Peaberry/Guice/OSGi/Servlets to place nice. To begin, I have been migrating a Jetty-based, WAR deployed webapp over to OSGi to leverage the plugin architecture. My original application was using guice everywhere.
I have broken everything into modules and Maven-iszed the build. Everything seems to be working except for the pesky installation of the ServletModule.
I receive the following exception when I attempt to install a ServletModule:
java.lang.NoClassDefFoundError: com/google/inject/internal/util/$Preconditions
at com.google.inject.servlet.ServletModule.configure(ServletModule.java:44)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.AbstractModule.install(AbstractModule.java:118)
at com.payplum.CoreActivator$CoreImportModule.configure(CoreActivator.java:145)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at com.payplum.CoreActivator.start(CoreActivator.java:53)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
So I'm not quite clear on why it's failing to find these bundles. I have added the guice-servlet dependency and have verified that it is making it into my deployed bundles.
I guess the other piece of importance is registering the GuiceFilter. I use the ServiceTracker to get the ExtHttpService, as I'm using Jetty. When that Tracker returns, I add register it out using the typical call
service.registerFilter( this.guiceFilter, "/*", null, 0, null );
And that seems to work fine. I'm really struggling to get these things working and I'm a little caught in the middle between the Guice/OSGi/Peaberry part. Any help is much appreciated.
Thanks!
The exception means you're missing a class on your classpath, so you're either missing a jar or one of the jars (surprisingly) doesn't include its required classes. Check the JARs that are included in your final war file e.g. using 'jar -tf thejar.jar' on whether they include the $Preconditions class.

Flex SDK missing fundamental things

alt text http://img710.imageshack.us/img710/4107/flashbuildershite.jpg
All of a sudden Flash Builder 4 is missing all kinds of fundamental things and is generating incorrect errors. I've had the same issue yesterday, where I fixed it by downloading a new Flex SDK and importing that into FB. I did this again, but this time it fixed nothing.
I don't think it's something I did, like removing critical references from the build path. The errors also appeared on projects I was not working on at the time. It occurs for ActionScript, Flex and Flex Library projects alike.
Update 3: Well, i've singled the problem down to a single piece of code, though a very simple one. I can make a new workspace in FB and things work ok, then screw the workspace up forever by adding this code to a project. All projects will have errors and closing or even removing the faulty project does not change this. Making another new workspace (without the faulty code) makes my projects compile again.
Link: http://www.the3rdage.net/files/2745/Main.as
(i've uploaded the file in case an odd character or encoding error causes the error)
Update 2: I've tried manual compiling with mxmlc, the same errors occur. It appears to be an SDK problem, not Flash Builder.
Update: I find this stack trace in the Flash Builder error log:
!ENTRY com.adobe.flexbuilder.project 4 43 2010-05-11 11:55:47.495
!MESSAGE Uncaught exception in compiler
!STACK 0
java.lang.NullPointerException
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2592)
at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:64)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2233)
at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2578)
at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:48)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2310)
at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2503)
at macromedia.asc.parser.WithStatementNode.evaluate(WithStatementNode.java:44)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2310)
at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2891)
at macromedia.asc.parser.FunctionCommonNode.evaluate(FunctionCommonNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:2905)
at macromedia.asc.parser.FunctionCommonNode.evaluate(FunctionCommonNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:3643)
at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106)
at macromedia.asc.semantics.ConstantEvaluator.evaluate(ConstantEvaluator.java:3371)
at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80)
at flex2.compiler.as3.As3Compiler.analyze4(As3Compiler.java:709)
at flex2.compiler.CompilerAPI.analyze(CompilerAPI.java:3089)
at flex2.compiler.CompilerAPI.analyze(CompilerAPI.java:2977)
at flex2.compiler.CompilerAPI.batch2(CompilerAPI.java:528)
at flex2.compiler.CompilerAPI.batch(CompilerAPI.java:1274)
at flex2.compiler.CompilerAPI.compile(CompilerAPI.java:1496)
at flex2.tools.oem.Application.compile(Application.java:1188)
at flex2.tools.oem.Application.recompile(Application.java:1133)
at flex2.tools.oem.Application.compile(Application.java:819)
at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:344)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(ASApplicationBuilder.java:276)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplicationBuilder.java:127)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:190)
at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:74)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(FlexProjectBuilder.java:480)
at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(FlexProjectBuilder.java:306)
at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(FlexIncrementalBuilder.java:157)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:256)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:309)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:341)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:140)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Did you get a chance to list this issue in their bugs list. I have not yet tried Flex 4. did you try to refresh your project and re open your flash builder.
Update:
What about a simple project. I think you are trying to load something which its not able to get.
mxmlc - verify-digests
Try this.
Problems I've had that were somewhat similar, once I had FB running under the wrong version of Java. Another time I had done some edits to the flex-config.xml file in order to make it work with a Maven plugin we had written in house. After that we made the plugin look at a copy of the original xml file, so that problem went away.
hth.
Might i recommend HFCD? The HellFire Compile Daemon is an out of process flex compiler that speeds up compile times immensely, and almost more importantly runs in a separate process from FlashBuidler. I have had some absolutely horrendous errors with Flash Builder due to the complexity and size of our project, where HFCD has helped tremendously here.

ASP.Net MissingMethodException - "ctor" method not found

We are getting intermittent problems on a production server that we cannot recreate.
There are two very strange things about the issue. Firstly it's a method not found error on the constructor (ctor) for an exception handling helper class and secondly we have custom errors switched on for remote users and this property is being ignored.
The detail of the error is:
Server Error in '/MyWebsite' Application.
Method not found: 'Void MyExceptionHelperClass..ctor (System.Exception)'.
...
Exception Details: System.MissingMethodException: Method not found: 'Void MyExceptionHelperClass..ctor (System.Exception)'.
...
The stack trace is pretty unhelpful.
My thoughts are that there may be an out-of-memory error or something like that that is killing the page. When the exception handling code kicks in it tries to create an exception object which fails for the same reason giving this error.
However this is wild speculation. We are waiting for the event logs to see whether anything is amiss with the server but in the meantime does anyone have any thoughts or suggestions?
UPDATE:
It has proven difficult to get information out of the team responsible for the production servers but I have managed to find out that as far as load balancing is concerned, this site is currently only running on one server (this can be made to switch over onto another if necessary). Given that this is an intermittent problem and there is only one server involved, then I find it difficult to believe that this could be an assembly issue. Surely if it was then the problem would occur every time?
If you see this error happening on a site that has custom errors turned on, then the error is happening in the custom error handling routine itself.
From the look of the .NET error message it appears that your routine is expecting a constructor that accepts an exception by reference - your comment above shows a constructor that accepts by value.
Check carefully that there isn't a stale version of an assembly in your system somewhere. These can lurk in the Temporary ASP.NET Files folder; you'll need to do an "iisreset /stop" before you can clear them out.
In that regard it's always a good idea to make sure that AssemblyInfo.cs is set up to automatically stamp version numbers in some way. We have our version numbers tied to our source code repository system and CI build box so we can tell exactly what was in what assembly really easily.
I would use elmah: http://code.google.com/p/elmah/ to hopefully give you a bit more insight into the issue. It is free and can be used on an existing site without any recompilation. Try it - and post back if the issue is still happening.
As others have also mentioned, I would suspect that your site is somehow using an out of date version of an assembly. Something you could try doing is a full Precompile of your site before deploying to your production server. This ensures that ASP .Net doesn't dynamically compile the site on the fly, and therefore should mean that it's using completely up to date code throughout.
Do you have a no parameter public constructor defined for MyExceptionHelperClass in your code? Or is the class meant to only have static methods, in which case it should be a static class.
public class MyExceptionHelperClass()
{
public MyExceptionHelperClass() { }
}
Unfortunately, this may be one of those cases where the error message is of little to no value. In my experience, this general class of exception may be the result of either a configuration issue or bad logic aroung threading/app domains. For example, I have seen similar issues upon attempting to load the same assembly into an app domain more than once.
You mention that this is difficult to reproduce. If it's only happening on one server in the production farm it's more likely to be a config issue (with that machine). If it's happening on more than one server than it could be either config or threading.
It might be worth spending some time looking at the larger code base around the areas mentioned above. The root cause may not be in this class. Good luck!
I think it's a Framework issue with keeping compiled versions consistency. It's common to see same sort of errors while updating site sources repeatedly. Just try something like
net stop iisadmin /y && del /q /f /s "%systemroot%\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\*.*" && iisreset
I encountered this exception today on a webforms page. I found a solution, but I'm not sure why it worked.
Nest the code behind in a 'Namespace [YourNamespace]' tag.
Add the namespace to the html Page tag's Inherits property in the aspx page 'Inherits="PathStart.YourNameSpace.ClassName"'.
Rebuild
Navigate to the page again and you should not encounter the exception.
After following the steps above I reverted the changes and did not re-encounter the exception.

Resources