invoking the java object in a widget
Hello
is it possible to invoke java objects in a widget or only java application complete?
for example, I tried:
var args = new blackberry.invoke.JavaArguments('net.rim.device.api.system.Alert.startVibrate(25500);'); blackberry.invoke.invoke(blackberry.invoke.APP_JAVA, args);
but his does not work is there a way to do it?
bert2002
Hi bert2002,
You can call a "Java Application" by using the API that you have demonstrated to invoke. But not a Java API.
You can create a JavaScript Extension that will wrap any Java API so that you can use in your widget. A video on how to make can be found here:
http://www.BlackBerry.com/DevMediaLibrary/view.do?name=WritingJavaScriptExtensions
As well as a lab here:
http://NA.BlackBerry.com/eng/developers/devbetasoftware/Lab_Widget_Extension.zip
Tags: BlackBerry Developers
Similar Questions
-
How the color in the Java object?
My code:
< cfset var image = createObject ("java", "java.awt.image.BufferedImage") / >
< cfset var color = createObject ("java", "java.awt.Color") / >
< cfset g = image.getGraphics () / >
< cfset g.setColor (color.white) / >
In the last line, I want to repalce the "color.white' with #F23ABB, how?
Thank you.Try the decode() method and you must initialize the BufferedImage object before using it.
http://Java.Sun.com/J2SE/1.4.2/docs/API/Java/AWT/image/BufferedImage.html#BufferedImage (in t, % 20int, % 20int)
-
Local channel & xquery = 'Test Apache';
Local chain & xquery1 = "test map";
Local JavaObject & XSSFWorkbook = CreateJavaObject ("org.apache.poi.xssf.usermodel.XSSFWorkbook");
Local JavaObject & jClass = GetJavaClass ("java.lang.Class");
Local JavaObject & jCompileArgTypes = CreateJavaObject ("java.lang.Class []" & jClass.forName ("java.lang.String"));
Local JavaObject & jCompileMethod = & XSSFWorkbook.getClass () .getDeclaredMethod ("createSheet", & jCompileArgTypes);
Local JavaObject & sheet1 = jCompileMethod.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object [] ' and xquery"));
Local JavaObject & Sheet2 = & jCompileMethod.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object []", & xquery1));
Local JavaObject & int = GetJavaClass ("java.lang.Integer");
Local JavaObject & IntType = GetJavaClass ("java.lang.Integer"). TYPE;
Local JavaObject & jIntArgTypes = CreateJavaObject ("java.lang.Class []", & IntType);
Local JavaObject & jcreateRow = & sheet1.getClass () .getDeclaredMethod ("createRow", & jIntArgTypes);
Local number I & k;
& k = 1;
For & i = 1 to 40000
Local JavaObject & rank = & jcreateRow.invoke (& sheet1, CreateJavaObject ("java.lang.Object []" & i));
Local JavaObject & jcreatecell = & Row.getClass () .getDeclaredMethod ("createCell", & jIntArgTypes);
Local JavaObject & cell = jcreatecell.invoke (& Row, CreateJavaObject ("java.lang.Object []" and k));
Local JavaObject & setCellValue = cell.getClass () .getDeclaredMethod ("setCellValue", & jCompileArgTypes);
Local JavaObject & cellvalue = setCellValue.invoke (& cell, CreateJavaObject ("java.lang.Object []", "interesting it's nice"));
-End;
REM JavaObject Local & autoSizeColumn = & sheet1.getClass () .getDeclaredMethod ("autoSizeColumn", & jIntArgTypes);
REM JavaObject Local & autoSize = autoSizeColumn.invoke (& sheet1, CreateJavaObject ("java.lang.Object []", 0));
Local JavaObject & out = CreateJavaObject ("java.io.FileOutputStream", "/ psoft/fs9devt/UserUpload/ap/comments12.xlsx", True);
& XSSFWorkbook.write(&out);
& out.close ();
get error below when running the code above through driving the demand, but he worked for 1 print the line, but when it's on a loop, it throws this error.
The Java Exception: java.lang.reflect.InvocationTargetException: during the java.lang.reflect.Method .invoke call.
I came across the same thing as you. I did a lot of experimenting and found it works:
var result = (function() { var ReflectiveArray = java.lang.reflect.Array; var CreateSQL = Packages.PeopleSoft.PeopleCode.Func.CreateSQL; var columns = ReflectiveArray.newInstance(java.lang.Object, 1 /* number of selected columns */); var results = []; SQL = CreateSQL("SELECT OPRDEFNDESC FROM PSOPRDEFN WHERE ROWNUM < 10"); while (SQL.Fetch(columns)) { results.push(columns[0]); } return results.join(); }());
He seems to have been a problem with translation between the JavaScript array and the Java array Object []. I solved this by using java.lang.reflect.Array.newInstance to create a new instance of the object [1].
Next issue to deal with is your memory problem. In the error message, it seems to have something to do with the Garbage Collection and a lot of temporary objects. You declare you line and cell by using the var =... line and cell var =...? If not, then they are in the global namespace and properties of the global object. At the end of each iteration of the loop, use delete line and delete cells. If you declare the var, then set their value null at the end of each iteration. Based on your code, I expect each time through the loop would decrease the number of references, but I saw where setting explicitly using null. The only other temporary object I see is the value in the table. Just for fun, I added this at the end of each loop, and he ran very well:
columns[0] = null;
-
How to get the XML from the Request of Java object before sending. SOAP Web services
I'm building
Java
request toOnline Web Services
and we'll call itapplication A
. I got theWSDL
forms the second part of the file in order to communicate with their application and we'll call itapplication B
.Of the
WSDL
file generate theJava
required classes that areRequests
andResponses
. classesApplication A
will send somerequest
object after setting the parameters required and with the exception ofresponse
object ofapplication B
.The connection is established and the two
applications A and B
communicate with each other.Question:
Of
application A
How can I get thexml
data (or text file) for therequest
object before sending it toapplication B
?As described the connection is passing
Java
object such asrequest
and I know that in some point thisrequest
will be converted toxml
file. How to get it?-EDIT-
Missing important information which can be confusing.
I'm generated the
Java
rating were generated using theAxis
frameworkThe problem is solved by, add the following statements in the
bindingStub
class that was automatically generated from theWSDL
file to theweb-services
you are trying to access.String request = _call.getMessageContext().getRequestMessage().getSOAPPartAsString();
String response = _call.getMessageContext().getResponseMessage().getSOAPPartAsString();
These statements should be placed after the following method call
_call.invoke
otherwise you will getNullPointerException
._call
is a variable of typeorg.apache.axis.client.Cal
and it is automatically generated byAxis
-
Distance communication: sending the custom Java objects
Hello...
I use Flex 3.01 - BlazedDS
I have a few working methods implemented on the server I have retrieve custom objects and custom objects table... everything works perfectly...
I also have a method that I pass a custom Flex object (mapped to a Java object) to retrieve another object Java (mapped to a Flex object) works perfectly...
But I have this method I have send as an argument one of my items customized to retrieve another object custom... and when I invoke this method the cursor "occupied" remains as always and demand is slowing down...
I checked the log on the server and I do not see the method called and no error...
Trying to debug... I saw in the object AbstractOperation "1023 stack overflow" error getting caught, but when I run it normally I see no error...
This object I send as an argument is like a custom class to hold one of my items for various operations on the server and the first method that works, the object I have send as and the argument is simple...
This second purpose is as a container that contains a table of another container of objects containing any kind of my items...
I thought that maybe there is a limit for mapping... I don't know... but I don't see any information to reach the server...
If someone could help me, I would appreciate...
Thank you
Solved...
It seems that by using the same RemoteObject to call a large number of methods on the same destination is not good...
I created another RemoteObject to call the method and worked...
Thanks anyway...
-
Hi all
I exponent of java objects in javascript, but the methods and attributes does not appear in the contextual help menu (< ctrl > + space) when I use these javascript objects.
How should I write my vso.xml so that the javascript objects are aware of methods in the Help menu popup javascript.
for example: -.
entry VSO.xml:
< enumerations >
< list type = "TestEnum" >
values of < description > defines attributes of objects managed Boolean xml < / description >
< entries >
< input id = "test1" name = "TEST1" > value to Test1. < / Entry >
< input id = "test2" name = "TEST2" > value of Test2. < / Entry >
< / input >
< / enumeration >
< / enumerations >
< script objects >
< script object 'MyObject' = java-class name = "com.test.MyObject" >
< description > This is a test object < / description >
<>attributes
< attribute java-name = "attr1" return-type = "Chain" script-name = 'Attr1' show-in-api = "true" / >
< attribute java-name = "attr1" return-type = "Chain" script-name = 'Attr1' show-in-api = "true" / >
< / attribute >
< / attribute >
<>methods
< java-method name = "testMtd" return-type = "Chain" script-name = "testMtd" show-in-api = "true" > < Parameters > < name of the parameter = "param1" type = "Any" / > < name of the parameter = "param2" type = "String" / > < = 'param3' type parameter name = "boolean" / > < / Parameter > < / method > < / methods >
< / object >
< / scripting objects >
JavaScript: -.
var myObj = new MyObject();
myObj. < ctrl > + space doesn't popup any context menu, as it does for string objects or object system.
myObj.testMtd ("abc", TestEnum. < ctrl > + space - Enums are also not pop values.)
Any help will be greatly appreciated.
Best regards
Sumit Tyagi
I see the use cases, and it would be wise to have seized semiautomatic for her, but as far as I KNOW is not possible right now.
(I think it's comparable to the VcPlugin object. Useful methods Nice in there, but no AutoComplete)
-
Should I return the JSON object or object java SOA?
Hi gurus,
A question that I hope makes sense - can SOA return a JSON object JAVA object, not XML?
Thank you
Anatoliy
First "SOA" is not a thing, so it's difficult to give a Yes or no
This is a technical product feature if it will be possible to expose data in xml/json/etc. formats
When we look at the Oracle portfolio, we have a preview for example Oracle SOA Suite and Oracle Service Bus (other Oracle products can do the same thing).
With these two products, you will be able to represent your data in other formats in addition to XML.
some links to help you get started.
https://blogs.Oracle.com/jeffdavies/entry/using_json_with_oracle_service
http://Biemond.blogspot.nl/2010/05/HTTP-binding-in-SOA-Suite-11g-PS2.html
http://javaoraclesoa.blogspot.nl/2012/12/receiving-JSON-requests-in-Oracle-BPEL.html
Oracle Service Bus can also store Java objects in jms queues, so, like, that you can carry your data too.
Hope it will be a little helpful
-
Transform the query inside cfscript to not access java objects
When I downloaded my page, now my Web host says my questions to access java objects is not allowed. I can't find out how to change these queries, so that they do not use a java object.
This is one of my questions. My other questions are in the same format:
objFactory1 = CreateObject( "java", "coldfusion.server.ServiceFactory" ); // Get the Data Source service from the service factory. objDataService1 = objFactory1.DataSourceService; // The data service object has access to all data sources // running on the server. Let's get a connection to our // datasource before running the query. objDataSource1 = objDataService1.GetDataSource( "myapp" ); // Open the connection. Here, we have the option to pass // in a username and password. Since I am on the dev // server, no need to do so. objConnection1 = objDataSource1.GetConnection( // USERNAME, PASSWORD if needed // dsnlogin,dsnpwd); // Prepare the SQL statement that you want to run. Much // harder than the CFQuery tag, but not impossible. getevents = objConnection1.PrepareStatement( "SELECT " & "dtstamp, " & "eventname " & "FROM " & "events " & "WHERE MONTH(DATE(dtstamp)) = " & CurMonth & " AND DAYOFMONTH(DATE(dtstamp)) = " & i ); // of object that we are all used to working with. getevents = CreateObject( "java", "coldfusion.sql.QueryTable" ).Init( getevents.ExecuteQuery() ); // Close the connection. objConnection1.Close();
I'm back the columns like this: getevents.eventname [intRow]
I think I got it. Here is the solution for anyone who runs into the same problem
q = new Query(); q.setDatasource( "myapp" ); // build the SQL statement //q.setSQL( "SELECT eventname FROM events WHERE MONTH(DATE(dtstamp)) = :themonth AND DAYOFMONTH(DATE(dtstamp)) = :theday" ); q.addParam( name="themonth", value=#curmonth#, cfsqltype="CF_SQL_INTEGER" ); q.addParam( name="theday", value=#i#, cfsqltype="CF_SQL_INTEGER" ); // run the query and get a query object getevents = q.execute(sql="SELECT * FROM events WHERE MONTH(DATE(dtstamp)) = :themonth AND DAYOFMONTH(DATE(dtstamp)) = :theday").getResult();
Loop over the query results
for ( intRow = 1 ; intRow LTE getevents.RecordCount ; intRow = (intRow + 1) ) { getevents.eventname[intRow] }
Not as difficult as I thought, just REALLY long to find the solution.
-
invoke the button action or a java script page
Hello
I wanted to call a java script button action. I created a button associated with a request. The button action should redirect to an existing page. I did the hidden button. I would like to call a java script function button. Can someone point me to a thread with the syntax which handles this.
Or is it possible to directly call a function of java script to a page?
Thank you
-vkantVkant
In a javascript function, you can set the property from 'rental' of the window object to point to the APEX page as in the example below. How you call this function from the Applet javascript I don't know.
function goToPage(pageno) { var str="f?p=101:" + pageno + ":&SESSION." // 101 is the APEX application id window.location=str; }
See here for APEX URL syntax http://download.oracle.com/docs/cd/E14373_01/appdev.32/e11838/concept.htm#sthref185
CITY
-
Receiving the EventInfo object for Web Service alerts as null?
I have set up the web as service:
Service endpoint interface
@WebService (targetNamespace = "http://prosight.com/wsdl/7.0/EventSink/")
@SOAPBinding (style = Style.RPC)
public interface {OPPMAlertWebService}
@WebMethod public void itemAddedToPortfolio (PsPortfoliosItemAddedToPortfolioEventInfo eventObj);
@WebMethod public void categoryConditionMet (PsPortfoliosCategoryConditionMetEventInfo eventObj);
@WebMethod public void multipleCategoryConditionMet (PsPortfoliosMultipleCategoryConditionsMetEventInfo eventObj);
@WebMethod public void phaseModified (PsPortfoliosPhaseModifiedEventInfo eventObj);
@WebMethod public void deliverableModified (PsPortfoliosDeliverableModifiedEventInfo eventObj);
@WebMethod public void actionItemModified (PsPortfoliosActionItemModifiedEventInfo eventObj);
}
Implementation of the service
@WebService (endpointInterface = "com.ws.OPPMAlertWebService", targetNamespace = "http://prosight.com/wsdl/7.0/EventSink/")
/ public class OPPMAlertWebServiceImpl implements OPPMAlertWebService {}
Item added to the triggered event portfolio
@Override
{} public void itemAddedToPortfolio (PsPortfoliosItemAddedToPortfolioEventInfo eventObj)
System.out.println ("added \n--Item method called-");
}
Category Condtion meeting triggered event
@Override
{} public void categoryConditionMet (PsPortfoliosCategoryConditionMetEventInfo eventObj)
System.out.println ("\n--Category filled Condition method called-");
}
Several categories filled Condition triggered event
@Override
{} public void multipleCategoryConditionMet (PsPortfoliosMultipleCategoryConditionsMetEventInfo eventObj)
System.out.println ("\n--Multiple category method called - filled Condition");
}
Updated the event triggered the phase
@Override
{} public void phaseModified (PsPortfoliosPhaseModifiedEventInfo eventObj)
System.out.println ("\n--Phase method called - changed");
}
Events updated the deliverable triggered
@Override
{} public void deliverableModified (PsPortfoliosDeliverableModifiedEventInfo eventObj)
System.out.println ("\n--Deliverable method called - changed");
}
Follow-up activity for change event triggered
@Override
{} public void actionItemModified (PsPortfoliosActionItemModifiedEventInfo eventObj)
System.out.println ("\n--Action element modified method called-");
}
Editor of endpoint
public class OPPMAlertWebServicePublisher {}
Public Shared Sub main (String [] args) {}
URL of the Web Service
" String url = ' http://URL ";
System.out.println ("\nOPPM Alert Web Service published on" + url);
Endpoint.Publish (url, new OPPMAlertWebServiceImpl());
}
}
The service works very well all the get methods called on respective alert events here, but whenever I tried to use the EventInfo object he throws NullPointer Exception. I get the EventInfo objects as null in these methods but the audit log shows event information are sent by the Madaboutangling. Y at - it another way to configure this service to receive the EventInfo object or where I have to change to receive the EventInfo object?
EventInfo object using there is Exception as:
-Added point method called-
October 15, 2015 05:30:52 com.sun.xml.internal.ws.server.sei.TieHandler createResp
onse
GRAVE: null
java.lang.NullPointerException
at com.ws.OPPMAlertWebServiceImpl.itemAddedToPortfolio(OPPMAlertWebServiceImpl.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at sun.reflect.misc.Trampoline.invoke (unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at sun.reflect.misc.MethodUtil.invoke (unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)
at java.lang.reflect.Method.invoke (unknown Source)
at com.sun.xml.internal.ws.api.server.MethodUtil.invoke (unknown Source)
to com.sun.xml.internal.ws.api.server.InstanceResolver$ 1.invoke(Unknown Source)
to com.sun.xml.internal.ws.server.InvokerTube$ 2.invoke (unknown Source)
to com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processRequest (Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun (unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun (unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun (unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync (unknown Source)
to com.sun.xml.internal.ws.server.WSEndpointImpl$ 2. process (unknown sourcee)
to com.sun.xml.internal.ws.transport.http.HttpAdapter$ HttpToolkit.handle(unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle (unknown SouNCE)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handleExchange(Unknown Source)
to com.sun.xml.internal.ws.transport.http.server.WSHttpHandler.handle (acalled Source)
to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)
at sun.net.httpserver.AuthFilter.doFilter (unknown Source)
to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)
to sun.net.httpserver.ServerImpl$ Exchange$ LinkHandler.handle (unknown SouNCE)
to com.sun.net.httpserver.Filter$ Chain.doFilter (unknown Source)
to sun.net.httpserver.ServerImpl$ Exchange.run (unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker (unknown Source)
to java.util.concurrent.ThreadPoolExecutor$ Worker.run (unknown Source)
at java.lang.Thread.run (unknown Source)
I rarely use java for Madaboutangling, but I would check the to see if the psPortfoliosEventInfo object has been generated with the correct namespace. Here is a c# class generated from a web job alert.
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.18020")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://prosight.com/type/Portfolios/5.0/psPortfoliosWebServiceAlert")] public partial class psPortfoliosItemAddedToPortfolioEventInfo : psPortfoliosEventInfo { private psADDED_CREATED addedCreatedField; private psPortfoliosItemInfo addedItemInfoField; ///
public psADDED_CREATED AddedCreated { get { return this.addedCreatedField; } set { this.addedCreatedField = value; } } /// public psPortfoliosItemInfo AddedItemInfo { get { return this.addedItemInfoField; } set { this.addedItemInfoField = value; } } } /// [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosMultipleCategoryConditionsMetEventInfo))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosCategoryConditionMetEventInfo))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosPhaseModifiedEventInfo))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosActionItemModifiedEventInfo))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosDeliverableModifiedEventInfo))] [System.Xml.Serialization.XmlIncludeAttribute(typeof(psPortfoliosItemAddedToPortfolioEventInfo))] [System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.18020")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://prosight.com/type/Portfolios/5.0/psPortfoliosWebServiceAlert")] public partial class psPortfoliosEventInfo { private string alertGuidField; private string alertNameField; private psPortfoliosItemInfo scopeInfoField; private System.DateTime eventDateTimeField; private int ownerIdField; private string ownerLoginField; /// public string AlertGuid { get { return this.alertGuidField; } set { this.alertGuidField = value; } } /// public string AlertName { get { return this.alertNameField; } set { this.alertNameField = value; } } /// public psPortfoliosItemInfo ScopeInfo { get { return this.scopeInfoField; } set { this.scopeInfoField = value; } } /// public System.DateTime EventDateTime { get { return this.eventDateTimeField; } set { this.eventDateTimeField = value; } } /// public int OwnerId { get { return this.ownerIdField; } set { this.ownerIdField = value; } } /// public string OwnerLogin { get { return this.ownerLoginField; } set { this.ownerLoginField = value; } } } V/r,
Gene
-
Houston-25036: an invalid object operation was drawn to the View object type.
Hi all
I use version jdev 11.1.2.2
I have an application module impl in which I have a method to call a pl/sql that calls an external API.
I returns a value of this class of impl. I call this form of method a bean customer interface through. Then, I want to display another page passing the return as a variable binding value to another object to display grace to perform with the workflow setting.public String create(String productId, String component) { String createMessage=null; DBTransaction dbtransaction = (DBTransaction)getTransaction(); StringBuffer str = new StringBuffer(); str.append(" BEGIN "); str.append(" api.database@test ( "); str.append(" p_number => :1, "); str.append(" p_product_id => :2, "); str.append(" p_component => :3 "); str.append(" ); "); str.append(" END; "); CallableStatement callablestatement = dbtransaction.createCallableStatement(str.toString(), 1); try { callablestatement.registerOutParameter(1, Types.INTEGER); callablestatement.setInt(2, Integer.parseInt(productId)); callablestatement.setString(3, component); callablestatement.executeUpdate(); dbtransaction.commit(); createMessage = callablestatement.getObject(1).toString(); if (callablestatement != null) { callablestatement.close(); } if (dbtransaction != null) { dbtransaction.closeTransaction();// closing connection } } catch (Exception e) { e.printStackTrace(); } return createMessage; }
Everything is going very well when I'm not closing the db connection in the impl.public void callCreate(ActionEvent actionEvent){ BindingContext bctx = BindingContext.getCurrent(); DCBindingContainer bindings = (DCBindingContainer)bctx.getCurrentBindingsEntry(); DCDataControl dataControl = bindings.findDataControl("ReportAMDataControl"); ReportAM ReportAM = (ReportAM)dataControl.getApplicationModule(); createMessage = ReportAM.createBug(product, component); FacesContext context = FacesContext.getCurrentInstance(); context.getApplication().getNavigationHandler().handleNavigation(context, null, "goExecute");//navigate to next page }
but when I close the db connection is showing the following error.
Houston-25036: an invalid object operation was drawn to the View object type.
No idea why this is happening?<MethodExpressionActionListener> <processAction> Received 'oracle.jbo.InvalidObjAccessException' when invoking action listener '#{invokeImplMethodBean.callCreate}' for component 'cb1' <MethodExpressionActionListener> <processAction> oracle.jbo.InvalidObjAccessException: JBO-25036: An invalid object operation was invoked on type View Object with name RVO at oracle.jbo.server.QueryCollection.getPCollManager(QueryCollection.java:505) at oracle.jbo.server.QueryCollection.initPCollRows(QueryCollection.java:337) at oracle.jbo.server.QueryCollection.initQC(QueryCollection.java:367) at oracle.jbo.server.QueryCollection.<init>(QueryCollection.java:271) at oracle.jbo.server.ViewRowSetImpl.initQueryCollection(ViewRowSetImpl.java:876) at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1140) at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1413) at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1319) at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1304) at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7211) at view.InvokeImplMethod.call(InvokeImplMethod.java:206) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source) at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:148) at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:824) at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179) at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:112) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:130) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:461) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:134) at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:106) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1134) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:358) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:207) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:508) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:180) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Can someone help me with this problem? :(
Thank you
Vigneshlike I said with ADF BC, we never explicitly close the DB connection (framework takes care for this).
-
I might be breaking the java.io.InputStream javadoc specifications
* [note] *: this is not intended to be a fully functional class at the moment. Step by step I am learning how to extend an existing class and create one that could be useful someday. 'Close()' being the simplest method of InputStream, I start here.
This InputStream made a number any of files in a directory look like one big file. I continue to read until the last file to read what EOF is reached.public class DirectoryInputStream extends InputStream { private boolean moreFiles = true; private int inputFileNmb = 0; private File[] files; private InputStream inStrm; private InputStream[] holdOntoOpenStreams; public DirectoryInputStream(File dataSrc) throws Exception { files = getFilesInDir(dataSrc); // holdOntoOpenStream = new FileInputStream[files.length]; <-- towards maintaining the integrity of "close()" chngFile(); } private void chngFile() throws IOException { if(inputFileNmb != 0) inStrm.close(); // <-- violates integrity of "close()". Don't do this if the javadoc for close() is to be followed inStrm = new FileInputStream(files[inputFileNmb]); // holdOntoOpenStreams[inputFileNmb] = inStrm; <-- could be used to hold onto open InputStreams until close() is called inputFileNmb++; if(inputFileNmb == files.length) moreFiles = false; } public int read() throws IOException { // code removed that deals with returning System.getProperty("line.separator") if the EOF of a file is reached and there are other files still to be read int c = inStrm.read(); if((c == -1) && !moreFiles) { inStrm.close(); // <-- violates integrity of "close()" ? return -1; } if((c == -1) && moreFiles) { // ...deal with transitioning inStrm to connect to a different file. "chngFile()" is invoked in the process, etc. c = inStrem.read(); } return c; } // following the API specifications, this is what an overridden "close()" should look like? public void close() throws IOException { inStrm.close(); for(int i = 0; i < (inputFileNmb - 1); i++) { holdOntoOpenStreams.close();
}
}
}Internalizing the closing of streams into this class seems like a feature. Yet, As per the API "close()": *Closes this input stream and releases any system resources associated with the stream.* Certainly, I am not doing that. My opinion is that I am violating the java.io.InputStream specification, In OOP, you should never do this. But, this is an exception because the resources associated with open FileInputStream objects are too limited. --thank you Edited by: triym on Jul 2, 2011 7:48 AM
The last FileInputStream is only closed automatically if the last file is read completely to expressions of folklore. You can't assume that. You can't assume the readings were made. You must close the file currently open, if there is one, in the close() method.
-
Arg list and method of the signature object
Hi all
I have a doubt regarding the lists of arguments
If I have these 3 methods:
public void doubts (String info, object... args)
Doubts public Sub (string info, string moreInfo)
public void doubts (info from the chain, moreInfo, object... args)
When I invoke:
doThis ("yyyy", "bbbb")
that will be called?
I tried this and it will call doubts (news channel, string moreInfo) that seems logical.
Actually there no way I can invoke the first method, at least I have use something other than a string as the second parameter
for example: doubts ("yyyy", 5)
My conclusion is therefore:
"the compiler will try to"match"arguments as much as possible. the list of arg as a last resort'
However, I would like to read this in a few 'official' somewhere doc, but I can't find any direct reference in google nor in the java lang spec.
Can someone confirm my conclusion?
Thank youuser13429421 wrote:
However, I would like to read this in a few 'official' somewhere doc, but I can't find any direct reference in google nor in the java lang spec.The official documentation for this is the JLS.
It is under [url http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12] 15,12 Expressions Invocation method, and in particular, [url http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.12.2.5] 15.12.2.5 choice of the most specific method.
Generally speaking, however, I would advise against each other an overload of the method signatures where it isn't intuitive writing one will be more accurate.
-
Are there alternatives for the large objects through callback JMS?
Hi, I am developing an application that uses JMS reminder to create this 'multi-threaded feel '. All's well if the data object returns of each MDB is relatively small, but as soon as we ended with the need to send back large objects (for example, an ArrayList of 250 objects k) of the MDB (with 20 MDB active at a given time), it breaks the app when the server ran out of memory when the MDB strikes the setObject method call on the response (server log see extract below). Is there any "known" for JMS problem managing large objects? Are there any other alternatives to recall JMS to create this 'multi-threaded' feature in WLS? Thanks in advance.
# < 19 October 2010 01:33:16 SGT > < WARNING > < EJB > < RTAN12 > < AdminServer > < ExecuteThread [ASSET]: '13' for queue: '(self-adjusting) weblogic.kernel.Default' > < < anonymous > > <><>< 1287423196150 > < BEA-010065 > < MessageDrivenBean threw an Exception in onMessage(). The exception was:
means: allocLargeObjectOrArray - size of the object: 9273360, elements of Num: 9273344.
means: allocLargeObjectOrArray - size of the object: 9273360, elements of Num: 9273344
at java.util.Arrays.copyOf(Arrays.java:2786)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:94)
in java.io.ObjectOutputStream$ BlockDataOutputStream.drain (ObjectOutputStream.java:1839)
in java.io.ObjectOutputStream$ BlockDataOutputStream.setBlockDataMode (ObjectOutputStream.java:1748)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1161)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at weblogic.jms.common.ObjectMessageImpl.setObject(ObjectMessageImpl.java:157)
at weblogic.jms.common.ObjectMessageImpl.setObject(ObjectMessageImpl.java:133)
at com.hp.it.ipg.vfmaps.services.vfdataquery.ejb.VfDataMiner.onMessage(VfDataMiner.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
to $Proxy123.onMessage (Unknown Source)
at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466)
at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371)
at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:328)
at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4585)
at weblogic.jms.client.JMSSession.execute(JMSSession.java:4271)
at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3748)
to weblogic.jms.client.JMSSession.access$ 000 (JMSSession.java:114)
to weblogic.jms.client.JMSSession$ UseForRunnable.run (JMSSession.java:5096)
to weblogic.work.SelfTuningWorkManagerImpl$ WorkAdapterImpl.run (SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Published by: user651019 on October 18, 2010 11:40It is your writing, you have put in place a use case when the application attempts to use on several large objects in parallel. The FMV is just short of the bunch. Looks like the same thing would be whether it's large objects JMS messages, or another type of object...
Some ideas: (A) release the memory JVM - possibly by setting pagination (see chapter JMS of the Performance and Tuning Guide), (B) reduce the size of the async message line (search for "MessagesMaximum") in the same guide, (C) increase the memory to the JVM, (D) see if its possible to decompose each large into several small objects/messages object, but perhaps especially (E) do not expect to be able to have multiple threads each operate on a very large object separate simultaneously - each object necessarily consume memory while it is accessed - seriously consider reducing the number of concurrent threads according to chapter MDB of the Performance and Tuning guide.
Tom
-
I finished building the Web site for my girlfriend, and the rest is the RSS feed. It works just fine in IE 8, but Fire Fox 9 when the widget is clicked a bookmark box appears and asks if I want to save it as a bookmark. I'm not a programmer of the Java script so I hope help here! Here's the script:
- "< a href ="http://www.susangabrielle.com/1/feed"title ="RSS"alt ="rss">< /a >"
- for example http://www.susangabrielle.com/1/post/2012/01/post-title-click-and-type-to-edit.html
even if I get a message about missing plugins
The view is http://www.susangabrielle.com
Probably you fixed, the RSS seems to work for me
Maybe you are looking for
-
text in adressbar and searchbar autoselecting fails or happens when I press bacspace
I've just updated from 32.x to 33.1I'm on win7-64. I now have a problem whenever I try to access the address bar (the control when you type the URL) and the serach bar.It has been that when the control had not developed to the point you clicked into
-
Among the installed add-ins are Ghostery, shortcuts Google, IE Tab Plus, InformEnter, Lazarus, NoScript and ZoneAlarm Toolbar. In the other machine, most people put icons in the status bar; only the last is here (although I've said to others). I gues
-
Satellite A210-19 t: screen goes black sometimes
Screen of my Satellite A210-19 t starts to turn black and white however the computer is still on.Its not not in hibernation that I'm at the computer to use it. Any suggestions on what it might be and how I can fix this problem? As I just bought
-
continues to stop watching the video on youtube?
watching the video on youtube, video will stop after 1 or 2 minutes and he will no longer play even trying to click on the play or pause buttons and video turns into full screen. When pressing ESC button screen will return to normal, but does not pla
-
I have a P7 - 1126 s running win7 Premium 64-bit and when I've upgraded to windows 8 that everything was working properly. I installed a second monitor without problem. After testing the monitors were operating properly, I shut down the PC to remove