Sponsored Content
Full Discussion: Java compilation error
Top Forums Programming Java compilation error Post 303024061 by boncuk on Thursday 27th of September 2018 10:56:11 PM
Old 09-27-2018
Java compilation error

i am on red hat Linux .


Code:
package hiveudf;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;
public class lowercaseudf extends UDF {
    public Text evaluate(final Text s) {
        if (s == null) { return null;}
        return new Text(s.toString().lowerCase());
        }
        }
}


Code:
# javac -classpath /usr/hdp/2.6.5.0-292/hive2/lib/*:/usr/hdp/2.6.5.0-292/hadoop/*:/usr/hdp/2.6.5.0-292/hadoop-mapreduce/* lowercaseudf.java
lowercaseudf.java:7: error: cannot find symbol
        return new Text(s.toString().lowerCase());
                                    ^
  symbol:   method lowerCase()
  location: class String
1 error

 

10 More Discussions You Might Find Interesting

1. Programming

Regarding compilation error.

Hi All, I facing the following compilation error; when I implementing the following logic. ostrstream ostr; ostr << (( scAxsm.getRecord( i ).getField( 2 ).getShort())%12)!=0?(( scAxsm.getRecord( i ).getField( 2 ).getShort())/12+1) : (( scAxsm.getRecord( i ).getField( 2 ).getShort())/12) <<... (1 Reply)
Discussion started by: sweta
1 Replies

2. Programming

compilation error

Hi, While trying compile a C++ file in UNIX with gcc whose make rule involves the usage of /usr/ccs/bin/as, I get the following error: /usr/ccs/bin/as: No such file or directory /usr/ccs/bin/as: error: write error on output file "<filename>.o" *** Error code 1 clearmake: Error: Build... (2 Replies)
Discussion started by: smanu
2 Replies

3. Programming

Compilation error

I am compiling a software xchm on solaris 10. First i run './configure' There is no error. But when i start compiling using 'gmake' following error shown /usr/local/include/wx-2.6/wx/x11/brush.h: In copy constructor `wxBrush::wxBrush(const wxBrush&)':... (3 Replies)
Discussion started by: mansoorulhaq
3 Replies

4. Linux

c++ compilation error

Hello every one, here i am attempting to compile a c++ module using gcc.it is throwing a error . error: ==== > make -S dummyCHARGP /usr/local/bin/gcc -g -DDEBUG -DMAT -I. -I/swtemp/usbs/cc/unix-ce/root/subsys/lib/Linux/ -I/opt/dce/include -I/opt/dce/include/dce ... (12 Replies)
Discussion started by: mannam srinivas
12 Replies

5. HP-UX

compilation error

hello everyone, here i am attempting to compile a c++ submodule.OS is HP-UX. here i am getting the following error. ====================================== "Make: Don't know how to make compile. Stop." =================================== could you pls somebody suggest why this error is... (2 Replies)
Discussion started by: mannam srinivas
2 Replies

6. Programming

Compilation error : Please help

state_field state_abvr = { "AL","ALABAMA", "AK","ALASKA", "AZ","ARIZONA", "AR","ARKANSAS", "CA","CALIFORNIA", "CO","COLORADO", "CT","CONNECTICUT", "DE","DELAWARE", "DC","DISTRICT-OF-COLUMBIA", "FL","FLORIDA", "GA","GEORGIA", "HI","HAWAII", "ID","IDAHO", "IL","ILLINOIS",... (1 Reply)
Discussion started by: jagan_kalluri
1 Replies

7. HP-UX

Compilation failed error

Hi, I have installed automake in one of HP-UX boxes using swinstall command. But when i issue automake it gives the following error message. Can't locate loadable object for module IO in @INC (@INC contains: /usr/local/share/automake-1.10 /usr/local/lib/perl5/5.8.8/PA-RISC2.0... (1 Reply)
Discussion started by: chrisanto_2000
1 Replies

8. Programming

Compilation Error

I am getting the below given errors for the following program though all the variables have been declared and used appropriately. Please Help. The environment is AIX. Error: ------ "gbsizeprofile.c", line 67.4: 1506-275 (S) Unexpected text 'void' encountered. "gbsizeprofile.c", line 67.10:... (2 Replies)
Discussion started by: yschd
2 Replies

9. AIX

Unable to correct NMONVisualizer java error. Can someone help to decode this java error?

Hello AIX and Java gurus, I have a java error that I have no clue how to resolve. I am trying to run the popular NMONVisualizer utility against a NMON dataset and getting the error as shown below: /db2storage/NMON >java -jar NMONVisualizer_2015-02-02.jar com.ibm.nmon.ReportGenerator... (1 Reply)
Discussion started by: okonita
1 Replies

10. Programming

Java compilation problem - path not set

I am compiling the Java program in the Command Prompt then one error has appeared that you did not have set the path of java folder then I also set the path to go in the environment variables but I have the same issue. What should I do to resolve this issue? Please don't hijack others'... (4 Replies)
Discussion started by: Nancy Wilson
4 Replies
MicroMason::TextTemplate(3pm)				User Contributed Perl Documentation			     MicroMason::TextTemplate(3pm)

NAME
Text::MicroMason::TextTemplate - Alternate Syntax like Text::Template SYNOPSIS
Instead of using this class directly, pass its name to be mixed in: use Text::MicroMason; my $mason = Text::MicroMason::Base->new( -TextTemplate ); Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( text=>$template )->( @%args ); print $mason->execute( text=>$template, @args ); Text::Template provides a syntax to mix Perl into a text template: { my $hour = (localtime)[2]; my $daypart = ( $hour > 11 ) ? 'afternoon' : 'morning'; '' } Good { $daypart }, { $name }! DESCRIPTION
This mixin class overrides several methods to allow MicroMason to emulate the template syntax and some of the other features of Text::Template. Compatibility with Text::Template This is not a drop-in replacement for Text::Template, as the Perl calling interface is quite different, but it should be able to process most existing templates without major changes. This should allow current Text::Template users to take advantage of MicroMason's one-time compilation feature, which in theory could be faster than Text::Template's repeated evals for each expression. (No benchmarking yet.) Contributed patches to more closely support the syntax of Text::Template documents would be welcomed by the author. Template Syntax The following elements are recognized by the TextTemplate lexer: o literal_text Anything not specifically parsed by the below rule is interpreted as literal text. o { perl_expr } A Perl expression to be interpolated into the result. Good { (localtime)[2]>11 ? 'afternoon' : 'morning' }. The block may span multiple lines and is scoped inside a "do" block, so it may contain multiple Perl statements and it need not end with a semicolon. Good { my $h = (localtime)[2]; $h > 11 ? 'afternoon' : 'morning' }. To make a block silent, use an empty string as the final expression in the block. { warn "Interpreting template"; '' } Hello there. Although the blocks are not in the same a lexical scope, you can use local variables defined in one block in another: { $phase = (localtime)[2]>11 ? 'afternoon' : 'morning'; '' } Good { $phrase }. Argument Passing Like Text::Template, this package clobbers a target namespace to pass in template arguments as package variables. For example, if you pass in an argument list of "foo => 23", it will set the variable $foo in your package. The strict pragma is disabled to facilitate these variable references. Internally, this module inherits this functionality from the PassVariables mixin. If you are using the TextTemplate mixin, do not also specify the PassVariables mixin or it will be included twice. For more information, see Text::MicroMason::PassVariables. Supported Attributes package Target package namespace. Private Methods prepare() If a package has not been specified, this method generates a new package namespace to use only for compilation of a single template. lex() Lexer for matched braces - produces only text and expr tokens. Uses Text::Balanced. SEE ALSO
The interface being emulated is described in Text::Template. For an overview of this templating framework, see Text::MicroMason. This is a mixin class intended for use with Text::MicroMason::Base. For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. perl v5.10.1 2007-01-29 MicroMason::TextTemplate(3pm)
All times are GMT -4. The time now is 01:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy