Sitefinity 6.0 Upgrade - telerik

Currently my sitefinity is working on Version 5.4.
I have to upgrade sitefinity to version 6.3.
I have followed all the steps mentioned in the sitefinity forum. First I upgraded to 6.0 and it worked fine. One small change I did manually was that I had to add a block of code mentioned below to force assembly redirect since even after upgrading, my site was referencing to the older version(5.4.4010.0)
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="5.4.4010.0" newVersion="6.0.4210.0"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="5.4.4010.0" newVersion="6.0.4210.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>
After I updated the above block in my web.config file, the application worked absolutely fine.
Now, as instructed I tried to upgrade to version 6.1 from version 6.0 following the procedures mentioned on the stefinity forum.
After up-gradation I had to modify the the web.config with the code mentioned below:
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="5.4.4010.0" newVersion="6.2.4900.0"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="5.4.4010.0" newVersion="6.2.4900.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>
<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="6.0.4210.0" newVersion="6.2.4900.0"/>
    </dependentAssembly>
    <dependentAssembly>
      <assemblyIdentity name="Telerik.Sitefinity.Model" publicKeyToken="b28c218413bdf563" culture="neutral"/>
      <bindingRedirect oldVersion="6.0.4210.0" newVersion="6.2.4900.0"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>
After this modification, the application works fine however, the product description page does not seem to work. It gives me an error mentioned below.
Server Error in '/' Application.
 
Value cannot be null.
Parameter name: item
 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: item
 
Source Error:
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
 
