Search Results

Search found 2034 results on 82 pages for 'akhil pm'.

Page 71/82 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • How can I track down "Template process failed: undef error" in Perl's Template Toolkit?

    - by swisstony
    I've moved a Perl CGI app from one web host to another. Everything's running fine except for Template Tookit which is giving the following error: "Template process failed: undef error - This shouldn't happen at /usr/lib/perl5/5.8.8/CGI/Carp.pm line 314." The templates are working fine on the other web host. I've set the DEBUG_ALL flag when creating the template object, but it doesn't provide any additional info about errors just loads of debug output. I can't post the template source as there's lots of client specific stuff in it. I've written a simple test template and that works okay. Just wondering if anyone had seen this error before or has any ideas on the quickest way to find a fix for it. EDIT: Here's a snippet of the code that loads and processes the template. my $vars = {}; $vars->{page_url} = $page_url; $vars->{info} = $info; $vars->{is_valid} = 0; $vars->{invalid_input} = 0; $vars->{is_warnings} = 0; $vars->{is_invalid_price} = 0; $vars->{output_from_proc} = $proc_output; ... my $file = 'clientTemplate.html'; #create ref to hash use Template::Constants qw( :debug ); my $template = Template->new( { DEBUG => DEBUG_SERVICE | DEBUG_CONTEXT | DEBUG_PROVIDER | DEBUG_PLUGINS | DEBUG_FILTERS | DEBUG_PARSER | DEBUG_DIRS, EVAL_PERL => 1, INCLUDE_PATH => [ '/home/perlstuff/templates', ], } ); $template->process( $file, $vars ) || die "Template process failed: ", $template->error(), "\n";

    Read the article

  • Iphone: TabView + TableView

    - by OneTrickPonySoft
    I think I'm missing something simple, but I can't figure out exactly what it is. I'm trying to set up an App with a UITabViewController, and one of the Tabs will have a UITableView and UISearchBar (but no Navigation Controller). I set up the UITabViewController with all the tabs in interface builder, and the views are in their own xib files. The xib file for the tab with the UITableView is set up and connected as follows. Stuff in the browser: File's owner (Class is my custom class that is a child of UITableViewController) view - View View (class UIView, reference view - File's owner) contains: UITableView (if i try and set references to the data source / delegate, the app breaks) UISearchBar (unconfigured at the moment) This setup displays all the items and doesn't lock up, but I can't assign a DataSource without it crashing when i try and load the tab with the UITableView. What should I do to get data into this table, either in IB or code? My ideas are as follows: Implement custom UITableView class, hook up to table view in IB or to custom tableviewcontroller in Xcode. Pound head or laptop against the wall until it works. Update: Here's the error the simulator pushes to the console when I connect the Tableview's data source and delegate to File Owner (who's class is my custom tableviewcontroller). 2/14/09 6:59:12 PM TabBarWillbeRight[33172] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[UIViewController tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x523760'

    Read the article

  • OutOfMemory during paging

    - by Tony
    Hi I am using ObjectDataSource, ListView, CustomPaging If the total number of rows is too big, I got OutOfMemory exception, it seems that it caused by some array, I don't get it, because total number of rows should never make any array to be filled with elements, the page size do!! This is the logger. ****EXCEPTION # 3 : 4/30/2010 9:43:07 PM System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. --- System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.Web.UI.WebControls.ListView.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.WebControls.ListView.get_Controls() at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) at System.Web.UI.Control.LoadViewStateRecursive(Object savedState) at System.Web.UI.Page.LoadAllState() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace --- at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\flickrdemo\15752207\c63ea96c\App_Web__8yxn9sb.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Read the article

  • Adding time zone hours difference to time

    - by Hwang
    I know there's a much better and correct way to do it, but i need a temporarily solutions. I need to add in extra hours to the time, and the day will change automatically too. How should I change the code below? package { public class getTime { private var today:Date=new Date(); private var hour:uint=today.getHours(); private var minute:uint=today.getMinutes(); private var month:uint=today.getMonth(); private var monthArray:Array=new Array('January','February','March','April','May','June','July','August','September','October','November','December'); private var time:String = getUSClockTime(today.getHours(), today.getMinutes()); public var dateNtime:String=(time+", " +today.getDate()+" "+monthArray[month]+" "+today.getFullYear());; public function getTime() { } private function getUSClockTime(hrs:uint, mins:uint):String { var modifier:String="PM"; var minLabel:String=doubleDigitFormat(mins); if (hrs>12) { hrs=hrs-12; } else if (hrs == 0) { modifier="AM"; hrs=12; } else if (hrs < 12) { modifier="AM"; } return (doubleDigitFormat(hrs) + ":" + minLabel + " " + modifier); } private function doubleDigitFormat(num):String { if (num<10) { return ("0" + num); } return num; } } }

    Read the article

  • Are there scenarios where the ViewModel needs to invoke methods on the View w.r.t. MVVM in WPF?

    - by Gishu
    As per the pattern, the ViewModel exposes Properties(with change notification) and Commands (to notify the VM of user actions) that the View binds to. The only communication that flows from the VM to the View is the property change notifications (so that the View can refresh itself with updated data). In MVP or PresentationModel form of the pattern (if I'm not mistaken), the View implements a plain vanilla interface (consisting of methods, properties and/or events). With MVVM, it feels methods on the IView have been outlawed (along with IView itself). One scenario I could think of was to set the focus to a certain control in the View. (When the user does ActionX, the focus should immediately be set to FieldY). In MVP, I'd write this as IView.ActivateField(NameConstant), which the presenter or PM would invoke. In MVVM, this seems to be a fringe case that needs a workaround / little bit of code-behind. The VM implements an ActiveField Property, which it sets to NameConstant. The view picks up the change notification event and in a code-behind event handler, activates the Name control. Is the above just an exception to the norm? Or are there other such scenarios, where the VM needs to invoke a method on the View ?

    Read the article

  • How do I find the module dependencies of my Perl script?

    - by zoul
    I want another developer to run a Perl script I have written. The script uses many CPAN modules that have to be installed before the script can be run. Is it possible to make the script (or the perl binary) to dump a list of all the missing modules? Perl prints out the missing modules’ names when I attempt to run the script, but this is verbose and does not list all the missing modules at once. I’d like to do something like: $ cpan -i `said-script --list-deps` Or even: $ list-deps said-script > required-modules # on my machine $ cpan -i `cat required-modules` # on his machine Is there a simple way to do it? This is not a show stopper, but I would like to make the other developer’s life easier. (The required modules are sprinkled across several files, so that it’s not easy for me to make the list by hand without missing anything. I know about PAR, but it seems a bit too complicated for what I want.) Update: Thanks, Manni, that will do. I did not know about %INC, I only knew about @INC. I settled with something like this: print join("\n", map { s|/|::|g; s|\.pm$||; $_ } keys %INC); Which prints out: Moose::Meta::TypeConstraint::Registry Moose::Meta::Role::Application::ToClass Class::C3 List::Util Imager::Color … Looks like this will work.

    Read the article

  • Crazy TableView (Or more likely me being just a jerk) ;-)

    - by Miky Mike
    Hi guy, I'm going crazy with all that objective C. I went to bed at 1.30 pm today, spending the night on my app but I love it... Well that's not the point anyway... My question is .... I have a table view which evaluates a statement when it displays its data : it goes like this : - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CustomCell"; cell = ((MainCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier]); if (cell == nil) { [[NSBundle mainBundle] loadNibNamed:@"MainCell" owner:self options:nil]; } Entry *entry = [fetchedResultsController objectAtIndexPath:indexPath]; cell.topLabel.text = [@"* " stringByAppendingString: entry.entryname]; cell.bottomLabel.text = entry.textbody; if ([entry.active boolValue] == YES) { cell.cellImageView.image = [UIImage imageNamed:@"check.png"]; } else { cell.cellImageView.image = nil; cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton; } return cell; } The problem is that the first time it displays the data, the conditions are met when I scroll down the tableview but when I scroll up, sometimes, I get my "check.png" image and the accessory as well, which is not possible normally. Am I going crazy or is it the tableview ? Could you help me with that please, I can't figure out why it doesn't work... :-(( Thanks a lot in advance. Mike

    Read the article

  • How to generate a key for a group entity?

    - by user246114
    Hi, I'm trying to make a group entity. Something like: class User { } class UserColor { } ... Key key = new KeyFactory.Builder( User.class.getSimpleName(), username). .addChild(UserColor.class.getSimpleName(), ???).getKey(); I know the unique username up-front to use for the key of the User object. But I just want app engine to generate a random unique value for the key value of the UserColor instance. I think this is described here, but I don't understand their wording: http://code.google.com/appengine/docs/java/datastore/transactions.html To create an object with a system-generated numeric ID and an entity group parent, you must use an entity group parent key field (such as customerKey, above). Assign the key of the parent to the parent key field, then leave the object's key field set to null. When the object is saved, the datastore populates the key field with the complete key, including the entity group parent. and this is their example: @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key customerKey; but I don't understand - should UserColor look like this then?: class UserColor { @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key mKeyParent; @Primary private Key mKey; // leave null } ... Key keyParent = new KeyFactory.Builder( User.class.getSimpleName(), username); UserColor uc = new UserColor(); uc.setKeyParent(keyParent); pm.makePersistent(uc); // now generated for me automatically? is that correct? Using this method, I should be able to use a User and a UserColor object in a transaction together, right? Thanks

    Read the article

  • Passing arguments to commandline with directories having spaces

    - by superstar
    Hi guys, I am making a system call from perl for ContentCheck.pl and passing parameters with directories (having spaces). So I pass them in quotes, but they are not being picked up in the ContentCheck.pl file Random.pm my $call = "$perlExe $contentcheck -t $target_path -b $base_path -o $output_path -s $size_threshold"; print "\ncall: ".$call."\n"; system($call); Contentcheck.pl use vars qw($opt_t $opt_b $opt_o $opt_n $opt_s $opt_h); # initialize getopts('t:b:o:n:s:h') or do{ print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1}; if ($opt_h) {print $UsagePage; exit; } my $tar; if ($opt_t) {$tar=$opt_t; print "\ntarget ".$tar."\n";} else { print " in target"; print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1;} my $base; if ($opt_b) {$base=$opt_b;} else { print "\nin base\n"; print "*** Error: Invalid command line option. Use option -h for help.\a\n"; exit 1;} This is the output in the commandline call: D:\tools\PacketCreationTool/bin/perl/winx64/bin/perl.exe D:/tools/PacketCr eationTool/scripts/ContentCheck.pl -t "C:/Documents and Settings/pkkonath/Deskto p/saved/myMockName.TGZ" -b "input file/myMockName.TGZ" -o myMockName.validate -s 10 target C:/Documents in base *** Error: Invalid command line option. Use option -h for help. Any suggestions are welcome! Thanks.

    Read the article

  • log4js ConsoleAppender initialization

    - by perrierism
    I'm wondering if anyone happens to have some experience using Log4js? It seems its normal ConsoleAppender isn't always ready to use immediately after it's added to a logger object... If I have two sequential script tags in a document like: //Initialize logger <script type="text/javascript"> var logger = new Log4js.getLogger("JSLOG"); logger.addAppender(new Log4js.ConsoleAppender(logger, false)); logger.setLevel(Log4js.Level.INFO); </script> //Use logger <script type="text/javascript"> logger.info('Test test'); </script> ... It causes the console pop-up (pop-up window) to appear with an error message on page load: 12:58:23 PM WARN Log4js - Could not run the listener function () { return fn.apply(object, arguments); }. TypeError: this.outputElement is null The console is still initialised, it's there afterward, but for just that first logger call it doesn't seem to be there fully. If I make the first logger call setTimeout("logger.info('test test')", 1000), it doesn't have the error. So it's like it's not ready immediately. Anyone see this before or know what a workaround might be? Cheers

    Read the article

  • DBD::CSV: Problem with file-name-extensions

    - by sid_com
    In this script I have problems with file-name-extensions: if I use /home/mm/test_x it works, with file named /home/mm/test_x.csv it doesn't: #!/usr/bin/env perl use warnings; use strict; use 5.012; use DBI; my $table_1 = '/home/mm/test_1.csv'; my $table_2 = '/home/mm/test_2.csv'; #$table_1 = '/home/mm/test_1'; #$table_2 = '/home/mm/test_2'; my $dbh = DBI->connect( "DBI:CSV:" ); $dbh->{RaiseError} = 1; $table_1 = $dbh->quote_identifier( $table_1 ); $table_2 = $dbh->quote_identifier( $table_2 ); my $sth = $dbh->prepare( "SELECT a.id, a.name, b.city FROM $table_1 AS a NATURAL JOIN $table_2 AS b" ); $sth->execute; $sth->dump_results; $dbh->disconnect; Output with file-name-extention: DBD::CSV::st execute failed: Execution ERROR: No such column '"/home/mm/test_1.csv".id' called from /usr/local/lib/perl5/site_perl/5.12.0/x86_64-linux/DBD/File.pm at 570. Output without file-name-extension: '1', 'Brown', 'Laramie' '2', 'Smith', 'Watertown' 2 rows Is this a bug?

    Read the article

  • Why do I get an error when inserting rows with Net::Cassandra::Easy and Cassandra 0.5x?

    - by knorv
    When using the Perl module Net::Cassandra::Easy to interface with Cassandra I use the following code to read colums col[123] from rows row[123] in the column-family Standard1: my $cassandra = Net::Cassandra::Easy->new(keyspace => 'Keyspace1', server => 'localhost'); $cassandra->connect(); my $result = $cassandra->get(['row1', 'row2', 'row3'], family => 'Standard1', byname => ['col1', 'col2', 'col3']); This works as expected. However, when trying to insert row row1 with .. $result = $cassandra->mutate(['row1'], family => 'Standard1', insertions => { "col1" => "Value to set." }); .. I get the error message Can't use string ("0") as a SCALAR ref while "strict refs" in use at .../Net/GenThrift/Thrift/BinaryProtocol.pm line 376. What am I doing wrong?

    Read the article

  • Problem storing a hash in DB using Storable::nfreeze in Perl

    - by Sam
    I want to insert a hash in the db using Storable::nfreeze but the data is not inserted properly. My code is as follows: %rec=(); $rec{'name'} = 'my name'; $rec{'address'} = 'my address'; my $order1 = new Order(); $order1->set_session(\%rec); $self->createOrder($order1); sub createOrder { my $self = $_[0]; my $order = $_[1]; # Retrieve the fields to insert into the database. my $st = $dbh->prepare("insert into order (session,.......) values(?,........)"); my $session = %{$order->get_session()}; $st->execute(&Storable::nfreeze(\%session),.....); $st->finish(); } sub getOrder { ... my $session = &Storable::thaw( $ref->{'session'} ); ..... } The thaw is working fine because I tested it withe some rows that have been inserted correctly, but when I try to get a row that was inserted using the createOrder subroutine, I get an error saying: Storable binary image v36.65 more recent than I am (v2.7) at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 415 The error comes from the line that have thaw. The nfreeze did not store the hash properly. Can someone point me to what I'm doing wrong in the createOrder subroutine? I know the module version have nothing to do with the problem.

    Read the article

  • Mahout - Error when try out wikipedia exmaples

    - by Li'
    Note this post is similar to Caused by: java.lang.ClassNotFoundException: classpath but different error message. When I try to run Wikipedia Bayes Example from https://cwiki.apache.org/confluence/display/MAHOUT/Wikipedia+Bayes+Example When I ran the following command : lis-macbook-pro:mahout-distribution-0.8 Li$ mahout wikipediaXMLSplitter -d examples/temp/enwiki-latest-pages-articles10.xml -o wikipedia/chunks -c 64 I got error message: MAHOUT_LOCAL is set, so we don't add HADOOP_CONF_DIR to classpath. MAHOUT_LOCAL is set, running locally SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/Users/Li/File/Java/mahout-distribution-0.8/examples/target/mahout-examples-0.8-job.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/Users/Li/File/Java/mahout-distribution-0.8/examples/target/dependency/slf4j-jcl-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.JCLLoggerFactory] Oct 21, 2013 4:25:47 PM org.slf4j.impl.JCLLoggerAdapter warn WARNING: Unable to add class: wikipediaXMLSplitter java.lang.ClassNotFoundException: wikipediaXMLSplitter at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:171) at org.apache.mahout.driver.MahoutDriver.addClass(MahoutDriver.java:236) at org.apache.mahout.driver.MahoutDriver.main(MahoutDriver.java:127) I am using Hadoop 1.2 and Mahout 0.8. mahout-distribution-0.8/bin has been added to $PATH. $MAHOUT_LOCAL is set to "True", so it runs locally. I dont know why I got "Unable to add class: wikipediaXMLSplitter"

    Read the article

  • "hour" int taken from NSDate not behaving as expected at midnight??

    - by Eric
    I feel like I've lost my mind. Can someone tell me what's going on here? Also, I'm sure there is a better way to do what I'm trying to do, but I'm not interested in that now. I'd just like to solve the mystery of why my ints are not responding to logic as expected. // Set "At: " field close to current time NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"HH"]; int hour = [[dateFormatter stringFromDate:[NSDate date]] intValue]; [dateFormatter setDateFormat:@"mm"]; int minute = [[dateFormatter stringFromDate:[NSDate date]] intValue]; NSLog(@"currently %i:%i",hour, minute); if(hour >= 12){ // convert to AM/PM selectedMeridiem = 1; if(hour != 12){ hour = hour - 12; } } else{ selectedMeridiem = 0; } selectedHour = hour - 1; if(selectedHour <= 0){ selectedHour = 11; } When I debug the above code with my clock set to 12:XX AM, the integer "hour" returned is 0. But then any if statements with the condition if(hour == 0) are not evaluated. Likewise, this would not be evaluated either: if(hour < 1). The code above puts the hour int into another int, selectedHour (don't worry about why I'm doing this for now), but selectedHour suffers from the same weird behavior; the if(selectedHour <= 0) line is never evaluated. Am I going crazy, or am I just an idiot? Maybe there's some behavior of 0 integers that I'm not aware of. All of my code runs fine as long as it's not 12:XX AM.

    Read the article

  • How do i pass arbitary date format from C# to sql backend

    - by Jims
    I have a datetime field for the transaction date in the back end. So I am passing that date from front C#.net, in the below format: 2011-01-01 12:17:51.967 to do this I have written: presentation layer: string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); PropertyClass prp=new PropertyClass(); Prp.TransDate=Convert.ToDateTime(date); PropertyClass structure: Public class property { private DateTime transdate; public DateTime TransDate { get { return transdate; } set { transdate = value; } } } From DAL layer passing the TransactionDate like this: Cmd.Parameters.AddWithValue("@TranSactionDate”, SqlDbType.DateTime).value=propertyobj.TransDate; While debugging from presntation layer: string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture); in this I am getting correct expected date format, but when debugs goes to this line Prp.TransDate=Convert.ToDateTime(date); again date format changing to 1/1/2011. But my backend sql datefield wants the date paramter 2011-01-01 12:17:51.967 in this format otherwise throwing exception invalid date format. Note: While passing date as string without converting to datetime getting exceptions like: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value) at System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value) at System.Data.SqlTypes.SqlDateTime..ctor(DateTime value) at System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb) at System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Byte scale, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc)

    Read the article

  • Where do I put jar files in Tomcat 6?

    - by Simon
    I am having trouble getting my JSP page to load a Java class which is in a jar file. The message I get appears to indicate a class not found exception: Jan 6, 2011 12:21:45 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 72 in the jsp file: /xmlloader.jsp FactArray cannot be resolved to a type 69: sourceType = "1"; 70: } 71: 72: FactArray fa = new FactArray(); 73: Fact f; 74: 75: /***********************/ The Type FactArray is one of my classes in a package com.mypackage.fact.FactArray which exists in myjar.jar. myjar.jar is a separate Java project (using NetBeans, but I don't think that's relevant). I include the package in my JSP as follows: <%@ page import="com.mypackage.fact.*" %> I deploy my web site and JSPs into Tomcat 6 as a WAR file. I include myjar.jar in that WAR in WEB-INF/lib but that doesn't work. I tried putting myjar.jar in my tomcat/lib folder, but that doesn't work either. I have bounced the server several times between changes. I have read a whole bunch of questions on here which say "put it in WEB-INF/lib" but that isn't working, so I'm asking my own question. Where do I need to put common JAR files so they get picked up by Tomcat?

    Read the article

  • Perl Module from relative path not working in IIS6

    - by Laramie
    Disclaimer: I am not a PERL developer and am learning by the seat of my pants. I am using a Perl module called from a CGI scipt in IIS 6 that is bombing. The identical folder structure on an XP machine (IIS 5.1) works fantastic. If I remove the module loading command at line 9, it will print "about to load" and "ok", but When I try to run use Language::Guess; I receive The specified CGI application misbehaved by not returning a complete set of HTTP headers. in the browser. The folder structure is /cgi-bin/test.pl /PerlModules/Language/Guess.pm I have tried adjusting the file/folder permissions and have reviewed my IIS configuration time and again. It runs fine from the command line on the IIS machine or if I copy the module into \Perl\site\lib, but I don't have permission to load modules on the shared server this script is destined for. Am I missing something simple? Here is test.pl use strict; use CGI ':standard'; print header("text/html"); use lib "..\\PerlModules\\"; print "about to load<br/>"; #bombs here use Language::Guess; print "ok"

    Read the article

  • problem storing a hash in DB using Storage::nfreeze Perl

    - by Sam
    Hello, I want to insert a hash in the db using Storage::nfreeze but the data is not inserted properly. the code is as follow: %rec=(); $rec{'name'} = 'my name'; $rec{'address'} = 'my address'; my $order1 = new Order(); $order1->set_session(\%rec); $self->createOrder($order1); sub createOrder { my $self = $_[0]; my $order = $_[1]; # Retrieve the fields to insert into the database. my $st = $dbh->prepare("insert into order (session,.......) values(?,........)"); my $session = %{$order->get_session()}; $st->execute(&Storable::nfreeze(\%session),.....); $st->finish(); } sub getOrder { ... my $session = &Storable::thaw( $ref->{'session'} ); ..... } the thaw is working fine because I tested it withe some rows that have been inserted correctly. but when I try to get a row that was inserted using the createOrder subroutine, I get an error saying" Storable binary image v36.65 more recent than I am (v2.7) at blib/lib/Storable.pm (autosplit into blib/lib/auto/Storable/thaw.al) line 415 the error comes from the line that have thaw. the nfreeze did not store the hash properly. Can someone point me to what i m doing wrong in the createOrder subroutine? Thanks in advance. I know the module version have nothing to do with the problem.

    Read the article

  • Characters in usernames that cause trouble

    - by acidzombie24
    I am testing out security and reliability issues on my site. I have made \n and \r illegal. I created a user with null in the name which caused my PM system to not message the user. However \b worked and \t didnt allow copy/paste to work correctly. The browser (firefox which i am testing with) copied the tab as a single space causing the name not to be the same thus not recognizing the username. Since i cant copy paste easily i'll probably disallow it. \f works as well although i do see a symbol in the title but nowhere else because of the \f. What else should i try? It appears 0-31 127-159 (i dont understand this range) are illegal. What characters in legal range might i want to disallow? I heard there was a 0 width character space. That may be something i want to disallow? What else is there?

    Read the article

  • Why "Not an ARRAY reference" error?

    - by Sandra Schlichting
    I have this script #!/usr/bin/perl use strict; use warnings; use yy; my $data = [ ["aax", "ert", "ddd"], ["asx", "eer", "kkk"], ["xkk", "fff", "lll"], ["xxj", "vtt", "lle"], ]; use Test::More tests => 4; is(yy::type1_to_type2(\$data, 'aax'), 'ert'); is(yy::type1_to_type3(\$data, 'asx'), 'kkk'); is(yy::type2_to_type3(\$data, 'fff'), 'lll'); is(yy::type3_to_type1(\$data, 'lle'), 'xxj'); which uses this module package yy; sub typeX_to_typeY { my ($x, $y, $data, $str) = @_; foreach (@$data) { if ($_->[$x - 1] eq $str) { return $_->[$y - 1]; } } return; } sub type1_to_type2 { typeX_to_typeY(1, 2, @_) } sub type1_to_type3 { typeX_to_typeY(1, 3, @_) } sub type2_to_type1 { typeX_to_typeY(2, 1, @_) } sub type2_to_type3 { typeX_to_typeY(2, 3, @_) } sub type3_to_type1 { typeX_to_typeY(3, 1, @_) } sub type3_to_type2 { typeX_to_typeY(3, 2, @_) } 1; and gives this error Not an ARRAY reference at yy.pm line 6. # Looks like your test died before it could output anything. The line it complains about is foreach (@$data) { Isn't this the way to pass an array reference? What am I doing wrong?

    Read the article

  • How can I prevent/make it hard to download my flash video?

    - by Billy
    I want to at least prevent normal users to download my flash video. What's the best way to do it? Create a httphandler, add a token (e.g. timeid), set the cache control to no-cache so that only the users with correct token can view the correct video. Is that feasible? It is the requirement from client that the video should not be downloaded by users and should be watched only in the particular website. I want to know if this works: http://www.somesite.com/video.swf?time=1248319067 Server will generate a token(time in the above example) so that user can only have one request to this link. If the user wants to watch the video again, he needs to go to our website to get the token again. Is this okay to prevent novices from downloading? I can't download this flash video by the downloadHelper firefox plugin: http://news.bbc.co.uk/2/hi/americas/8164177.stm Updated (13:49 pm 2009/07/23): The above file can be downloaded using some video download software. The video files of following Chinese sites are well protected (I can't download it using many video download software): http://programme.tvb.com/drama/abrideforaride/video/ Do you know how it is done?

    Read the article

  • parsing xml using dom4j

    - by D3GAN
    My XML structure is like this: <rss> <channel> <yweather:location city="Paris" region="" country="France"/> <yweather:units temperature="C" distance="km" pressure="mb" speed="km/h"/> <yweather:wind chill="-1" direction="40" speed="11.27"/> <yweather:atmosphere humidity="87" visibility="9.99" pressure="1015.92" rising="0"/> <yweather:astronomy sunrise="8:30 am" sunset="4:54 pm"/> </channel> </rss> when I tried to parse it using dom4j SAXReader xmlReader = createXmlReader(); Document doc = null; doc = xmlReader.read( inputStream );//inputStream is input of function log.info(doc.valueOf("/rss/channel/yweather:location/@city")); private SAXReader createXmlReader() { Map<String,String> uris = new HashMap<String,String>(); uris.put( "yweather", "http://xml.weather.yahoo.com/ns/rss/1.0" ); uris.put( "geo", "http://www.w3.org/2003/01/geo/wgs84_pos#" ); DocumentFactory factory = new DocumentFactory(); factory.setXPathNamespaceURIs( uris ); SAXReader xmlReader = new SAXReader(); xmlReader.setDocumentFactory( factory ); return xmlReader; } But I got nothing in cmd but when I print doc.asXML(), my XML structure print correctly!

    Read the article

  • Is this a bug in plist or Xcode?

    - by Pedro
    G'day All If you create a date item in the plist editor of Xcode or Apple's standalone plist editor you get something of the form <date>2010-05-29T10:30:00Z</date> which is a nice well formed ISO date at UTC (indicated by the "Z"). Because I'm in timezone UTC +10 when that's read into my app & then displayed I get 8:30 PM out, still good. However if that is a time in my timezone it should be <date>2010-05-29T10:30:00+10</date> (replacing "Z" with my timezone offset). All of my attempts at reading such dates into my iPhone app have had the plist rejected as if it is malformed & editing a plist with such a date in Apple's editors changed the "+10" to "Z" without adjusting the time. Do others think I'm correct in thinking this is a bug in either plist or Xcode? My feeling is that the implementation of ISO date & time in plist is incomplete. Cheers, Pedro :)

    Read the article

  • java.lang.ExceptionInInitializerError Exception when creating Application Context in Spring

    - by cyotee
    I am practicing with Spring, and am getting a java.lang.ExceptionInInitializerError exception when I try to instantiate the context. The Exception appears below, with my code following it. I have simplified my experiment from before. The Exception Oct 17, 2012 5:54:22 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@570c16b7: startup date [Wed Oct 17 17:54:22 CDT 2012]; root of context hierarchy Exception in thread "main" java.lang.ExceptionInInitializerError at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:195) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:128) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:535) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:449) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) at helloworld.HelloWorldTest.main(HelloWorldTest.java:13) Caused by: java.lang.NullPointerException at org.springframework.beans.factory.support.DefaultListableBeanFactory.<clinit>(DefaultListableBeanFactory.java:105) ... 7 more My configuration XML <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://www.springframework.org/schema/c" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> <bean id="messageContainer" class="helloworld.MessageContainer"> <property name="message" value="Hello World"> </property> </bean> <bean id="messageOutputService" class="helloworld.MessageOutputService"> </bean> My test class. package helloworld; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class HelloWorldTest { /** * @param args */ public static void main(String[] args) { ApplicationContext context = new ClassPathXmlApplicationContext("HelloWorldTest-context.xml"); MessageContainer message = context.getBean(MessageContainer.class); MessageOutputService service = context.getBean(MessageOutputService.class); service.outputMessageToConsole(message); } }

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >