error: Can't find constructor

MJB1024 <[email protected]> Thu, 26 Jun 2008 12:19:40 -0700 (PDT)
Newsgroups gmane.comp.java.beanshell.user
Message-ID <[email protected]>
Hi, maybe someone can help me ...

I am sourcing a java-source file defining a class which compiles and run in
JAVA.
I want to use it interpreted, so it could be changed easily.

When I check the constructors with getDeclaredConstructors they are shown as
expected.

Then I construct the arguments as instances of JAVA classes.

When I try to construct an instance of the interpreted class I get a strange
'Can't find constructor'

any Ideas what I need to do differently? - thanks  MJB

bsh session:
----------------
bsh %
source("c:\\programme\\TestLoop\\cnf\\ScriptedPS\\PSSetRelaisGroup1.java");
<class com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1>

bsh %
com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1.class.getDeclaredConstructors();
<[Ljava.lang.reflect.Constructor;@166c114>

bsh %
print(com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1.class.getDeclaredConstructors());
java.lang.reflect.Constructor []: {
public
com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1(com.rabe.proofstepmanager.hardwareregistry.HardwareRegistry,com.rabe.proofstepmanager.eventqueue.EventQueue,com.rabe.utils.log.LogFile),
public
com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1(com.rabe.proofstepmanager.hardwareregistry.HardwareRegistry,com.rabe.proofstepmanager.eventqueue.EventQueue),
}

bsh % hr = psm.hr;
<com.rabe.proofstepmanager.hardwareregistry.HardwareRegistry@1bf68a9>
bsh % ev = psm.evtQueue;
<com.rabe.proofstepmanager.eventqueue.EventQueue@ec436>


bsh % x = new PSSetRelaisGroup1(hr,ev);
// Error: EvalError: Constructor error: Can't find constructor:
com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1(
com.rabe.proofstepmanager.hardwareregistry.HardwareRegistry,
com.rabe.proofstepmanager.eventqueue.EventQueue ) in class:
com.rabe.m2pConnector.proofsteps.PSSetRelaisGroup1 : at Line: 1 : in file:
<unknown file> : new PSSetRelaisGroup1 ( hr , ev ) 






-- 
View this message in context: http://www.nabble.com/error%3A-Can%27t-find-constructor-tp18141334p18141334.html
Sent from the BeanShell - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php