Stack Trace:
 
 
[ArgumentNullException: Value cannot be null.
Parameter name: item]
   Telerik.Microsoft.Practices.Unity.Utility.Guard.ArgumentNotNull(Object argumentValue, String argumentName) +68
   Telerik.Sitefinity.Lifecycle.LifecycleDecorator.GetMaster(ILifecycleDataItemGeneric item) +67
   Telerik.Sitefinity.Lifecycle.LifecycleDecorator.Telerik.Sitefinity.Lifecycle.ILifecycleDecorator.GetMaster(ILifecycleDataItem cnt) +61
   Telerik.Sitefinity.Modules.Ecommerce.Orders.Implementations.ProductOptionsPopulator.GetProductVariation(Product product, List`1 selectedAttributeValues) +192
   Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.ProductOptionsControl.GetSelectedOptions() +1255
   Telerik.Sitefinity.Modules.Ecommerce.Catalog.Web.UI.ProductOptionsControl.get_SelectedOptions() +38
   Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.AddToCartWidget.GetOptionDetails() +322
   Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.AddToCartWidget.GetProductVariation() +39
   Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.AddToCartWidget.SwitchVisibilityBasedOnInventory() +45
   Telerik.Sitefinity.Modules.Ecommerce.Orders.Web.UI.AddToCartWidget.InitializeControls(GenericContainer container) +45
   Telerik.Sitefinity.Web.UI.SimpleView.CreateChildControls() +106
   System.Web.UI.Control.EnsureChildControls() +83
   System.Web.UI.Control.PreRenderRecursiveInternal() +42
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Control.PreRenderRecursiveInternal() +155
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
 
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
This is my upgrade trace
----------------------------------------
Timestamp: 3/5/2014 6:29:03 AM
Message: PASSED : SiteInitializer: Upgrade to 4100 (method: ReorderAdminMenu_6_0)
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:29:05 AM
Message: PASSED : SiteInitializer: Upgrade to 4100 (method: AddContentLocationsBackendPage)
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:29:05 AM
Message: PASSED : SiteInitializer: Upgrade to 4200 (method: UpgradeBackendTemplatesRemoveIE8Compatibility)
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:30:19 AM
Message: Libraries: Upload mode changed to Silverlight
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:30:38 AM
Message: PASSED : Copy data from sf_ec_product_type.title to sf_ec_product_type.title_
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:30:38 AM
Message: PASSED : Copy data from sf_ec_product_type.title_plural to sf_ec_product_type.title_plural_
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:32:09 AM
Message: PASSED : Scheduling task for updating content locations
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:35:03 AM
Message: PASSED : Updating content locations service
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:53:28 AM
Message: PASSED : SiteInitializer: Upgrade to 4300 (method: Upgrade_InitializeNavigationWidgetTemplates)
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:53:44 AM
Message: PASSED: OpenAccessLibrariesProvider - Prepare 'sf_media_thumbnails' table for upgrade
----------------------------------------
----------------------------------------
Timestamp: 3/5/2014 6:54:20 AM
Message: PASSED WITH WARNINGS: OpenAccessLibrariesProvider: Prepare thumbnails legacy mode: Telerik.OpenAccess.OpenAccessException: SQL exception on 'update sf_media_thumbnails set total_size=DATALENGTH(dta) where dta is not null' : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding..For more details see the error log
----------------------------------------
Can anyone help me out this?
Thanks.

You could try using a tool like Beyond Compare to compare your site files with the vanilla Sitefinity version you're trying to upgrade to. In the folder where you ran the Sitefinity.exe file from the Sitefinity project manager to do the upgrade, there should be a another folder called _EmptyProject. Compare that with your site and make sure all the correct dll's were moved over and that the web.config was updated appropriately.

Related

Error on Open Kb Genexus 17 in Genexus 18

========== Preserve Knowledge Base style based on themes started ==========
No version update was required.
Failed: Preserve Knowledge Base style based on themes
I receive this error in every single KB when i close on Genexus 17 and Open on Genexus 18.
Timestamp: 13/02/2023 14:09:47
Message: HandlingInstanceID: 24c7ba00-4ede-4a8d-b273-6b13d512b349
An exception of type 'Artech.Common.Diagnostics.GxException' occurred and was caught.
-------------------------------------------------------------------------------------
02/13/2023 14:09:47
Type : Artech.Common.Diagnostics.GxException, Artech.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=6f5bf81c27b6b8aa
Message : Cannot access a disposed object.
Object name: 'ObjectSelectorControl'.
Source :
Help link :
Exception Data
Product : GeneXus 18
Version : 18.0.167910 U1
Exception.Severity : Error
TargetSite :
HResult : -2146232832
Stack Trace : The stack trace is unavailable.
Additional Info:
MachineName : MACHINNENAME
TimeStamp : 13/02/2023 17:09:47
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=79a65ef946496ecc
AppDomainName : GeneXus.exe
ThreadIdentity : MACHINNENAME\WINDOWSUSER
WindowsIdentity : MACHINNENAME\WINDOWSUSER
Inner Exception
---------------
Type : System.ObjectDisposedException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Cannot access a disposed object.
Object name: 'ObjectSelectorControl'.
Source : System.Windows.Forms
Help link :
ObjectName : ObjectSelectorControl
TargetSite : Void CreateHandle()
HResult : -2146232798
Stack Trace : at System.Windows.Forms.Control.CreateHandle()
at System.Windows.Forms.Control.get_Handle()
at Artech.Core.UI.ToolWindows.ObjectSelectorControl.StopPainting()
at Artech.Core.UI.ToolWindows.ObjectSelectorControl.OnUpdateDataSource(List`1 items)
at Artech.Core.UI.ToolWindows.ObjectSelectorControl.set_Objects(List`1 value)
at Artech.Core.UI.ToolWindows.WorkWithObjectsEditor.Artech.Core.UI.ToolWindows.IObjectBrowser.UpdateControl(ObjectBrowserHelperResult result)
at Artech.Core.UI.ToolWindows.ObjectBrowserHelper.WorkerRunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.RunWorkerCompletedEventHandler.Invoke(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
Category: Default Category
Priority: 0
EventId: 100
Severity: Error
Title:Genexus Application Exception
Machine: MACHINNENAME
Application Domain: GeneXus.exe
Process Id: 6420
Process Name: C:\Program Files (x86)\GeneXus\GeneXus18\GeneXus.exe
Win32 Thread Id: 3696
Thread Name:
Extended Properties: AdvancedInformation.Product - GeneXus 18
AdvancedInformation.Version - 18.0.167910 U1
Exception.Severity - Error

Cannot deserialize value of type when getting CertificateRequest

I am working on fabric8 CertificateRequest, I followed https://github.com/rohankanojia-forks/cert-manager-java-extension-demo/blob/main/src/main/java/io/fabric8/demo/CertificateRequestGet.java to try to get an existing CertificateRequest, but I got error as following.
My test environment:
Kubernetes Cluster: OpenShift 4.7.32
my app environment: Java 11
java version "11.0.12" 2021-07-20
IBM Semeru Runtime Certified Edition 11.0.12.0 (build 11.0.12+7)
Eclipse OpenJ9 VM 11.0.12.0 (build openj9-0.27.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20210901_134 (JIT enabled, AOT enabled)
OpenJ9 - 1851b0074
OMR - 9db1c870d
JCL - 54d2067eec based on jdk-11.0.12+7)
certmanager-client version
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>certmanager-client</artifactId>
<version>5.9.0</version>
</dependency>
Source code
try (CertManagerClient certManagerClient = new DefaultCertManagerClient()) {
CertificateRequest certificateRequest = certManagerClient.v1()
.certificateRequests()
.inNamespace("default")
.withName("aaaaa")
.get();
System.out.println(String.format("%s found in default namespace", certificateRequest.getMetadata().getName()));
System.out.println(SerializationUtils.dumpAsYaml(certificateRequest));
} catch (Exception e) {
e.printStackTrace();
}
Error:
io.fabric8.kubernetes.client.KubernetesClientException: An error has occurred.
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:103)
at io.fabric8.kubernetes.client.KubernetesClientException.launderThrowable(KubernetesClientException.java:97)
at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:263)
at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:215)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:569)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:527)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:494)
at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleGet(OperationSupport.java:476)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.handleGet(BaseOperation.java:788)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.getMandatory(BaseOperation.java:187)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:154)
at io.fabric8.kubernetes.client.dsl.base.BaseOperation.get(BaseOperation.java:87)
at com.ibm.si.osprey.App.main(App.java:66)
Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.util.ArrayList<java.lang.Integer>` from String value (token `JsonToken.VALUE_STRING`)
at [Source: (BufferedInputStream); line: 1, column: 2603] (through reference chain: io.fabric8.certmanager.api.model.v1.CertificateRequest["status"]->io.fabric8.certmanager.api.model.v1.CertificateRequestStatus["ca"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1741)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1515)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1462)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:392)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromString(CollectionDeserializer.java:326)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:250)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:313)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:176)
at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:322)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4675)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3675)
at io.fabric8.kubernetes.client.utils.Serialization.unmarshal(Serialization.java:261)
... 10 more
this is our outpurt yaml file, for your request.
apiVersion: cert-manager.io/v1
kind: CertificateRequest
metadata:
name: barrycertificaterequest
namespace: barry
spec:
duration: 2160h0m0s
issuerRef:
group: cert-manager.io
kind: Issuer
name: barry-dlc-cert-issuer
request: >-<here is your csr>
status:
ca: >-<here is returned ca>
certificate: >-<here is returned certificate>
conditions:
- lastTransitionTime: '2021-10-25T20:13:03Z'
message: Certificate request has been approved by cert-manager.io
reason: cert-manager.io
status: 'True'
type: Approved
- lastTransitionTime: '2021-10-25T20:13:04Z'
message: Certificate fetched from issuer successfully
reason: Issued
status: 'True'
type: Ready

