What is this System.ArgumentException on ContainerBuilder.Build (autofac)? And is it a problem? - autofac

When running the following code:
var builder = new ContainerBuilder();
builder.Build();
with Exception Settings: (all) Common Language Runtime Errors, I get the following error
System.ArgumentException: 'Bit position in AllKeywords (48) must equal the command argument named "EtwSessionKeyword" (43).'
What is this System.ArgumentException on ContainerBuilder.Build? And is it a problem?
I am running in .Net 4.8, Autofac 6.5.0

Related

Error upgrading Jasperreports server from 7.2 to 7.5 (keystore problem)

The upgrade procedure is pretty simple and well documented. I have been upgrading jasperreports server since version 4 always using the same procedure (buildomatic).
Now, in 7.5 version I get
java.lang.RuntimeException: KeystoreManager was never initialized or
there are errors while instantiating the instance.
Failed to instantiate
[com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure
that create-keystore was executed;
Error creating bean with name 'keystoreManager': Invocation of init
method failed;
Error creating bean with name 'passwordEncoder': Unsatisfied
dependency expressed through field 'keystoreManager';
The keystore is in /root folder, as it should.
Have you tried the process mentioned in this link https://community.jaspersoft.com/wiki/encryption-jasperreports-server-75
"If the JasperReports Server cannot find the keystore files - maybe because of permissions as noted above, you will get an exception on server start like:
Failed to instantiate [com.jaspersoft.jasperserver.crypto.KeystoreManager]: Please make sure that create-keystore was executed; nested exception is java.lang.RuntimeException: KeystoreManager was never initialized or there are errors while instantiating the instance.
To fix this, you need to move the keystore files into a directory that is accessible by the user running the web app process. See Updating keystore files below."

How to use U2.Data.Client for .NET Core Web API?

I am looking to create a connection with Universe DB using .NET Core Web API and run SELECT queries but I am getting an error and have heard that U2.Data.Client cannot be used for .NET Core. Is there any workaround for this?
Below is the code which I am trying to execute but an exception is thrown while initializing U2Connection:
U2Connection con = new U2Connection();
U2ConnectionStringBuilder csb = new U2ConnectionStringBuilder();
csb.AccessMode = "Native";
csb.RpcServiceType = "uvcs";
csb.Database = "HS.SALES";
csb.UserID = "user";
csb.Password = "password";
csb.Server = "localhost";
csb.ServerType = "universe";
con.ConnectionString = csb.ToString();
con.Open();
These are the exceptions which I get when calling the U2Connection constructor:
System.TypeInitializationException: 'The type initializer for 'U2.Data.Client.U2Connection' threw an exception.'
MissingMethodException: Method not found: 'System.Security.Policy.Evidence System.Reflection.Assembly.get_Evidence()'.
There is no .Net core version of Universe database connector yet! If you are using .Net core 2.x you can target .Net Framework as workaround to be able to use a .Net Framework library where you manage you Universe database access by using the available connector from U2 Toolkit for .NET.
Hope this will help you.

Compilation Error while writing Hopping Window in Kafka Streams(Confluent 4.0.0)

I am trying to write aggregation operation on time-windows in Confluent open source 4.0.0 version as below.
KTable<Windowed<String>, aggrTest> testWinAlerts =
testRecords.groupByKey()
.windowedBy(TimeWindows.of(TimeUnit.SECONDS.toMillis(120))
.advanceBy(TimeUnit.SECONDS.toMillis(1)))
.aggregate(
new aggrTestInitilizer(),
new minMaxCalculator(),
Materialized.<String, aggrTest, WindowStore<Bytes, byte[]>>
as("queryable-store-name")
.withValueSerde(aggrMessageSerde)
.withKeySerde(Serdes.String()));
But above code gives error while compilation as below
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method aggregate(Initializer<VR>, Aggregator<? super String,? super TestFields,VR>, Materialized<String,VR,WindowStore<Bytes,byte[]>>) in the type TimeWindowedKStream<String,TestFields> is not applicable for the arguments (aggrTestInitilizer, minMaxCalculator, Materialized<String,aggrTest,WindowStore<Bytes,byte[]>>)
Same code when I write in 3.3.1 version as below, it does not give any error
KTable<Windowed<String>, aggrTest> testWinAlerts =
testRecords.groupByKey()
.aggregate(
new aggrTestInitilizer(),
new minMaxCalculator(),
TimeWindows.of(TimeUnit.SECONDS.toMillis(120))
.advanceBy(TimeUnit.SECONDS.toMillis(1)),
aggrMessageSerde,
"aggr-test");
What might be issue? Also aggrTestInitilizer, minMaxCalculator, aggrMessageSerde used in all cases are same.

Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'

I am getting an "System.InvalidCastException occurred" exception where I am using the EF 6 asynchronous functionality.
The message is: Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'.
This application was upgraded from MVC4 to MVC5 and is using the .Net Framework 4.5 for the first time.
I am aware this has been raised as an issue before; https://github.com/Glimpse/Glimpse/issues/540 but I tried getting the latest version of Glimpse and I still got the same problem.
I am wondering if I failed to uninstall Glimpse properly, either the latest version or the one I used previously.
The code where the exception happened is;
public static async Task<IList<Company>> GetCompaniesAsync()
{
using (var db = new SherryGreenGroupContext())
{
return await db.Companies
.Include("AddressLines")
.Where(x => x.EndOfBusinessDate == null)
.OrderBy(x => x.CompanyName).ToListAsync();
}
}
The exception is;
System.InvalidCastException occurred
HResult=-2147467262
Message=Unable to cast object of type 'Glimpse.Ado.AlternateType.GlimpseDbConnection' to type 'System.Data.SqlClient.SqlConnection'.
Source=System.Data
StackTrace:
at System.Data.SqlClient.SqlCommand.set_DbConnection(DbConnection value)
InnerException:
You should check you don't have Glimpse EF5 installed. That fixed it for me.
If you dont' then just uninstall all Glimpse packages. Clean your solution and reinstall Glimpse.

ActivitiException: unknown variable type name alfrescoScriptNode

I am using alfresco community edition and its activiti workflow engine.
I want to access activiti tasks and executions in my java classes; set and get some variables. but there is a problem in RuntimeService It throws an exception when call its method:
org.activiti.engine.ProcessEngine.getRuntimeService().getVariables(taskExecutionId))
It throws:
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.activiti.engine.ActivitiException: unknown variable type name alfrescoScriptNode
### The error may involve org.activiti.engine.impl.persistence.entity.VariableInstanceEntity.selectVariablesByExecutionId-Inline
### The error occurred while setting parameters
### Cause: org.activiti.engine.ActivitiException: unknown variable type name alfrescoScriptNode
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:77)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:182)
at org.activiti.engine.impl.persistence.entity.VariableInstanceManager.findVariableInstancesByExecutionId(VariableInstanceManager.java:47)
at org.activiti.engine.impl.persistence.entity.ExecutionEntity.loadVariableInstances(ExecutionEntity.java:880)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.ensureVariableInstancesInitialized(VariableScopeImpl.java:57)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.collectVariables(VariableScopeImpl.java:78)
at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.getVariables(VariableScopeImpl.java:65)
at org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:58)
at org.activiti.engine.impl.cmd.GetExecutionVariablesCmd.execute(GetExecutionVariablesCmd.java:28)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.RuntimeServiceImpl.getVariables(RuntimeServiceImpl.java:81)
I searched about it but there was no relevant result.