Search Results

Search found 3838 results on 154 pages for 'throws'.

Page 1/154 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Eclipse juno - ubuntu 12 > can't install RadRails throws error for a gem i have installed allready

    - by Bogdan M
    The thing is I installed ubbuntu 12, java(for eclipse), eclipse, ruby, ruby gems, rails. Everything went smooth. When i tried to prepare eclipse for ruby on rails i isntaled ruby dev kit plugin. This workd, but RadRails failed with this error: Cannot complete the install because one or more required items could not be found. Software currently installed: org.radrails.rails-feature 0.7.2 (org.radrails.rails_feature.feature.group 0.7.2) Missing requirement: Rails Core Plug-in 0.7.2 (org.radrails.rails.core 0.7.2) requires 'bundle org.eclipse.update.core 0.0.0' but it could not be found Cannot satisfy dependency: From: org.radrails.rails-feature 0.7.2 (org.radrails.rails_feature.feature.group 0.7.2) To: org.radrails.rails.core [0.7.2]

    Read the article

  • ASP.NET MVC 2 throws exception for ‘favicon.ico’

    - by nmarun
    I must be on fire or something – third blog in 2 days… awesome! Before I begin, in case you’re wondering, favicon.ico is the small image that appears to the left of your web address, once the page loads. In order to learn more about MVC or any thing for that matter, it’s better to look at the source itself. Since MVC is open source (at least some part of it is), I started looking at the source code that’s available for download. While doing so, I hit Steve Sanderson’s blog site where he explains in great detail the way to debug your app using ASP.NET MVC source code. For those who are not aware, Steve Sanderson’s book - Pro ASP.NET MVC Framework, is one of the best books to learn about MVC. Alrighty, I followed the article and I hit F5 to debug the default / unchanged MVC project. I put a breakpoint in the DefaultControllerFactory.cs, CreateController() method. To know a little more about this class and the method, read this. Sure enough, the control stopped at the breakpoint and I hit F5 again and the page rendered just fine. But then what’s this? The breakpoint was hit again, as if something else was being requested. I now hovered my mouse over the ‘controllerName’ parameter and it says – favicon.ico. This by itself was more than enough for me to raise my eye-brows, but what happened next just took the ground below my feet. Oh, oh, I’m sorry I’m just typing, no code, no image, so here are a couple of screen captures. The first one shows the request for the Home controller; I get ‘Home’ when I hover over the parameter: And here’s the one that shows the same for call for ‘favicon.ico’. So, I step through the code and when the control reaches line 91 – GetControllerInstance() method, I step in. This is when I had the ‘ground-losing’ experience. Wow, an exception is being thrown for this file and that too in RTM. For some reason MVC thinks, this as a controller and tries to run it through the MvcHandler and it hits this snag. So it seems like this will happen for any MVC 2 site and this did not happen for me in the previous version of MVC. Before I get to how to resolve it, here’s another way of reproducing this exception. Revert back all your changes that you did as mentioned in Steve’s blog above. Now, add a class to your MVC project and call it say, MyControllerFactory and let this inherit from DefaultControllerFactory class. (Read this for details on the DefaultControllerFactory class is and how it is used in a different context). Add an override for the CreateController() method and for the sake of this blog, just copy the same content from the DefaultControllerFactory class. The last step is to tell your MVC app to use the MyControllerFactory class instead of the default one. To do this, go to your Global.asax.cs file and add line 6 of the snippet below: 1: protected void Application_Start() 2: { 3: AreaRegistration.RegisterAllAreas(); 4:   5: RegisterRoutes(RouteTable.Routes); 6: ControllerBuilder.Current.SetControllerFactory(new MyControllerFactory()); 7: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Now, you’re ready to reproduce the issue. Just F5 the project and when you hit the overridden CreateController() method for the second time, this is what it looks like for me: And continuing further gives me the same exception. I believe this is something that MS should fix, as not having ‘favicon.ico’ file will be common for most of the applications. So I think the when you create an MVC project, line 6 should be added by default by Visual Studio itself: 1: public class MvcApplication : System.Web.HttpApplication 2: { 3: public static void RegisterRoutes(RouteCollection routes) 4: { 5: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 6: routes.IgnoreRoute("favicon.ico"); 7:   8: routes.MapRoute( 9: "Default", // Route name 10: "{controller}/{action}/{id}", // URL with parameters 11: new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults 12: ); 13: } .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } There it is, that’s the solution to avoid the exception altogether. I tried this both IE8 and Firefox browsers and was able to successfully reproduce the error. Hope someone will look at this issue and find a fix. Just before I finish up, I found another ‘bug’, if you want to call it, with Visual Studio 2008. Remember how you could change what browser you want your application to run in by just right clicking on the .aspx file and choosing ‘Browse with…’? Seems like that’s missing when you’re working with an MVC project. In order to test the above bug in the other browser, I had to load a classic ASP.NET project, change the settings and then run my MVC project. Felt kinda ‘icky’, for lack of a better word.

    Read the article

  • Oracle 64-bit assembly throws BadImageFormatException when running unit tests

    - by pjohnson
    We recently upgraded to the 64-bit Oracle client. Since then, Visual Studio 2010 unit tests that hit the database (I know, unit tests shouldn't hit the database--they're not perfect) all fail with this error message:Test method MyProject.Test.SomeTest threw exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Could not load file or assembly 'Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. An attempt was made to load a program with an incorrect format.I resolved this by changing the test settings to run tests in 64-bit. From the Test menu, go to Edit Test Settings, and pick your settings file. Go to Hosts, and change the "Run tests in 32 bit or 64 bit process" dropdown to "Run tests in 64 bit process on 64 bit machine". Now your tests should run.This fix makes me a little nervous. Visual Studio 2010 and earlier seem to change that file for no apparent reason, add more settings files, etc. If you're not paying attention, you could have TestSettings1.testsettings through TestSettings99.testsettings sitting there and never notice the difference. So it's worth making a note of how to change it in case you have to redo it, and being vigilant about files VS tries to add.I'm not entirely clear on why this was even a problem. Isn't that the point of an MSIL assembly, that it's not specific to the hardware it runs on? An IL disassembler can open the Oracle.DataAccess.dll in question, and in its Runtime property, I see the value "v4.0.30319 / x64". So I guess the assembly was specifically build to target 64-bit platforms only, possibly due to a 64-bit-specific difference in the external Oracle client upon which it depends. Most other assemblies, especially in the .NET Framework, list "msil", and a couple list "x86". So I guess this is another entry in the long list of ways Oracle refuses to play nice with Windows and .NET.If this doesn't solve your problem, you can read others' research into this error, and where to change the same test setting in Visual Studio 2012.

    Read the article

  • Bash script throws, "syntax error near unexpected token `}'" when ran

    - by Tab00
    I am trying to write a script to monitor some battery statuses on a laptop running as a server. To accomplish this, I have already started to write this code: #! /bin/bash # A script to monitor battery statuses and send out email notifications #take care of looping the script for (( ; ; )) do #First, we check to see if the battery is present... if(cat /proc/acpi/battery/BAT0/state | grep 'present: *' == present: yes) { #Code to execute if battery IS present #No script needed for our application #you may add scripts to run } else { #if the battery IS NOT present, run this code sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is either missing, or removed. Please check ASAP." -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #Second, we check into the current state of the battery if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: charging') { #Code to execute if battery is charging sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is charging. This MIGHT mean that something just happened" -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #If it isn't charging, is it discharging? else if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: discharging') { #Code to run if the battery is discharging sendemail -f [email protected] -t 214*******@txt.att.net -u NTA TV Alert -m "The battery from the computer is discharging. This shouldn't be happening. Please check ASAP." -s smtp.gmail.com -o tls=yes -xu [email protected] -xp *********** } #If it isn't charging or discharging, is it charged? else if(cat /proc/acpi/battery/BAT0/state | grep 'charging state: *' == 'charging state: charged') { #Code to run if battery is charged } done I'm pretty sure that most of the other stuff works correctly, but I haven't been able to try it because it will not run. whenever I try and run the script, this is the error that I get: ./BatMon.sh: line 15: syntax error near unexpected token `}' ./BatMon.sh: ` }' is the error something super simple like a forgotten semicolon? Thanks -Tab00

    Read the article

  • Eclipse juno: Can't install RadRails throws error for a gem I have installed already

    - by Bogdan M
    The thing is I installed Ubuntu 12.04, Java (for Eclipse), Eclipse, ruby, ruby gems, rails. Everything went smooth. When I tried to prepare Eclipse for ruby on rails, I installed ruby dev kit plugin. This worked, but RadRails failed with this error: Cannot complete the install because one or more required items could not be found. Software currently installed: org.radrails.rails-feature 0.7.2 (org.radrails.rails_feature.feature.group 0.7.2) Missing requirement: Rails Core Plug-in 0.7.2 (org.radrails.rails.core 0.7.2) requires 'bundle org.eclipse.update.core 0.0.0' but it could not be found Cannot satisfy dependency: From: org.radrails.rails-feature 0.7.2 (org.radrails.rails_feature.feature.group 0.7.2) To: org.radrails.rails.core [0.7.2]

    Read the article

  • MiniMax function throws null pointer exception

    - by Sven
    I'm working on a school project, I have to build a tic tac toe game with the AI based on the MiniMax algorithm. The two player mode works like it should. I followed the code example on http://ethangunderson.com/blog/minimax-algorithm-in-c/. The only thing is that I get a NullPointer Exception when I run the code. And I can't wrap my finger around it. I placed a comment in the code where the exception is thrown. The recursive call is returning a null pointer, what is very strange because it can't.. When I place a breakpoint on the null return with the help of a if statement, then I see that there ARE still 2 to 3 empty places.. I probably overlooking something. Hope someone can tell me what I'm doing wrong. Here is the MiniMax code (the tic tac toe code is not important): /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package MiniMax; import Game.Block; import Game.Board; import java.util.ArrayList; public class MiniMax { public static Place getBestMove(Board gameBoard, Block.TYPE player) { Place bestPlace = null; ArrayList<Place> emptyPlaces = gameBoard.getEmptyPlaces(); Board newBoard; //loop trough all the empty places for(Place emptyPlace : emptyPlaces) { newBoard = gameBoard.clone(); newBoard.setBlock(emptyPlace.getRow(), emptyPlace.getCell(), player); //no game won and still room to move if(newBoard.getWinner() == Block.TYPE.NONE && newBoard.getEmptyPlaces().size() > 0) { //is an node (has children) Place tempPlace = getBestMove(newBoard, invertPlayer(player)); //ERROR is thrown here! tempPlace is null. emptyPlace.setScore(tempPlace.getScore()); } else { //is an leaf if(newBoard.getWinner() == Block.TYPE.NONE) { emptyPlace.setScore(0); } else if(newBoard.getWinner() == Block.TYPE.X) { emptyPlace.setScore(-1); } else if(newBoard.getWinner() == Block.TYPE.O) { emptyPlace.setScore(1); } //if this move is better then our prev move, take it! if((bestPlace == null) || (player == Block.TYPE.X && emptyPlace.getScore() < bestPlace.getScore()) || (player == Block.TYPE.O && emptyPlace.getScore() > bestPlace.getScore())) { bestPlace = emptyPlace; } } } //This should never be null, but it does.. return bestPlace; } private static Block.TYPE invertPlayer(Block.TYPE player) { if(player == Block.TYPE.X) { return Block.TYPE.O; } return Block.TYPE.X; } }

    Read the article

  • Unity throws SynchronizationLockException while debugging

    - by pjohnson
    I've found Unity to be a great resource for writing unit-testable code, and tests targeting it. Sadly, not all those unit tests work perfectly the first time (TDD notwithstanding), and sometimes it's not even immediately apparent why they're failing. So I use Visual Studio's debugger. I then see SynchronizationLockExceptions thrown by Unity calls, when I never did while running the code without debugging. I hit F5 to continue past these distractions, the line that had the exception appears to have completed normally, and I continue on to what I was trying to debug in the first place.In settings where Unity isn't used extensively, this is just one amongst a handful of annoyances in a tool (Visual Studio) that overall makes my work life much, much easier and more enjoyable. But in larger projects, it can be maddening. Finally it bugged me enough where it was worth researching it.Amongst the first and most helpful Google results was, of course, at Stack Overflow. The first couple answers were extensive but seemed a bit more involved than I could pull off at this stage in the product's lifecycle. A bit more digging showed that the Microsoft team knows about this bug but hasn't prioritized it into any released build yet. SO users jaster and alex-g proposed workarounds that relieved my pain--just go to Debug|Exceptions..., find the SynchronizationLockException, and uncheck it. As others warned, this will skip over SynchronizationLockExceptions in your code that you want to catch, but that wasn't a concern for me in this case. Thanks, guys; I've used that dialog before, but it's been so long I'd forgotten about it.Now if I could just do the same for Microsoft.CSharp.RuntimeBinder.RuntimeBinderException... Until then, F5 it is.

    Read the article

  • Keep trying to install always throws error help!

    - by Hector Soto
    So I was installing 12.10 on my Asus g74sx laptop... Did everything the tutorial told me to do yet I keep getting an error saying that there was an error of input/output.. That I should check the hard drive and see if it needs replacement. I tried with 2 DVDs and did format twice my usb to fat 32 and mounted the image file for 12.10... No idea what is going on. Please help! Mmm I cannot add an image... I'll comment with the link to the error!

    Read the article

  • NUnit: Assert.Throws

    - by epitka
    How do I use Assert.Throws to assert type of the exception and the actual message workding. Something like this: Assert.Throws<Exception>( ()=>user.MakeUserActive()).WithMessage("Actual exception message") Method I am testing throws multiple messages of the same type, with different message and I need a way to test that correct message is thrown depending on the context.

    Read the article

  • ASPX throws "404 The resource cannot be found"

    - by Diegoeche
    I'm deploying a website under a virtual directory using IIS. For some strange reason, Default.html works, but Default.aspx throws a 404. I have tried these: There's another virtual directory that contains an older version of the application and that one just works. I checked the properties of each virtual directory and they looked the same. I checked that the root didn't had any extra backslashes

    Read the article

  • ScriptResource.axd throws 404 server error

    - by Gayathiri
    Hi, Iam running the application locally, performing the WebTest(UI)..I record the test, and stop recording, the test is running in the visual studio, It thorws error telling "ScriptResource.axd throws 404 server error" Excetly the error was Server '/' application not found.The scriptResource.axd not found. Can anybody help me in resolving this problem. Regards, Gayathiri Venkatraman.

    Read the article

  • Windows 8 - When AC Power is disconnected, atibtmon.exe throws a Runtime error

    - by Junior Mayhé
    The installer is not working for my ATI mobility Radeon HD 3670 on Dell XPS Studio 16 using Windows 8 PRO 64 bits. Here are the screenshots of my ATI Radeon configuration: Hardware configuration Software configuration And here is the problem on Windows 8: everytime I disconnect the AC power cord, atibtmon.exe throws a runtime error as follows What could I do to avoid this error? I have installed the legacy driver http://support.amd.com/us/kbarticles/Pages/catalystlegacywin8.aspx but this installer fails (when trying to install the driver).

    Read the article

  • phpmyadmin throws a blank page after installing Zend CE server

    - by infotoknowledge
    I installed LAMP on Ubuntu 12.0.4 LTE. Then I installed phpmyadmin. Everything was good. I used phpadmin to do lots of DB administration.... Then I installed Zend CE server. Now, phpmyadmin throws a blank page. No login screen. So, I reinstalled my VPS in the same sequence again. No luck. Same behavior. This time, I installed Apache, Mysql, PHP and Zend server in that order. Then I installed phpmyadmin....Unfortunately, still blank page on phpmyadmin. Any help?...Thanks in advance.

    Read the article

  • Java JPA Hibernate Spring @EntityListeners throws org.springframework.dao.DataIntegrityViolationException

    - by user
    I am using Spring 3 with Hibernate 3. I would like to update the last modification date automatically when an entity is updated. Below is the sample code: HibernateConfig: @Configuration public class HibernateConfig { @Bean public DataSource dataSource() throws Exception { DriverManagerDataSource dataSource = new DriverManagerDataSource(); Properties properties = new Properties(); properties.load(ClassLoader.getSystemResourceAsStream(new String("hibernate.properties"))); dataSource.setUrl(properties.getProperty(new String("jdbc.url"))); dataSource.setUsername(properties.getProperty(new String("jdbc.username"))); dataSource.setPassword(properties.getProperty(new String("jdbc.password"))); dataSource.setDriverClassName(properties.getProperty(new String("jdbc.driverClassName"))); return dataSource; } @Bean public AnnotationSessionFactoryBean sessionFactory() throws Exception { AnnotationSessionFactoryBean sessionFactory = new AnnotationSessionFactoryBean(); Properties hibernateProperties = new Properties(); Properties properties = new Properties(); properties.load(ClassLoader.getSystemResourceAsStream(new String("hibernate.properties"))); // set the Hibernate Properties hibernateProperties.setProperty(new String("hibernate.dialect"), properties.getProperty(new String("hibernate.dialect"))); hibernateProperties.setProperty(new String("hibernate.show_sql"), properties.getProperty(new String("hibernate.show_sql"))); hibernateProperties.setProperty(new String("hibernate.hbm2ddl.auto"), properties.getProperty(new String("hibernate.hbm2ddl.auto"))); sessionFactory.setDataSource(dataSource()); sessionFactory.setHibernateProperties(hibernateProperties); sessionFactory.setAnnotatedClasses(new Class[]{Message.class}) return sessionFactory; } @Bean public HibernateTemplate hibernateTemplate() throws Exception { HibernateTemplate hibernateTemplate = new HibernateTemplate(); hibernateTemplate.setSessionFactory(sessionFactory().getObject()); return hibernateTemplate; } } DAOConfig: @Configuration public class DAOConfig { @Autowired private HibernateConfig hibernateConfig; @Bean public MessageDAO messageDAO() throws Exception { MessageDAO messageDAO = new MessageHibernateDAO(hibernateConfig.hibernateTemplate()); return messageDAO; } } Message: import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity @Table @EntityListeners(value = MessageListener.class) public class Message implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column private int id; @Column(nullable = false) @Temporal(TemporalType.TIMESTAMP) private Date lastMod; public Message() { } public int getId() { return id; } public void setId(int id) { this.id = id; } public Date getLastMod() { return lastMod; } public void setLastMod(Date lastMod) { this.lastMod = lastMod; } } MessageListener: import java.util.Date; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import org.springframework.stereotype.Component; @Component public class MessageListener { @PrePersist @PreUpdate public void setLastMod(Message message) { message.setLastMod(new Date()); } } When running this the MessageListener is not being invoked. I use a DAO design pattern and when calling dao.update(Message) it throws the following Exception: org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value: com.persistence.entities.MessageStatus.lastMod; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value: com.persistence.entities.Message.lastMod at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:665) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.save(HibernateTemplate.java:683) at com.persistence.dao.hibernate.GenericHibernateDAO.save(GenericHibernateDAO.java:38) Having looked at a number of websites there seems not to be a solution.

    Read the article

  • Hudson Mercurial checkout throws exception on Debian

    - by Jack
    I'm trying to configure Hudson to checkout my site's sources from Mercurial but it throws an exception. The /var/lib/hudson/jobs/jobname directory does exist, and I can create a workspace directory in there (even after su hudson), but as soon as I run the Hudson job again this directory disappears and the job ends with the same error: java.io.IOException: Cannot run program "hg" (in directory "/var/lib/hudson/jobs/jobname/workspace"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at hudson.Proc$LocalProc.<init>(Proc.java:192) at hudson.Proc$LocalProc.<init>(Proc.java:164) at hudson.Launcher$LocalLauncher.launch(Launcher.java:639) at hudson.Launcher$ProcStarter.start(Launcher.java:274) at hudson.Launcher$ProcStarter.join(Launcher.java:281) at hudson.plugins.mercurial.MercurialSCM.joinWithPossibleTimeout(MercurialSCM.java:298) at hudson.plugins.mercurial.HgExe.popen(HgExe.java:191) at hudson.plugins.mercurial.HgExe.tip(HgExe.java:171) at hudson.plugins.mercurial.MercurialSCM.calcRevisionsFromBuild(MercurialSCM.java:254) at hudson.scm.SCM._calcRevisionsFromBuild(SCM.java:304) at hudson.model.AbstractProject.calcPollingBaseline(AbstractProject.java:1183) at hudson.model.AbstractProject.checkout(AbstractProject.java:1172) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:499) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:415) at hudson.model.Run.run(Run.java:1362) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:145) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) Running on Debian 6.0.1 I wonder if anyone has ran into this before, and hopefully solved it?

    Read the article

  • IPv6 working fine, IPv4 throws OpenSSL error

    - by jippie
    I am building a webserver ( http://blog.linformatronics.nl/ ), which functions just fine on both IPv4 and IPv6 and when using a non-SSL connection. However when I connect to it through https, IPv6 works as expected, but an IPv4 connection throws a client side error. Server side logs are empty for the IPv4/https connection. Summarized in a table: | http | https -----+-------+------------------------------------------------------- IPv4 | works | OpenSSL error, failed. No server side logging. -----+-------+------------------------------------------------------- IPv6 | works | self signed certificate warning, but works as expected Apparently the SSL tunnel isn't even set up, which accounts for the Apache logs being empty. But why does it work fine for IPv6 and fail for IPv4? My question is why is this OpenSSL error being thrown and how can I solve it? Below is some extra information about the setup. IPv6 https Command used to reproduce IPv6/https behaviour: $ wget --no-check-certificate -O /dev/null -6 https://blog.linformatronics.nl --2012-11-03 15:46:48-- https://blog.linformatronics.nl/ Resolving blog.linformatronics.nl (blog.linformatronics.nl)... 2001:980:1b7f:1:a00:27ff:fea6:a2e7 Connecting to blog.linformatronics.nl (blog.linformatronics.nl)|2001:980:1b7f:1:a00:27ff:fea6:a2e7|:443... connected. WARNING: cannot verify blog.linformatronics.nl's certificate, issued by `/CN=localhost': Self-signed certificate encountered. WARNING: certificate common name `localhost' doesn't match requested host name `blog.linformatronics.nl'. HTTP request sent, awaiting response... 200 OK Length: 4556 (4.4K) [text/html] Saving to: `/dev/null' 100%[=======================================================================>] 4,556 --.-K/s in 0s 2012-11-03 15:46:49 (62.5 MB/s) - `/dev/null' saved [4556/4556] IPv4 https Command used to reproduce IPv6/https behaviour: $ wget --no-check-certificate -O /dev/null -4 https://blog.linformatronics.nl --2012-11-03 15:47:28-- https://blog.linformatronics.nl/ Resolving blog.linformatronics.nl (blog.linformatronics.nl)... 82.95.251.247 Connecting to blog.linformatronics.nl (blog.linformatronics.nl)|82.95.251.247|:443... connected. OpenSSL: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol Unable to establish SSL connection. Notes I am on Ubuntu Server 12.04.1 LTS

    Read the article

  • When would you prefer to declare an exception rather than handling it in Java?

    - by Epitaph
    I know we can declare the exception for our method if we want it to be handled by the calling method. This will even allow us to do stuff like write to the OutputStream without wrapping the code in try/catch block if the enclosing method throws IOException. My question is: Can anyone provide an instance where this is usually done where you'd like the super class to handle the exception instead of the current method?

    Read the article

  • Perl equivalent to Java's "throws" clausule.

    - by Konerak
    Is there a way in Perl to declare that a method can throw an error (or die)? I always loved how in Java, a method could handle an Exception and/or throw it. The method signature allows to put "throws MyException", so a good IDE/compiler would know that if you use said method somewhere in your code, you'd have to check for the Exception or declare your function to "throws" the Exception further. I'm unable to find something alike in Perl. A collegue of mine wrote a method which "dies" on incorrect input, but I forget to eval-if($@) it... offcourse the error was only discovered while a user was running the application. (offcourse I doubt if there is any existing IDE that could find these kind of things for Perl, but atleast perl -cw should be able to, no?)

    Read the article

  • Perl equivalent to Java's "throws" clause

    - by Konerak
    Is there a way in Perl to declare that a method can throw an error (or die)? EDIT: What interests me the most is a way to get the compiler or IDE to tell me I have an unchecked exception somewhere in my code. I always loved how in Java, a method could handle an Exception and/or throw it. The method signature allows to put "throws MyException", so a good IDE/compiler would know that if you use said method somewhere in your code, you'd have to check for the Exception or declare your function to "throws" the Exception further. I'm unable to find something alike in Perl. A collegue of mine wrote a method which "dies" on incorrect input, but I forget to eval-if($@) it... offcourse the error was only discovered while a user was running the application. (offcourse I doubt if there is any existing IDE that could find these kind of things for Perl, but atleast perl -cw should be able to, no?)

    Read the article

  • nUnit Assert.That(method,Throws.Exception) not catching exceptions

    - by JasonM
    Hi Everyone, Can someone tell me why this unit test that checks for exceptions fails? Obviously my real test is checking other code but I'm using Int32.Parse to show the issue. [Test] public void MyTest() { Assert.That(Int32.Parse("abc"), Throws.Exception.TypeOf<FormatException>()); } The test fails, giving this error. Obviously I'm trying to test for this exception and I think I'm missing something in my syntax. Error 1 TestCase '.MyTest' failed: System.FormatException : Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s) based on the documentation at Throws Constraint (NUnit 2.5)

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >