WLE 4.2 IJTPFW_CAT:57 when calling method
Platform WLE4.2 on Solaris 2.6 :
I am able to create an object reference without problems
however, when I call a method on the object I get the following error :
IJTPFW_CAT:57: ERROR: Activating object - application raised
TobjS.CreateServantFailed. Reason = Interface =
IDL:administrator/Administrator:1.0 OID = adm
The doc is dose not og much help ("Contact the programmer")
What is the cause of such an error ?
jo
This shouldn't be too hard for you to correct. I've recreated the same
error in a sample application by commenting the "create_servant" code in
one of my servers. The resulting message is:
100527.ZZZZZ!wakeUpTarget.9478: TPFW_CAT:23: ERROR: Activating object -
application raised TobjS::
CreateServantFailed. Reason = . Interface =
IDL:WakeUpTarget/IWakeUpTarget:1.0, OID = wakeUpTarget
When the client attempts to invoke a method on the object reference, WLE
tries to create the servant to service the request. As you should see in
the following code excerpt, I have prevented the servant from being created
and this results in the error you seem to be experiencing:
// Method to create servants
Tobj_Servant Server::create_servant(const char* intf_repos_id)
if (!strcmp(intf_repos_id, WakeUpTarget::_tc_IWakeUpTarget->id()))
return new IWakeUpTarget_i();
return 0; // unknown interface
Please post more details if this doesn't help you solve your problem.
Thanks,
Charlie
The views expressed in this posting are solely those of the author,
and BEA Systems, Inc. does not endorse any of these views. BEA
Systems, Inc. is not responsible for the accuracy or completeness of
the information provided and assumes no duty to correct, expand upon,
delete or update any of the information contained in this posting.
Jan-Olav Eide wrote:
Platform WLE4.2 on Solaris 2.6 :
I am able to create an object reference without problems
however, when I call a method on the object I get the following error :
IJTPFW_CAT:57: ERROR: Activating object - application raised
TobjS.CreateServantFailed. Reason = Interface =
IDL:administrator/Administrator:1.0 OID = adm
The doc is dose not og much help ("Contact the programmer")
What is the cause of such an error ?
jo
Similar Messages
-
Alternatives to long parameter lists when calling methods
I've heard you shouldn't have more than 3 parameters when calling methods. What are the alternatives to long parameter lists when calling methods? Compounding parameters into new inner classes, declaring them as member fields? Which one is preferable?
Okay, I get it. But since it's late in the day, I'll share my additional wandering thoughts. And I'll just go ahead and preemptively slap myself for doing so. Ouch! There. So the rules are more like this:
1) Only use setters if the values in question are meant to be part of the state of an object.
2) In general, don't let external entities directly set the state of an object.
Which can be combined into:
1) In general, never use setters.
Which could be reworded to:
1) Only use setters in non-general situations.
Or:
1) Only use setters when setters are a good solution...which isn't very often...generally speaking...
Or if I were to infer when it's a good solution:
1) Only use a setter when it is useful to the caller and has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class...generally speaking...
Actually, you might just infer from here forward that the "generally speaking" is implicit to every rule, and is essentially the "There is an exception to every rule" rule. Which is an interesting rule because it can be applied to itself, resulting in a paradox...generally speaking...but I digress.
And then translated back to the original topic:
1) You can use a setter instead of a constructor argument so long as the value isn't needed at time of construction (or a default value will suffice) and it is useful for the caller to be able to use the setter and using the setter has no significant negative effects on the operation of the object nor the maintainability, size, or performance of the class.
But this won't quite cut it either. With the input of others, we could eventually devise a very concise rule, but it will end up being so long that on one will ever read it...making it an ideal candidate to be included in a legal document. Which will eventually find it's way into a very long scroll pane with a check box at the end exclaiming that you read the document, at which you will not be able to continue unless you check the check box...at which point, what do you do? After all, you are not a liar...generally speaking...
In summary, you could potentially use setters in some limited cases, but in the general sense, that's more of an option than a recommendation. :-) -
Error when calling method INIT in class cl_hrxss_rem for salary statements
after configuring the our hrform to work with the new ess system in ecc 6.0 we configured the hrfor decision tree to $cedt$ and pointed the form variant to the edtin feature.
Now we are getting a class error.
com.sap.pcuigp.xssfpm.java.FPMRuntimeException: Error when calling method INIT of class CL_HRXSS_REM
at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:111)
at com.sap.pcuigp.xssfpm.java.MessageManager.raiseException(MessageManager.java:121)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.reportBapiRet2Error(FcRepFramework.java:525)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.callRfcExecAction(FcRepFramework.java:374)
at com.sap.xss.hr.rep.fcrfw.FcRepFramework.initModel(FcRepFramework.java:292)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFramework.initModel(InternalFcRepFramework.java:256)
at com.sap.xss.hr.rep.fcrfw.FcRepFrameworkInterface.initModel(FcRepFrameworkInterface.java:136)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface.initModel(InternalFcRepFrameworkInterface.java:198)
at com.sap.xss.hr.rep.fcrfw.wdp.InternalFcRepFrameworkInterface$External.initModel(InternalFcRepFrameworkInterface.java:258)
at com.sap.xss.hr.rem2.selection.VcRem2Selection.onInit(VcRem2Selection.java:245)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2Selection.onInit(InternalVcRem2Selection.java:249)
at com.sap.xss.hr.rem2.selection.VcRem2SelectionInterface.onInit(VcRem2SelectionInterface.java:161)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface.onInit(InternalVcRem2SelectionInterface.java:144)
at com.sap.xss.hr.rem2.selection.wdp.InternalVcRem2SelectionInterface$External.onInit(InternalVcRem2SelectionInterface.java:220)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:564)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:438)
at com.sap.pcuigp.xssfpm.wd.FPMComponent.wdDoInit(FPMComponent.java:196)
at com.sap.pcuigp.xssfpm.wd.wdp.InternalFPMComponent.wdDoInit(InternalFPMComponent.java:110)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doInit(DelegatingComponent.java:108)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:430)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:362)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.initApplication(ApplicationSession.java:748)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:283)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1246)
at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:354)
at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:547)
at com.sap.portal.pb.PageBuilder.wdDoRefresh(PageBuilder.java:591)
at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:822)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:313)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:684)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
ThanksHi,
Maintain the EDTIN feature
&CEDT$
And UR problem solve -
JFrame not showing components when called method in other class
Hi everyone,
I am new to SWING,and have this little problem.
i have created a JFrame which has a button and its calling a method in another class.the result takes much more time(around 3mins) as the call involved with FTP.
My problem is , i click the button(other componetns also there),and waiting for the result.all the time my Frame doesnt show any of the components,it looks as if the components are added to it.but when the call returns.everything is OK.
Can any1 help me?
Thanx in advance
ethirajanhttp://java.sun.com/docs/books/tutorial/essential/threads/
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html -
Possible to bypass password when calling Method SessionFactory.getInstance?
Is there any way this method can be called without requiring the password? We do not want to prompt the user for their password when they have already logged into the domain. This needs to work the same way as a single sign-on would. We do not want to hard code the userid and password.
Session session = SessionFactory.getInstance("userid", "password", "production", 6800);
Any ideas?
Thanks in advance!
KarenWe're attempting to achieve multiple things here and I could still really use some help :)
We need to display inside a separate internal website a list of reports/BQY's/etc. out of Workspace that the user has access to. Then they'd click a report link and be automatically logged in to Workspace and the report would run.
In order to pull a list out of Workspace of reports that a user has access to we're trying to use the API but apparently it involves using SessionFactory.getInstance which requires the user's ID and password. We have no way of getting their password, so is there some other way to use the API to interact with Workspace without having to pass each user's ID and password? We're not prompting them to log in at any point except their initial PC login, so we don't have an IE login to leverage.
On a side note we're currently using Apache/Tomcat but can't get the auto-login to Workspace to work so we may be switching to IIS soon, but that's a separate part of this related issue. Yes we're trying to use Trusted Password for that part but I don't believe that is applicable in the above line of code which is requiring a password to be passed as a parameter. Thoughts?
-Thanks,
Karen -
When calling method error .class expected
First the method I'm calling.
public void ExeSqlStmt(String sqlStmt, String columnNames[], String connectString, String userName, String password,int numColumns)
This compiles clean. The code that calls the method is giving me fits with expecting .class, expecting ), can not resolve symble and unexpected type.
The offending line is near the bottom of the code.
Thanks,
-Rob
package jdba;
* Execute the sql statement
// java imports
import java.util.Vector;
import java.awt.event.*;
import java.awt.Toolkit;
import java.awt.Container;
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
// sql imports
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
public class SqlUtil extends JPanel
Connection conn; // database connection object
Statement stmt; // statement object
ResultSet rslt; // result set object
// create someplace to put dat
Vector data; // = new Vector();
Vector columns; // = new Vector();
Vector colHeads; // = new Vector();
public SqlUtil()
// setup panel
JPanel sqlPanel = new JPanel(false);
sqlPanel.setLayout(new BorderLayout());
setBackground(Color.white);
setForeground(Color.black);
public void ExeSqlStmt(String sqlStmt, String columnNames[], String connectString, String userName, String password,int numColumns)
data = new Vector();
columns = new Vector();
colHeads = new Vector();
try
// connect to database
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection(connectString, userName, password);
// select data into object
stmt = conn.createStatement();
rslt = stmt.executeQuery(sqlStmt);
while (rslt.next())
columns = new Vector();
for ( int i=0; i<numColumns; i++ )
colHeads.addElement(columnNames); // column heads
columns.addElement(rslt.getObject(i+1)); // get the Object at i+1
} // end for
data.addElement(columns);
// create the table
JTable table = new JTable(data,colHeads);
// add table to scroll pane
int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
JScrollPane jsp = new JScrollPane(table,v,h);
// Add scroll pane to content pane
add(jsp, BorderLayout.CENTER);
// close the result set and close the statement
rslt.close();
stmt.close();
} catch (SQLException ex)
String msg = "SQL error: "+ex.toString();
} catch (Exception ex)
String msg = "Error: "+ex.toString();
} // end constructor
} // end SqlUtil class
// then we have the code that is calling and getting the errors
package jdba;
// java imports
import java.util.Vector;
import java.awt.event.*;
import java.awt.Toolkit;
import java.awt.Container;
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.JTable;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JLabel;
// sql imports
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
// rollback contention
public class RollbackContention extends JPanel
Connection conn; // database connection object
Statement stmt; // statement object
ResultSet rslt; // result set object
//private vars
private String userName = "[cut]";
private String password = "[cut]";
private String sid = "rob";
private String port = "1521";
private String server = "[cut]";
private String connectString = "jdbc:oracle:thin:@"+server+":"+port+":"+sid;
private int numCols = 3;
private String sqlStmt = null;
private String prompt = null;
private String colNames[] = {"name","waits","gets"};
// constructor
public RollbackContention()
SqlUtil exeStmt = new SqlUtil();
sqlStmt = "select name, waits, gets";
sqlStmt = sqlStmt + " from v$rollstat, v$rollname";
sqlStmt = sqlStmt + " where v$rollstat.usn = v$rollname.usn";
// here is the offending line.
exeStmt.exeSqlStmt(sqlStmt, colNames[], connectString, userName, password, 3);
// loop through and display the rollback segmentsIn your call your referencing the array as colNames[] - it should be colNames (no []'s )
exeStmt.exeSqlStmt(sqlStmt, colNames, connectString, userName, password, 3); -
Error when calling method with a return of double in j2me
hello all,
i have following problem with a j2me program:
if i call a method with a return of double, then i get following error
message:
ERROR: floating-point constants should not appear
Error preverifying class test.hallo
what i'm doing wrong
thanks in regard
----------------example----------------------------
double yourValue(int y, int m, int d)
double v = 0.10;
v = 3.39 y m *d
return v;
public void startApp()
int td;
int y =2;
int m =2;
int d =2;
td = yourValue(y,m,d);
return(td);It's true for MIDP 1.0.
But you can always use implementation of the float
point arithmetic which was written by independent
developers. For example see J2ME section of my
homepage http://henson.newmail.ru
anyway, double is reserved word in java, the way you wrote the source code in your example neither the preverifier nor the compiler will recognize that you intend to use your own types for double and float. maybe with Double or Float it would be different ...
further question: you declare a void function, in the body, however, you try to return some value. something wrong with this function??
regards
bernard -
Error when calling method on EJB
Hi,
I have the following problem:
From my action class I'm calling a method on EJB through Business Object and getting the following error:
org.apache.struts.action.RequestProcessor Unhandled Exception thrown: class gov.nyc.fisa.wbas.exceptions.ServerException
[3/6/08 13:53:44:700 EST] 1acdd938 WebGroup E SRVE0026E: [Servlet Error]-[SERVER EXCEPTION CALLING searchBenefitGroups() METHOD ]: gov.nyc.fisa.wbas.exceptions.ServerException: SERVER EXCEPTION CALLING searchBenefitGroups() METHOD
The following are parts of my code:
In Action Class:
BenefitGroupBO bo = new BenefitGroupBO();
BenefitGroupsColView cView = new BenefitGroupsColView();
try{
cView = bo.searchBenefitGroups(transferObject,true);
catch (ServerException e){
throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
In Business Object:
private BenefitGroupImpl benGrpImpl = null;
try{
System.out.println("1. BenefitGroupBO - searchBenefitGroups()");
collectionView = benGrpImpl.searchBenefitGroups(transferObject, isSearch);
System.out.println("2. BenefitGroupBO - searchBenefitGroups()");
catch (RemoteException e){
throw new ServerException("Remote exception calling BenefitGroupImplBean: searchBenefitGroups()", e);
.....It never executes the second print statement in the method
In Remote Interface:
public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch)
throws ServerException, java.rmi.RemoteException;
In the EJB
public BenefitGroupsColView searchBenefitGroups(BenefitGroupVO transferObject, boolean isSearch){
throws ServerException
System.out.println("1. BenefitGroupImplBean - searchBenefitsGroups() method");
BenefitGroupsColView collectionView = new BenefitGroupsColView();
System.out.println("2. BenefitGroupImplBean - searchBenefitsGroups() method");
return collectionView;
.....It never executes first Print statement in that method and I do not think it ever goes into the actual EJB class.
Can anyone tell me what am I doing wrong?
Thank youHi
BenefitGroupBO bo = new BenefitGroupBO();
BenefitGroupsColView cView = new BenefitGroupsColView();
try{
cView = bo.searchBenefitGroups(transferObject,true);
catch (ServerException e){
throw new ServerException("SERVER EXCEPTION CALLING searchFunds() METHOD ",e);
How are you trying to catch Exception within try{ } ? Because as i know usage is try { }catch (Exception e) { } Could you send full code?
Bye. -
I am getting a line 1 error which I have provided in the troubleshooting box. I have a the newest verison of Java and the newest version of firefox. No addons will load, no toolbars will load, those being yahoo, Google.
== This happened ==
Every time Firefox opened
== when I download 3.6.8, yahoo toolbar and google toolbar also dont load. These error are rolling error that happen every time I start firefoxMy Error:
Error: uncaught exception: Error: <http://www.mayi.com> à³CPûÖ^' Proxy.InstallTrigger
what's this?
help~~~
thanks. -
CALL METHOD ABAP run SQL wrong
Dear All
I have a problem in ABAP connect SQL,Below is my code snippet sentence.
CONCATENATE 'Insert Into [timportcortrol]'
'(zucode,zstate,zdate,zkind) Values('''
VG_PCID ''','''
'1'','''
SY-DATUM ''','''
'1' ''')'
INTO SQL.
CALL METHOD OF REC 'Execute'
EXPORTING #1 = SQL
#2 = CON
#3 = '1'.
IF NOT SY-SUBRC = 0.
MESSAGE I000 WITH 'Download to [timportcortrol] failure,Please Check the SQL Connect!!! '.
EXIT.
ENDIF.
Con:is the connect SQL String ,the connect SQL is Okay.
I debug this code,when I used u2018Select u2026sentenceu2019,the program can work.if I use u2018insert intou2019 then canu2019t work,but I copied the SQL of the u2018inset Into sentenceu2026u2019run it into SQL server then it can work also.
And I found the SY-SUBRC eq u20182u2019.whatu2019s mean about of the sy-subrc eq u20182u2019.
I think the insert into sentence in abap I have write the wrong ,but I canu2019t assurance.
The Insert Into Sentence is:u2019 Insert Into [timportcortrol](zucode,zstate,zdate,zkind) Values('20080807094713','1','20080807','1')u2019
Could you give me some advice for this issue?
Thanks of all
Sun.Have you checked whether it's a problem with mixed case? Some SQL dialects are case sensitive.
The not very helpful meanings of the sy-subrc value can be found in ABAP help.
0 Successful processing of the method meth.
1 Communication Error to SAP GUI.
2 Error when calling method meth.
3 Error when setting a property.
4 Error when reading a property
matt -
Possible thread issues when calling java from C++/Delphi/C#
Hi,
We have a java API for one of our applications. This API has wrapper API's in C++, Delphi and C#. There are two main top level classes in te API - Client and Receiver. Both haave a receive() method.
We used to ship JRE1.3 with the API installation - this was needed to suport the user applications. Recently we haev moved to java 1.4 as the least suported version.
We have two ways of using the java API in our wrapper API's.
Method one, we instantiate the client, and call client.receive(). There are no threads etc involved here. This is working fine.
In the second method, we set a callback on the client, which starts a thread (in C++/Delphi or C#) which calls receiver.receive() and tries to get the message. This is failing.
It fails at a line which simply says "DocumentBuilderFactory.newInstance()".
This call has already been made when connecting the client and it is successful because we can see the client connected.
Whether we do client.receive() or receiver.receive() in a thread, the code passes through this line.But is throwing the exception only when we come to it through a thread.
Any ideas on what I need to watch out for when calling methods on a JVM from a thread in C++/Delphi or C#?
Thanks
Hari
PS: I know we are using some really old versions, but thats needed and out of my control.Hi,
I managed to solve this - finally!
This is what was the cause in our case - should apply to all situations though.
We had the Xerces classes packaged in a custom jar file along with other XML stuff we have. And this mega-jar was on the class path.
We were running everything on Java 1.3 and it worked fine.
But Java 1.4 wrecked all havoc.
So here is what I did:
1. I tried explicitly doing Class.forName() with the name of the Xerces class that was not found. I did this at the same point in the code where the exception was being thrown.
2. The class was successfully loaded indicating that it was on the class path somewhere.
3. Java 1.4 made some changes in terms of class loaders - so suspecting that, I tried printing out the System and the Context class loaders at the point where the exception was being thrown - the system class loader was a valid object, but context class loader was null
4. We have another point in the code base where the exact same lines were used, and these are getting successfully executed even in the multi threaded situation - this is the start up sequence.
5. I printed the two class loaders at this point - they are both valid objects, no nulls.
With this, I narrowed down the scope and was convinced that the class loaders are the cause.
A search on Google and after looking the the source code for Xerces, we realized that the Xerces API uses the Context Class Loader to resolve and load the DocumentFactoryImpl class - this change is from Java 1.4 onwards.
In our case, the JNI AttachCurrentThread method called from C++/C# and Delphi was attaching the thread to the JVM, but each time the context class loader was null.
We could not find anything on how we could make the method to put a non null context classloader.
So, we changed all our JNI interfaces to do the following
//attach the current thred
jvm->AttachCurrentThread(...)
//now get the system class loader and set it as the context class loader on the current thread
//get things from the Thread class
jclass thread = get the thread class
jmethod currentThread = get the static method currentThread()
jobject thread_object = get the current thread object into this
jmethod setContextClassLoader = get the setContextClassLoader() method on the thread
//get the SystemClassLoader
jclass clsLoader = get the class for ClassLoader
jmethodid getSysClsLoader = get the method ID for the getSystemClassLoader() method
jobect sysClsLoader = get the system class loader by calling the above method
//set the context class loader on the thread by calling set context class loader with the sys class loader as the argumentUnfortunately I don't have the code with me right now,otherwise would have shared the same. -
Erratic AbstractMethodError when calling equals() on interfaces
I am getting java.lang.AbstractMethodError or NPEs when calling methods that were defined in java.lang.Object on objects declared as interfaces. The following code executes normally, but sometimes (erratically) I am getting these errors. The code is part of a complex application; I have not been able to reproduce the errors in a small example.
The following code snipped shows where the error occurrs. Important to know is that the variable 'settings' is declared as private final IInterfaceSettings;, where IInterfaceSettings is declared as Java interface.
public int hashCode(){
int result = 83;
result+=(this.settings==null)?0:this.settings.hashCode(); // error occurs here
return result;
}An explicit cast to Object seems to solve the problem; it never occurred again until now.
public int hashCode(){
int result = 83;
result+=(this.settings==null)?0:((Object)this.settings).hashCode();
return result;
}DanielDefine hashCode() in the interface itself. You will probably end up with something like the following:
interface IInterfaceSettings {
abstract public int hashCode();
// other methods follow
class InterfaceSettingsImpl implements IInterfaceSettings {
final public int hashCode() {
return super.hashCode(); // should resolve to Object
Also, if you are going to implement hashCode, you might as well implement equals() so collections behavior is as exepcted.
- Saish
"My karma ran over your dogma." - Anon -
Error when calling a Webservice's public method in Forms10g
Hi,
I'm getting the following error when calling a webservice's public method, i'm using Forms10g 10.1.2.3
java.rmi.RemoteException; nested exception is: HTTP transport error javax.xml.soap.SOAPException
java.security.PrivilegedActionException javax.xml.soap.SOAPException
Message send failed javax.net.ssl.SSLException SSL handshake failed X509CertChI have added the Jar containing the client proxy in both Classpaths(system variable and default.env), the jar has been made with jdk 1.4
I also have tested the client proxy from jDeveloper and it's working there, but in Forms i'm getting this error.
I guess my problem might be that i'm calling a webservice that is secured since the url starts with https
what should i do to fix this ??
Regards
CarlosI understand, so i have a doubt, why the webservice works on jDeveloper ??Not just JDeveloper even soapUI and Neatbeans have a way of working without a client certificate installed.
I do not know how they achieve it. I know that they work without a client DC.
Cheers,
PS: See this http://stackoverflow.com/questions/8887434/webservices-ssl-https, it offers a clue.
The java programs run unhindered when one-way authentication is being used. These products ship with a digital certificate that is in the path of most popular CAs.
Corollary, if the Web Server is configured for mutual authentication then you need to install and configure the client certificate in the tools.
Edited by: Prabodh on Dec 5, 2012 8:36 PM -
NoSuchMethodError when call JPublisher method
Im getting a java.lang.NoSuchMethod error when calling a method within
a Java class generated by JPublisher.Hi Larry,
thanks for the answer:
DB Version is:
select * from v$version:
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.0.1.4.0 - 64bit Production
PL/SQL Release 9.0.1.4.0 - Production
CORE 9.0.1.2.0 Production
TNS for IBM/AIX RISC System/6000: Version 9.0.1.4.0 - Production
NLSRTL Version 9.0.1.4.0 - Production
Is there a possibility to get out if intermedia is installed? I really think it is because the methods work. I can process the image - the problem is that somehow a error occurs but the the method worked. The image written to the filesystem has the correct values.
describe ordsys.ordimage leads to the expected output:
SQL> describe ordsys.ordimage;
Element Type
SOURCE ORDSYS.ORDSOURCE
HEIGHT INTEGER
WIDTH INTEGER
CONTENTLENGTH INTEGER
FILEFORMAT VARCHAR2(4000)
CONTENTFORMAT VARCHAR2(4000)
COMPRESSIONFORMAT VARCHAR2(4000)
MIMETYPE VARCHAR2(4000)
INIT FUNCTION
COPY PROCEDURE
PROCESS PROCEDURE
PROCESSCOPY PROCEDURE
SETPROPERTIES PROCEDURE
CHECKPROPERTIES FUNCTION
GETHEIGHT FUNCTION
GETWIDTH FUNCTION
GETFILEFORMAT FUNCTION
GETCONTENTFORMAT FUNCTION
GETCOMPRESSIONFORMAT FUNCTION
SETLOCAL PROCEDURE
CLEARLOCAL PROCEDURE
ISLOCAL FUNCTION
GETUPDATETIME FUNCTION
SETUPDATETIME PROCEDURE
GETMIMETYPE FUNCTION
SETMIMETYPE PROCEDURE
GETCONTENTLENGTH FUNCTION
GETCONTENT FUNCTION
GETBFILE FUNCTION
DELETECONTENT PROCEDURE
SETSOURCE PROCEDURE
GETSOURCE FUNCTION
GETSOURCETYPE FUNCTION
GETSOURCELOCATION FUNCTION
GETSOURCENAME FUNCTION
IMPORT PROCEDURE
IMPORTFROM PROCEDURE
EXPORT PROCEDURE
PROCESSSOURCECOMMAND FUNCTION
OPENSOURCE FUNCTION
CLOSESOURCE FUNCTION
TRIMSOURCE FUNCTION
READFROMSOURCE PROCEDURE
WRITETOSOURCE PROCEDURE
MIGRATEFROMORDIMGB PROCEDURE
MIGRATEFROMORDIMGF PROCEDURE
GETPROPERTIES PROCEDURE
I do not want to use a database link. everything is stored in that one database. I really have no clue why plsql thinks I want to.
Regards,
Markus -
NullPointer when GUI calls method in Client
Hi, I'm relatively new to Java programming and this conference.
I hope the following is not too long winded.
I'm trying to programme a FTP Client which is controlled by a GUI.
My JBuilder project has three classes:
ClientGUI.java and ClientFrame.java (produced with JBUilder's New Application option)
plus AClient.java (this is the 'engine' of the project).
ClientGUI constructs an instance 'frame' of ClientFrame which in turn constructs an instance 'client' of AClient.
The call to the AClient constructor has to be in a try/catch statement,
and takes a JTextArea as a parameter from ClientFrame to allow 'client' to display messges in my GUI.
The AClient constructor opens the Socket connection to a simple server on the same computer.
This part works.
However, when I attempt to use events generated by buttons in my GUI ('frame')to call methods in 'client', I get the following null-pointer exception:-
java.lang.NullPointerException
at ClientFrame.jButton1_actionPerformed(ClientFrame.java:219)
at ClientFrame_jButton1_actionAdapter.actionPerformed(ClientFrame.java:274)
etc...
etc...
These refer to code blocks:-
if ( client.isAlive() ) { /*line 219*/
System.out.println("client alive");
}where isAlive() is a simple test method that returns true,
and
public void actionPerformed(ActionEvent e) {
adaptee.jButton1_actionPerformed(e); /*line 274*/
}'client' is listed as a public field in ClientFrame and is instanciated, so why do I have this problem?
Enclosing the call in a try/catch statement doesn't help.
Thanks in advance. LaurenceThe NullPointer means that the client was not instantiated, though you may think it has been.
Make sure that you are instantiating the correct variable, for instance, if you have a class-level field called client you would do something like this:
public class WhateverClass {
private AClient client;
//other stuff
public WhateverClass(...) {
client = //assignment either
//with new AClient(...)
//or something else
}You would NOT do:
public class WhateverClass {
private AClient client;
//other stuff
public WhateverClass(...) {
AClient client = //assignment either
//with new AClient(...)
//or something else
}Since this would create a second variable of name client that only has scope within the constructor.
Also, if the client is being assigned through a parameter in the constructor, check to make sure that that you are not passing a null value along... Do a System.out.println(client) after the assignement and see what you get. Then you know if the problem occurs in this class or in the class that creates the AClient reference to begin with...
Maybe you are looking for
-
Two Apple IDs on iPhone, can't accept password
I changed my Apple ID and everything appeared to be fine, but now iPhone keeps asking for old ID password? forgot password won't work.
-
PH2423 How do you get text pages in a project to a saved slideshow?
Hi Peeps, My project is a book which has photos AND text pages. I can get the photos to the saved slide show but not the text pages. Can someone advise?
-
Image positioning in a div, vertical and central alignment
Can any body help me with this please. I have a row of logo images displayed across a page like this example working perfectly on my test site http://thewebsitedeveloper.co.nz/thinkRedTest/pattonNz/suppliersTemplateCombined.html On the actual Busines
-
How to configure Material Master
Dear Guru, May I know how the steps to configure material master? Thank you. Rgds, Goh Yen
-
Email Update - *UPDATED 29/08/14*
Hi Everyone Thank you for your continued patience with us whilst we undertake the massive job of migrating all our customers over to BT Mail. We are regularly feeding back comments made on the forum to the email team so that they can get an understa