Instantiation of class in BPEL process - bpel

I have a very Strange problem, in my BPEL process I have used java embed Activity. on that activity if I am using Task class. then I am not able to deploy my process. its giving me following message.
when I remove that line then I am able to deploy that process.
following error comes when deployment.
[10:29:41 AM] ---- Deployment
started. ---- [10:29:41 AM] Target
platform is (Weblogic 10.3).
[10:29:41 AM] Running dependency
analysis... [10:29:41 AM] Building...
[10:29:52 AM] Deploying profile...
[10:30:19 AM] Wrote Archive Module to
D:\RegistrationUpload\RegistrationUpload\RegistrationUpload\deploy\sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Deploying
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:30:19 AM] Processing
sar=/D:/RegistrationUpload/RegistrationUpload/RegistrationUpload/deploy/sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Adding sar file -
D:\RegistrationUpload\RegistrationUpload\RegistrationUpload\deploy\sca_RegistrationUpload_rev21.0.jar
[10:30:19 AM] Preparing to send HTTP
request for deployment [10:30:19 AM]
Creating HTTPS connection to
host:WIN-73I7I7QL8Z3.uradevt.gov.sg,
port:8002 [10:30:19 AM] Sending
internal deployment descriptor
[10:30:20 AM] Sending archive -
sca_RegistrationUpload_rev21.0.jar
[10:33:45 AM] Received HTTP response
from the server, response code=500
[10:33:45 AM] Error deploying archive
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:33:45 AM] HTTP error code returned
[500] [10:33:45 AM] Error message from
server: Error during deployment: Error
occurred during deployment of
component: OfficerList to service
engine: implementation.bpel, for
composite: RegistrationUpload:
ORABPEL-01005
Failed to compile bpel generated
classes. failure to compile the
generated BPEL classes for BPEL
process "OfficerList" of composite
"default/RegistrationUpload!21.0*soa_27af417b-20d6-48d0-821c-4f26b3c4ce94" The class path setting is incorrect.
Ensure that the class path is set
correctly. If this happens on the
server side, verify that the custom
classes or jars which this BPEL
process is depending on are deployed
correctly. Also verify that the run
time is using the same
release/version. . [10:33:45 AM]
Check server log for more details.
[10:33:45 AM] Error deploying archive
sca_RegistrationUpload_rev21.0.jar to
partition "default" on server
soa_server1
[WIN-73I7I7QL8Z3.uradevt.gov.sg:8002]
[10:33:45 AM] #### Deployment
incomplete. #### [10:33:45 AM] Error
deploying archive
file:/D:/RegistrationUpload/RegistrationUpload/RegistrationUpload/deploy/sca_RegistrationUpload_rev21.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)
follwing code I have used in snippet.
<bpelx:exec import="org.w3c.dom.Element"/>
<bpelx:exec import="com.ura.dams.workflow.process.OfficerList"/>
<bpelx:exec import="oracle.bpel.services.workflow.task.model.Task"/>
<bpelx:exec name="getTaskInfoForPO" version="1.5" language="java">
<![CDATA[try
{
OfficerList officerlist= new OfficerList();
String JobAssignmentType1= (String)getVariableData("JobAssignmentType");
String officerLevel1= (String)getVariableData("officerLevel");
String applicationType1= (String)getVariableData("applicationType");
String functionId1= (String)getVariableData("functionId");
String dcConservationFlag1= (String)getVariableData("dcConservationFlag");
String app_id_key1= (String)getVariableData("app_id_key");
String app_id_value1= (String)getVariableData("app_id_value");
String taskID1= (String)getVariableData("taskID");
String officer="";
String DConservatiionFlag="";
java.util.Hashtable keyValues= new java.util.Hashtable();
keyValues.put(app_id_key1, app_id_value1);
Task taskinfo= null;
}
catch(Exception e)
{
System.out.println("error occured" + e);
}]]>
</bpelx:exec>
Will anyone please tell me do I need to refer jar file in terms of BPEL process also.
even same class I can use in my java files in the same project. (for other class its working like OfficerList)
Environment is : Oracle SOA 11g, Jdeveloper
please suggest something.

