Starting wso2 3.0.0 gateway windows "Could not load Logmanager" - wso2

So i am trying to load the WSO2 gateway from my local machine running the new 3.0.0-m6 version downloaded from their website.
I have run everything as described in the quickstart guide, and i get the following error on start up.
Could not load Logmanager "org.ballerinalang.launcher.BLogManager"
java.lang.ClassNotFoundException: org.ballerinalang.launcher.BLogManager
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.util.logging.LogManager$1.run(LogManager.java:195)
at java.util.logging.LogManager$1.run(LogManager.java:181)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(LogManager.java:181)
at java.util.logging.Logger.demandLogger(Logger.java:448)
at java.util.logging.Logger.getLogger(Logger.java:502)
at com.sun.jmx.remote.util.ClassLogger.<init>(ClassLogger.java:55)
at sun.management.jmxremote.ConnectorBootstrap.<clinit>(ConnectorBootstrap.java:846)
at sun.management.Agent.startLocalManagementAgent(Agent.java:138)
at sun.management.Agent.startAgent(Agent.java:260)
at sun.management.Agent.startAgent(Agent.java:447)
ballerina: unknown command 'start'
Run 'ballerina help' for usage.
ActiveMQ is running
WSO2 Server is running
WSO2 Identity manager is running
WSO2 API Manager is running
I am starting the gateway from the root folder as explained in the start up guide.

Are you running this in Windows? The version 3.0.0-m6 is based on Ballerina v0.89 and in this version of Ballerina, there's a bug in the bin/ballerina.batfile. As you can see, it's looking for a class named org.ballerinalang.launcher.BLogManager and fails. This class was moved to another package and now, its fully qualified name is org.ballerinalang.logging.BLogManager. In the ballerina.bat script, change the property (towards the end of the file) -Djava.util.logging.manager="org.ballerinalang.launcher.BLogManager" to -Djava.util.logging.manager="org.ballerinalang.logging.BLogManager" and it should solve your problem.

Related

Connecting the Jenkins controller with the nodes on different clouds

We have our Jenkins controller on GCP and the Jenkins Node on AWS (Auto Scaling Groups). Initially, We had the controller on AWS (Ubuntu 18) with openjdk11. We used the ec2-fleet jenkins plugin to spin-up and destroy instances based on usage.
The setup was working fine but we wanted to have the controller (Ubuntu 18) in GCP (Our existing jenkins system is in GCP). I used the same ec2-fleet plugin. The Jenking controller in GCP was able to spin up instances but I kept getting the error - java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.amzn2.0.2.x86_64/jre/lib/currency.data (No such file or directory)
The nodes in AWS use Amazon Linux AIM images. So I thought I have to downgrade the JVM in controller to openjdk8 and did downgraded from openjdk11 to openjdk8. I still keep getting the same error. We then checked the openjdk version in AWS controller and it had openjdk11. The setup is working fine in AWS but doesn't work with GCP.
java.io.FileNotFoundException: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.332.b09-1.amzn2.0.2.x86_64/jre/lib/currency.data (No such file or directory)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at java.util.Currency$1.run(Currency.java:221)
Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to i-09b4990d879f5e7e4
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
at hudson.remoting.Channel.call(Channel.java:1000)
at hudson.FilePath.act(FilePath.java:1194)
at hudson.FilePath.act(FilePath.java:1183)
at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:140)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:916)
at hudson.plugins.git.GitSCM.createClient(GitSCM.java:847)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1297)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
Upgrading both the controller and node to JDK11 solved the issue.

wso2 is 5.1.0 missing classes when running as a service (org.apache.jsp.user.edit_002duser_002droles_jsp)

Upgrading from WSO2 IS 5.0.0 SP1 to WSO2 IS 5.1.1 patch 92 (Windows Server 2008, JRE 1.7), running as a Windows service (installed using the yajsw.conf).
Adding a role to the user fails (with a blank page), in the wso2carbon.log we have an exception:
Caused by: java.lang.ClassNotFoundException:
org.apache.jsp.user.edit_002duser_002droles_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
Caused by: java.io.IOException: JSPException while including path '/user/edit-user-roles.jsp'. ServletException while including page.
at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)
at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:82)
Interesting on it is, that running the WSO2 IS 5.1.0 from the console works (wso2server.bat) without any issues. I searched for the edit-user-roles.jsp file and I found it in the library org.wso2.carbon.user.mgt.ui_5.0.7.jar (repository/components/plugins and repository/components/patches/patch0000). So - looks like the library is not loaded properly.
I was comparing the JVM settings between the IS started as a service and from CLI. The only discrepancy I found is in the -Dcomponents.repo parameter:
wso2server.bat: -Dcomponents.repo=%CARBON_HOME%\repository\components
wrapper.conf: -Dcomponents.repo=%CARBON_HOME%\repository\components\dropins
However
in the WSO2 IS 5.0.0S.P1 it looks the same (there are different values in the wso2server.bat and wrapper.conf) and there's no problem to add a role to the user account
I've changed the wrapper.conf to have the same value (=%CARBON_HOME%\repository\components) with no effect
Following updates to the wrapper.conf solved the problem:
wrapper.java.additional.18 = -Dcomponents.repo=${carbon_home}\\repository\\components
wrapper.java.additional.26 = -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false

