NetStream.client can't be a class instance?
I tried this:
netStream = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
netStream.addEventListener(NetStatusEvent.NET_STATUS, streamStatus);
netStream.publish("gamestate");
netStream.client = this;
public function onPeerConnect(ns:NetStream):Boolean {
trace("onPeerConnect", ns.farID);
Inside a class called ClientStream. However I found that onPeerConnect was not being called. I changed .client to this:
netStream.client = {
onPeerConnect:function(ns:NetStream):Boolean {
trace("onPeerConnect", ns.farID);
And it works. Does this mean that you have to use a generic object like that for the client? Is there something I'm not understanding in the first example?
I can confirm that you need to use a generic object for this callback.
It's not a bug as much as it's an oddity.
Similar Messages
-
Client can't access Serializable classes on Server
Hi there, i have created a very simple client server model and had it running fine. I then added a new serializable class to the server and return it in a new method. Now when i try to run that method on the client side it complains it cannot find my new serializable class ("no class def found exception: rmi/server/ServerObject.class"). This is how it's setup at the moment:
Server
-ServerFront extends Remote
-Server implements ServerFront
-ServerObject implements Serializable
The server binds itself to the registry as such:
ServerFront engine = new Server();
String name = "Server";
ServerFront stub = (ServerFront)UnicastRemoteObject.exportObject(engine, 0);
Registry registry = LocateRegistry.getRegistry();
registry.rebind(name, stub);The ServerObject class looks like this:
public class ServerObject implements Serializable
private static final long serialVersionUID = 10L;
//methods
}The ServerFront interface has a method as such:
ServerObject getServerObject () throws RemoteException; Client
-Client
The client gets a reference to the server as follows:
String name = "Server";
Registry registry = LocateRegistry.getRegistry("127.0.0.1");
server = (ServerFront)registry.lookup(name);Then tries to run the getServerObject() method:
ServerObject = server.getServerObject();I run the client and server from jar files using the following commands:
start java -Djava.rmi.server.codebase="http://www.xenwars.com/Server.jar" -Djava.security.policy=security.policy -jar Server.jar
java -Djava.security.policy=security.policy -jar Client.jar"security.policy" allows all access, and the codebase URL points to my webserver where i uploaded an identical copy of the Server jar file that i'm trying to run.
So... i've read all the Sun documentation and such and i'm massively confused why my client isn't simply downloading the serializable class as it's supposed to. Any help is massively appreciated, thanks :D
Edited by: Aldarn on Feb 8, 2009 10:03 AM
Edited by: Aldarn on Feb 8, 2009 10:05 AMBy a mirrored interface i mean i just created an interface based off my existing serializable classes, i.e. copied the method constructors into an interface class and made the serializable class implement that interface.
I think that must have been the problem then, that i wasn't giving the client an interface to the serializable classes on the server that it was attempting to download. I thought by using RMI on a serializable class it would just download that class when it needs it and so wouldn't need an interface pre-defining it.
Thanks for the help! I'm now working on a system with 3 servers and one client, where two servers have various methods implemented and the third one acts as a bridge between the other two servers and the client - so the client only has to deal with one server. It's working fine but it's pretty annoying having to mirror all the methods from both servers' interface classes in the server that acts as a bridge's interface class - is there any way that the bridge server can inherit the other two servers interfaces into its own so i don't need to make loads of duplicate "shell" methods like this:
// second server
public ArrayList<Thing> getAllThings ()
return things;
// bridge server
private SecondServerFront secondServer; // reference loaded in constructor
public ArrayList<Thing> getAllThings () throws RemoteException
return secondServer.getAllThings();
} -
Rmi and classloader: some server instances can not find the class on server
Hi:
I want to migrate my rmi applications from JDK 1.1 to JDK1.2.2. It exists in the following environments:
- there is one authentication server and many application servers, all have binded in the main method
- dynamic loading of the server stubs and interfaces is not used; they are local on the client.
- security manager is enabled only on the server site and the policy file is created.
- all server classes, stubs and interfaces are in the same directory on server site
- the registry and the server are started as follows:
unsetenv CLASSPATH
rmiregistry 1103 &
setenv CLASSPATH ~usr/serverDir:~oracle/jdbc/lib/classes12.zip
java -Djava.rmi.server.codebase=file://~usr/serverDir/
-Djava.rmi.server.hostname=myHost -Djava.security.manager myServer
After starting the client, the rmi client connects to the server and the authentication request comes back with a list of applications.
When the user chooses one of them, the rmi sends the request to thatapplication (e.g., OMSRmiServer_Stub). The application could not find the other class on the sever directory: (the authenication server can find the same class)
java.lang.NoClassDefFoundError: JOMPrepStatement
at java.lang.Class.getFields0(Native Method)
at java.lang.Class.getFields0(Compiled Code)
at java.lang.Class.getDeclaredFields(Compiled Code)
at java.io.ObjectStreamClass$1.run(Compiled Code)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(Compiled Code)
at java.io.ObjectStreamClass.<init>(Compiled Code)
at java.io.ObjectStreamClass.lookupInternal(Compiled Code)
at java.io.ObjectStreamClass.lookup(Compiled Code)
at java.io.ObjectStreamClass.lookupInternal(Compiled Code)
at java.io.ObjectStreamClass.lookup(Compiled Code)
at java.io.ObjectStreamClass.lookupInternal(Compiled Code)
at java.io.ObjectStreamClass.lookup(Compiled Code)
at java.io.ObjectStreamClass.lookupInternal(Compiled Code)
at java.io.ObjectOutputStream.writeObject(Compiled Code)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:256)
at sun.rmi.server.UnicastRef.invoke(Compiled Code)
at OMSRmiServer_Stub.executeStringSetSelect(Unknown Source)
at OMSDeviceRmiClient.getStatusLOV(OMSDeviceRmiClient.java:196)
at OMSRmiClient.getStatusLOV(OMSRmiClient.java:76)
at OMSDevicePane.listenToTree(Compiled Code)
at OMSDeviceContextPane.initComponents(OMSDeviceContextPane.java:107)
at OMSFrame.jomInit(Compiled Code)
at JOMCountFrame.init(JOMCountFrame.java:190)
at JOMCountFrame.run(JOMCountFrame.java:253)
at java.lang.Thread.run(Thread.java:485)
Any help is appreciated.
- Mahan.in jdk1.2.2 no need classes12.zip in class path.
just set CLASSPATH=.;
that is enough for solving ur problem
bye
raghu -
Binding a JavaFX variable to a Java class instance variable
Hi,
I am pretty new to JavaFX but have been developing in Java for many years. I am trying to develop a JavaFX webservice client. What I am doing is creating a basic scene that displays the data values that I am polling with a Java class that extends Thread. The Java class is reading temperature and voltage from a remote server and storing the response in an instance variable. I would like to bind a JavaFx variable to the Java class instance variable so that I can display the values whenever they change.
var conn: WebserviceConnection; // Java class that extends Thread
var response: WebserviceResponse;
try {
conn = new WebserviceConnection("some_url");
conn.start();
Thread.sleep(10000);
} catch (e:Exception) {
e.printStackTrace();
def bindTemp = bind conn.getResponse().getTemperature();
def bindVolt = bind conn.getResponse().getVoltage();
The WebserviceConnection class is opening a socket connection and reading some data in a separate thread. A regular socket connection is used because the server is not using HTTP.
When I run the application, the bindTemp and bindVolt are not updated whenever new data values are received.
Am I missing something with how bind works? Can I do what I want to do with 'bind'. I basically want to run a separate thread to retrieve data and want my UI to be updated when the data changes.
Is there a better way to do this than the way I am trying to do it?
Thanks for any help in advance.
-RichardHi,
If you don't want to constantly poll for value change, you can use the observer design pattern, but you need to modify the classes that serve the values to javafx.
Heres a simple example:
The Thread which updates a value in every second:
// TimeServer.java
public class TimeServer extends Thread {
private boolean interrupted = false;
public ValueObject valueObject = new ValueObject();
@Override
public void run() {
while (!interrupted) {
try {
valueObject.setValue(Long.toString(System.currentTimeMillis()));
sleep(1000);
} catch (InterruptedException ex) {
interrupted = true;
}The ValueObject class which contains the values we want to bind in javafx:
// ValueObject.java
import java.util.Observable;
public class ValueObject extends Observable {
private String value;
public String getValue() {
return this.value;
public void setValue(String value) {
this.value = value;
fireNotify();
private void fireNotify() {
setChanged();
notifyObservers();
}We also need an adapter class in JFX so we can use bind:
// ValueObjectAdapter.fx
import java.util.Observer;
import java.util.Observable;
public class ValueObjectAdapter extends Observer {
public-read var value : String;
public var valueObject : ValueObject
on replace { valueObject.addObserver(this)}
override function update(observable: Observable, arg: Object) {
// We need to run every code in the JFX EDT
// do not change if the update method can be called outside the Event Dispatch Thread!
FX.deferAction(
function(): Void {
value = valueObject.getValue();
}And finally the main JFX code which displays the canging value:
// Main.fx
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import threadbindfx.TimeServer;
var timeServer : TimeServer;
var valueObjectAdapter : ValueObjectAdapter = new ValueObjectAdapter();
timeServer = new TimeServer();
valueObjectAdapter.valueObject = timeServer.valueObject;
timeServer.start();
Stage {
title: "Time Application"
width: 250
height: 80
scene: Scene {
content: Text {
font : Font {
size : 24
x : 10, y : 30
content: bind valueObjectAdapter.value;
}This approach uses less cpu time than constant polling, and changes aren't dependent on the polling interval.
However this cannot be applied to code which you cannot change obviously.
I hope this helps. -
Can I find how many instances of BPEL process is in running state ?
Hi,
How can I find how many instances of BPEL process is in running state ? Any code/API ? help ? ThanksCheck the class com.oracle.bpel.client.Locator...
u can use the method listInstances(WhereCondition wc) to get the required details
Regards
Albin I -
How to use tcp socket to receive a class instance
I've created a class instance c2smsg, then use PS.println(c2smsg) to send the instance to server.
But how can I receive the class and read the class members at the server side?
socket.getInputStream() can only receive String, byte[], or int...To be clear, here is the sample code, i wrote a TestClass, and i want to send it and read it from the recieving side.
class TestClass{
String testSting = "i love you";
int port = 1024;
//send side
TestClass tc = new TestClass();
PrintWriter out=new PrintWriter(socket.getOutputStream());
out.println(tc); //i am not sure if this is right
//send side end
//receive side
BufferedReader buf =new BufferedReader(new InputStreamReader(client.getInputStream()));
//then what can i do to buf to read out TestClass members? buf.readLine()?
//receive side end -
Hi!
I wish someone can help me on this, I'm a new guy on cisco firewalls and I'm currently implementing cisco asa 5512x, here are the details:
ISP -> Firewall -> Core switch -> Internal LAN
after installing the cisco asa and terminating the appropriate lan for the outside and inside interfaces, internet seems intermittent and cisco vpn client can connect with internet connection but can't ping internal LAN.
here's my configuration from my firewall.
ASA Version 8.6(1)2
hostname ciscofirewall
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
interface GigabitEthernet0/0
nameif outside
security-level 0
ip address 203.x.x.x 255.255.255.0
interface GigabitEthernet0/1
nameif inside
security-level 100
ip address 10.152.11.15 255.255.255.0
interface GigabitEthernet0/2
shutdown
no nameif
no security-level
no ip address
interface GigabitEthernet0/3
shutdown
no nameif
no security-level
no ip address
interface GigabitEthernet0/4
shutdown
no nameif
no security-level
no ip address
interface GigabitEthernet0/5
shutdown
no nameif
no security-level
no ip address
interface Management0/0
nameif management
security-level 100
ip address 192.168.1.1 255.255.255.0
management-only
ftp mode passive
dns domain-lookup outside
dns domain-lookup inside
dns server-group DefaultDNS
name-server 4.2.2.2 -------> public DNS
name-server 8.8.8.8 -------> public
name-server 203.x.x.x ----> Clients DNS
name-server 203.x.x.x -----> Clients DNS
same-security-traffic permit intra-interface
object network net_access
subnet 10.0.0.0 255.0.0.0
object network citrix_server
host 10.152.11.21
object network NETWORK_OBJ_10.10.10.0_28
subnet 10.10.10.0 255.255.255.240
object network NETWORK_OBJ_10.0.0.0_8
subnet 10.0.0.0 255.0.0.0
object network InterconHotel
subnet 10.152.11.0 255.255.255.0
access-list net_surf extended permit ip any any
access-list net_surf extended permit ip object NETWORK_OBJ_10.10.10.0_28 object InterconHotel
access-list outside_access extended permit tcp any object citrix_server eq www
access-list outside_access extended permit ip object NETWORK_OBJ_10.10.10.0_28 any
access-list outsidevpn_splitTunnelAcl standard permit 10.152.11.0 255.255.255.0
access-list LAN_Users remark LAN_clients
access-list LAN_Users standard permit any
access-list vpnpool extended permit ip 10.10.10.0 255.255.255.248 any
pager lines 24
logging enable
logging asdm informational
mtu management 1500
mtu outside 1500
mtu inside 1500
ip local pool vpnpool 10.10.10.1-10.10.10.6 mask 255.255.255.248
icmp unreachable rate-limit 1 burst-size 1
no asdm history enable
arp timeout 14400
nat (inside,outside) source static NETWORK_OBJ_10.10.10.0_28 NETWORK_OBJ_10.10.10.0_28 destination static NETWORK_OBJ_10.10.10.0_28 NETWORK_OBJ_10.10.10.0_28 no-proxy-arp route-lookup
object network net_access
nat (inside,outside) dynamic interface
object network citrix_server
nat (inside,outside) static 203.177.18.234 service tcp www www
object network NETWORK_OBJ_10.10.10.0_28
nat (any,outside) dynamic interface
object network InterconHotel
nat (inside,outside) dynamic interface dns
access-group outside_access in interface outside
access-group net_surf out interface outside
route outside 0.0.0.0 0.0.0.0 203.x.x.x 1
route outside 10.10.10.0 255.255.255.248 10.152.11.15 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00
timeout floating-conn 0:00:00
dynamic-access-policy-record DfltAccessPolicy
user-identity default-domain LOCAL
aaa authentication telnet console LOCAL
http server enable
http 192.168.1.0 255.255.255.0 management
http 10.0.0.100 255.255.255.255 inside
http 10.10.10.0 255.255.255.240 outside
http 0.0.0.0 0.0.0.0 outside
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart warmstart
crypto ipsec ikev1 transform-set ESP-AES-256-MD5 esp-aes-256 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-DES-SHA esp-des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-DES-MD5 esp-des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-MD5 esp-aes-192 esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec ikev1 transform-set ESP-AES-256-SHA esp-aes-256 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-192-SHA esp-aes-192 esp-sha-hmac
crypto ipsec ikev1 transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set pfs
crypto dynamic-map SYSTEM_DEFAULT_CRYPTO_MAP 65535 set ikev1 transform-set ESP-AES-128-SHA ESP-AES-128-MD5 ESP-AES-192-SHA ESP-AES-192-MD5 ESP-AES-256-SHA ESP-AES-256-MD5 ESP-3DES-SHA ESP-3DES-MD5 ESP-DES-SHA ESP-DES-MD5
crypto map outside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map outside_map interface outside
crypto map inside_map 65535 ipsec-isakmp dynamic SYSTEM_DEFAULT_CRYPTO_MAP
crypto map inside_map interface inside
crypto ikev1 enable outside
crypto ikev1 enable inside
crypto ikev1 policy 10
authentication crack
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 20
authentication rsa-sig
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 30
authentication pre-share
encryption aes-256
hash sha
group 2
lifetime 86400
crypto ikev1 policy 40
authentication crack
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 50
authentication rsa-sig
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 60
authentication pre-share
encryption aes-192
hash sha
group 2
lifetime 86400
crypto ikev1 policy 70
authentication crack
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 80
authentication rsa-sig
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 90
authentication pre-share
encryption aes
hash sha
group 2
lifetime 86400
crypto ikev1 policy 100
authentication crack
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 110
authentication rsa-sig
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 120
authentication pre-share
encryption 3des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 130
authentication crack
encryption des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 140
authentication rsa-sig
encryption des
hash sha
group 2
lifetime 86400
crypto ikev1 policy 150
authentication pre-share
encryption des
hash sha
group 2
lifetime 86400
client-update enable
telnet 10.152.11.0 255.255.255.0 inside
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd address 192.168.1.2-192.168.1.254 management
dhcpd enable management
threat-detection basic-threat
threat-detection statistics
threat-detection statistics tcp-intercept rate-interval 30 burst-rate 400 average-rate 200
webvpn
enable outside
anyconnect-essentials
group-policy outsidevpn internal
group-policy outsidevpn attributes
dns-server value 203.x.x.x 203.x.x.x
vpn-tunnel-protocol ikev1 l2tp-ipsec ssl-client
split-tunnel-policy tunnelall
split-tunnel-network-list value outsidevpn_splitTunnelAcl
default-domain value interconti.com
address-pools value vpnpool
username test1 password i1lji/GiOWB67bAs encrypted privilege 5
username test1 attributes
vpn-group-policy outsidevpn
username mnlha password WlzjmENGEEZmT9LA encrypted
username mnlha attributes
vpn-group-policy outsidevpn
username cisco password 3USUcOPFUiMCO4Jk encrypted privilege 15
tunnel-group outsidevpn type remote-access
tunnel-group outsidevpn general-attributes
address-pool (inside) vpnpool
address-pool vpnpool
authentication-server-group (outside) LOCAL
default-group-policy outsidevpn
tunnel-group outsidevpn ipsec-attributes
ikev1 pre-shared-key *****
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225
inspect h323 ras
inspect rsh
inspect rtsp
inspect esmtp
inspect sqlnet
inspect skinny
inspect sunrpc
inspect xdmcp
inspect sip
inspect netbios
inspect tftp
inspect ip-options
inspect icmp
inspect http
inspect ipsec-pass-thru
class class-default
user-statistics accounting
service-policy global_policy global
prompt hostname context
no call-home reporting anonymous
hpm topN enable
Cryptochecksum:edc30dda08e5800fc35b72dd6e1d88d7
: end
thanks. please help.I think you should change your nat-exemption rule to smth more general, like
nat (inside,outside) source static any any destination static NETWORK_OBJ_10.10.10.0_28 NETWORK_OBJ_10.10.10.0_28 no-proxy-arp route-lookup
'cause your inside networks are not the same as your vpn-pool subnet.
Plus, if you're trying to reach inside subnets, different from 10.152.11.0 255.255.255.0 (ip from wich subnet is assignet to your inside interface, and for wich above nat exception should be enough), you should check if routing is configured from that subnets to your vpn-pool-subnet through the ASA. -
How can i run a new instance of API by providing seperate JVM.
Hello,
I have some static member and function and they conflicted while opening the new instance of API. Can i run a new instance in separate JVM so it will run independently even we have static members and functions.
Or do we have any other procedure, without removing "static" we can run with out conflicting ?
Thanks
Ashish PancholiYuccaS wrote:
Once again someone thinks static is the same in a distributed application/clustered system. The OP must realise that static is only static per jvm of which there can be more than one in an environment and may not work in a cluster if pooling is used across the cluster. I am no expert on this myself but I think the solution has something to do with creating your own class loader or use JEE which may provide the OP with the flexibility they wish to have?Personally I think they've just found a new version of some API they're using, and don't want to refactor all their code to fit it. Writing web service layers and the like, even a bunch of RMI code, is going to be more painful than that. -
How can we calculate no. of instances in a java program ?
Hi,
I want to know that
How can we calculate no. of instances in a java program ?
Actually I just want to calculate number of live instances in a program at any time...
Thanx in Advance
VijayBeen asked a few times in this forum.
Try having a search.
One way, in brief, is to instrument your classes so that constructors update a per-type counter, and enqueue a PhantomReference for the instance.
When you pop from an associated ReferenceQueue, decrement the counter for the no longer reachable type.
Once you have this, you can query instance counts per type, or globably etc.
We maintain a model which can be remotely queried - and display results over time using JGraph. Gives a fairly non-intrusive way to spot and narrow down the cause of memory leaks in a large application. -
How to get a reference to the owner of a class instance?
Within a method of a class, how can I get a reference to the
object containing the class instance?
To be clear: I have class B that contains a method, say
"myfunc()". Class A (say, the application itself or a custom
component) instantiates a new instance of Class B : myclassB=new
ClassB()
Now, from within myfunc() can I get a reference to Class A?
The simplest way here is to pass a "this" reference when
calling myfunc(), i.e. "myclassB.myfunc(this)" but I would prefer
not to have to remember to always use 'this'.Are these objects within each other. Does classA own classB?
If that is the case, then Greg is correct and it should be
available in parentDocument.
In projects in the past we have created a central
refObjectLocator object that is available to all objects.
Mostly we use events to communicate between objects. Dispatch
an event and let whoever listen for it.
Here is a copy of our reflocator if you are interested.
package com.goconfigure.model {
import mx.collections.ArrayCollection;
import com.adobe.cairngorm.model.ModelLocator;
import com.goconfigure.util.HashMap;
[Bindable]
public class RefObjectLocator implements ModelLocator {
// this instance stores a static reference to itself
private static var refObject : RefObjectLocator;
public var refObjectHM : HashMap = new HashMap();
// singleton: constructor only allows one model locator
public function AppLocator() : void {
if ( RefObjectLocator.refObject != null )
throw new Error( "Only one RefObjectLocator instance should
be instantiated" );
// singleton: always returns the one existing static
instance to itself
public static function getInstance() : RefObjectLocator {
if ( refObject == null )
refObject = new RefObjectLocator();
return refObject;
public function addRefObject( pRefObject : Object, pName :
String ) : void {
refObjectHM.put(pName,pRefObject);
public function getRefObject( pName : String ) : Object {
return refObjectHM.getValue(pName);
public function removeRefObject( pName : String ) : void {
refObjectHM.remove(pName);
public function clearRefObject() : void {
refObjectHM.clear(); -
OBI SE 1 Administration Tool as a client tool to another OBI SE1 instance
Our client has installed the OBI SE 1 on a "server" machine with no hassles. They then installed OBI SE 1 again on a different "client machine", in order to use, only the Administration Tool as a client tool to the other OBI SE 1 Server instance.
They changed the Oracle BI ODBC connectivity to point to the other machine but when they try to use the Administration Tool they get the following message:
[nQSError: 37001]Could not connect to the Oracle BI Server instance.
They then tested the ODBC Client tool to test connectivity and they can access the OBI Server instance in question.
I know that with the SE 1 installation there are no separate installs for client and server components, so my question is: can they do this or in the SE 1 the Administration tool must reside on the same machine as the Oracle BI Server??
Any help will be much appreciated.
Thanks,
SergioDid they use the "Oracle BI Server" ODBC type?
Are they able to successfully ping the remote machine?
There is also a possiblity that they did not fully configure the connection to the Remote Repository. There are 3 steps to the wizard.
The Admin tool is the same admin tool that comes with BI EE (but at a lower release level than the current BI EE, so do not try to just install that client, it will adjust the Repositoy upward and then it will be incompatible with BI SE One). I have connected to many remote repositories without any problem.
Can you post the full log from C:\OracleBI\server\Log\NQSAdminTool.log
Thanks -
Getting Class instance of a class
Dear Friends,
I need to get Class instance of a class in my project. Inorder to use the reflection API 's the package name of the class is needed , but it may not be available Only available thing is the name of the class file and the location where that file is existing .
Please suggest some method to get Class instance in this situation.
Shaiju.PYou can create a ClassLoader of your own. There's a simplified example in this thread (reply number 6):
http://forum.java.sun.com/thread.jsp?thread=538836&forum=31 -
Converting string into class instance
Hi all,
I want to convert a string which is a class instance in to that class object in the receiving class. I'm sending server's class object as string to another class which is a client.
Please any one suggest to solve this problem.
Thanks& regards,
Sai.do you mean reflection?
http://java.sun.com/developer/technicalArticles/ALT/Reflection/
here is a simple example:
import java.lang.reflect.Field;
public class ThisClass{
public static void main(String[] args) {
try{
System.out.println("Variable Value: " + Variable);
String className = "ThisClass";
String varName = "Variable";
Class c = Class.forName("" + className);
Field f = c.getField("" + varName);
f.setInt(null, 123);
System.out.println("Variable Value: " + Variable);
} catch(Exception e){ System.out.println("Error: " + e); }
public static int Variable = 0;
} -
Can any help, can i use java class in
froms 6 or any one have designed form
of progress bar please help meThanks for your reply...
Actually the task is quite simple... It requires me to do a better interface for a tomcat server folders...
For example, users are free to access
http://apache.oss.eznetsols.org/jakarta/tomcat-5/v5.0.12-beta/
to download the tomcat... However, its index may not nice and easy for browing.. Therefore, the task requires a new dynamic page to access this server folder, and get all file names under this folder, anlaysis whether it is file or directory..and finally get its path....
It is quite easy to do a JSP page, but I don't know whether it is possible to do by using JavaScript .... Although JS is running in client side, the user/client also can access the tomcat folder, why not JavaScript?
Thanks a lot!
SD -
Get class Instance, and then get hers attributes
Hi Gurus,
i'm new to ABAP Object,
creating an a BSP whit MVC controller i've try to implement the class controller,
but on a method of it i want to get instance of the class parents:
the class that i implement is an extension of CL_BSP_CONTROLLER2.
In this class in the method DO_REQUEST ( for example ) i try to get the instance of the class
parent ( and i got it! ) using this syntax:
data: Parent type ref to IF_BSP_DISPATCHER, " type take from attribute M_PARENT of the class
Parent = ME->M_PARENT.
In debug i see that 'Parent' get rightly the class parent instance but than i want do this:
(i want get the sub controller of the main contoller 'parent', in debug i can see everything fine)
SubController = Parent->GET_ATTRIBUTE(LEFT_CONTROLLER).
But the compiler say that the class instance 'Parent' has no methods and no attribute.
i've try other syntax like:
call METHOD Parent_>GET_ATTRIBUTE
IMPORTING
LEFT_CONTROLLER)
call METHOD ME->M_PARENT->GET_CONTROLLER
EXPORTING
CONTROLLER_ID = 'search'
IMPORTING
CONTROLLER_INSTANCE = Parent2
No one work!
How can i do?
Here screnshot of that i see in debug mode, and that i want get:
http://img190.imageshack.us/i/1debugscreen.jpg/
http://img10.imageshack.us/i/2debugscreen.jpg/
Thanks in advance,
DavideHi Pawan,
classes ref to CL_BSP_CONTROLLER2 like my controller class, have an attribute
M_PARENT type IF_BSP_DISPATCHER.
If the class is a subclass of an main class it has the M_PARENT attribute containing the instance of the parent class,
i can see in debug mode ( here example: http://img40.imageshack.us/img40/1648/3debugscreen.jpg )
i can get this attribute:
data: Parent type ref to IF_BSP_DISPATCHER, " type take from attribute M_PARENT of the class
Parent = ME->M_PARENT.
but the interface IF_BSP_DISPATCHER has no attribute and no method defined, and if i declare 'Parent' as type ref to
CL_BSP_CONTROLLER2 the compiler return error
<=> "The type of "PARENT" cannot be converted to the type of "ME->M_PARENT". "
Davide
Maybe you are looking for
-
Reports 3.0 "Memory could not be read" error
If the object referenced by a trigger is deleted without also deleting the trigger itself the following error message appears when attempting to access or delete the trigger: R30DES32.EXE - Application Error The instruction at "0x649e401e" referenced
-
Creating File in Shift-JIS, Japanese Encoding for EFT
Hi, We need to do EFT for the data which is present in Shift-JIS(JA16SJIS), Japanese characterset. Our database is having NLS_CHARACTERSET -- UTF8 NLS_NCHAR_CHARACTERSET -- AL16UTF16 File needs to be sent to the bank in the Shift-JIS format, I need t
-
Sorting an array of filenames by filetype?
I have an array of filenames read from a directory list. I can parse the file type from each filename using a function. How would I then sort the array by their respective file type, so that all PDF files sort together in the array, for example? Or w
-
Hi, I want to convert from date to number. How can I do? Thanks [email protected]
-
Loading and displaying an image
I have been able to do this with an applet quite easily import java.applet.Applet; import java.awt.Graphics; import java.awt.Image; // This is a simple example applet that loads an image and // displays it. public class DrawImage extends Applet