MQ - 2142 error - websphere

I am new to Java-MQ programming. I am facing a strange issue.
I am trying to send a text message to WMQ V7 using java.
In my code I have a property called identifier which I am setting to the message by using the method msg.setStringProperty("IDENTIFIER", "XXXXX");
I deployed the code in Unix system and while testing I am getting MQ-2142 error MQRC_HEADER_ERROR.
The strange thing is when I am running the same code from my local desktop using netbeans-6.9 (like a standalone application) it is executing successfully.
Please help me out with this issue?

Related

Java Spring Boot: How to implement a JCo3 server with different message server

​Hi everyone one,
On my project, we are developing a spring boot application which is using JCo3.
It works fine for calling SAP from JAVA.
Now we are enhancing this application and we want to create a Jco server.
It will have to communicate with 2 different SAP system.
Each system have its own message server.
We customize each message server with several logon group according to our needs.
So we have created 2 classes to build up 2 Jco server one per system.
For server class, we hae base our development upon this blog:
https://blogs.sap.com/2017/08/25/sap-jco-server-example/
So we use a ServerDataProvider to use the parameters below
jco.server.connection_count=2
jco.server.progid=JCO_SERVER_SAP
jco.server.repository_map=SID(020)=S4
jco.server.mshost=myslanaddress.com
j
co.server.msserv=3601
jco.server.system_id=SID
We have 2 files to specify these parameters one per SAP system
The other system wil use a different progid.
When starting our application, everything goes well for the first bean instanciation.
As soon we arrived on the other, when trying to create the new Jco server
with for instance new progid JCO_SERVER_SAP and with new message server info)
with (server = JCoServerFactory.getServer(properties.getProperty(ServerDataProvider.JCO_PROGID));
The Constructor threw this exception; nested exception is com.sap.conn.jco.JCoRuntimeException: (136) JCO_ERROR_ILLEGAL_STATE: JCoServer JCO_SERVER_SAP is currently running. Current server state is STARTED
It is strange because in debug the progId is JCO_SERVER_CAR and not JCO_SERVER_SAP..
I foun this message (https://answers.sap.com/questions/12862862/how-to-implement-a-jco3-server-with-multiple-diffe.html) but I don’t know how to build such solution.
Do you have any clue ?
Thanks in advance for any help.
I tried to create and use
jco.server.repository_map
but it do not work.

Getting error when running jmeter master-slave Error in rconfigure() method

I have a existing jmeter Master/Slave configuration which works fine. The existing jmeter is 3.0
I installed 3.3 version in the Master server and added the necessary library jar which enabled me to open the existing jmx file.
I copied the exisitng jmeter properties file to the new directory as well. But when I try to run that, I am getting the below error message
Error in rconfigure() method java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.net.SocketException: Software caused connection abort: socket write error
Should I need to install my slave server with 3.3 as well? I tried upgrading the library files, but the jmeter version displayed remains 3.0 even after that. Hence not sure if that is the right way to upgrade it.
Yes, using the same JMeter version is amust in Remote Testing step 0:
Step 0: Configure the nodes
Make sure that all the nodes (client and servers) :
are running exactly the same version of JMeter.
are using the same version of Java on all systems. Using different versions of Java may work but is discouraged
You should use the download version in all computers there is no upgrade option in JMeter

MQRC_NOT_AUTHORIZED Reason Code 2035

I have set up a MQ Server 7.1 on my local machine.
I have set up a Queue Manager : QM_APPLE
I am trying to run the sample .Net Code from the MQ Examples to PUT a message on the Queue : Q1.
When I try to instantiate the MQQueueManager, I get the above error.
I have tried following the Authorization steps in http://www-01.ibm.com/support/docview.wss?uid=swg21166937 but I am still getting the error. Obviously I am not specifying the parameters correctly here. Can anyone help?
alladm is administrative privileges. It doesn't work for API privileges. Try with +allmqi.
But that's generally not advisable. Try to drill down to specific authorization (like put, get, setid, setall) when you start developing a real application.
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.ref.adm.doc%2Fq083500_.htm

How to connect to oracle from a java servlet?

I have a problem connecting to oracle from within a java servlet running in Jetty (as part of Eclipse). The identical code runs fine from a standalone java app.
My entire development environment is on a single mac. I am using Eclipse and have included the ojdbc6.jar in the main 'Referenced Libraries' and have also dragged and dropped this file in the war/web-inf/lib folder.
As soon as the line
OracleConnectionPoolDataSource ocpds = new
OracleConnectionPoolDataSource();
is called (within the servlet) I get the exception:
java.security.AccessControlException: access denied
(javax.management.MBeanServerPermission createMBeanServer)
Am I missing some security policy or so? If so, exactly what do I do need to do to rectify this? And where does this BeanServer come in?
Thanks in advance.
Every web container has its own way of defining data sources, and making them available through JNDI. You should do that instead.
The native oracle connection pool seems to be creating an MBeanServer, and this is not probably not allowed by the security manager used by Jetty. See http://wiki.eclipse.org/Jetty/Feature/Secure_Mode and http://wiki.eclipse.org/Jetty/Tutorial/Jetty-Policy.
Worked it out - not entirely clear why but created a new GWT app in Eclipse but this time NOT included the Google App Engine (which is ticked by default). This seems to add some restrictions to the code when it is running in Jetty....
I now have copied the sample code over and all is working well!

Unable to load model from controller in linux server in codeigniter

I have developed a small accounting application which running fine in xampp in windows machine and also it is working fine in my development server (linux based).
But, when i migrate the total application to client linux server I got the following error:
Parse error: syntax error, unexpected T_STRING in /home/orcilia/public_html/cfm/application/models/sm_main.php on line 1
I have checked it several times but unable to found an error ...
But, I think in the client server there is some issue in case of loading model from controller..
PLEASE HELP ME REGARDING THIS..i have spent a lot of time but unable to get rid of this error...
Thanks,
TANAY GHOSH
If you use <? as an opening tag (check at the very start of your file), change it to
<?php. The server might not allow the shorthand style.

Resources