Problem with sending objects to a package function
Hello fellows,
I am working on a project where I need to call a PL/SQL package's function and then work with the result.
The procedure takes a custom object:
CREATE OR REPLACE TYPE DTODOROV.my_object AS OBJECT
ATTR1 VARCHAR2(255)
)and the result is the same object.
I have the following java code
if(conn.isUsable()){
System.out.println("Connected!");
ocs = (OracleCallableStatement) conn.prepareCall("{? = call MYPACK.MF(?)}");
Object[] args1 = {"Petar"};
STRUCT ms = new STRUCT(new StructDescriptor("DTODOROV.MY_OBJECT", conn), conn, args1);
ocs.setObject(2, ms, OracleTypes.STRUCT);
ocs.registerOutParameter(1, OracleTypes.STRUCT,"DTODOROV.MY_OBJECT");
ocs.execute();
Object object = ocs.getObject(1);
System.out.println(((STRUCT)object).getAttributes()[0]);
}And this is the body of my package:
CREATE OR REPLACE PACKAGE BODY DTODOROV.myPack AS
FUNCTION MF(Param1 MY_OBJECT) RETURN MY_OBJECT
is
myObjIn MY_OBJECT;
myObjOut MY_OBJECT;
BEGIN
myObjIn:=Param1;
if(myObjIn.ATTR1 <> null) then
myObjOut:= new MY_OBJECT('Mitko');
INSERT INTO DEBUG_INFO VALUES (myObjIn.ATTR1||'not empty');
else
myObjOut:= new MY_OBJECT('Oktim ');
INSERT INTO DEBUG_INFO VALUES ('empty');
end if;
return myObjOut;
END;
END myPack;
/DEBUG_INFO is just a table with one column to check what is happening.
The database is oracle 11g.
JDBC driver is the latest from oracle.
JDK is 1.6
The java is intended to run as a web service on GlassFish (for now, or Tomcat later).
And here is my problem. When I execute the java code the object i send to the procedure is null. What am I doing wrong? Because I get no exceptions or SQL errors. If you could give me some pointers as to how to easily debug such code?
Thanks in advance,
Mitko
Edited by: DiTod on Apr 5, 2011 8:41 AM
if (conn.isUsable()) {
System.out.println("Connected!");
ocs = (OracleCallableStatement) conn.prepareCall("{? = call MYPACK.MF(?)}");
Object[] args1 = {new CHAR("fa",CharacterSet.make(CharacterSet.UTF8_CHARSET))};
StructDescriptor sd = StructDescriptor.createDescriptor("DTODOROV.MY_OBJECT", conn);
STRUCT ms = new STRUCT(sd, conn, args1);
System.out.println(ms.dump());
ocs.setObject(2, ms, OracleTypes.STRUCT);
ocs.registerOutParameter(1, OracleTypes.STRUCT,"DTODOROV.MY_OBJECT");
ocs.execute();
Object object = ocs.getObject(1);
System.out.println(((STRUCT)object).getAttributes()[0]);
}I think you mean this. But it is still not working :(
Actually when I dump it I see that it has just one property and that it is from the correct type
>
name = DTODOROV.MY_OBJECT
length = 1
ATTR1 = fa
>
but something happens during the sending and in the database I don't recieve the object or it is null.
Edited by: DiTod on Apr 5, 2011 8:46 AM
Similar Messages
-
Problem with inherited Objects
Hi,
I have a problem with inherited objects inside Flex using
wsdl as the source of the object. The AS-classes are generated
inside Flex Builder 3.
Inside the wsdl I have 2 complex types:
<complexType abstract="true" name="PersistentObject">
<sequence>
<element name="id" nillable="true" type="xsd:string"/>
<element name="insertTimeStamp" nillable="true"
type="xsd:dateTime"/>
<element name="insertUsername" nillable="true"
type="xsd:string"/>
<element name="updateTimeStamp" nillable="true"
type="xsd:dateTime"/>
<element name="updateUsername" nillable="true"
type="xsd:string"/>
</sequence>
</complexType>
and
<complexType name="Contact">
<complexContent>
<extension base="tns3:PersistentObject">
<sequence>
<element name="birthday" nillable="true"
type="xsd:dateTime"/>
<element name="firstName" nillable="true"
type="xsd:string"/>
<element name="lastName" nillable="true"
type="xsd:string"/>
<element name="middleName" nillable="true"
type="xsd:string"/>
<element name="newPassword" nillable="true"
type="xsd:string"/>
<element name="password" nillable="true"
type="xsd:string"/>
<element name="title" nillable="true"
type="xsd:string"/>
<element name="username" nillable="true"
type="xsd:string"/>
</sequence>
</extension>
</complexContent>
</complexType>
The classes in actionscript seem plausable:
public class PersistentObject
* Constructor, initializes the type class
public function PersistentObject() {}
public var id:String;
public var insertTimeStamp:Date;
public var insertUsername:String;
public var updateTimeStamp:Date;
public var updateUsername:String;
and
public class Contact extends PersistentObject
* Constructor, initializes the type class
public function Contact() {}
public var birthday:Date;
public var firstName:String;
public var lastName:String;
public var middleName:String;
public var newPassword:String;
public var password:String;
public var title:String;
public var username:String;
When I want to retreive an object of type Contact, it seems
that only a couple of entries are filled. While debugging the flex
XMLDecoder, I noticed something strange. It seems, like the decoder
is expecting the result xml data to be in alphabetical order:
birthday, firstname, lastname, etc. But since the object is
inherited, the data that is actually received contains elements
from the parent class: birthday, firstname, id, inserttimestamp,
The resulting object has just birthday and firstname filled,
which is somehow wrong. This seems to be a problem inside the
parser itself. What can I do?I am having a problem with an extended class as well.
When I step through the code, everything is going fine and the decoder (mx.rpc.xml::XMLDecoder) sees that the class is an extension and wants to get the values for the superclass first. When it gets into getApplicableValues(), it's looking for the values to be in the order of the definition which would be ok if the values collection didn't include the values from the subclass as well! It goes through the whole definition and doesn't find anything for the superclass because the values aren't where it expects them. When it pops back up to the subclass and starts to decode those values, it finds them because the definition order and values order match.
Is this a known issue? Or, am I misunderstanding something?
Thanks,
Chuck -
Problem with shared objects synchoronization.
I encountered a small problem with shared objects.
I'm working on a program that creates chat rooms of a fixed
size of 30 users. When the 31th user comes, a new room is created.
The idea is that the client first connects to the first room
and checks if it's full by connecting to shared objects. If it is
full, connection is closed and process is reapeated on a new
instance of the application.
I use a function to connect to an instance, which takes as a
parameter a number (1 for instance room_1, 2 for room_2, etc). The
function itself creates the necessary Netconnection and
sharedObject objects.
If a room is full, Netconnections and sharedObjects are
closed and function is called again with another number.
I have no problem for connecting to the first room, but after
closing the first connection and connecting to the new room, there
seem to be some problems with the shared objects (especially,
OnSync doesn't seem to execute again after the connection to the
shared objects of the new instance).
I was wondering if you had any ideas what could cause this.
Is it the use of the same variable names for connecting at two
different shared objects?
Here is the function :
function initStreams(room) {
client_nc = new NetConnection();
client_nc.connect("rtmp://192.168.0.4/Elearning/room_"+room);
in_ns = new NetStream(client_nc);
in_ns2 = new NetStream(client_nc);
Replay_video.attachVideo(in_ns);
out_ns = new NetStream(client_nc);
out_ns2 = new NetStream(client_nc);
in_ns.play("my_recorded_stream");
users_name = SharedObject.getRemote("users_name",
_root.client_nc.uri, false);
users_name.connect(_root.client_nc);
users_language = SharedObject.getRemote("users_language",
_root.client_nc.uri, false);
users_language.connect(_root.client_nc);
users_picture = SharedObject.getRemote("users_picture",
_root.client_nc.uri, false);
users_picture.connect(_root.client_nc);
users_finger = SharedObject.getRemote("users_finger",
_root.client_nc.uri, false);
users_finger.connect(_root.client_nc);
I you need more info, I can post more of the code on the
forum.
Any help would be really appreciatedI don't see any onStatus events in the code you posted above.
If you're defining the onstatus event outside the function, that's
the problem. When you define the shared object, you also need to
define it's onStatus event handler.
Also, you really should wait for the onStatus event of the
netConnection before you connect your sharedObjects. If you try to
connect the SO before the netConnection is established, the SO will
never connect. -
I have too many problems with UserKeyMD Object
Hi everybody!!!......
I've too many problems with UserKeyMD object, this don't work, I have a Application which create the DataBase structure, but when try it for create the user key on "x" field in "ABC" table (x field is present on table, is db_Alpha with 8 chars, subtype is st_None) is raised the problem.
I try to create this way the key (VB example):
Dim oUserKeysMD As SAPbobsCOM.UserKeysMD
Set oUserKeysMD = oCompany.GetBusinessObject(oUserKeys)
oUserKeysMD.TableName = sTableName
oUserKeysMD.KeyName = sKeyName
oUserKeysMD.Unique = BoYesNoEnum.tYES
oUserKeysMD.Elements.ColumnAlias = sFieldName
oUserKeysMD.Add '<- here problem is raised
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserKeysMD)
I'm work in Delphi .Net and translate the source code of my function to VB.
P.D.:this source code at least work 2 times, but does not use it until today, I do not know because no longer it works now but.
excuse my ingles is very bad
thanks
regards
Francisco Troncoso
Chile.
Message was edited by: Francisco TroncosoHi, I using this names for my tables, fields and keys.
the table name is:
AOTI
the fields names are:
codigo alpha editsize 8
decrip alpha editsize 40
tipo alpha editsize 1 - valid values W, C - Default Value C
grupo1 alpha editsize 1 - valid values Y, N - Default Value N
grupo2 alpha editsize 1 - valid values Y, N - Default Value N
grupo3 alpha editsize 1 - valid values Y, N - Default Value N
grupo4 alpha editsize 1 - valid values Y, N - Default Value N
grupo5 alpha editsize 1 - valid values Y, N - Default Value N
grupo6 alpha editsize 1 - valid values Y, N - Default Value N
grupo7 alpha editsize 1 - valid values Y, N - Default Value N
grupo8 alpha editsize 1 - valid values Y, N - Default Value N
all fields have subtype none and the key name is :
AOPK1
ColumnAlias is codigo, when I try to create the table, fields and key with MetaDataOperatios example I have not problems but I try to create with my application I have the error.
Regards,
Franciso. -
Problems with the O2 blackberry data package on my Curve 3G.
I have already informed O2 about this but they claim that I should be used the blackberry support services, but nothing there helps me!
I got my Blackberry Curve 3G on September 9th this year and I put on the Blackberry Data Package bolt-on onto my phone on September 16th. I then received a text to say they've taken £5 from my credit and it will be up and running in the next 24 hours. Its now September 19th and my BBM is not working at all and I am extremely upset with the services and behaviour I have received from both O2 and Blackberry.
Is there any way you can help? If this fails, I shall be forced to go back to the shop from where I got my Blackberry from and ask for their help.
Many thanks, Jade.Can a bubble whistle Problems with the O2 blackberry data package on my Curve 3G.? The seat matures in your oar. The lad ices the pursuing method inside a resident. A judge spins against the vendor! The rose wows the hello.
filipina heart -
Problem with Send and Receive Emal In SAP System
Hi gurus!
I have a following quote:
Dear !
I have a problem with send and receive email in SAP system following :
I want to test send and receive email in local network at my company. I
had two server
Server 1 : I setup Exchange Mail Server 2007 with domain controller is
fes.com
Server 2 : I setup SAP ERP ECC 6.0
On Server 1 : I created 2 account ( u1Afes.com and u2Afes.com ) and then I tested send and receive email between u1 and u2 in local network through Microsoft Outlook 2007 -> OK
and then
On Server 2: I had configured send and receive email on SAP system
through tcode SBWP, SCOT and SOST as Note 455140 - "Configuration of
e-mail, fax, paging or SMS using SMTP"
for example :
I logged in SAP system with user Basis01 (with email u1Afes.com ) -> then,using tcode SBWP -> new message -> send to u2Afes.com with Internet Mail type and then status message with green light -> sending ok
and then I have used Microsoft Outlook 2007, I logged with account u2 ->check email -> Ok. I saw message which send from u1
Finally, My problem is how can receive mail in SAP system without using Microsoft Outlook
For example:
Login system SAP with Basis01 account (with u1Afes.com ) -> tcode SBWP ->New Message -> send to u2Afes.com
and then
Login system SAP with Basis02 account (with u2Afes.com ) -> tcode ??? ->
To receive email from Basis01 (with u1Afes.com )
Please help me now
Thanks
I replace "@" with "A" because of banning email of this forum.
This quote is about sending email in local network. And we can't receive any email from the outside email address. Addition if I wanna send email to internal email in Internet (we've just tried with email address in local network) What should I config in SAP and Exchange ?
By the way, Is SAP Server IP added to Relay Agent for sending or receiving mail ?
Regards
An NLP
Edited by: An NLP on Apr 6, 2010 7:03 PMHi,
This problem is a classic problem of mail routing via Exchange. Exchange like most mail servers use the domain part of the email address as a means to route mails. So I will make an assumption that your main company mail addrss is "User @ fes.com".
So when you send a mail to the "User @ fes.com mail" address the mail is delivered to your Outlook mail address as this is the default route for company.
(Q) So how do you get your Exchange server to relay the mail into the sending SAP system?
(A) The easiest way would be to setup and unique mail domain for your SAP system. I always recommend "user @ client.sid.company.com" which in your case would be "u1 @ 100.PRD.fes.com". You can then instruct Exchange to send any emails addressed to 100.PRD.fes.com domain to your SAP system. Also using this format of address you can configure multiple mail connections into multiple SAP systems.
(A) Another answer would be to enter the "Full" email address (LOcal and Domain part of address) into the routing rule for Exchange e.g. "U1 @ fes.com" so that all emails addressed to this user will be delivered into SAP. However this method requires a lot of Admin as you will have to update Exchange with ALL email address that need to receive emails. Also if your corporate mail address is "U1 @ fes.com" then all mails will be forwarded to SAP.
I would definitely NOT recommend this method but the decision is up to you.
P.S. The IP address of the SAP system is entered into the mail header of the email. This is standard practice in SMTP relay. You can suppress this header in Exchange
Hope this helps
Michael -
Problem with sending and receiving e-mail through exchange [GMail]
Hello I have problem with sending and receiving e-mail.
all is well set, username and password are correct, the server set m.google.com. verification of data is about like stepping into a post and want to check the post office gives me an error message: Can not Get Mail. The connection to the server has failed
I have this problem on my two iPhonehttp://www.zdnet.com/google-drops-exchange-activesync-support-for-free-email-acc ounts-7000008836/
-
I recently upgraded to Firefox 13.0.1 and I’m operating a Mac Powerbook Pro with OS of 10.6.8 (Snow Leopard).
Now I’m having intermittent problems with sending emails where Firefox freezes up. There is often a yellow warning above suggesting 32-bit mode, sometimes I can click to shift it that way, sometimes not.
Anyone having these problems?
Any suggestions?I recently upgraded to Firefox 13.0.1 and I’m operating a Mac Powerbook Pro with OS of 10.6.8 (Snow Leopard).
Now I’m having intermittent problems with sending emails where Firefox freezes up. There is often a yellow warning above suggesting 32-bit mode, sometimes I can click to shift it that way, sometimes not.
Anyone having these problems?
Any suggestions? -
Mail and iPhoto Problems with sending photos.
Mail and iPhoto Problems with sending photos.
I have this problem that started a while ago and seems to be getting worse.
Here are the different scenarios.
-If I try to share a photo to email within iPhoto, it will insert the image file name in the mail message, but no image icon or opened image. In iPhoto Preferences under General I have chosen to use Email Photos using Mail.
-If I choose to use iPhoto to send the photo, it will compose the message and the photo is viewable. If I send the message i can view the photo within the email I sent to myself. Nothing happens when I double click on the photo in the Mail message. Nothing happens when i control click on the photo in the mail message. Nothing happens when I try to drag the photo to the desktop from the mail message. When I try to save attachments from the email and choose a place to save it, the save button is grayed out and it cannot be saved. When I check the mail message it says there is an attachemnt but there is no file size listed.
-If I use the stationary within Mail app I cannot drag a photo into the placeholder, I get a circle with a line through it symbol when I try. It happens if I try to drag a photo from the desktop or from the media browser within Mail app.
-If I drag the photo to the desktop from iPhoto, I can double click it on the desktop and it will open in Preview.
-If I then control click on the same photo on the desktop and scroll to share/email, the generic photo icon will be inserted in the mail message. If i double click the photo icon in the mail message I get a message it can't be opened because it is empty.
-If I drag that same image to the mail message body the same thing happens.
-If I send that email to someone they cannot open the image file.
What I can do:
- I can drag that same image file on the desktop to my dropbox folder and it will upload. From there I can go on my iPad and download the photo and send it through email just fine.
-I can open the same image file on my desktop in Preview, I can copy and paste it into a mail message and the image will be viewable in the mail message by me and by the recipient.
-I can drag that same image on the desktop to my safari browser window and it will be viewable in the page. i can then copy and paste that image into a mail message and it is viewable in the message. I can then send that email message to myself and i can control click on the image and get all my options. It also shows as an attachment with the size of the image file in the mail message.
I can send that message to someone and they can see the photo and open it fine.
-If I send that same email to me I can see the photo within the mail. If I then drag that photo to the desktop I cannot use it again to put in an email as the same problem happens again.
I have tried all scenarios in my user account, another users account and in a guest account. The same happens in all. I am guessing because of this it is not a corrupt preference file, unless all of the preference files are corrupt. The guest user account I added a new email account so it was brand new and still had the problem.
I am stumped, all and any help is appreciated.Another problem that may be related….
I have Snapz Pro. I used to be able to save the snaps to my desktop or a folder. Now when I take a screenshot and try to save the file to my desktop or a folder on my desktop I get this message "Files cannot be created in the selected location. You do not have permission to write to the selected location. Please choose a different location." I have found that i can only save the file to the clipboard. I have repaired permissions many times and still I have this problem. -
Problem with sending sms - nokia x3
Hello,
I've got a problem with sending sms in my nokia x3 - actually with recently used number. I sent messages, but the list is the same. There is only one number although I used many more. I removed this number from the list, but is still here. I also tried to turn off the phone and pull out the battery, restart factory setting but there's no change.
Could somebody help me, please?
p.s. Sorry, but my english isn't well. I hope the post is understoodCheck if there is any relation with the LOG... When you clear the log.. (selecting ALL).. is it removing details from the RECENTLY USED too...
To confirm this select Clear Log.. and check if that one no. you are talking about still remains or not.. If its no more there means you must have cleared the log just before using the last no. that is appearing..
--------------------------------------------------------------------------------------------------------------------------------------------------------If you find this helpful, pl. hit the White Star in Green Box... -
Problem with "new page as a copy" function in 4.2
Hi all,
I found several problems with version 4.2 in the functionality of "new page as a copy".
In particular, copying a page from another application, you lose the references to the template (eg template region, button ...) and these are replaced by a numeric code (eg 426589173 ... instead of "Region without Buttons and Titles") and, worst of all, the reference is lost to the buttons on the process conditions and branches.
Has anyone encountered the same problem? I never had any problems with version 4.1.1
Thanks
Stefano
Edited by: Stefano_i0600006 on 18-ott-2012 7.52
Edited by: Stefano_i0600006 on 18-ott-2012 7.52Hi Stefano,
Thank you for bringing this issue to our attention. I've logged bug *14786585* to track this issue. We'll endeavour to identify a resolution as soon as possible.
Regards,
Hilary -
Hi,
I have problem with embedded objects which contained embedded objects.
When I create an Object in the persistent memory and commit this object I get the following error:
ORA-22805: cannot insert NULL object into object tables or nested tables
In the constructor of my persisten object I create the embedded members in the transient memory:
ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
m_lang = new AEnumLanguage_OraType();
m_cost = new AAmount_OraType();
}Or when I dereference a reference I get this error:
ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
Can somebody give me a hint?
I've defined the following Type:
CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
VALUE NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
) FINAL " );
CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
ISONR NUMBER(5,0)
) FINAL ;
CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
CCY ACURRENCY_ORATYPE,
LO32BITS NUMBER(10,0),
HI32BITS NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
COUNT NUMBER(4),
LANG AENUMLANGUAGE_ORATYPE,
COST AAMOUNT_ORATYPE
) FINAL ;
oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
pObjR->setCount(i+2001);
pObjR->setLang(AEnumLanguage(i+1));
pObjR->setCost(AAmount(ACurrency(), 2.5));
c.commit();
c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
len = persObjListR.size();
{for (int i = 0; i < len; i++) {
oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
pObjR->getCount();
pObjR->getLang();
c.commit();
With kind regards
Daniel
Message was edited by:
DanielF
Message was edited by:
DanielFHi,
I have problem with embedded objects which contained embedded objects.
When I create an Object in the persistent memory and commit this object I get the following error:
ORA-22805: cannot insert NULL object into object tables or nested tables
In the constructor of my persisten object I create the embedded members in the transient memory:
ATestPersObj::ATestPersObj() : m_count(0), m_lang(NULL), m_cost(NULL) {
m_lang = new AEnumLanguage_OraType();
m_cost = new AAmount_OraType();
}Or when I dereference a reference I get this error:
ORA-00600: internal error code, arguments: [kokeicadd2], [16], [5], [], [], [], [], []
Can somebody give me a hint?
I've defined the following Type:
CREATE OR REPLACE TYPE AENUM_ORATYPE AS OBJECT (
VALUE NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE AENUMLANGUAGE_ORATYPE UNDER AENUM_ORATYPE (
) FINAL " );
CREATE OR REPLACE TYPE ACURRENCY_ORATYPE AS OBJECT (
ISONR NUMBER(5,0)
) FINAL ;
CREATE OR REPLACE TYPE AAMOUNT_ORATYPE AS OBJECT (
CCY ACURRENCY_ORATYPE,
LO32BITS NUMBER(10,0),
HI32BITS NUMBER(10,0)
) NOT FINAL ;
CREATE OR REPLACE TYPE ATESTPERSOBJ AS OBJECT (
COUNT NUMBER(4),
LANG AENUMLANGUAGE_ORATYPE,
COST AAMOUNT_ORATYPE
) FINAL ;
oracle::occi::Ref<ATestPersObj> pObjR = new(c.getConnPtr(), "TTESTPERSOBJ") ATestPersObj();
pObjR->setCount(i+2001);
pObjR->setLang(AEnumLanguage(i+1));
pObjR->setCost(AAmount(ACurrency(), 2.5));
c.commit();
c.execQueryRefs("SELECT REF(a) FROM TTESTPERSOBJ a", persObjListR);
len = persObjListR.size();
{for (int i = 0; i < len; i++) {
oracle::occi::Ref<ATestPersObj> pObjR = persObjListR;
pObjR->getCount();
pObjR->getLang();
c.commit();
With kind regards
Daniel
Message was edited by:
DanielF
Message was edited by:
DanielF -
hi all,
i am having a problem with activeX objects.
my activeX ( Tree View) is wrking fine with windows2000
but when i am trying the same code with XP its saying dll missing.
do these activeX depends on OS also..
plz help me.hey Vishwas!
did you register the .dll?
do you work with vb.net?
which ServicePack do you have in Windows XP?
greetz
Matthias -
I had iTunes 10.2.1.1 but needed to upgrade to 10.6 so my iPhone could synch...I'm getting this error message "Problem with this Windows (XP) Installer package. A program required for this install to complete could not be run." Any ideas?
This has been fixed. Answer is that I needed to go to "Apple Software Update" and repair it. (From my Control Panel).
-
Hi there, I've got a problem with sending via an URL. If I send and receive something I use a method called connect. This method works well, I construct a URL, connect and receive an ObjectStream.
But as I only want to set some values in another use case I do not want to receive anything,
But it doesn't work - my servlet does not receive any request.
Could anyone please help me to solve this?
Thank you.
Regards
Tarik
private synchronized static void connectOneWay(String data)
throws IOException, ClassNotFoundException {
try {
URLConnection connection = null;
URL testServlet = null;
Class classLock = ServletConnector.class;
while (locked)
classLock.wait();
locked = true;
testServlet = new URL(servletURL + data);
if (MMSCMSTree.debug)
System.out.println("Servlet URL: " + testServlet);
connection = testServlet.openConnection();
connection.setDoInput(false);
connection.connect();
locked = false;
classLock.notify();
} catch (InterruptedException e) {
e.printStackTrace();
}Hi
There was not a problem with this, the problem was on the server side, infinite loop ... :-)
Regards
Tarik
Maybe you are looking for
-
Error Viewing Released iPhone/iPod App in iPad's App Store
Our app's status had been changed to ready for sale since 16th September 2013 Here is the link to our app https://itunes.apple.com/us/app/irelief/id694991621?ls=1&mt=8 This app was built with setting as follows: XCode 4.6.1 Required Device Capabiliti
-
Printing JTable landscape mode
How can I print out a JTable in a landscape mode (to physical paper)? so like 0000000000000 0--------0---------0 0--------0---------0 0000000000000 instead of 00000000 0----------0 0----------0 0----------0 0----------0 0----------0 0----------0 0000
-
[Solved] Openproj looks strange in the awesome WM
Hi Community, I just installed openproj from the AUR. But when I run it in the awesome WM, I found the background of the application looked nearly blank, which made openproj impossible to edit in. It looks strange. So, openproj cannot be run from the
-
I am using Windows 2000 Server and I can't to start up admin console from http://localhost:7001/console. My Internet Explorer browser (version 5.0) always hung up (task manager shows 'not responding...') ... IE5 can run applet, etc... Someone said to
-
Change itunes account on itouch
I have seen people say that to change the itunes account on the ituoch you have to sign in on the computer. My computer is currently broken. My itouch is already set up but with a different itunes account. I would like to just change the itunes accou