I am suspecting that the IMPORT statements does not work. Most of the time I do import, but turn around and use the full package/class name for it. Have you try using the full package/class as follow?
com.ura.dams.workflow.process.OfficerList officerlist=
new com.ura.dams.workflow.process.OfficerList();
...
oracle.bpel.services.workflow.task.model.Task taskinfo= null;

Related

Azure functions that are timer based complain about log type

I am having the exact same issue as this question
But none of the answers works, been googling for a long time and my versions are updated etc and still I get that same error
Code is the sample template
using System;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
namespace NWMPosNGPimFeeder
{
public static class Function1
{
[FunctionName("Function1")]
public static void Run([TimerTrigger("0 */1 * * * *")]TimerInfo myTimer, TraceWriter log)
{
log.Info($"C# Timer trigger function executed at: {DateTime.Now}");
}
}
}
Versions of host etc is as follows including the actual error
[21/5/2018 2:03:29 AM] Host has been specialized
Listening on http://localhost:7071/
Hit CTRL-C to exit...
[21/5/2018 2:03:29 AM] Reading host configuration file 'C:\Users\MattDouhan\source\repos\NWMPosNGPimFeeder\NWMPosNGPimFeeder\bin\Debug\net461\host.json'
[21/5/2018 2:03:29 AM] Host configuration file read:
[21/5/2018 2:03:29 AM] {
[21/5/2018 2:03:29 AM] }
[21/5/2018 2:03:30 AM] Loaded custom extension 'BotFrameworkConfiguration'
[21/5/2018 2:03:30 AM] Loaded custom extension 'SendGridConfiguration'
[21/5/2018 2:03:30 AM] Loaded custom extension 'EventGridExtensionConfig'
[21/5/2018 2:03:31 AM] Generating 1 job function(s)
[21/5/2018 2:03:31 AM] Starting Host (HostId=desktop7cks1do-1972353084, Version=1.0.11232.0, ProcessId=2668, Debug=False, Attempt=0)
[21/5/2018 2:03:31 AM] A ScriptHost error has occurred
[21/5/2018 2:03:31 AM] Microsoft.Azure.WebJobs.Host: Error indexing method 'Function1.Run'. Microsoft.Azure.WebJobs.Host: Cannot bind parameter 'log' to type TraceWriter. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
[21/5/2018 2:03:31 AM] Error indexing method 'Function1.Run'
Problem locates at the old function cli VS is using.
Version=1.0.11232.0
It means the cli version is 1.0.4. This old version does cause your issue but it has already been fixed in new ones.
Check your Azure Functions and Web Jobs Tools version.
Latest extension 15.0.40502.0, will make VS use cli 1.0.4 if VS fails to download new version cli. This downloading process is in background and seems no explicit warning. See This GitHub issue.
Solution
I recommend you to delete C:\Users\UserName\AppData\Local\AzureFunctionsTools folder and restart your VS to download it again.
When we create a function app, we can see tip on the dialog that Making sure all templates are up to date...
Wait for a while, we can see the tip changes as
If it doesn't change after 3m(time to download 200M files on your side), check C:\Users\UserName\AppData\Local\AzureFunctionsTools\Releases\1.0.12.1 folder to see whether it's empty. If it's empty, which means downloading can't be done through VS. We have to do it manually.
You can find download link of cli, itemTemplates and projectTemplates in C:\Users\UserName\AppData\Local\AzureFunctionsTools\feed.json.
You can refer to 1.0.10 folder to build similar folder structure.

Azure Function: Microsoft.WindowsAzure.Storage assembly not found

[15/03/2018 11:03:14 PM] Could not load file or assembly 'Microsoft.WindowsAzure.Storage, Version=8.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Azure.AzureTable.<Init>d__1.MoveNext()
[15/03/2018 11:03:14 PM] at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Azure.AzureTable.Init(String tableName)
[15/03/2018 11:03:14 PM] at Tux.Workers.RollCall.Function1.<Run>d__0.MoveNext()
[15/03/2018 11:03:14 PM] Function completed (Success, Id=438dae86-18a8-4c85-b121-3918e2307ca4, Duration=122ms)
[15/03/2018 11:03:14 PM] Executed 'Function1' (Succeeded, Id=438dae86-18a8-4c85-b121-3918e2307ca4)
No matter how I do this error always occur whenever trying to calling Cloud Service in Azure function project. I can see the Microsoft.WindowsAzure.Storage.dll file in the bin directory inside the project. I also see the dll inside
C:\Users\klam0\.nuget\packages\windowsazure.storage\8.6.0
When I create a basic console application, I have no problem calling the Cloud to get the table reference.
Do I need to configure something on the portal if I just run the project locally?

