Unable to find the class 'Common' - sonicmq

I am new to Sonic and am trying out Management API.
I took the program ShowQueues.java inside Sonic_Installation\MQ8.6\samples\Management\runtimeAPI\javaProxy and pasted it into eclipse, since I want to change the url (currently: tcp://localhost:2506).
It is showing an error near the class 'Common'. Can you please tell me which jar this 'Common' class is available in?

The Common class is part of the sample project and can be found in the sample directory.
SonicHome\MQ8.6\samples\Management\runtimeAPI\javaProxyCommon.java
-- utility methods used by the above samples
Otherwise the jars can be found in the lib directory.
The class path for the Mgmt api is :
MGMT_CLASSPATH=%SONICMQ_LIB%\mgmt_client.jar;%SONICMQ_LIB%\mgmt_config.jar;%SONICMQ_LIB%\mfcontext.jar;%SONICMQ_LIB%\xercesImpl.jar
The class path for the MQ api is :
SONICMQ_CLASSPATH=%SONICMQ_LIB%\sonic_Client.jar;%SONICMQ_LIB%\sonic_mgmt_client.jar
Regards

Related

While running a flex template NoClassDefFoundError: org/apache/beam/sdk/transforms/DoFn is thrown

I am running gcp flex templates in dataflow.
While starting a job from a template I am getting this exception:
Error: Unable to initialize main class.
com.mycompany.pubsubdfjobs.protocol1_0.PubSubRedis
Caused by: java.lang.NoClassDefFoundError: org/apache/beam/sdk/transforms/DoFn
DoFn is used in a lot of classes in the Project. I am able to run the code locally. All dependencies are in my gradle.build file. The gradle.build file is copied to the Dokerfile the is used for the template.
What could be the issue?
The error states that your JAR is not able to find the main class for your project. This class should be specified on your pom.xml file according to the documentation. This file needs to have the same structure as the sample presented in the documentation. You can make sure that the plugin tag on your pom.xml file matches the one found in the documentation.

Error while building WSO2 Microgateway project on Windows 10

I’ve been trying to explore WSO2 Microgateway and set up a Microgateway project. Building the project in Windows 10 with the command “micro-gw build project-name” is giving this error: “Could not find or load main class org.wso2.apimgt.gateway.cli.cmd.Main”.
I’ve downloaded the Toolkit and Runtime from https://wso2.com/api-management/api-microgateway/. I've set the Path environment variable to the /bin directory of the Toolkit and Runtime extracted folders, but still the “micro-gw build project-name” command is giving error “Could not find or load main class org.wso2.apimgt.gateway.cli.cmd.Main”. I’ve also cloned the source code from Github (https://github.com/wso2/product-microgateway/) which has the Main.java class and tried setting environment variables to its path.
I also tried setting the environment variables to the path where Toolkit batch file is present. I also followed the steps mentioned here, https://github.com/wso2/product-microgateway/#running-the-microgateway.
I'm assuming the Toolkit batch file (micro-gw) would execute the Main.java class coming up in the error.
These steps did not resolve the error. I'm new to Java based product, and I'm sure I'm missing something here.
Problem is with the init command not the build command. Init command is suppose to setup the TOOLKIT after the first use. It should extract the platform.zip file and copy all of the required resources to relevant places for you.
I hope you get the Project ___ successfully initialized message after running the init command. Just check $TOOLKIT_HOME/logs/ directory to see if there are any information on the log file.
If the log file also doesn't help, as a workaround, copy all the .jar files inside $TOOLKIT_HOME/lib/gateway/platform and $TOOLKIT_HOME/lib/gateway/cli to $TOOLKIT_HOME/lib/platform/bre/lib and try again, that should work.
Also please report this issue at https://github.com/wso2/product-microgateway/issues

Generated Service with Axis outside Liferay, can't use it inside plugins

Using Liferay 6.2 CE GA6 here.
In my current project I am forced to use a SOAP-RPC webservice generated outside liferay. I have the WSDL file and the procedure I used to get the client was:
Downloaded Axis 1.4 (same that Liferay 6.2 CE GA6 uses, I think)
Used WSDL2Java to generate Java classes that use the remote service.
Did a local test with those classes - everything fine.
Included those classes in a EXT plugin and deployed that plugin to
Liferay.
Created Arquilian test and run that test FROM ECLIPSE - Everything
works.
And now, thinking I got this covered, I created a new Service Plugin, created a test method:
public Boolean canICallMyService(){
MyWsCaller wsClient = new MyWsCaller();
return true;
}
And bam, exception:
09:33:21,394 ERROR
[http-bio-8080-exec-18][JSONWebServiceServiceAction:87] Unresolved
compilation problems: _ The import javax.xml.rpc cannot be
resolved_ The method X() from the type XServiceXmlCCServiceLocator
refers to the missing type ServiceException_ ServiceException cannot
be resolved to a type_ [Sanitized]
I know this must be related with me using Axis libs and Liferay using Axis libs as well, but I can't figure out how to overcome this classpath error. The import in question is jaxrpc.jar, that is included in Liferay's lib (webapps\ROOT\WEB-INF\lib). I have included in ALSO in my EXT plugin's lib directory. If I remove it from the EXT's lib, then the Arquilian test also fails with same error.
I have tried to put the required libs in the lib/ext in tomcat, this just makes Liferay give up on life at start with multiple Axis cast errors on all portlets.
Anyone has any idea what is the correct procedure and how can I replicate it?
I just want to use a Axis 1.4 generated webservice within a Portlet.
My current solution, that I consider kind of lame, is to deploy the webservice as a servlet in the same container and just run calls to localhost/service?q=parametersThatINeed. Works, and no Axis libs conflits.. but not really ideal.

Pentaho DI / Kettle / Spoon Configuration with External Jars

I am deveoloping a custom plugin for Pentaho DI / Kettle 4.4 and use custom Validation and XSLT jars as part of it.
Those jars are referenced in plugin.xml along with the plugin's jar itself and deployed in the same location as the plugin's jar.
When I try to load this plugin in Spoon GUI, I can see and run the plugin fine till I reach the reference to the external jars and after that I get ClassNotFOund Exception.
I have tried following so far but has not worked :
Add the expernal Jars to libext folder and expect those to be picked up automatically. - Failed. Jars not loaded.
Add -cp command line option to Spoon.bat and specify the Jar files - Did not work.
Turned on -verbose option and search everywhere in the output but the Jars are ignored.
Deployed the Jars next to the plugin's Jar file in the plugin's folder. - Jars are not recognized.
From Within the plugin, if I dynamically load (using Reflection and URL Class Loader) I am able to force the loading of the Jars and it works that way but I would like a simpler classpath fix.
Any class that I reference in the Jar through XSL externsion (XALAN-J Java Extension) is still not recognized / loaded and XSL terminates at the beginning of Extension call.
Searched Google and this site for something similar but did not find specific answers on why SPoon behaves so differently and avoids external code and content.
A similar issue is reported here though its too old and has not shown final conclusive fix. I tried all that it said. http://forums.pentaho.com/archive/index.php/t-77190.html
Requesting someone to help me identify whats missing. Thanks in advance,
Thanks to this seemingly obscure website and it fixed all pain.
http://www.arulraj.net/2014/09/how-to-access-external-java-libraries-with-in-pentaho.html
Basically, go to the launcher folder and edit the launcher.properties file to include any path, library etc. and it fixes all the issues I reported above. Wish Kettle documentatation had answers like this.

Codeigniter Tank_Auth used as a HMVC module along with the Template library

I've successfully configured and run HMVC on my clean install of Codeigniter 2.1.0
Then I've included Template library. It consist of only 3 files: /system/library/Template.php, /application/config/template.php and finally, template file itself (somewhere in /views directory).
I've tested template library while loading one of my created modules. I had to go to /system/library/Template.php to correct paths so they point to my module/views instead of default CI's ones.
Then I tested and it seemed just fine.
The third step is to include Tank_Auth authentication library. I want it to reside in module as well (/modules/auth). This module should have the same directory structure just like a regular app directory does (config, controllers, language, libraries, models, views, etc.) so I can copy Tank_Auth's files to Auth module's respective directories.
Basically, I have already done that copy part. But now when I try to run http://adresar.local/auth/auth/login I get
An Error Was Encountered
Unable to load the requested file: auth/login.php
I've also tried changing
class Auth extends CI_Controller
to
class Auth extends MX_Controller
but to no avail.
If anyone can throw in some useful advice I will appreciate it a lot.