ReplyTo header field from Java JMS read by C JMS API causes core dump...
Hi,
First step is to add the option -Xcheck:jni to your java command line. It will flag common JNI errors.
If that doesn't identify the problem, then compile your jni code with debugging symbols (-g) and add the following option to the java command line when you run your test: -XX:+ShowMessageBoxOnError. When you hit the problem again, the VM will keep the process alive instead of calling abort(). Then you can use dbx to attach to the live process and should be able to get a better idea of what went wrong.
Similar Messages
-
Get a specific Http header field from an http request in a component
Hello,
In a custom component that I've created ( which extends ServiceHandler), I'd like to access a specific http header field from the http requests that this component receives.
I assume this could be accessible through m_binder or m_service, but I didn't find any solution so far.
Any Idea?
Thanks in advance,
LeoAs it may help others, I answer what I figured out.
Every details of the http request is put into the m_binder.
So a specific field can be accessed with m_binder.getEnvironmentValue("My_data")
You can also list all the available data as it is a standard properties set. -
Accessing Message Header fields from envelope
I am doing an interface with the RNIF adapter. They want me to pull the delivery header information, which is in the RNIF envelope, not the payload document and map it into some fields that exist in the inbound schema. Can this be done in message mapping? I would suppose that this question would apply if one wanted message header fields from the SOAP envelope also.
Kind Regards,
ChrisHave you checked this ?
http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
Regards,
Amol -
How to delete User-Agent header field from http request ?
Hi,
I'm currently using HttpUrlConnection to create a HTTP 1.1 POST client, and I wish to remove the User-Agent field from my request.
However, java seems to set this field to "java.1.4.2" if none is provided.
I have found methods to modify the User-Agent ( "setRequestProperty()" and system property "http.agent" ) but none to delete it.
Is there a way to remove this header from the request ?
This field is said as "should be implemented" but is not required in rfc2616(http1.1), so I'm a bit surprised that I can't remove it in the java HttpUrlConnection...
Thank you for your help,
GregoireYou can always go around java.net.HttpUrlConnection with your own subclass of UrlConnection or simply a socket. You may lose some functionality, for example with handling binary content, but it may still be a solution.
(But are you saying that the server requires that there's no user-agent header? That's not a case of incompatibility, it's a bug. Scrap the server, and get one that works.
It seems a lot more likely that the server just have strict ideas of what user agents it wants to talk to. Then instead of removing the header, you want to find out what values the server will expect.) -
How to get return value from java and read by other application?
i want to read return value from java and the other application read it.
for example:
public class test_return {
test_return(){
public int check(){
return 1;
public static void main(String args[]){
new test_return().check();
}from that class i make as jar file. How to read the return value (1) by other application?
thx..If your installer is requiring some process it invokes to return a particular value on failure, then the installer is seriously broken. There are a bazillion commands your installer could invoke, and any of them could fail, which in turn could invalidate the entire install process, and any of them could return any value on failure. The only value that's consistent (in my experience) is that zero means success and non-zero means failure, with specific non-zero values being different in different programs.
About the only control you have over the JVM's exit code is that if your main method completes without throwing an exception, the JVM will have an exit code of 0, and if main throws an exception (either explicitly or by not catching one thrown from below), it will be non-zero. I'm not even sure if that's guaranteed, but I would guess that's the case.
EDIT: I'm kind of full of crap here. If you're writing the Java code, you can call System.exit(whatever). But nonetheless, if your installer requires certain exit codes from any app--java or otherwise--you have a problem.
Edited by: jverd on Oct 29, 2009 1:27 AM -
Read Header Text From VF03 Transaction
Hi Frds,
I want to Read Header Text From VF03 Transaction
Read Transport Number and Transport Date From Vf03 Transaction.
Guide Me Briefly
How to pass the varaibles to the function Module
Regards,
Kabilhi Kabil ,
Your issue completely accepted just keep in mind
1) if you have to read both text you have to use read_text 2 times
2) in that for first read_text
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0002'
LANGUAGE = SY-LANGU
NAME = ' ' "" YOUR VARIABLE THAT CONTAINS Invoices number
OBJECT = 'VBRK'
TABLES
LINES = TLINE
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
is ok for Header note 1 .(means first text ) but for second text your ID is change other thing is same .
CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
ID = '0013'
LANGUAGE = SY-LANGU
NAME = ' ' "" YOUR VARIABLE THAT CONTAINS Invoices number
OBJECT = 'VBRK'
TABLES
LINES = TLINE
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Hope this will help you
Thanking You,
shrikant padwale. -
Hi all,
We just moved some java JSP's/code to a new Apache2(2.0.55)/Tomcat5.5.12 running Java 1_05_05 server.
Java -version:
java version "1.5.0_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05)
Java HotSpot(TM) Server VM (build 1.5.0_05-b05, mixed mode)
I get a similar error that deals with invalid headers.
This code(.jar/jsp's) have been running on a tomcat 4 server with Java 1_4:
/usr/java/j2sdk1.4.1_02/bin/java
Any idea why I might be getting this error, is it related to this previous post?
INFO: HTMLManager: start: Starting web application at '/wsiathena'
Nov 29, 2005 1:23:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in dependencyCheck
java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:389)
at java.util.jar.Manifest.read(Manifest.java:167)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at org.apache.catalina.util.ExtensionValidator.validateApplication(ExtensionValidator.java:152)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3998)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1175)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:527)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Nov 29, 2005 1:23:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Nov 29, 2005 1:23:10 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [wsiathena] startup failed due to previous errors
Nov 29, 2005 1:23:10 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[wsiathena] has not been started
Nov 29, 2005 1:23:10 PM org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'
Thanks for any input!
ScottGJ Erick on finding one working solution.
-
How to send a signed SOAP message with additional HTTP Header fields
Our Partner's integration requirements are that we send them asynchronous SOAP messages, that are digitally signed, and whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping. I believe we can use the HTTP adapter for adding new fields to the HTTP header, but don't believe it supports signing. I believe that the SOAP adapter supports signing, but I'm not clear on how to use it to add fields to the HTTP header. What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
Thanks,
Kurt>>>What is the most straight-forward way to achieve both the signing of the message and the addition of the HTTP header values?
Use Java mapping for both.
1) Signing the message
You can digitally sign the soap message using many standard api like WSS4j? or refer Java XML signature API which comes in Jdk1.6.
Refer these links
WSS4J - http://ws.apache.org/wss4j/axis.html
Java XML signature : http://java.sun.com/developer/technicalArticles/xml/dig_signature_api/
2) >>whose HTTP headers contains 5 or 6 additional header fields, of which 3 or 4 will need to be dynamically set during the message mapping
Use Dynamic configuration API to set the additional header fields during message mapping. -
Problems with image field and java
Hi, i´m a beginner user of Adobe LiveCycle Designer, i create a form and i fill the text fields with a Java code, but when i try to dinamically assign a image on the image field of my form it doesn´t work, someone have any idea of whats happening or how can i manipulate the image field from Java code? thanks
Session data will only last as long as the servlet container allows. In most cases (eg Tomcat) this defaults to about 30 minutes, but can be changed. Check that the session timeout configuration in your servlet container hasn't been set to "never timeout".
Even if it had, I would have expected OutOfMemory errors rather than degrading performance. Although if the max heap size of the JVM has been set to a level higher than the RAM on the machine you could be getting excess page file usage.
This probably wouldn't put CPU utilization at 99% though.. I suspect this is a code related problem.
My best guess is one of two reasons:
1. Somewhere in your code, or someone elses, there is a loop that never ends.
2. There is a bug in the servlet container.
I don't know which servlet container you are using, but I have used Tomcat extensively and never seen this behaviour.
In terms of solving this problem, that's a tough one. I would try running the entire application within a profiling tool to see which threads are clogging up the processor. The Eclipse java IDE has a plugin called Eclipse Profiler which will allow you to track the utilization of code right down to the method level.
If it were me, I'd be running the entire web application with a profiler like Eclipse Profiler and waiting for it to start clogging, then see who the guilty code is. -
Jar Exception : invalid header field
Hi,
I was executing the statement like this
please help me:
C:\appletVideo>jar cvfm classes.jar *.class *.mf
java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:354)
at java.util.jar.Manifest.read(Manifest.java:165)
at java.util.jar.Manifest.<init>(Manifest.java:55)
at sun.tools.jar.Main.run(Main.java:127)
at sun.tools.jar.Main.main(Main.java:907)
by
Kiranyou must have a character ':' followed by a space (' ') otherwise you will get this exception.
walker -
Calling Stored Procedure with table type as In parameter from Java
Hi Everyone,
Can anyone help me with the sample code to call a stored procedure having input parameter of Table type (consisting of multiple fields) from Java. This job is currently being done by a BPEL process.
We want to implement the same using Java.
Any sample code will be really helpful.
Thanks & Regards,
VikasTo start using a blob you have to insert it into the database and then get it back. Sounds weird but that is how it is. Here is a very simple program to do this:
#include<occi.h>
#include <iostream>
using namespace oracle::occi;
using namespace std;
int main()
try
Environment *env = Environment::createEnvironment(Environment::OBJECT);
Connection *conn = env->createConnection("hr","hr","");
string stmt1 = "insert into blob_tab values (:1) ";
string stmt2 = "select col1 from blob_tab";
Blob blob(conn);
blob.setEmpty(conn);
Statement *stmtObj = conn->createStatement(stmt1);
stmtObj->setBlob(1,blob);
stmtObj->executeUpdate();
conn->commit();
Blob blob1(conn);
Statement *stmtObj2 = conn->createStatement(stmt2);
ResultSet *rs = stmtObj2->executeQuery();
while(rs->next())
blob1 = rs->getBlob(1);
string stmt3 = "begin my_proc(:1) ;end;";
Statement *stmtObj3 = conn->createStatement(stmt3);
stmtObj3->setBlob(1,blob1);
stmtObj3->executeUpdate();
catch (SQLException e)
cout << e.getMessage();
/* The tables and procedure are primitive but ok for demo
create table blob_tab(col1 blob);
create or replace procedure my_proc(arg in blob)
as
begin
-- just a putline here. you can do other more meaningful operations with the blob here
dbms_output.put_line('hello');
end;
}Hope this helps.
Thanks,
Sumit -
Browser modifies http accept header field set by applet
My problem: I have an applet which emulates a wml-browser. The applet is running in Internet Explorer 5. I can access all http-header fields from the applet and all settings made by the applet are honored.
But not the accept header-field... I can set it, but it is always modified afterwards by Internet Explorer or Netscape... It always include accept: text/html while it should only accept wml
Thanx in advance,
MarcoMy problem: I have an applet which emulates a
wml-browser. The applet is running in Internet
Explorer 5. I can access all http-header fields from
the applet and all settings made by the applet are
honored.
But not the accept header-field... I can set it, but
it is always modified afterwards by Internet Explorer
or Netscape... It always include accept: text/html
while it should only accept wml
Thanx in advance,
Marco
Question is ofcourse: How can I prevent this unwanted behaviour of the browser in which the applet is running?
Marco -
REG : HTTP header fields (Synchronous response)
Hi All,
Can anyone please explain the advantage of using this function in the receiver HTTP adapter( ie
"Set adapter specific message attribute -> HTTP header fields (Synchronous response)")
and how this can be implemented?
Thanks in Adavnce,
Siva>
sivarama krishna wrote:
> Hi All,
>
> Can anyone please explain the advantage of using this function in the receiver HTTP adapter( ie
> "Set adapter specific message attribute -> HTTP header fields (Synchronous response)")
> and how this can be implemented?
>
>
>
> Thanks in Adavnce,
> Siva
from help:
If you want to save HTTP header fields from the synchronous response in the XI message header, choose HTTP Header Fields (Synchronous Response) and enter the fields in the fields Field 1 to Field 6.
The fields must have the same names as the fields that are also to be sent in the HTTP response.
The technical names of the fields are HeaderFieldOne,...,HeaderFieldSix.
this means that in case you look to access the header of the response message of a sync http you can use this ASMA.
the implementation will be in your response mapping, using dynamic configuration - /people/shabarish.vijayakumar/blog/2009/03/26/dynamic-configuration-vs-variable-substitution--the-ultimate-battle-for-the-file-name -
Hi,
When running the below query from sqlyog it works OK but when running from java I got exception.
What can cause this difference ?
The query :
create temporary table TempTable1 SELECT salaries.salary AS `salary`,salaries.emp_no AS `emp_no`,salaries.from_date AS `from_date`,MAX(salaries.salary) AS `func` FROM `salaries` WHERE salaries.to_date = '9999-01-01'
The exception:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'salary' cannot be null
ThanksBelow is the code.
When run from sqlyog is works OK.
Thanks
The code :
package client;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
public class test {
* @param args
* @throws ClassNotFoundException
* @throws IllegalAccessException
* @throws InstantiationException
* @throws SQLException
public static void main(String[] args) throws InstantiationException,
IllegalAccessException, ClassNotFoundException, SQLException {
String username = "root";
String password = "";
Class.forName("com.mysql.jdbc.Driver").newInstance();
java.sql.Connection connection = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/employees-thin", username,
password);
Statement statement = connection.createStatement();
statement
.execute("create temporary table TempTable1 SELECT salaries.salary AS `salary`,salaries.emp_no AS `emp_no`,salaries.from_date AS `from_date`,MAX(salaries.salary) AS `func` FROM `salaries` WHERE salaries.to_date = '9999-01-01'");
Exception in thread "main" com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'salary' cannot be null
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931) -
Hi,
I hava class (send sms from java) in dll - ActiveXComponent type, his name: SMSCom
dll name: SMSSender
that get in his constractor: (in VB I wrote this)
SMSObj.password = password;
SMSObj.Username = user;
SMSObj.Source = phone;with this code I'm connect to the dll file and his object, but
I don't know how to give this object this parameters.
ActiveXComponent ax = new ActiveXComponent("SMSCom.SMSSender");
Dispatch SMSObj = (Dispatch) ax.getObject();Thanks alot for any help :)Thank you so moch, you helped me alot!!!!!
I you coul'd help me with last little thing I'll be happy:
but I have error, it is not attached to your help, the error link to this line
(I have jacob.dll +jacob.jar)
ActiveXComponent ax = new ActiveXComponent("SMSCom.SMSSender");the error messege:
Exception occurred during event dispatching:
com.jacob.com.ComFailException: Can't get object clsid from progid
at com.jacob.com.Dispatch.createInstance(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java)
at com.matarotqm.QM6.model.Test1.<init>(SmsDll.java:51)
at com.matarotqm.QM6.model.SmsDll.<init>(SmsDll.java:27)
at com.matarotqm.QM6.view.Sms.actionPerformed(Sms.java:273)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
I have in this object (SMSObj) method that I have to set her text as String and phone as String.
do I call method from SMSObj like this?
System.out.println("Calling method..");
Dispatch.call(SMSObj,"SendSMS","Hello From Java","0507657661");
Maybe you are looking for
-
Table to see stock on particular date
Hello SAP Gurus, I know that through mb5b report you can see the stock on posting date.But guys can u tell me that from which table and field it takes the data?
-
Dynamic Configuration in SAP PI 7.3
Hello, I am doing one file to file scenario in PI 7.3 (Java Stack only). There is one requirement i.e. The output file name will change according to Development, Quality and Production. Prefix will be added to the outputput file name according to Dev
-
Will microsoft word 2004 for the Mac work with OS X Mavericks
When finishing the OS x Mavericks installation, I got a message that said that some version of Microsoft office applications would not work with Marericks. Will Microsoft Work 2004 for Mac work with OS X Mavericks?
-
PS CS5 (x64, x32), Windows 7 (x64) - Photomerge crahes PS
Hi! I use PS CS5 x64 to merge some pics for a panorama with Photomerge, which worked just fine - for awhile. Nowadays whenever I try to use Photomerge crashes PS. There is a note the Event Manager of Windows x64 Ultimate (german): name of crashing ap
-
Dear Friends, I want to make mandatory field of search term 2 in vendoe master creation for some paricular vendor type.I have checked in vendor configuration by T Code OMSG, but there is no option for search term 2.please help me... Regards, Dishant