I got the following error when trying to start presto server, how can I diagnose what property is malformed or something else? Thanks.
config file:
coordinator=true
datasources=jmx
http-server.http.port=8080
presto-metastore.db.type=h2
presto-metastore.db.filename=var/db/MetaStore
task.max-memory=1GB
discovery-server.enabled=true
discovery.uri=http://localhost:8080
exception is
2013-11-11T11:11:39.582-0800 ERROR main com.facebook.presto.server.PrestoServer Guice creation errors:
1) Error: Constraint violation with property prefix '': environment is malformed (for class io.airlift.node.NodeConfig)
at io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error
com.google.inject.CreationException: Guice creation errors:
1) Error: Constraint violation with property prefix '': environment is malformed (for class io.airlift.node.NodeConfig)
at io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:435) ~[guice-3.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:154) ~[guice-3.0.jar:na]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:106) ~[guice-3.0.jar:na]
at com.google.inject.Guice.createInjector(Guice.java:95) ~[guice-3.0.jar:na]
at io.airlift.bootstrap.Bootstrap.initialize(Bootstrap.java:277) ~[bootstrap-0.84.jar:0.84]
at com.facebook.presto.server.PrestoServer.run(PrestoServer.java:137) ~[presto-server-0.52.jar:0.52]
at com.facebook.presto.server.PrestoServer.main(PrestoServer.java:50) ~[presto-server-0.52.jar:0.52]
Apologies for the very unfriendly and unhelpful error message. This is on our list of things to fix.
The error "environment is malformed" means that the node.environment property (in the node.properties file) is set but fails to match the following regular expression: [a-z0-9][_a-z0-9]*. In other words, it must be lowercase, start with an alphanumeric character, and have only alphanumeric or underscores in subsequent characters.
Try a simpler name like test or production.
Not that it's of consolation, but I am getting something similar on Centos:
1) Error: Constraint violation with property prefix '': environment
may not be null (for class io.airlift.node.NodeConfig) at
io.airlift.node.NodeModule.configure(NodeModule.java:34)
1 error com.google.inject.CreationException: Guice creation errors:
Related
use anyhow::Context;
fancy_module::run()
.await
.with_context(|| {
format!("An error has been found")
})?;
From what I understand, when run returns an error, we return "An error has been found". But this message is not really meaningful. I would like to also return the error that run returns. Something like format!("An error has been found {}", e). How do I get e returned by run?
I could do that in multiple lines of code. By fetching the result of run and then having a match statement. Is there a nicer way of doing that?
From what I understand, when run returns an error, we return "An error has been found".
Not correct! context and with_context create a wrapper around the underlying error value to introduce additional context, but the original error is kept within!
Once you try displaying the error, you will see something of this sort:
Error: An error has been found
Caused by:
No such file or directory (os error 2)
(This also shows that "An error has been found" is a poor choice of words for creating additional context.)
I would like to also return the error that run returns. Something like format!("An error has been found {}", e).
That used to be a reasonable design decision in the past, but the current guidelines for error type design are against including the source error in the display message, unless that source error is also not reachable in the source error chain. The context methods will put the error in the source chain, so including that error's message into the top level error's message is ill advised.
How do I get e returned by run?
See the chain method in order to traverse the chain of source errors and so enable you to peek into underlying causes. Still, anyhow's error type was mostly designed to be opaque. If you need better introspection into what the error entails or easier pattern matching on errors, consider using a structural error type instead of anyhow::Error (snafu or thiserror can help you build them).
See also:
Should an Error with a source include that source in the Display output?
What is the difference between "context" and "with_context" in anyhow?
Simplier way to return custom error type with anyhow::Error?
can any body tell me the actual reason causing the below error:
oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NullPointerException, msg=null
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:7349)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1257)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1449)
at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1355)
at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1340)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7236)
at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBindingWithParams(DCJboDataControl.java:2987)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1541)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
...
...
..
.
Caused by: java.lang.NullPointerException
at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15884)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName(Unknown Source)
at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22684)
From the stacktrace, it seems some bind variable that is required by your view object query is not being set correctly.
If it works intermittently, it could be that the bind variable is lost at some point. To debug/test, try it with a hard-coded value for your bind variable and see if that works first (if you have a ViewCriteria, try removing that first) - then run the task flow and see if it works consistently.
I would suggest running the application in JDeveloper with -Djbo.debugoutput=console argument. It gives you a lot if information of what your business components are doing and you could catch the error cause in console logs.
I want to show more beautiful error message to my users.
For example if someone types integer i= the error message no viable alternative at input '<EOF>' appears. That's totally fine and predictable due to my grammar rules but I'm figuring out ways to improve those messages. If the = is missing in the example above the message changes to mismatched input '<EOF>' expecting '='. Again predictable but I can do more stuff on things like this in my code than on a general input error.
Should I catch them in the code and try to evaluate which cases is meant? Or is there a better way to handle this?
Typically you'd create your own error listener and add it to the parser where you can deal with the error yourself. For that remove any existing error listeners (one for the console is automatically registered by default), by calling parser.removeErrorListeners();. Define an own error listener class derived from BaseErrorListener and add an instance of that to your parser via parser.addErrorListener(yourListener);. You can see an example of such a custom error listener in the ANTLR runtime (search for XPathLexerErrorListener). Override the syntaxError method and use the provided info to generate your own error message. There is already a message passed in to this method (in addition to other stuff like line + char position, exception etc.), which you cannot customize as it comes directly from generated code. So best is probably to leave that alone and start from scratch (the passed in exception is your best option you have).
In my APP I have a really simple model with just two classes. One of those is CDAttribute.
This APP is in the store and was working. Now I tested it the fist time with xCode 6 today and put a new version of it on my iPad. Now I get this error
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '"CDAttribute" is not a subclass of NSManagedObject.'
*** First throw call stack:
(0x18342e084 0x193e800e4 0x1830f5350 0x183113f94 0x10004450c 0x100043410 0x1833d4434 0x1833137e0 0x18420b6c0 0x10003f758 0x187e3f104 0x187e432dc 0x187e47624 0x187e46b00 0x187e46a58 0x187e3a38c 0x18b605640 0x1833e6360 0x1833e5468 0x1833e3a8c 0x183311664 0x18c41f5a4 0x187c16984 0x10004d0a0 0x1944eea08)
libc++abi.dylib: terminating with uncaught exception of type NSException
calling this fuction
CDAttribute *attr = (CDAttribute *)[NSEntityDescription insertNewObjectForEntityForName:#"CDAttribute" inManagedObjectContext:self.managedObjectContext];
Which I can't understand because I didn't touch the model nor the code.
It seems like CDAttribute is reserved in iOS8. I changed the Classname (not the table name in the model, because then I'd probably loose all my entries when I update to this version) to SIAttribute and it worked.
It was the solution, however I'd be intrested if its really reserved and where it is documented.
WHen I start VS2012 I always get an exception tellng me to look at ActivityLog.xml. Here is what I see- useless to me. Hoping someone else has seen this before.
Also - VS2012 eats 100% of the CPU on the machine at time. Hoping the two are related and fixable.
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) The current type, SquaredInfinity.Foundation.Configuration.Services.IConfigurationService, is an interface and cannot be constructed. Are you missing a type mapping?
Resulting in: Resolution of the dependency failed, type = "SquaredInfinity.Foundation.Configuration.Services.IConfigurationService", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, SquaredInfinity.Foundation.Configuration.Services.IConfigurationService, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving SquaredInfinity.Foundation.Configuration.Services.IConfigurationService,(none)
Resulting in: An exception occurred while trying to create an instance of type '#Btb.#Rtb'.
Resulting in: Cannot activate part '#Btb.#Rtb'.
Element: #Btb.#Rtb --> #Btb.#Rtb
Resulting in: Cannot get export '#Btb.#Rtb (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider")' from part '#Btb.#Rtb'.
Element: #Btb.#Rtb (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider") --> #Btb.#Rtb
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass42.<CreateStronglyTypedLazyOfTM>b__1()
at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value()
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, Object errorSource)
Is your VSCommands extension up to date?
There was a compatibility issue which could produce similar stack trace, and it was fixed in latest release.