Azure Functions 1.0.7 giving Could not load file or assembly error with EF Core 2

I'm trying to move some functionality to Azure Functions. Created a project for EF Core 2 code, and referenced it to the Azure Functions project. Added the EF Core+SQLServer nugget packages to the Azure Functions project. When the function attempts to execute, this is the errors in the screen. I can see that the Microsoft.EntityFrameworkCore assembly is in the same directory as our azure functions dll.
Can anyone shed some light on why it's not finding it and how to fix this?
[1/3/2018 6:49:56 AM] A ScriptHost error has occurred
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting
[1/3/2018 6:49:56 AM] Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Function completed (Failure, Id=56ba500b-7c3a-45c1-a9eb-8be4d52d1592, Duration=159ms)
[1/3/2018 6:49:56 AM]
[1/3/2018 6:49:56 AM] Executed 'Accounting' (Failed, Id=56ba500b-7c3a-45c1-a9eb-8be4d52d1592)
[1/3/2018 6:49:56 AM] System.Private.CoreLib: Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
[1/3/2018 6:49:56 AM] Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is '56ba500b-7c3a-45c1-a9eb-8be4d52d1592'
[1/3/2018 6:49:56 AM] System.Private.CoreLib: Exception while executing function: Accounting. AS.Jobs: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621). System.Private.CoreLib: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=2.0.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Update: 1/3/2018
I have VS 2017 15.5.2 installed, and I am building this in VS.
Here is the output of the function host when I run it from VS.
[1/4/2018 3:47:03 AM] Host configuration file read:
[1/4/2018 3:47:03 AM] {
[1/4/2018 3:47:03 AM] }
[1/4/2018 3:47:04 AM] Generating 1 job function(s)
[1/4/2018 3:47:04 AM] Starting Host (HostId=jlt03-962556955, Version=2.0.11353.0, ProcessId=21200, Debug=False, Attempt=0, FunctionsExtensionVersion=)
[1/4/2018 3:47:04 AM] Found the following functions:
[1/4/2018 3:47:04 AM] Jobs.Accounting.Run
[1/4/2018 3:47:04 AM]
Listening on http://localhost:7071/
So after much much more searching, I came across this GitHub posted issue. It is the exact same issue that I am seeing here. Apparently it is a issue with Azure Functions 1.0.7 and EF Core 2.0.1.
I had to role back AF back to 1.0.6 AND I also had to role EF Core back to 2.0.0. Afterwards the function executed as expected.
I will be monitoring the GitHub issue and update this answer once it is confirmed to be fixed.
Update
This is now fixed with Azure Functions Core Tools 2.1.0 release.
https://github.com/Azure/app-service-announcements/issues/109
what worked for me was to delete all folders under bin folder and build the app!!

Trouble using Spring Config Server in jhipster-registry