Xamarin Forms Android service crashes right after the boot in mscorlib.dll

I want to run my background service at the boot, I'm on Android using Xamarin Forms. I created the service following the great example “LongRunningTaskService” of Rob Gibbens https://github.com/RobGibbens/XamarinFormsBackgrounding
and works perfectly but I needed it at the boot and not triggered by the UI. I added the service at the boot and there's a crash right after the boot in mscorlib.dll. The crash happens even removing all code and not doing anything apart the broadcast listener.
here the broadcast listener
using Android.App;
using Android.Content;
namespace FormsBackgrounding.Droid
{
[BroadcastReceiver(Enabled = true)]
[IntentFilter(new[] { Android.Content.Intent.ActionBootCompleted })]
public class StartReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
//if (intent.Action == Intent.ActionBootCompleted)
//{
//Intent timerIntent = new Intent(context, typeof(LongRunningTaskService));
//Application.Context.StartService(timerIntent);
//}
}
}
}
here the manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.arteksoftware.formsbackgrounding">
<uses-sdk android:minSdkVersion="16" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application android:label="FormsBackgrounding">
<receiver android:name="StartReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
<service android:name=".LongRunningTaskService" ></service>
</application>
</manifest>
the crash from log
Assembly Loader probing location: '/storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll'.
637): The first listener is added
Image addref mscorlib[0xe1bfe280] -> /storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll[0xeaf8c800]: 2
Prepared to set up assembly 'mscorlib' (/storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll)
AOT module '/storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll.so' not found: dlopen failed: library "/data/app/
/lib/x86/libaot-mscorlib.dll.so" not found
AOT module '/Users/builder/data/lanes/4009/df84ee74/source/monodroid/builds/install/mono-x86/lib/mono/aot-cache/x86/mscorlib.dll.so' not found: dlopen failed: library "/data/app/
/lib/x86/libaot-mscorlib.dll.so" not found
Assembly Loader loaded assembly from location: '/storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll'.
Config attempting to parse: '/storage/emulated/0/Android/data/com.arteksoftware.formsbackgrounding/files/.__override__/mscorlib.dll.config'.
Config attempting to parse: '/Users/builder/data/lanes/4009/df84ee74/source/monodroid/builds/install/mono-x86/etc/mono/assemblies/mscorlib/mscorlib.config'.
mono_threads_platform_set_priority: unknown policy 3
Fatal signal 6 (SIGABRT), code -6 in tid 1462 (msbackgrounding)
debuggerd: handling request: pid=1445 uid=10068 gid=10068 tid=1462
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'Android/vbox86p/vbox86p:7.0/NRD90M/genymo09131924:userdebug/test-keys'
Revision: '0'
ABI: 'x86'
pid: 1445, tid: 1462, name: msbackgrounding >>> com.arteksoftware.formsbackgrounding <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'mono_threads_platform_set_priority: unknown policy 3'
eax 00000000 ebx 000005a5 ecx 000005b6 edx 00000006
esi cd3ef978 edi cd3ef920
xcs 00000023 xds 0000002b xes 0000002b xfs 0000006b xss 0000002b
eip ef775bb9 ebp cd3ef748 esp cd3ef6ec flags 00000292
backtrace:
#00 pc 00000bb9 [vdso:ef775000] (__kernel_vsyscall+9)
#01 pc 0007a2ec /system/lib/libc.so (tgkill+28)
#02 pc 00075b35 /system/lib/libc.so (pthread_kill+85)
#03 pc 0002784a /system/lib/libc.so (raise+42)
#04 pc 0001ee26 /system/lib/libc.so (abort+86)
#05 pc 00270657 /data/app/Mono.Android.DebugRuntime-1/lib/x86/libmonosgen-32bit-2.0.so
Anyone faced same issue? got any workaround?