Is it possible to run WSO2 ESB in Openshift?

We are trying to create a WSO2 ESB cartridge to run on Openshift but haven't had much success yet. Is it even possible to run WSO2 ESB on Openshift or do we have to rely on Fuse ESB? Happy to run WSO2 either through cartridge option or just an EAR file if that's possible.
I was trying to install WSO2 ESB in an Openshift DIY cartridge. But I'm getting an port binding issue. The nasty thing is the message does not say which port it is unable to be bind into.
Please let me know if you passed this stage while trying to deploy WSO2 ESB in Openshift.
[esb3-yasas.rhcloud.com bin]> sh wso2server.sh
Starting WSO2 Carbon (in unsupported JDK) [ERROR] CARBON is
supported only on JDK 1.6 and 1.7 JAVA_HOME environment variable is
set to
/var/lib/openshift/57dca6070c1e66b48000003c/app-root/data/java/jdk1.8.0_45/
CARBON_HOME environment variable is set to
/var/lib/openshift/57dca6070c1e66b48000003c/app-root/data/esb Java
HotSpot(TM) 64-Bit Server VM warning: ignoring option
MaxPermSize=256m; support was removed in 8.0 Error: Exception thrown
by the agent : java.rmi.server.ExportException: Port already in use:
0; nested exception is:
java.net.BindException: Permission denied
Snapshot
Thanks !

Failed to configure Identity Server 5.0.0 as API Key Manager

I followed document to configure Identity Server 5.0.0 as API(1.80) Key Manager - https://docs.wso2.com/display/CLUSTER420/Configuring+WSO2+Identity+Server+as+the+Key+Manager, and log displayed exceptions when startup after installed API Key Manager feature in Identity server. The exceptions are as following:
ERROR {org.wso2.carbon.registry.indexing.RegistryConfigLoader} - org.wso2.carbon.apimgt.impl.indexing.indexer.WSDLIndexer is not found in classpath. Please check whether the class is exported in your OSGI bundle. {org.wso2.carbon.registry.indexing.RegistryConfigLoader}
java.lang.ClassNotFoundException: org.wso2.carbon.apimgt.impl.indexing.indexer.WSDLIndexer
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at org.wso2.carbon.registry.indexing.RegistryConfigLoader.<init>(RegistryConfigLoader.java:132)
...
ERROR {org.wso2.carbon.registry.indexing.solr.SolrClient} - Could not instantiate Solr client {org.wso2.carbon.registry.indexing.solr.SolrClient}
java.lang.RuntimeException: java.io.FileNotFoundException: D:\wso2\wso2is-5.0.0\solr\data\index\_7.fnm (The system cannot find the file specified)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1068)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:579)
at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
at org.wso2.carbon.registry.indexing.solr.SolrClient.<init>(SolrClient.java:90)
...
Can anyone help? I would be very gratefull.
I believe I have found the issue. When installing the Key Manager feature in this article and installing the WSO2 Identity Manager Service pack after the Key Manager, there are two files in the /repository/components/plugins directory:
org.wso2.carbon.registry.indexing_4.2.1.jar
org.wso2.carbon.registry.indexing_4.2.2.jar
I resolved this issue by removing the 4.2.1 jar version and leaving the 4.2.2 jar version. After doing so, no errors were encountered.

Failed to deploy Webservice into weblogic server

I developed webservice and I want to deploy it into weblogic, so that I can integrate it with my portal application.
My webservice works well in integrated Weblogic server(10.3.5). But, when I try to deploy it into development server (10.3.6), Weblogic throw an exception.
I also try to deploy it into EAR file, and I got the same exception.
The error message is :
[02:16:01 PM] Caused by: java.lang.ClassCastException: com.sun.xml.bind.AccessorFactoryImpl cannot be cast to com.sun.xml.bind.InternalAccessorFactory
Does anyone know how to fix this issue? I'm still trying to deploy it into 10.3.6 version.
Please check versions in web.xml.
WebApp_ID version should be as javaee version you specified.
I reinstall the weblogic server using jrockit 1.6.0_33 then I able to deploy my webservice. Means that I downgrade jdk (not latest version).