Upgrading NServiceBus from version 3 to 4 and get this error while compiling:
error CS0234: The type or namespace name 'Impl' does not exist in the namespace 'NServiceBus.Sagas' (are you missing an assembly reference?)
if (NServiceBus.Sagas.Impl.Configure.SagasWereFound)
{
var connStr = ConfigurationManager.AppSettings["DB"];
// Register session factory which takes care of managing
// the database connections and transactions
Configure.Instance.Configurer.ConfigureComponent(typeof(OracleSagaSessionFactory),
DependencyLifecycle.InstancePerCall)
.ConfigureProperty("ConnectionString", connStr);
// Then register the saga persister itself
Configure.Instance.Configurer.ConfigureComponent(typeof(OracleSagaPersister),
DependencyLifecycle.InstancePerCall);
}
You should be able to use:
NServiceBus.Features.Feature.IsEnabled<Features.Sagas>()
Related
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."
I'm a beginner in both F# and the .Net world, I'm trying to make this F# script work:
#r "./packages/SQLProvider/lib/netstandard2.0/FSharp.Data.SqlProvider.dll"
#r "./packages/SQLProvider/lib/netstandard2.0/netstandard.dll"
#r "./packages/Npgsql/lib/netstandard2.0/Npgsql.dll"
open FSharp.Data.Sql
open Npgsql
let [<Literal>] ConnString =
"Host=localhost;" +
"Port=5431;" +
"Database=suavetododb;" +
"Username=postgres;" +
"Password=postgres"
let [<Literal>] DbVendor = Common.DatabaseProviderTypes.POSTGRESQL
let [<Literal>] ResPath = #"./packages/Npgsql/lib/netstandard2.0"
type Sql =
SqlDataProvider<
DbVendor,
ConnString,
"",
ResPath,
1000,
true>
This is the error I get:
error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Could not resolve field token 0x04000523, due to: Could not load type of field 'Npgsql.NpgsqlConnection+d__28:<>u__2' (7) due to: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. assembly:System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 type: member:(null) signature: assembly:(my_filesystem)/API/packages/Npgsql/lib/netstandard2.0/Npgsql.dll type:d__28 member:(null) signature:
Which is weird, since Npgsql is actually imported (so the last #r actually works).
The database is up via docker:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4704763ec2ba suave_rezoom_db:0.1 "docker-entrypoint.s…" 25 hours ago Up 2 hours 0.0.0.0:5431->5432/tcp todo_rezoom_1
Also, the project was generated via the .Net Core 2.1.200 and is running on Linux.
This is because the type provider needs to resolve dependencies of the third-party driver (Npgsql in this case), and it can't because it doesn't have access to the full dependency tree like NuGet (or Paket) does. You need to copy System.Threading.Tasks.Extensions.dll to the same folder where Npgsql.dll sits (your ResPath) so that the type provider can resolve that assembly.
Once you do that, you'll find that you also need to copy System.Runtime.CompilerServices.Unsafe.
I've started a new React+Redux project in VS2017 (.net core 2.0). Default template comes without database use, so I just added use of entity framework manually. It compiles well but when I try to add a migration using command
dotnet ef migrations add "Initial"
I'm getting the next error:
An error occurred while calling method 'BuildWebHost' on class 'Program'. Continuing without the application service provider. Error: One or more errors occurred. (Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Users\sibvic\AppData\Local\Temp\iu25u5dg.r0n:83:19)
at __webpack_require__ (C:\Users\sibvic\AppData\Local\Temp\iu25u5dg.r0n:20:30)
at createWebpackDevServer (C:\Users\sibvic\AppData\Local\Temp\iu25u5dg.r0n:62:26)
at C:\Users\sibvic\AppData\Local\Temp\ftqvg4wq.l1l:114:19
at IncomingMessage.<anonymous> (C:\Users\sibvic\AppData\Local\Temp\ftqvg4wq.l1l:133:38)
at emitNone (events.js:86:13)
Current directory is: C:\projects\test\bin\Debug\netcoreapp2.0
)
Unable to create an object of type 'ApplicationDbContext'. Add an implementation of 'IDesignTimeDbContextFactory<ApplicationDbContext>' to the project, or see https://go.microsoft.com/fwlink/?linkid=851728 for additional patterns supported at design time.
It looks like this features is too new. Not much information I can find. And can't figure out what's wrong by myself (at least yet, rubber duck method doesn't work either).
Any idea how to fix it?
I had the same issue during migration from dotnet core 1.1 to 2.0.
I had to update implementation of my Program class to following:
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>()
.Build();
}
I know that this is not about React+Redux, but maybe it can help you.
I am working with the Rule Designer for the Business Rules service on Bluemix to create a BOM entry from an XML schema. When I select the XOM entry in the wizard, I see the error:
"Invalid XOM entry, please check your log file"
The Eclipse log file contains the following stacktrace:
!MESSAGE An error occurred while loading the XML schema
C:\mySchema.xsd.
!STACK 0
ERROR ERR011: in source file:C:/mySchema.xsd, after line 18, before
lines ?, The type reference on MyType cannot be resolved.
ERROR ERR011: in source file:C:/mySchema.xsd, after line 21, before
lines ?,
The type reference on MyType cannot be resolved.
at ilog.rules.xml.model.IlrXsdXomConvertorBase.convertSchema(IlrXsdXomConvertorBase.java:111)
at com.ibm.rules.dynamic.xom.SchemaDriver.loadModel(SchemaDriver.java:159)
at com.ibm.rules.dynamic.xom.XsdBuilder.buildXom(XsdBuilder.java:63)
at ilog.rules.studio.model.xom.impl.IlrDynamicXOMPathEntryImpl.getXsdReflect(IlrDynamicXOMPathEntryImpl.java:676)
...
How do I resolve this?
I had multiple xsd:import statements for the same namespace.
I put all the declarations for the namespace in a single file, and then used a single xsd:import for that namespace.
Another way is to add a new schema file that uses several xsd:include statements to include all the schema declarations for the namespace into this new file.
I had the same error message when I used www. at my xsd namespace.
Try changing your namespace "schema targetNamespace= and xmlns:tns= schema" until you can create the BOM succesfully. Verify you have the same value for both.
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.