On 23/01/07, Richard Gaywood <[EMAIL PROTECTED]> wrote:
On 1/22/07, sebb <[EMAIL PROTECTED]> wrote:
>
> > How do I now make them appear in the JMeter GUI? They've not
> auto-magically
> > inserted themselves into the Logic Controller menu. I have a vague
> feeling
> > that you need to change something around, but I can't remember what... I
> > also thought it was at least reflection based and therefore there wasn't
> > much config.
>
> Should work ...



Don't I need to futz about with the i18n messages file? At the moment, my
FailingTransactionControllerGui class has this method:

 public String getLabelResource() {
       return "transaction_controller_title";
   }

Which collides with the one in TransactionController. Problem is, I would
ideally like to ship my code as a JAR file people add to their JMeter
install -- but this looks like I have to add lines to
src/core/org/apache/jmeter/resources/messages.properties, and I'm guessing I
can't do that without a custom entire build of JMeter. Is that right?

Yes - unless you use the TestBean approach, which has its own property files.

It would be useful if JMeter could read additional properties files,
but it does not do so at present.

Unless you need i18n, just implement the getLabel() method.


> Any help greatfully received! Hopefully it's not complex.
>
> Try enabling debug trace - this should show what is done in startup.


I can see my JAR file on the classpath, but nothing else of note.

It should appear in the GUI if you have got the class structure correct.

I tried manually editing a JMX file to add a FailingTransactionController. I
created this node:
   <hashTree>
       <FailingTransactionController
guiclass="FailingTransactionControllerGui"
testclass="FailingTransactionController" testname="Comtec Transaction
Controller" enabled="true"/>
       <hashTree/>
     </hashTree>

But when I loaded it I got a "could not initialise class" error message,
with this in the log file:
2007/01/23 09:00:59 WARN  - jmeter.gui.action.Load: Could not convert file
com.thoughtworks.xstream.converters.ConversionException:
FailingTransactionController : FailingTransactionController
---- Debugging information ----
required-type       : org.apache.jorphan.collections.ListedHashTree
cause-message       : FailingTransactionController :
FailingTransactionController
class               : org.apache.jmeter.save.ScriptWrapper
message             : FailingTransactionController :
FailingTransactionController
line number         : 28
path                :
/jmeterTestPlan/hashTree/hashTree/hashTree/FailingTransactionController
cause-exception     :
com.thoughtworks.xstream.alias.CannotResolveClassException
-------------------------------

Again, I can definitely see my JAR file on JMeter's classpath in jmeter.log.

So is there also a separate list of XStream aliases I need to add my class
into?

You can use the full class names.

Aliases are defined in saveservice.properties, but again, there is
only one such file.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to