Mono completely ignores app.config

I've added an app.config file to my project by right-clicking on the solution => Add => New File => Misc => Application Configuration File, and named it "LightmapUpdater.exe.config". "LightmapUpdater.exe" is the name of my executable. Here's what the config file has inside:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="libIL" target="/opt/local/lib/libil.dylib" />
</configuration>
No matter what mistakes I intentionally make in the file, it keeps ignoring them, not giving me even a single warning. Is it supposed to be that way? Why is it ignoring everything I type in there? How can I make sure that mono looks inside of my config file before compiling? I must be missing some step.
It does work for me. With executable file Test773.exe the file is named Test773.exe.config and the dll mapping specified takes place. Is the file in the same directory as the exe file? Is it marked with a "Copy to output" option in MonoDevelop?
The source code of the application:
using System;
using System.Runtime.InteropServices;
namespace Test773
{
class MainClass
{
public static void Main(string[] args)
{
Funkcja();
}
[DllImport("libIL")]
public static extern void Funkcja();
}
}
The content of the config file is copy pasted from your question. The effect of the execution:
Unhandled Exception:
System.DllNotFoundException: /opt/local/lib/libil.dylib
at (wrapper managed-to-native) Test773.MainClass:Funkcja ()
at Test773.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: /opt/local/lib/libil.dylib
at (wrapper managed-to-native) Test773.MainClass:Funkcja ()
at Test773.MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
EDIT:
To trace/debug this you can use MONO_LOG_LEVEL. For example:
MONO_LOG_LEVEL=debug mono Test773.exe | grep config
results in:
Mono: Config attempting to parse: '/usr/lib/mono/4.5/mscorlib.dll.config'.
Mono: Config attempting to parse: '/usr/etc/mono/assemblies/mscorlib/mscorlib.config'.
Mono: Config attempting to parse: '/usr/etc/mono/config'.
Mono: Config attempting to parse: '/home/konrad/.mono/config'.
Mono: Config attempting to parse: '/home/konrad/eksperymenty/Test773/Test773/bin/Debug/Test773.exe.config'.
Mono: Config attempting to parse: '/usr/etc/mono/assemblies/Test773/Test773.config'.

