Loading ...
Sorry, an error occurred while loading the content.

Re: [archive-crawler] JMX Engine readFile

Expand Messages
  • Paul Jack
    Howdy, You ve uncovered a documentation bug in Engine.java. You want to reverse the second and third parameters. The parameters should be: job -- the
    Message 1 of 4 , Dec 14, 2007
    View Source
    • 0 Attachment
      Howdy,

      You've uncovered a documentation bug in Engine.java. You want to
      reverse the second and third parameters. The parameters should be:

      job -- the stage-name of the job
      settingsPath -- the path to the file setting
      fileName -- optional filename if settingsPath is a directory
      startPos -- starting position of the file
      length -- number of bytes to return

      You were passing a filename in as the settingsPath, which was
      confusing the code. Also the "fileName" parameter is only necessary
      is settingsPath refers to a directory. Since root:seeds:seedfile
      refers to the file, you can pass in null for the third parameter.

      -Paul

      On Dec 14, 2007, at 2:46 PM, Daniel Clark wrote:

      > Error from log file. How can I check the keys in
      > org.archive.settings.file.FileSheetManager?
      >
      > 12/14/2007 22:43:30 +0000 SEVERE
      > org.archive.settings.jmx.LoggingDynamicMBean dealWithException
      > ReflectionException during getFilePath
      > org.archive.settings.path.InvalidPathException:
      > /home/clarkdac/heritrix/heritrix-2.0.0-RC1/jobs/ready-
      > basic_seed_sites-20071
      > 214-danny2/seeds.txt is invalid because
      > org.archive.settings.file.FileSheetManager does not define a key named
      > /home/clarkdac/heritrix/heritrix-2.0.0-RC1/jobs/ready-
      > basic_seed_sites-20071
      > 214-danny2/seeds.txt
      > at
      > org.archive.settings.path.PathValidator.validateKey
      > (PathValidator.java:218)
      > at
      > org.archive.settings.path.PathValidator.validatePath
      > (PathValidator.java:119)
      > at
      > org.archive.settings.path.PathValidator.validate(PathValidator.java:
      > 233)
      > at
      > org.archive.settings.jmx.JMXSheetManagerImpl.getFilePath
      > (JMXSheetManagerImpl
      > .java:600)
      > at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
      > at
      > sun.reflect.DelegatingMethodAccessorImpl.invoke
      > (DelegatingMethodAccessorImpl
      > .java:25)
      > at java.lang.reflect.Method.invoke(Method.java:585)
      > at org.archive.openmbeans.annotations.Bean.invoke(Bean.java:236)
      > at
      > org.archive.settings.jmx.LoggingDynamicMBean.invoke
      > (LoggingDynamicMBean.java
      > :158)
      > at
      > com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke
      > (DynamicMetaDataImpl.java:
      > 213)
      > at
      > com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
      > at
      > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke
      > (DefaultMBeanSer
      > verInterceptor.java:815)
      > at
      > com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
      > at
      > org.archive.openmbeans.annotations.BeanProxy.invoke(BeanProxy.java:87)
      > at $Proxy11.getFilePath(Unknown Source)
      > at
      > org.archive.crawler.framework.EngineImpl.getFilePath
      > (EngineImpl.java:617)
      > at
      > org.archive.crawler.framework.EngineImpl.readFile(EngineImpl.java:510)
      > at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
      > at
      > sun.reflect.DelegatingMethodAccessorImpl.invoke
      > (DelegatingMethodAccessorImpl
      > .java:25)
      > at java.lang.reflect.Method.invoke(Method.java:585)
      > at org.archive.openmbeans.annotations.Bean.invoke(Bean.java:236)
      > at
      > org.archive.settings.jmx.LoggingDynamicMBean.invoke
      > (LoggingDynamicMBean.java
      > :158)
      > at
      > com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke
      > (DynamicMetaDataImpl.java:
      > 213)
      > at
      > com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
      >
      > -----Original Message-----
      > From: archive-crawler@yahoogroups.com
      > [mailto:archive-crawler@yahoogroups.com] On Behalf Of stack
      > Sent: Friday, December 14, 2007 4:00 PM
      > To: archive-crawler@yahoogroups.com
      > Subject: Re: [archive-crawler] JMX Engine readFile
      >
      > That exception is not very informative. Anything in logs on the
      > heritrix
      > otherside that'd give you a clue as to whats errant? Otherwise, add
      > logging on the Heritrix side to see if you can figure whats failing/
      > missing.
      > St.Ack
      >
      > Daniel Clark wrote:
      > >
      > > I'm trying to read a job's seedlist via JMX. After checking the
      > source
      > > org.archive.crawler.webui.Seeds, I attempted the following with no
      > > success. The filename parameter appears to be the problem. I
      > tried the
      > > fully qualified name as well. I successfully executed the
      > getFilePath
      > > and getFileSize. Therefore, I know the settingsPath is accurate.
      > > Please, advise on how to execute readFile properly. If there's a
      > > better way to read and/or write to the seedlist, please explain.
      > Thanks.
      > >
      > > $ java -jar cmdline-jmxclient-0.10.5.jar controlRole:admin
      > > localhost:8859
      > >
      > org.archive.crawler:host=<host>,instance=26156414,jmxport=8859,name=En
      > gine,t
      > ype=org.archive.crawler.framework.Engine
      > >
      > readFile=ready-basic_seed_sites-20071213-
      > danny-20071214152937,seeds.txt,root
      > :seeds:seedsfile,0,32000
      > >
      > > ERROR
      > >
      > > =======
      > >
      > > Exception in thread "main" javax.management.ReflectionException
      > >
      > > at
      > >
      > org.archive.settings.jmx.LoggingDynamicMBean.dealWithException
      > (LoggingDynami
      > cMBean.java:77)
      > >
      > > at
      > >
      > org.archive.settings.jmx.LoggingDynamicMBean.invoke
      > (LoggingDynamicMBean.java
      > :160)
      > >
      > > at
      > >
      > com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke
      > (DynamicMetaDataImpl.java:
      > 213)
      > >
      > > at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:
      > 220)
      > >
      > > at
      > >
      > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke
      > (DefaultMBeanSer
      > verInterceptor.java:815)
      > >
      > > at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke
      > (JmxMBeanServer.java:784)
      > >
      > > at
      > >
      > com.sun.jmx.remote.security.MBeanServerAccessController.invoke
      > (MBeanServerAc
      > cessController.java:431)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.doOperation
      > (RMIConnectionImpl.
      > java:1410)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.access$100
      > (RMIConnectionImpl.j
      > ava:81)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl
      > $PrivilegedOperation.run(RMICon
      > nectionImpl.java:1247)
      > >
      > > at java.security.AccessController.doPrivileged(Native Method)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation
      > (RMIConne
      > ctionImpl.java:1350)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.invoke
      > (RMIConnectionImpl.java:
      > 784)
      > >
      > > at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      > >
      > > at
      > >
      > sun.reflect.DelegatingMethodAccessorImpl.invoke
      > (DelegatingMethodAccessorImpl
      > .java:25)
      > >
      > > at java.lang.reflect.Method.invoke(Method.java:585)
      > >
      > > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:
      > 294)
      > >
      > > at sun.rmi.transport.Transport$1.run(Transport.java:153)
      > >
      > > at java.security.AccessController.doPrivileged(Native Method)
      > >
      > > at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      > >
      > > at
      > > sun.rmi.transport.tcp.TCPTransport.handleMessages
      > (TCPTransport.java:466)
      > >
      > > at
      > >
      > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
      > (TCPTransport.java:7
      > 07)
      > >
      > > at java.lang.Thread.run(Thread.java:595)
      > >
      > > at
      > >
      > sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
      > (StreamRemoteC
      > all.java:247)
      > >
      > > at
      > > sun.rmi.transport.StreamRemoteCall.executeCall
      > (StreamRemoteCall.java:223)
      > >
      > > at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
      > >
      > > at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
      > >
      > > at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown
      > > Source)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnector
      > $RemoteMBeanServerConnection.invoke(
      > RMIConnector.java:972)
      > >
      > > at org.archive.jmx.Client.doBeanOperation(Client.java:661)
      > >
      > > at org.archive.jmx.Client.doSubCommand(Client.java:446)
      > >
      > > at org.archive.jmx.Client.doBean(Client.java:393)
      > >
      > > at org.archive.jmx.Client.doBeans(Client.java:344)
      > >
      > > at org.archive.jmx.Client.execute(Client.java:312)
      > >
      > > at org.archive.jmx.Client.execute(Client.java:278)
      > >
      > > at org.archive.jmx.Client.execute(Client.java:256)
      > >
      > > at org.archive.jmx.Client.main(Client.java:159)
      > >
      > > Caused by: java.lang.IllegalStateException
      > >
      > > at
      > >
      > org.archive.settings.jmx.LoggingDynamicMBean.dealWithException
      > (LoggingDynami
      > cMBean.java:77)
      > >
      > > at
      > >
      > org.archive.settings.jmx.LoggingDynamicMBean.invoke
      > (LoggingDynamicMBean.java
      > :160)
      > >
      > > at
      > >
      > com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke
      > (DynamicMetaDataImpl.java:
      > 213)
      > >
      > > at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:
      > 220)
      > >
      > > at
      > >
      > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke
      > (DefaultMBeanSer
      > verInterceptor.java:815)
      > >
      > > at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke
      > (JmxMBeanServer.java:784)
      > >
      > > at
      > >
      > com.sun.jmx.remote.security.MBeanServerAccessController.invoke
      > (MBeanServerAc
      > cessController.java:431)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.doOperation
      > (RMIConnectionImpl.
      > java:1410)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.access$100
      > (RMIConnectionImpl.j
      > ava:81)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl
      > $PrivilegedOperation.run(RMICon
      > nectionImpl.java:1247)
      > >
      > > at java.security.AccessController.doPrivileged(Native Method)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation
      > (RMIConne
      > ctionImpl.java:1350)
      > >
      > > at
      > >
      > javax.management.remote.rmi.RMIConnectionImpl.invoke
      > (RMIConnectionImpl.java:
      > 784)
      > >
      > > at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
      > >
      > > at
      > >
      > sun.reflect.DelegatingMethodAccessorImpl.invoke
      > (DelegatingMethodAccessorImpl
      > .java:25)
      > >
      > > at java.lang.reflect.Method.invoke(Method.java:585)
      > >
      > > at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:
      > 294)
      > >
      > > at sun.rmi.transport.Transport$1.run(Transport.java:153)
      > >
      > > at java.security.AccessController.doPrivileged(Native Method)
      > >
      > > at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
      > >
      > > at
      > > sun.rmi.transport.tcp.TCPTransport.handleMessages
      > (TCPTransport.java:466)
      > >
      > > at
      > >
      > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run
      > (TCPTransport.java:7
      > 07)
      > >
      > > at java.lang.Thread.run(Thread.java:595)
      > >
      > > *~~~~~~~~~~~~~~~~~~~~~*
      > >
      > > *Daniel Clark, President*
      > >
      > > *DAC Systems, Inc.*
      > >
      > > * (703) 403-0340*
      > >
      > > *~~~~~~~~~~~~~~~~~~~~~***
      > >
      > >
      >
      > Yahoo! Groups Links
      >
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.