You are right:
17/07/26 12:18:03 INFO state.ConnectionStateManager: State change: CONNECTED
Exception in thread "main" java.lang.ClassCastException: 
org.apache.metron.dataloads.extractor.TransformFilterExtractorDecorator cannot 
be cast to org.apache.metron.dataloads.extractor.stix.StixExtractor
        at 
org.apache.metron.dataloads.nonbulk.taxii.TaxiiLoader.main(TaxiiLoader.java:204)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)

these exeption below was after my own changes on original code 0.4.0  , sorry.
rgds
az

From: Casey Stella [mailto:[email protected]] 
Sent: Wednesday, July 26, 2017 11:56 AM
To: [email protected]
Cc: [email protected]
Subject: Re: FW: STIX extractor problem.

Are you sure you applied the patch and rebuilt?  Line 189 of TaxiiLoader 
doesn't cast to StixExtractor.  If it were a problem, I'd expect the line to be 
204 of TaxiiLoader.java

On Wed, Jul 26, 2017 at 10:03 AM, Ziaja Aleksander 
<mailto:[email protected]> wrote:
Hi again.
After patching there i san exeption:

Exception in thread "main" java.lang.ClassCastException: 
org.apache.metron.dataloads.extractor.TransformFilterExtractorDecorator cannot 
be cast to org.apache.metron.dataloads.extractor.stix.StixExtractor
        at 
org.apache.metron.dataloads.nonbulk.taxii.TaxiiLoader.main(TaxiiLoader.java:189)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)

Config files are the same (as below)
Is the rany problem in config file know , please?

Rgds,
-aziaja

From: Casey Stella [mailto:mailto:[email protected]]
Sent: Tuesday, July 25, 2017 4:52 PM
To: mailto:[email protected]
Cc: mailto:[email protected]
Subject: Re: FW: STIX extractor problem.

Yep, unfortunately this is a bug and there's a PR open for it: METRON-1026 
https://github.com/apache/metron/pull/643

On Tue, Jul 25, 2017 at 3:49 PM, Ziaja Aleksander 
<mailto:mailto:[email protected]> wrote:
Hi All,

I would like to ask you (I still can not figure out why it happenes , may be it 
is so obvious ...) what means exeption:



Exception in thread "main" java.lang.IllegalStateException: Extractor must be a 
STIX Extractor
        at 
org.apache.metron.dataloads.nonbulk.taxii.TaxiiLoader.main(TaxiiLoader.java:202)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:148)

executed: /usr/metron/0.4.0/bin/threatintel_taxii_load.sh -c 
/opt/taxii/connection.json  -e /opt/taxii/extractor.json
os: Centos 7

config files:
cat /opt/taxii/connection.json
{
   "endpoint" : "https://xxxxx/taxii-discovery-service";
  ,"type" : "DISCOVER"
  ,"username" : "xxxx"
  ,"password" : "xxxx"
  ,"collection" : "guest.Abuse_ch"
  ,"table" : "threat_intel"
  ,"columnFamily" : "cf"
  ,"allowedIndicatorTypes" : [ "domainname:FQDN", "address:IPV_4_ADDR" ]
}

cat /opt/taxi/extractor.json
{
  "config" : {
    "stix_address_categories" : "IPV_4_ADDR"
  }
  ,"extractor" : "STIX"
}

So please, any sugestions welcome.
Thank you in advance.
-Alex

Reply via email to