I created a microservice architecture using JHipster. I am using the jhipster-registry v2.8.0. I renamed the 'dev' profile to 'devdmi' because I will have many 'dev' profiles. It is working OK using the "dev,native" profiles for the jhipster-registry and each microservice including it's application-devdmi.yml / boostrap-devdmi.yml files.
I tried to convert this configuration over to using a Git repo. I built my Git repo with .yml files, but I'm not exactly sure of the configuration to use. At the moment I've got:
MyConfig/app1/MyApp1-devdmi.yml
MyConfig/app2/MyApp2-devdmi.yml
I also tried using:
MyConfig/MyApp1-devdmi.yml
MyConfig/MyApp2-devdmi.yml
In MyApp1, I renamed src/main/resources/config/application-devdmi.yml to application-devdmi.yml.bak hoping it would pick up the config from the jhipster-registry acting as a Spring Cloud Config Server.
In MyApp1, I have a bootstrap-devdmi.yml with:
spring:
application:
name: my-app-1
cloud:
config:
fail-fast: true
uri: http://admin:${jhipster.registry.password}#my.host.com:8761/config
name: MyApp1
profile: devdmi
label: master
The jhipster-registry starts up and shows it is connected to the Git repo by looking at the Configuration webpage.
MyApps1 doesn't start and throws an error about Liquibase not knowing which database to connect to:
2017-05-23 13:09:52.669 WARN 60704 --- [ main] o.s.boot.SpringApplication : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation /web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor' defined in class path resource [org/springframework/transaction/annotation/ProxyTransactionManagementConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor]: Factory method 'transactionAdvisor' threw exception; nested exception is java.lang.NullPointerException)
2017-05-23 13:09:52.683 ERROR 60704 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Cannot determine embedded database driver class for database type NONE
Any ideas?

IaaS Azure Diagnostics won't start. Missing assemblies

When I try to enable Iaas Azure Diagnostics on my VM, I encounter the following errors. I was able to track down the local log files and found these entries.
How do you repair the Azure Diagnostics extension, without recycling the VM?
"C:\Packages\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\Logs\DiagnosticsPluginLauncher.log"
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] No DiagnosticsPlugin is running.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] Killing any DiagnosticsPlugin that might remain.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:43 AM] Killing any MonAgentHost that might remain.
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:44 AM] Diagnostics plugin stopped successfully
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:05:44 AM] Resetting DiagnosticPlugin
DiagnosticsPluginLauncher.exe Error: 0 : [1/10/2015 1:05:53 AM] DiagnosticsPlugin launch failed with exit code -108
DiagnosticsPluginLauncher.exe Information: 0 : [1/10/2015 1:06:01 AM] DiagnosticPlugin exited with code -108
"C:\Packages\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\Logs\DiagnosticsPlugin.log"
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Found namespace http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration in schema schema\WADPrivateConfigSchema.xsd
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] WadCfg is provided in initial configuration. Using that to initialize Diagnostics.
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] <PublicConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"><WadCfg><DiagnosticMonitorConfiguration overallQuotaInMB="4096" xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration"><DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" /><Directories scheduledTransferPeriod="PT1M"><IISLogs containerName="wad-iis-logfiles" /><FailedRequestLogs containerName="wad-failedrequestlogs" /></Directories><WindowsEventLog><DataSource name="Application!*" /><DataSource name="System!*" /><DataSource name="Security!*" /></WindowsEventLog><Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" /></DiagnosticMonitorConfiguration></WadCfg></PublicConfig>
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Private setting is loaded
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Checkpoint file is presentC:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\WAD0103\Configuration\Checkpoint.txt
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:44 AM] Will use local resource directory C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Diagnostics.IaaSDiagnostics\1.3.1.6\WAD0103
DiagnosticsPlugin.exe Error: 0 : [1/10/2015 1:05:44 AM] System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Cis.Monitoring.SecUtil.dll' or one of its dependencies. The specified module could not be found.
File name: 'Microsoft.Cis.Monitoring.SecUtil.dll'
at Microsoft.Azure.Plugins.Plugin.StandardConfig.EncryptKey(String key, String thumbprint)
at Microsoft.Azure.Plugins.Plugin.StandardConfig..ctor(String nameSpace, Int32 eventVersion, Int64 overallQuota, String accountName, String accountKey, String accountUri, String accountCertStore, Int32 retention, String thumbprint)
at Microsoft.Azure.Plugins.Plugin.WadParser.Translate(String baseMaResourcePath, Int32 actualDiskQuota, String& fullConfigFilePath)
DiagnosticsPlugin.exe Error: 0 : [1/10/2015 1:05:48 AM] Failed to convert WAD1.1 config to Monagent config format
DiagnosticsPlugin.exe Information: 0 : [1/10/2015 1:05:52 AM] DiagnosticPlugin.exe exit with code -108
Probably the easiest way to rebuild is to uninstall then reinstall the VM Extension.

Resources