WSO2 data service (DS) in ESB 4.0.3 returns wrong fault message

I work at Apple and we are working on the prototype using WSO2 ESB with Data Services Feature. I am using WSO2 ESB 4.0.3 with DSS feature. I have deployed data service and calling the data service from proxy service in ESB. I am using MAC OS X 10.7.4 and java version details are as below.
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3635)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
My DS service is expecting certain parameter say parameter A and I do not pass that this parameter in the Input XML I see following error on the WSO2 ESB console.
[2012-06-07 09:49:11,348] ERROR - DataService DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:Hw_Serial_Nr
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: OWCHECK
Location: /TQS_OWCHECK.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: OWCHECK_OP
Current Params: {COUNTRYORIGIN=US, SUBDT=20090428}
DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:Hw_Serial_Nr
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: OWCHECK
Location: /TQS_OWCHECK.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: OWCHECK_OP
Current Params: {COUNTRYORIGIN=US, SUBDT=20090428}
at org.wso2.carbon.dataservices.core.engine.CallQuery.extractParams(CallQuery.java:214)
at org.wso2.carbon.dataservices.core.engine.CallQuery.execute(CallQuery.java:183)
at org.wso2.carbon.dataservices.core.engine.CallQueryGroup.execute(CallQueryGroup.java:110)
at org.wso2.carbon.dataservices.core.description.operation.Operation.execute(Operation.java:71)
at org.wso2.carbon.dataservices.core.engine.DataService.invoke(DataService.java:592)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:99)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:116)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:225)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:254)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getFirstOMChild(OMSourcedElementImpl.java:867)
at org.apache.axiom.om.impl.OMNavigator._getFirstChild(OMNavigator.java:196)
at org.apache.axiom.om.impl.OMNavigator.updateNextNode(OMNavigator.java:140)
at org.apache.axiom.om.impl.OMNavigator.getNext(OMNavigator.java:112)
at org.apache.axiom.om.impl.SwitchingWrapper.updateNextNode(SwitchingWrapper.java:1113)
at org.apache.axiom.om.impl.SwitchingWrapper.updateLastNode(SwitchingWrapper.java:1104)
at org.apache.axiom.om.impl.SwitchingWrapper.next(SwitchingWrapper.java:1041)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:47)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.cloneOMElement(OMElementImpl.java:1065)
at org.wso2.carbon.tracer.module.handler.AbstractTracingHandler.storeMessage(AbstractTracingHandler.java:81)
at org.wso2.carbon.tracer.module.handler.TracingMessageOutObservationHandler.invoke(TracingMessageOutObservationHandler.java:94)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
[2012-06-07 09:49:11,352] ERROR - OMSourcedElementImpl Could not get parser from data source for element {http://ws.wso2.org/dataservice}EVENT
javax.xml.stream.XMLStreamException: DS Fault Message: Error in 'CallQuery.extractParams', cannot find parameter with type:query-param name:Hw_Serial_Nr
DS Code: INCOMPATIBLE_PARAMETERS_ERROR
Source Data Service:-
Name: OWCHECK
Location: /TQS_OWCHECK.dbs
Description: N/A
Default Namespace: http://ws.wso2.org/dataservice
Current Request Name: OWCHECK_OP
Current Params: {COUNTRYORIGIN=US, SUBDT=20090428}
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:105)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.serialize(DSOMDataSource.java:110)
at org.wso2.carbon.dataservices.core.engine.DSOMDataSource.getReader(DSOMDataSource.java:116)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getDirectReader(OMSourcedElementImpl.java:225)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.forceExpand(OMSourcedElementImpl.java:254)
at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.getFirstOMChild(OMSourcedElementImpl.java:867)
at org.apache.axiom.om.impl.OMNavigator._getFirstChild(OMNavigator.java:196)
at org.apache.axiom.om.impl.OMNavigator.updateNextNode(OMNavigator.java:140)
at org.apache.axiom.om.impl.OMNavigator.getNext(OMNavigator.java:112)
at org.apache.axiom.om.impl.SwitchingWrapper.updateNextNode(SwitchingWrapper.java:1113)
at org.apache.axiom.om.impl.SwitchingWrapper.updateLastNode(SwitchingWrapper.java:1104)
at org.apache.axiom.om.impl.SwitchingWrapper.next(SwitchingWrapper.java:1041)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:47)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.cloneOMElement(OMElementImpl.java:1065)
at org.wso2.carbon.tracer.module.handler.AbstractTracingHandler.storeMessage(AbstractTracingHandler.java:81)
at org.wso2.carbon.tracer.module.handler.TracingMessageOutObservationHandler.invoke(TracingMessageOutObservationHandler.java:94)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
[2012-06-07 09:49:11,355] ERROR - ServerWorker Error processing POST request
org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:180)
at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.cloneOMElement(OMElementImpl.java:1065)
at org.wso2.carbon.tracer.module.handler.AbstractTracingHandler.storeMessage(AbstractTracingHandler.java:81)
at org.wso2.carbon.tracer.module.handler.TracingMessageOutObservationHandler.invoke(TracingMessageOutObservationHandler.java:94)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
... 6 more
Caused by: javax.xml.stream.XMLStreamException
at org.apache.axiom.om.impl.SwitchingWrapper.updateLastNode(SwitchingWrapper.java:1106)
at org.apache.axiom.om.impl.SwitchingWrapper.next(SwitchingWrapper.java:1041)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:47)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 19 more
[2012-06-07 09:49:11,375] WARN - ClientHandler Received an internal server error : Internal Server Error For : 127.0.0.1:8280 For Request : Axis2Request [Message ID : urn:uuid:55a4d59a-2be2-43ee-99b5-8943b1ff2b91] [Status Completed : true] [Status SendingCompleted : true]
How ever the fault message it returned to the proxy service is as below
2012-06-07 09:49:11,081 [-] [HttpServerWorker-1] TRACE OWCHECK_RPOXY To: /services/OWCHECK_RPOXY.OWCHECK_RPOXYHttpSoap12Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:1f8cb9bf-ab10-40a4-b75d-6b3d4805322c, Direction: request, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><OWCHECK_OP spec="IDL:com/apple/vitria/idl/sapamr_rfcevents/RfcCallEvents:1.0#Z_WARR_VALIDATION_GROUP"><TAB_SERNHDR><SERIALNR>YM6191TJSCH</SERIALNR><SUBDT>20090428</SUBDT><COUNTRYORIGIN>US</COUNTRYORIGIN></TAB_SERNHDR></OWCHECK_OP></soapenv:Body></soapenv:Envelope>
2012-06-07 09:49:11,398 [-] [HttpClientWorker-1] TRACE OWCHECK_RPOXY To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:55a4d59a-2be2-43ee-99b5-8943b1ff2b91, Direction: response, MESSAGE = In-to-OutSequence !!!!!!!!!!!!!!!!!!!!!!!!!!!!, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Receiver</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text xml:lang="en-US">javax.xml.stream.XMLStreamException</soapenv:Text></soapenv:Reason><soapenv:Detail><Exception>org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:180)
at org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod(ServerWorker.java:409)
at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:173)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78)
at org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722)
at org.apache.axiom.om.impl.llom.OMElementImpl.cloneOMElement(OMElementImpl.java:1065)
at org.wso2.carbon.tracer.module.handler.AbstractTracingHandler.storeMessage(AbstractTracingHandler.java:81)
at org.wso2.carbon.tracer.module.handler.TracingMessageOutObservationHandler.invoke(TracingMessageOutObservationHandler.java:94)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:427)
at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:45)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
... 6 more
Caused by: javax.xml.stream.XMLStreamException
at org.apache.axiom.om.impl.SwitchingWrapper.updateLastNode(SwitchingWrapper.java:1106)
at org.apache.axiom.om.impl.SwitchingWrapper.next(SwitchingWrapper.java:1041)
at javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:47)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
... 19 more
</Exception></soapenv:Detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
Looking at the SOAP fault I have to return the error message to client but even thought the correct error message must "Parameter Missing" SOAP fault's reason text is "javax.xml.stream.XMLStreamException"
Is there any thing wrong I am doing or is it BUG in DSS?
By looking at the stacktrace, I can see that you've enabled the SOAP tracer in invoking the service, disable the SOAP tracer and you should get the proper fault message.
Cheers,
Anjana.
As error message explains itself, it is expecting input parameters, which is not coming int the request. It can be fixed by two ways:
Passing empty tag from ESB without value.
Set default value in DSS.
First option works with all versions, here is the example for setting default value.
<payloadFactory media-type="xml">
<format>
<ds:DATA_SERVICE_REQUST xmlns:ds="http://ws.wso2.org/dataservice">
<ds:INPUT_PARAM_1>$1</ds:INPUT_PARAM_1>
</ds:DATA_SERVICE_REQUST>
</format>
<args>
<arg xmlns:ds="http://ws.wso2.org/dataservice" evaluator="xml" expression="get-property('INPUT_PARAMETER')"/>
</args>
</payloadFactory>
<call>
<endpoint>
<address uri="DSS_END_POINT"/>
</endpoint>
</call>
For 2nd option, please check your DSS version if this supports null values
Latest Version of DSS Supports default parameter values in the query param list.
Could you please give a try by adding defaultValue="#{NULL}" in query param list in your data service (dbs) file?
<query id="QUERY-ID" useConfig="DATA-SOURCE-ID">
<sql>-------------SQL QUERY HERE -----</sql>
<result ----------- >
<element ------------ />
</result>
<param defaultValue="#{NULL}" name="PARAM-NAME" ordinal="1" sqlType="INTEGER"/>
</query>
If this issue is still not resolved then it would be good if you can provide your API details.

Resources