Search Results

Search found 1218 results on 49 pages for 'env'.

Page 6/49 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Writing a mini-language with haskell, trouble with "while" statements and blocks { }

    - by Nibirue
    EDIT: problem partially solved, skip to the bottom for update. I'm writing a small language using haskell, and I've made a lot of progress, but I am having trouble implementing statements that use blocks, like "{ ... }". I've implemented support for If statements like so in my parser file: stmt = skip +++ ifstmt +++ assignment +++ whilestmt ifstmt = symbol "if" >> parens expr >>= \c -> stmt >>= \t -> symbol "else" >> stmt >>= \e -> return $ If c t e whilestmt = symbol "while" >> parens expr >>= \c -> symbol "\n" >> symbol "{" >> stmt >>= \t -> symbol "}" >> return $ While c t expr = composite +++ atomic And in the Syntax file: class PP a where pp :: Int -> a -> String instance PP Stmt where pp ind (If c t e) = indent ind ++ "if (" ++ show c ++ ") \n" ++ pp (ind + 2) t ++ indent ind ++ "else\n" ++ pp (ind + 2) e pp ind (While c t) = indent ind ++ "while (" ++ show c ++") \n" ++ "{" ++ pp (ind + 2) t ++ "}" ++ indent ind Something is wrong with the while statement, and I don't understand what. The logic seems correct, but when I run the code I get the following error: EDIT: Fixed the first problem based on the first reply, now it is not recognizing my while statment which I assume comes from this: exec :: Env -> Stmt -> Env exec env (If c t e) = exec env ( if eval env c == BoolLit True then t else e ) exec env (While c t) = exec env ( if eval env c == BoolLit True then t ) The file being read from looks like this: x = 1; c = 0; if (x < 2) c = c + 1; else ; -- SEPARATE FILES FOR EACH x = 1; c = 1; while (x < 10) { c = c * x; x = x + 1; } c I've tried to understand the error report but nothing I've tried solves the problem.

    Read the article

  • access parametrically values of variables inside environments

    - by Apostolos
    Let's say we have one or more environments and variables in them. My question is how we access the values of these variables, parametrically. rm(list = ls()) env1 <- new.env() env1$var1 <- "value1" env2 <- new.env() env2$var2 <- "value2" env <- ls.str(mode="environment") # We get the environments var <- ls.str(eval(parse(text = env[1])))# We get the variables of an environment eval(var[1]) # We fail to get the value of a variable Thank you all, in advance

    Read the article

  • How to configure custom binding to consume this WS secure Webservice using WCF?

    - by Soeteman
    Hello all, I'm trying to configure a WCF client to be able to consume a webservice that returns the following response message: Response message <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://myservice.wsdl"> <env:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1" /> </env:Header> <env:Body> <ns0:StatusResponse> <result> ... </result> </ns0:StatusResponse> </env:Body> </env:Envelope> To do this, I've constructed a custom binding (which doesn't work). I keep getting a "Security header is empty" message. My binding: <customBinding> <binding name="myCustomBindingForVestaServices"> <security authenticationMode="UserNameOverTransport" messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11" securityHeaderLayout="Strict" includeTimestamp="false" requireDerivedKeys="true"> </security> <textMessageEncoding messageVersion="Soap11" /> <httpsTransport authenticationScheme="Negotiate" requireClientCertificate ="false" realm =""/> </binding> </customBinding> My request seems to be using the same SOAP and WS Security versions as the response, but use different namespace prefixes ("o" instead of "wsse"). Could this be the reason why I keep getting the "Security header is empty" message? Request message <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <s:Header> <o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <o:UsernameToken u:Id="uuid-d3b70d1f-0ebb-4a79-85e6-34f0d6aa3d0f-1"> <o:Username>user</o:Username> <o:Password>pass</o:Password> </o:UsernameToken> </o:Security> </s:Header> <s:Body> <getPrdStatus xmlns="http://myservice.wsdl"> <request xmlns="" xmlns:a="http://myservice.wsdl" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> ... </request> </getPrdStatus> </s:Body> </s:Envelope> How do I need to configure my WCF client binding to be able to consume this webservice? Any help greatly appreciated! Sander

    Read the article

  • How to retrieve all the records from a Berkeley DB in Ruby

    - by Federico Builes
    I'd like to be able to get all the key-values stored in a Berkeley DB using the Ruby bindings from http://github.com/mattbauer/bdb/tree/master but I'm not sure how to proceed. Any pointers will be appreciated. UPDATE Here's a small script that loops over the keys and prints them. Based on Pax' answer: require 'rubygems' require 'bdb' env = Bdb::Env.new(0) env.open('foo', Bdb::DB_CREATE,0) db = env.db db.open(nil, 'db1.db', nil, Bdb::Db::BTREE, Bdb::DB_CREATE,0) db.put(nil, 'key', 'value', 0) db.put(nil, 'key1', 'value1', 0) db.put(nil, 'key2', 'value2', 0) dbc = db.cursor(nil,0) key,val = dbc.get(nil,nil,Bdb::DB_FIRST) while key p key,val key,val = dbc.get(nil,nil,Bdb::DB_NEXT) end dbc.close db.close(0) env.close

    Read the article

  • can a valid xml body have escaped characters for the '<' and '>' around the element names

    - by prmatta
    My web service is receiving xml from a third party that looks like this: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> &lt;Foo&gt;bar&lt;/Foo&gt; </SOAP-ENV:Body> </SOAP-ENV:Envelope> My jaxws web service rejects this with a parsing error. Also if I try to validate this xml using soapui it says Body with element-only content type cannot have text element. My question is, is that xml valid? Or is the client supposed to send me something without escaping the < and . Any references to xml standards or rules are appreciated.

    Read the article

  • scons: overriding build options for one file

    - by Jason S
    Easy question but I don't know the answer. Let's say I have a scons build where my CCFLAGS includes -O1. I have one file needsOptimization.cpp where I would like to override the -O1 with -O2 instead. How could I do this in scons? update: this is what I ended up doing based on bialix's answer: in my SConscript file: Import('env'); env2 = env.Clone(); env2.Append(CCFLAGS=Split('-O2 --asm_listing')); sourceFiles = ['main.cpp','pwm3phase.cpp']; sourceFiles2 = ['serialencoder.cpp','uartTestObject.cpp']; objectFiles = []; objectFiles.append(env.Object(sourceFiles)); objectFiles.append(env2.Object(sourceFiles2)); ... previously this file was: Import('env'); sourceFiles = ['main.cpp','pwm3phase.cpp','serialencoder.cpp','uartTestObject.cpp']; objectFiles = env.Object(sourceFiles); ...

    Read the article

  • How do I extend the classpath used for 'grails run-app'

    - by Eric
    I have the following in my Config.groovy file: grails.config.locations = [ "classpath:env.groovy" ] Now, where exactly am I supposed to place "env.groovy" such that it is available on the CLASSPATH during grails run-app? The documentation here is sorely lacking. I am able to get it to work on the pure commandline by placing "env.groovy" in $APP_HOME/etc and then running: $ grails -classpath ./etc run-app This seems a little hackish, but I can live with it... However, I am unable to get any such configuration working when I launch run-app using the Grails eclipse plugin (STS): Unable to load specified config location classpath:env.groovy : class path resource [env.groovy] cannot be opened because it does not exist I've seen related posts here, here, here, and here but the answers have been unfulfilling. I am looking for a CLASSPATH-based solution that will work with 'run-app' in development mode (both commandline and from eclipse). I know how to set up the CLASSPATH for my deployment servlet container, so that is not an issue.

    Read the article

  • Paperclip and Amazon S3 Issue

    - by Jimmy
    Hey everyone, I have a rails app running on Heroku. I am using paperclip for some simple image uploads for user avatars and some other things, I have S3 set as my backend and everything seems to be working fine except when trying to push to S3 I get the following error: The AWS Access Key Id you provided does not exist in our records. Thinking I mis-pasted my access key and secret key, I tried again, still no luck. Thinking maybe it was just a buggy key I deactivated it and generated a new one. Still no luck. Now for both keys I have used the S3 browser app on OS X and have been able to connect to each and view my current buckets and add/delete buckets. Is there something I should be looking out for? I have my application's S3 and paperclip setup like so development: bucket: (unique name) access_key_id: ENV['S3_KEY'] secret_access_key: ENV['S3_SECRET'] test: bucket: (unique name) access_key_id: ENV['S3_KEY'] secret_access_key: ENV['S3_SECRET'] production: bucket: (unique_name) access_key_id: ENV['S3_KEY'] secret_access_key: ENV['S3_SECRET'] has_attached_file :cover, :styles => { :thumb => "50x50" }, :storage => :s3, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :path => ":class/:id/:style/:filename" Note: I just added the (unique name) bits, those aren't actually there--I have also verified bucket names, but I don't even think this is getting that far. I also have my heroku environment vars setup correctly and have them setup on dev

    Read the article

  • Why Does My Website Redirect me to my localhost?

    - by Noah Brainey
    Alright, my website has some issues that I'm not sure what's causing them. Visit this page http://online-file-sharing.net/tos.html and click one of the bottom footer links... it redirects you to your localhost in the address bar. I have no idea why it does this. I'm hosting this website on my own server, which is this computer, and using Xampp. If this information helps. Anyways any help would be greatly appreciated! I'm also using DYNDNS as my nameservers. I've already ask this question on superuser and webapps QnA sites neither could help. They said to come here. Another thing to note is that this website runs on one script and not multiple scripts (upload.cgi). However there are three files that aren't dynamic and aren't part of the upload.cgi file... these are about.html, browse.html and tos.html. Another thing to note is that my homepage which is upload.cgi can only be accessed by manually typing in online-file-sharing.net/cgi-bin/upload.cgi (which isn't it's real location but it seems to recognize it this way... but redirects me to my localhost). .htaccess file code: DirectoryIndex upload.cgi My upload.cgi path code: my $version = "4.14"; $ENV{PATH} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ($ENV{DOCUMENT_ROOT}) = ($ENV{DOCUMENT_ROOT} =~ /(.*)/); # untaint. #$ENV{SCRIPT_NAME} = '/cgi-bin/upload.cgi'; use lib './perlmodules'; #use Time::HiRes 'gettimeofday'; #my $hires_start = gettimeofday(); my (%PREF,%TEXT) = (); The script I'm using is FileChucker. I hope this information is enough to find an answer... if not please let me know and I'll post as much information as you need!

    Read the article

  • MySQLdb within python2.5 virtualenv

    - by wizard
    I have a Fedora 11 box with MySQL server. Fedora 11 uses python 2.6 internally and python 2.6 is automatically installed on the box. I have created a python virtual-env for version 2.5.5, so that I can run turbogears 1.x application. I have MySQLdb rpm installed on the box (and it works fine with python 2.6). When I import MySQLdb from within python version 2.6 it imports is successfully. When I import MySQLdb from within the python 2.5.5 virtual-env the import fails (because I have installed virtual-env with --no-site-packages). So, I have to install MySQLdb python as a local package (local to virtual-env). 'easy_install MySQL-python' within the virtual env fails. It downloads the MySQL-python-1.2.3.c1.tar.gz/download, but the 'python setup.py build' fails with error. The same problem occurs when building the MySQL outside of virtual-env. Is the 'python setup.py build' for MySQL-python trying to link to a library (and am I missing some library)? Or is the downloaded code missing some header files (unlikely)? Thanks.

    Read the article

  • LinkedIn API returning extra/incorrect login prompt

    - by Paul Osetinsky
    I have a Rails application running the omniauth-linkedin gem and linkedin gem (essentialy an API wrapper). When a user logs in, they receive a primary login prompt that displays to them the correct scopes (FULL PROFILE and EMAIL ADDRESS), as below: However, after they log in, they get another login prompt that should not come up, and that ignores the initial scope request. It tells them that LinkedIN is only requesting their PROFILE OVERVIEW, which is incorrect: The problem must lie in my auth_controller, and I think it has do to with the url that is created in one of the authentication stages (definitely right after the user enters their LinkedIn authentication credentials). Here is my auth_controller: require 'linkedin' class AuthController < ApplicationController def auth client = LinkedIn::Client.new(ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET']) request_token = client.request_token(:oauth_callback => "http://#{request.host_with_port}/callback") session[:rtoken] = request_token.token session[:rsecret] = request_token.secret redirect_to client.request_token.authorize_url end def callback client = LinkedIn::Client.new(ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET']) if session[:atoken].nil? pin = params[:oauth_verifier] atoken, asecret = client.authorize_from_request(session[:rtoken], session[:rsecret], pin) session[:atoken] = atoken session[:asecret] = asecret @user = current_user @user.uid = client.profile(:fields => ["id"]).id flash.now[:success] = 'Signed in with LinkedIn.' else client.authorize_from_access(session[:atoken], session[:asecret]) @user.uid = client.profile(:fields => ["id"]).id flash.now[:success] = 'Signed in with LinkedIn.' end @user = current_user @user.save redirect_to current_user end end Just in case, here is my omniauth.rb file that states the scopes I am requesting for my application: Rails.application.config.middleware.use OmniAuth::Builder do provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], :scope => 'r_fullprofile r_emailaddress', :fields => ['id', 'email-address', 'first-name', 'last-name', 'headline', 'industry', 'picture-url', 'public-profile-url', 'location', 'positions', 'educations'] end Can't figure out how to get rid of that second unnecessary and misleading prompt from LinkedIn and would appreciate any guidance! Thank you.

    Read the article

  • How can I get the name of the namespace from a SOAP message?

    - by olly
    Hi I have a SOAP message (see below). Using Xpath, how can I extract the name of the namespace from this message? In other words, is there an Xpath routine that will return the text "validateNewOrder"? Any suggestions or help would be invaluable. I have been searching everywhere but not found an solution. It is driving me crazy... Thanks! <?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <ns1:validateNewOrder xmlns:ns1="http://sire.rabobank.nl/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <sireheader xmlns="http://sire.rabobank.nl/"> <sender> <compid>TEST</compid> </sender> </sireheader> <order xmlns="http://sire.rabobank.nl/"> <account>123456789</account> </order> </ns1:validateNewOrder> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

    Read the article

  • XSL transformation generating output from other nodes

    - by Abel Morelos
    I have the following XSL template: <xsl:template match="SOAP-ENV:Body/*[local-name()='Publisher']"> <html> <xsl:call-template name="body" /> </html> </xsl:template> The previous template generates the output I want, it's generating the tags containing the output generated by the "body" template. The issue I'm having is that before the opening tag I'm getting text output from a previous node. Not sure why this is happening since I'm not selecting these other nodes. For example: <SOAP-ENV:Header> <!-- Many child nodes here--> </SOAP-ENV:Header> <SOAP-ENV:Body> <publishParty:Publisher> <!-- Many child nodes here--> </publishParty:Publisher> </SOAP-ENV:Body> Given the previous sample XML fragment, my output would contain what I would expect of formatting the Publisher element, but I'm also getting the text nodes of the children of the SOAP-ENV:Header node. Any ideas? Thanks!

    Read the article

  • Python virtualenv questions

    - by orokusaki
    I'm using VirtualEnv on Windows XP. I'm wondering if I have my brain wrapped around it correctly. I ran virtualenv ENV and it created C:\WINDOWS\system32\ENV. I then changed my PATH variable to include C:\WINDOWS\system32\ENV\Scripts instead of C:\Python27\Scripts. Then, I checked out Django into C:\WINDOWS\system32\ENV\Lib\site-packages\django-trunk, updated my PYTHON_PATH variable to point the new Django directory, and continued to easy_install other things (which of course go into my new C:\WINDOWS\system32\ENV\Lib\site-packages directory). I understand why I should use VirtualEnv so I can run multiple versions of Django, and other libraries on the same machine, but does this mean that to switch between environments I have to basically change my PATH and PYTHON_PATH variable? So, I go from developing one Django project which uses Django 1.2 in an environment called ENV and then change my PATH and such so that I can use an environment called ENV2 which has the dev version of Django? Is that basically it, or is there some better way to automatically do all this (I could update my path in Python code, but that would require me to write machine-specific code in my application)? Also, how does this process compare to using VirtualEnv on Linux (I'm quite the beginner at Linux).

    Read the article

  • Why does my CGI script keep redirecting links to localhost?

    - by Noah Brainey
    Visit this page http://online-file-sharing.net/tos.html and click one of the bottom footer links. It redirects you to your localhost in the address bar. I have no idea why it does this. This is in the main script that my entire website revolves around: upload.cgi $ENV{PATH} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; ($ENV{DOCUMENT_ROOT}) = ($ENV{DOCUMENT_ROOT} =~ /(.*)/); # untaint. #$ENV{SCRIPT_NAME} = '/cgi-bin/upload.cgi'; use lib './perlmodules'; #use Time::HiRes 'gettimeofday'; #my $hires_start = gettimeofday(); my (%PREF,%TEXT) = (); No file is displayed when someone visits the root directory, although I have a .htaccess file saying to open my upload.cgi file which is located in my root directory. When I point my browser directly to the CGI file it works but it brings me to my localhost again. I'm hosting this website on my own server, which is this computer, and using XAMPP if this information helps. I'm also using DynDNS as my nameservers. I hope you can give me some insight.

    Read the article

  • Can you do this with Hudson?

    - by damian
    I want to create a hudson job, that takes an id as a parameter. And use that id to calculate the svn-repo path. Where I work you have a svn path for every issue that you resolve. And then all the issues are joined into a single svn-path. What I want to do is to run static code analysis on the partial issues. So I think maybe having an Ant build.xml that I use for every issue, then, parametrize the job with the issue id. I have tried to achieve that but the svn path doesn't replace the parameter. I have tried with #issueId, %issueId%, ${issueId} and ${env.issueId} without success. Jump error like: Location 'http://svn-path:8181/svn/devSet/issues/${env.chuid}' does not exist Checking out a fresh workspace because C:\Documents and Settings\dnoseda\.hudson\jobs\test\workspace\${env.chuid} doesn't exist Checking out http://svn-path:8181/svn/devSet/issues/${env.chuid} ERROR: Failed to check out http://svn-path:8181/svn/devSet/issues/${env.chuid} org.tmatesoft.svn.core.SVNException: svn: '/svn/!svn/bc/46190/devSet/issues/$%7Benv.chuid%7D' path not found: 404 Not Found (http://svn-path:8181) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at I am think that I can not do what I want. Do you know how I can setup the correct configuration to achieve this matter? Thanks for any help. Edit The section of the configurate job that I want to put this parameter is this: <scm class="hudson.scm.SubversionSCM"> <locations> <hudson.scm.SubversionSCM_-ModuleLocation> <remote>http://svn-path:8181/svn/devSet/issues/${env.issueid}</remote> </hudson.scm.SubversionSCM_-ModuleLocation> </locations>

    Read the article

  • JNI 'problmatic frame' causes JVM to crash

    - by HJED
    Hi I'm using JNI to access the exiv2 library (written in C++) in Java and I'm getting a weird runtime error in the JNI code. I've tried using various -Xms and -Xmx options, but that seems to have no affect. I've also tried running this code on JDK1.7.0 with the same result. # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007ff31807757f, pid=4041, tid=140682078746368 # # JRE version: 6.0_20-b20 # Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 ) # Derivative: IcedTea6 1.9.2 # Distribution: Ubuntu 10.10, package 6b20-1.9.2-0ubuntu2 # Problematic frame: # V [libjvm.so+0x42757f] # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ # --------------- T H R E A D --------------- Current thread (0x000000000190d000): JavaThread "main" [_thread_in_Java, id=4043, stack(0x00007ff319447000,0x00007ff319548000)] siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), si_addr=0x0000000000000024 Registers: ... Register to memory mapping: RAX=0x0000000000000002 0x0000000000000002 is pointing to unknown location RBX=0x000000000190db90 0x000000000190db90 is pointing to unknown location RCX=0x0000000000000000 0x0000000000000000 is pointing to unknown location RDX=0x00007ff3195463f8 0x00007ff3195463f8 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE RSP=0x00007ff319546270 0x00007ff319546270 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE RBP=0x00007ff319546270 0x00007ff319546270 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE RSI=0x0000000000000024 0x0000000000000024 is pointing to unknown location RDI=0x00007ff3195463e0 0x00007ff3195463e0 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R8 =0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R9 =0x000000000190db88 0x000000000190db88 is pointing to unknown location R10=0x00007ff319546300 0x00007ff319546300 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R11=0x0000000000000002 0x0000000000000002 is pointing to unknown location R12=0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R13=0x00007ff319546560 0x00007ff319546560 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R14=0x00007ff3195463e0 0x00007ff3195463e0 is pointing into the stack for thread: 0x000000000190d000 "main" prio=10 tid=0x000000000190d000 nid=0xfcb runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE R15=0x0000000000000003 0x0000000000000003 is pointing to unknown location Top of Stack: (sp=0x00007ff319546270) ... Instructions: (pc=0x00007ff31807757f) 0x00007ff31807756f: e2 03 48 03 57 58 31 c9 48 8b 32 48 85 f6 74 03 0x00007ff31807757f: 48 8b 0e 48 89 0a 8b 77 68 83 c0 01 39 f0 7c d1 Stack: [0x00007ff319447000,0x00007ff319548000], sp=0x00007ff319546270, free space=1020k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x42757f] V [libjvm.so+0x42866b] V [libjvm.so+0x4275c8] V [libjvm.so+0x4331bd] V [libjvm.so+0x44e5c7] C [libExiff2-binding.so+0x1f16] _ZN7JNIEnv_15CallVoidMethodAEP8_jobjectP10_jmethodIDPK6jvalue+0x40 C [libExiff2-binding.so+0x1b96] _Z8loadIPTCSt8auto_ptrIN5Exiv25ImageEEPKcP7JNIEnv_P8_jobject+0x2ba C [libExiff2-binding.so+0x1d3f] _Z7getVarsPKcP7JNIEnv_P8_jobject+0x176 C [libExiff2-binding.so+0x1de7] Java_photo_exiv2_Exiv2MetaDataStore_impl_1loadFromExiv+0x4b j photo.exiv2.Exiv2MetaDataStore.impl_loadFromExiv(Ljava/lang/String;Lphoto/exiv2/Exiv2MetaDataStore;)V+0 j photo.exiv2.Exiv2MetaDataStore.loadFromExiv2()V+9 j photo.exiv2.Exiv2MetaDataStore.loadData()V+1 j photo.exiv2.Exiv2MetaDataStore.<init>(Lphoto/ImageFile;)V+10 j test.Main.main([Ljava/lang/String;)V+76 v ~StubRoutines::call_stub V [libjvm.so+0x428698] V [libjvm.so+0x4275c8] V [libjvm.so+0x432943] V [libjvm.so+0x447f91] C [java+0x3495] JavaMain+0xd75 --------------- P R O C E S S --------------- Java Threads: ( => current thread ) 0x00007ff2c4027800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4060, stack(0x00007ff2c9052000,0x00007ff2c9153000)] 0x00007ff2c4025000 JavaThread "CompilerThread1" daemon [_thread_blocked, id=4059, stack(0x00007ff2c9153000,0x00007ff2c9254000)] 0x00007ff2c4022000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4058, stack(0x00007ff2c9254000,0x00007ff2c9355000)] 0x00007ff2c401f800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=4057, stack(0x00007ff2c9355000,0x00007ff2c9456000)] 0x00007ff2c4001000 JavaThread "Finalizer" daemon [_thread_blocked, id=4056, stack(0x00007ff2c994d000,0x00007ff2c9a4e000)] 0x0000000001984000 JavaThread "Reference Handler" daemon [_thread_blocked, id=4055, stack(0x00007ff2c9a4e000,0x00007ff2c9b4f000)] =>0x000000000190d000 JavaThread "main" [_thread_in_Java, id=4043, stack(0x00007ff319447000,0x00007ff319548000)] Other Threads: 0x000000000197d800 VMThread [stack: 0x00007ff2c9b4f000,0x00007ff2c9c50000] [id=4054] 0x00007ff2c4032000 WatcherThread [stack: 0x00007ff2c8f51000,0x00007ff2c9052000] [id=4061] VM state:not at safepoint (normal execution) VM Mutex/Monitor currently owned by a thread: None Heap PSYoungGen total 18432K, used 316K [0x00007ff2fed30000, 0x00007ff3001c0000, 0x00007ff313730000) eden space 15808K, 2% used [0x00007ff2fed30000,0x00007ff2fed7f0b8,0x00007ff2ffca0000) from space 2624K, 0% used [0x00007ff2fff30000,0x00007ff2fff30000,0x00007ff3001c0000) to space 2624K, 0% used [0x00007ff2ffca0000,0x00007ff2ffca0000,0x00007ff2fff30000) PSOldGen total 42240K, used 0K [0x00007ff2d5930000, 0x00007ff2d8270000, 0x00007ff2fed30000) object space 42240K, 0% used [0x00007ff2d5930000,0x00007ff2d5930000,0x00007ff2d8270000) PSPermGen total 21248K, used 2827K [0x00007ff2cb330000, 0x00007ff2cc7f0000, 0x00007ff2d5930000) object space 21248K, 13% used [0x00007ff2cb330000,0x00007ff2cb5f2f60,0x00007ff2cc7f0000) Dynamic libraries: 00400000-00409000 r-xp 00000000 08:03 141899 /usr/lib/jvm/java-6-openjdk/jre/bin/java 00608000-00609000 r--p 00008000 08:03 141899 /usr/lib/jvm/java-6-openjdk/jre/bin/java 00609000-0060a000 rw-p 00009000 08:03 141899 /usr/lib/jvm/java-6-openjdk/jre/bin/java 01904000-019ad000 rw-p 00000000 00:00 0 [heap] ... 7ff2c820c000-7ff2c8232000 r-xp 00000000 08:03 917704 /lib/libexpat.so.1.5.2 7ff2c8232000-7ff2c8432000 ---p 00026000 08:03 917704 /lib/libexpat.so.1.5.2 7ff2c8432000-7ff2c8434000 r--p 00026000 08:03 917704 /lib/libexpat.so.1.5.2 7ff2c8434000-7ff2c8435000 rw-p 00028000 08:03 917704 /lib/libexpat.so.1.5.2 7ff2c8435000-7ff2c844a000 r-xp 00000000 08:03 917708 /lib/libgcc_s.so.1 7ff2c844a000-7ff2c8649000 ---p 00015000 08:03 917708 /lib/libgcc_s.so.1 7ff2c8649000-7ff2c864a000 r--p 00014000 08:03 917708 /lib/libgcc_s.so.1 7ff2c864a000-7ff2c864b000 rw-p 00015000 08:03 917708 /lib/libgcc_s.so.1 7ff2c864b000-7ff2c8733000 r-xp 00000000 08:03 134995 /usr/lib/libstdc++.so.6.0.14 7ff2c8733000-7ff2c8932000 ---p 000e8000 08:03 134995 /usr/lib/libstdc++.so.6.0.14 7ff2c8932000-7ff2c893a000 r--p 000e7000 08:03 134995 /usr/lib/libstdc++.so.6.0.14 7ff2c893a000-7ff2c893c000 rw-p 000ef000 08:03 134995 /usr/lib/libstdc++.so.6.0.14 7ff2c893c000-7ff2c8951000 rw-p 00000000 00:00 0 7ff2c8951000-7ff2c8af3000 r-xp 00000000 08:03 134599 /usr/lib/libexiv2.so.6.0.0 7ff2c8af3000-7ff2c8cf2000 ---p 001a2000 08:03 134599 /usr/lib/libexiv2.so.6.0.0 7ff2c8cf2000-7ff2c8d0f000 r--p 001a1000 08:03 134599 /usr/lib/libexiv2.so.6.0.0 7ff2c8d0f000-7ff2c8d10000 rw-p 001be000 08:03 134599 /usr/lib/libexiv2.so.6.0.0 7ff2c8d10000-7ff2c8d23000 rw-p 00000000 00:00 0 7ff2c8d42000-7ff2c8d45000 r-xp 00000000 08:03 800718 /home/hjed/libExiff2-binding.so 7ff2c8d45000-7ff2c8f44000 ---p 00003000 08:03 800718 /home/hjed/libExiff2-binding.so 7ff2c8f44000-7ff2c8f45000 r--p 00002000 08:03 800718 /home/hjed/libExiff2-binding.so 7ff2c8f45000-7ff2c8f46000 rw-p 00003000 08:03 800718 /home/hjed/libExiff2-binding.so 7ff2c8f46000-7ff2c8f49000 r--s 0000f000 08:03 141333 /usr/lib/jvm/java-6-openjdk/jre/lib/ext/pulse-java.jar 7ff2c8f49000-7ff2c8f51000 r--s 00066000 08:03 408472 /usr/share/java/gnome-java-bridge.jar ... 7ff2ca559000-7ff2ca55b000 r--s 0001d000 08:03 141354 /usr/lib/jvm/java-6-openjdk/jre/lib/plugin.jar 7ff2ca55b000-7ff2ca560000 r--s 00044000 08:03 141353 /usr/lib/jvm/java-6-openjdk/jre/lib/netx.jar 7ff2ca560000-7ff2ca592000 rw-p 00000000 00:00 0 7ff2ca592000-7ff2ca720000 r--s 038af000 08:03 141833 /usr/lib/jvm/java-6-openjdk/jre/lib/rt.jar ... 7ff31673b000-7ff316742000 r-xp 00000000 08:03 141867 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libzip.so 7ff316742000-7ff316941000 ---p 00007000 08:03 141867 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libzip.so 7ff316941000-7ff316942000 r--p 00006000 08:03 141867 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libzip.so 7ff316942000-7ff316943000 rw-p 00007000 08:03 141867 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libzip.so 7ff316943000-7ff31694f000 r-xp 00000000 08:03 921396 /lib/libnss_files-2.12.1.so 7ff31694f000-7ff316b4e000 ---p 0000c000 08:03 921396 /lib/libnss_files-2.12.1.so 7ff316b4e000-7ff316b4f000 r--p 0000b000 08:03 921396 /lib/libnss_files-2.12.1.so 7ff316b4f000-7ff316b50000 rw-p 0000c000 08:03 921396 /lib/libnss_files-2.12.1.so 7ff316b50000-7ff316b5a000 r-xp 00000000 08:03 921398 /lib/libnss_nis-2.12.1.so 7ff316b5a000-7ff316d59000 ---p 0000a000 08:03 921398 /lib/libnss_nis-2.12.1.so 7ff316d59000-7ff316d5a000 r--p 00009000 08:03 921398 /lib/libnss_nis-2.12.1.so 7ff316d5a000-7ff316d5b000 rw-p 0000a000 08:03 921398 /lib/libnss_nis-2.12.1.so 7ff316d5b000-7ff316d63000 r-xp 00000000 08:03 921393 /lib/libnss_compat-2.12.1.so 7ff316d63000-7ff316f62000 ---p 00008000 08:03 921393 /lib/libnss_compat-2.12.1.so 7ff316f62000-7ff316f63000 r--p 00007000 08:03 921393 /lib/libnss_compat-2.12.1.so 7ff316f63000-7ff316f64000 rw-p 00008000 08:03 921393 /lib/libnss_compat-2.12.1.so 7ff316f64000-7ff316f6c000 r-xp 00000000 08:03 141869 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/native_threads/libhpi.so 7ff316f6c000-7ff31716b000 ---p 00008000 08:03 141869 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/native_threads/libhpi.so 7ff31716b000-7ff31716c000 r--p 00007000 08:03 141869 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/native_threads/libhpi.so 7ff31716c000-7ff31716d000 rw-p 00008000 08:03 141869 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/native_threads/libhpi.so 7ff31716d000-7ff317184000 r-xp 00000000 08:03 921392 /lib/libnsl-2.12.1.so 7ff317184000-7ff317383000 ---p 00017000 08:03 921392 /lib/libnsl-2.12.1.so 7ff317383000-7ff317384000 r--p 00016000 08:03 921392 /lib/libnsl-2.12.1.so 7ff317384000-7ff317385000 rw-p 00017000 08:03 921392 /lib/libnsl-2.12.1.so 7ff317385000-7ff317387000 rw-p 00000000 00:00 0 7ff317387000-7ff3173b2000 r-xp 00000000 08:03 141850 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjava.so 7ff3173b2000-7ff3175b1000 ---p 0002b000 08:03 141850 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjava.so 7ff3175b1000-7ff3175b2000 r--p 0002a000 08:03 141850 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjava.so 7ff3175b2000-7ff3175b5000 rw-p 0002b000 08:03 141850 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libjava.so 7ff3175b5000-7ff3175c3000 r-xp 00000000 08:03 141866 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libverify.so 7ff3175c3000-7ff3177c2000 ---p 0000e000 08:03 141866 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libverify.so 7ff3177c2000-7ff3177c4000 r--p 0000d000 08:03 141866 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libverify.so 7ff3177c4000-7ff3177c5000 rw-p 0000f000 08:03 141866 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/libverify.so 7ff3177c5000-7ff3177cc000 r-xp 00000000 08:03 921405 /lib/librt-2.12.1.so 7ff3177cc000-7ff3179cb000 ---p 00007000 08:03 921405 /lib/librt-2.12.1.so 7ff3179cb000-7ff3179cc000 r--p 00006000 08:03 921405 /lib/librt-2.12.1.so 7ff3179cc000-7ff3179cd000 rw-p 00007000 08:03 921405 /lib/librt-2.12.1.so 7ff3179cd000-7ff317a4f000 r-xp 00000000 08:03 921390 /lib/libm-2.12.1.so 7ff317a4f000-7ff317c4e000 ---p 00082000 08:03 921390 /lib/libm-2.12.1.so 7ff317c4e000-7ff317c4f000 r--p 00081000 08:03 921390 /lib/libm-2.12.1.so 7ff317c4f000-7ff317c50000 rw-p 00082000 08:03 921390 /lib/libm-2.12.1.so 7ff317c50000-7ff3184c4000 r-xp 00000000 08:03 141871 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so 7ff3184c4000-7ff3186c3000 ---p 00874000 08:03 141871 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so 7ff3186c3000-7ff318739000 r--p 00873000 08:03 141871 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so 7ff318739000-7ff318754000 rw-p 008e9000 08:03 141871 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server/libjvm.so 7ff318754000-7ff31878d000 rw-p 00000000 00:00 0 7ff31878d000-7ff318907000 r-xp 00000000 08:03 921385 /lib/libc-2.12.1.so 7ff318907000-7ff318b06000 ---p 0017a000 08:03 921385 /lib/libc-2.12.1.so 7ff318b06000-7ff318b0a000 r--p 00179000 08:03 921385 /lib/libc-2.12.1.so 7ff318b0a000-7ff318b0b000 rw-p 0017d000 08:03 921385 /lib/libc-2.12.1.so 7ff318b0b000-7ff318b10000 rw-p 00000000 00:00 0 7ff318b10000-7ff318b12000 r-xp 00000000 08:03 921388 /lib/libdl-2.12.1.so 7ff318b12000-7ff318d12000 ---p 00002000 08:03 921388 /lib/libdl-2.12.1.so 7ff318d12000-7ff318d13000 r--p 00002000 08:03 921388 /lib/libdl-2.12.1.so 7ff318d13000-7ff318d14000 rw-p 00003000 08:03 921388 /lib/libdl-2.12.1.so 7ff318d14000-7ff318d18000 r-xp 00000000 08:03 141838 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli/libjli.so 7ff318d18000-7ff318f17000 ---p 00004000 08:03 141838 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli/libjli.so 7ff318f17000-7ff318f18000 r--p 00003000 08:03 141838 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli/libjli.so 7ff318f18000-7ff318f19000 rw-p 00004000 08:03 141838 /usr/lib/jvm/java-6-openjdk/jre/lib/amd64/jli/libjli.so 7ff318f19000-7ff318f31000 r-xp 00000000 08:03 921401 /lib/libpthread-2.12.1.so 7ff318f31000-7ff319130000 ---p 00018000 08:03 921401 /lib/libpthread-2.12.1.so 7ff319130000-7ff319131000 r--p 00017000 08:03 921401 /lib/libpthread-2.12.1.so 7ff319131000-7ff319132000 rw-p 00018000 08:03 921401 /lib/libpthread-2.12.1.so 7ff319132000-7ff319136000 rw-p 00000000 00:00 0 7ff319136000-7ff31914c000 r-xp 00000000 08:03 917772 /lib/libz.so.1.2.3.4 7ff31914c000-7ff31934c000 ---p 00016000 08:03 917772 /lib/libz.so.1.2.3.4 7ff31934c000-7ff31934d000 r--p 00016000 08:03 917772 /lib/libz.so.1.2.3.4 7ff31934d000-7ff31934e000 rw-p 00017000 08:03 917772 /lib/libz.so.1.2.3.4 7ff31934e000-7ff31936e000 r-xp 00000000 08:03 921379 /lib/ld-2.12.1.so 7ff319387000-7ff319391000 rw-p 00000000 00:00 0 7ff319391000-7ff319447000 rw-p 00000000 00:00 0 7ff319447000-7ff31944a000 ---p 00000000 00:00 0 7ff31944a000-7ff31954d000 rw-p 00000000 00:00 0 7ff319562000-7ff31956a000 rw-s 00000000 08:03 1966453 /tmp/hsperfdata_hjed/4041 7ff31956a000-7ff31956b000 rw-p 00000000 00:00 0 7ff31956b000-7ff31956c000 r--p 00000000 00:00 0 7ff31956c000-7ff31956e000 rw-p 00000000 00:00 0 7ff31956e000-7ff31956f000 r--p 00020000 08:03 921379 /lib/ld-2.12.1.so 7ff31956f000-7ff319570000 rw-p 00021000 08:03 921379 /lib/ld-2.12.1.so 7ff319570000-7ff319571000 rw-p 00000000 00:00 0 7fff0fb03000-7fff0fb24000 rw-p 00000000 00:00 0 [stack] 7fff0fbff000-7fff0fc00000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] VM Arguments: jvm_args: -Dfile.encoding=UTF-8 java_command: test.Main Launcher Type: SUN_STANDARD Environment Variables: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games USERNAME=hjed LD_LIBRARY_PATH=/usr/lib/jvm/java-6-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-6-openjdk/jre/lib/amd64:/usr/lib/jvm/java-6-openjdk/jre/../lib/amd64 SHELL=/bin/bash DISPLAY=:0.0 Signal Handlers: SIGSEGV: [libjvm.so+0x712700], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGBUS: [libjvm.so+0x712700], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGFPE: [libjvm.so+0x5d4020], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGPIPE: [libjvm.so+0x5d4020], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGXFSZ: [libjvm.so+0x5d4020], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGILL: [libjvm.so+0x5d4020], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGUSR2: [libjvm.so+0x5d3730], sa_mask[0]=0x00000004, sa_flags=0x10000004 SIGHUP: [libjvm.so+0x5d61a0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGINT: SIG_IGN, sa_mask[0]=0x00000000, sa_flags=0x00000000 SIGTERM: [libjvm.so+0x5d61a0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 SIGQUIT: [libjvm.so+0x5d61a0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004 --------------- S Y S T E M --------------- OS:Ubuntu 10.10 (maverick) uname:Linux 2.6.35-24-generic #42-Ubuntu SMP Thu Dec 2 02:41:37 UTC 2010 x86_64 libc:glibc 2.12.1 NPTL 2.12.1 rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity load average:0.25 0.16 0.21 /proc/meminfo: MemTotal: 4048200 kB MemFree: 1230476 kB Buffers: 589572 kB Cached: 911132 kB SwapCached: 0 kB Active: 1321712 kB Inactive: 1202272 kB Active(anon): 1023852 kB Inactive(anon): 7168 kB Active(file): 297860 kB Inactive(file): 1195104 kB Unevictable: 64 kB Mlocked: 64 kB SwapTotal: 7065596 kB SwapFree: 7065596 kB Dirty: 632 kB Writeback: 0 kB AnonPages: 1023368 kB Mapped: 145832 kB Shmem: 7728 kB Slab: 111136 kB SReclaimable: 66316 kB SUnreclaim: 44820 kB KernelStack: 3824 kB PageTables: 27736 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 9089696 kB Committed_AS: 2378396 kB VmallocTotal: 34359738367 kB VmallocUsed: 332928 kB VmallocChunk: 34359397884 kB HardwareCorrupted: 0 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 67136 kB DirectMap2M: 4118528 kB CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 26 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, ht Memory: 4k page, physical 4048200k(1230476k free), swap 7065596k(7065596k free) vm_info: OpenJDK 64-Bit Server VM (19.0-b09) for linux-amd64 JRE (1.6.0_20-b20), built on Dec 10 2010 19:45:55 by "buildd" with gcc 4.4.5 time: Sat Jan 1 14:12:27 2011 elapsed time: 0 seconds The java code is: ... public class Main { public static void main(String[] args) { ... ImageFile img = new ImageFile(System.getProperty("user.home") + "/PC100001.JPG"); Exiv2MetaDataStore e = new Exiv2MetaDataStore(img); Iterator<Entry<String, String>> i = e.entrySet().iterator(); while (i.hasNext()) { Entry<String, String> entry = i.next(); System.out.println(entry.getKey() + ":" + entry.getValue()); } //if you switch this print statment with the while loop you get the same error. // System.out.print(e.toString()); } } and /** NB: MetaDataStore is an abstract class that extends HashMap<String,String> */ public class Exiv2MetaDataStore extends MetaDataStore{ ... private final ImageFile F; /** * Creates an meta data store from an ImageFile using Exiv2 * this calls loadData(); * @param f */ public Exiv2MetaDataStore(ImageFile f) { F = f; loadData(); } ... @Override protected void loadData() { loadFromExiv2(); } ... private void loadFromExiv2() { impl_loadFromExiv(F.getAbsolutePath(), this); } private native void impl_loadFromExiv(String path, Exiv2MetaDataStore str); //this method called by the C++ code public void exiv2_reciveElement(String key, String value) { super.put(key,value); } static { Runtime.getRuntime().load("/home/hjed/libExiff2-binding.so"); } } C++ code: #include <exif.hpp> #include <image.hpp> #include <iptc.hpp> #include <exiv2/exiv2.hpp> #include <exiv2/error.hpp> #include <iostream> #include <iomanip> #include <cassert> void loadIPTC(Exiv2::Image::AutoPtr image, const char * path, JNIEnv * env, jobject obj) { Exiv2::IptcData &iptcData = image->iptcData(); //load method jclass cls = env->GetObjectClass(obj); jmethodID mid = env->GetMethodID(cls, "exiv2_reciveElement", "(Ljava/lang/String;Ljava/lang/String;)V"); //is there any IPTC data AND check that method exists if (iptcData.empty() | (mid == NULL)) { std::string error(path); error += ": failed loading IPTC data, there may not be any data"; } else { Exiv2::IptcData::iterator end = iptcData.end(); for (Exiv2::IptcData::iterator md = iptcData.begin(); md != end; ++md) { jvalue values[2]; const char* key = md->key().c_str(); values[0].l = env->NewStringUTF(key); md->value().toString().c_str(); const char* value = md->typeName(); values[2].l = env->NewStringUTF(value); //If I replace the code for values[2] with the commented out code I get the same error. //const char* type = md->typeName(); //values[2].l = env->NewStringUTF(type); env->CallVoidMethodA(obj, mid, values); } } } void getVars(const char* path, JNIEnv * env, jobject obj) { //Load image Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(path); assert(image.get() != 0); image->readMetadata(); //Load IPTC data loadIPTC(image, path, env, obj); } JNIEXPORT void JNICALL Java_photo_exiv2_Exiv2MetaDataStore_impl_1loadFromExiv(JNIEnv * env, jobject obj, jstring path, jobject obj2) { const char* path2 = env->GetStringUTFChars(path, NULL); getVars(path2, env, obj); env->ReleaseStringUTFChars(path, path2); } I've searched for a fix for this, but I can't find one. I don't have much experience using C++ so if I've made an obvious mistake in the C code I apologies. Thanks for any help, HJED P.S. This is my first post on this site and I wasn't sure how much of the code I needed to show. Sorry if I've put to much up.

    Read the article

  • SimpleXML SOAP response Namespace issues

    - by Stu
    Hi. After spending SEVERAL frustrated hours on this I am asking for your help. I am trying to get the content of particular nodes from a SOAP response. The response is $XmlStr = <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"<xmlns:ns1="http://soap.xxxxxx.co.uk/"><env:Body><ns1:PlaceOrderResponse><xxxxxOrderNumber></xxxxxOrderNumber><ErrorArray><Error><ErrorCode>24</ErrorCode><ErrorText>The+client+order+number+3002254+is+already+in+use</ErrorText></Error><Error><ErrorCode>1</ErrorCode><ErrorText>Aborting</ErrorText></Error></ErrorArray></ns1:PlaceOrderResponse></env:Body></env:Envelope> I am trying to get at the nodes and children of <ErrorArray. Because of the XML containing namespaces $XmlArray = new SimpleXMLElement($XmlStr); foreach ($XmlArray->env:Envelope->env:Body->ns1:PlaceOrderResponse->ErrorArray->Error as $Error) { echo $Error->ErrorCode."<br />";<br /> } doesn't work. I have read a number of articles such as http://www.sitepoint.com/blogs/2005/10/20/simplexml-and-namespaces/ htp://blog.stuartherbert.com/php/2007/01/07/using-simplexml-to-parse-rss-feeds/ and about 20 questions on this site which unfortunately are not helping. (the second link has htp:// as a newbie here I cannot post more than one link) Even writing, $XmlArray = new SimpleXMLElement($XmlStr); echo "<br /><br /><pre>\n"; print_r($XmlArray); echo "<pre><br /><br />\n"; gives SimpleXMLElement Object ( ) which makes me wonder if the soap response ($XmlStr) is actually a valid input for SimpleXMLElement. It seems that the line $XmlArray = new SimpleXMLElement($XmlStr); is not doing what I expect it to. Any help on how to get the nodes from the XML above would be very welcome. Obviously getting it to work (having a working example) is what I need in the short term, but if someone could help me understand what I am doing wrong would be better in the long term. Cheers. Stu

    Read the article

  • Netsuite - how to specify record_type for getall request

    - by Dvporg
    I want to get a list of all InventoryItems According to this document: https://system.netsuite.com/help/helpcenter/en_US/Output/Help/SuiteCloudCustomizationScriptingWebServices/SuiteTalkWebServices/getAll.html I'm forming the following request: <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:platformMsgs="urn:platform_2013_1.webservices.netsuite.com" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"> <env:Header> <passport> <email>******</email> <password>******</password> <account>******</account> </passport> </env:Header> <env:Body> <platformMsgs:getAll> <recordType>InventoryItem</recordType> </platformMsgs:getAll> </env:Body> </env:Envelope> But receiving response with the error: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Header> <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2013_1.platform.webservices.netsuite.com"> <platformMsgs:nsId>WEBSERVICES_969904_100920131651936419141601801_cbf1690968b43</platformMsgs:nsId> </platformMsgs:documentInfo> </soapenv:Header> <soapenv:Body> <getAllResponse xmlns="urn:platform_2013_1.webservices.netsuite.com"> <platformCore:getAllResult xmlns:platformCore="urn:core_2013_1.platform.webservices.netsuite.com"> <platformCore:status isSuccess="false"> <platformCore:statusDetail type="ERROR"> <platformCore:code>GETALL_RCRD_TYPE_REQD</platformCore:code> <platformCore:message>The getAll record type is required.</platformCore:message> </platformCore:statusDetail> </platformCore:status> </platformCore:getAllResult> </getAllResponse> </soapenv:Body> </soapenv:Envelope> I've tried to request currencies, states - the response always the same I've tried following variants: <GetAllRecordType>inventoryItem</GetAllRecordType> and <recordType>inventoryItem</recordType> and <GetAllRecordType>currency</GetAllRecordType> and <recordType>currency</recordType> with the same response: <platformCore:message>The getAll record type is required.</platformCore:message> According to https://webservices.netsuite.com/xsd/platform/v2013_2_0/coreTypes.xsd - I've specified correctly recordType (btw I've also tried without any success) I'm using ruby and there is no complete library for ruby. The one that is exists doesn't contain almost all things I'm going to use. Can someone help me what I'm doing wrong or may be someone have working example

    Read the article

  • How to reset Bash on Mac OSX, .bash_profile corrupted and bash no longer works

    - by user1463172
    I am on a MacBook Pro, running the latest version of Mountain Lion. I really need some help, I have managed some how to damage my .bash_profile (I think) so that every time I open up the terminal I get the error listed below. -bash: export: `/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/go/bin': not a valid identifier -bash: export: `/Users/rob/Applications/sbt/bin:': not a valid identifier env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory env: bash: No such file or directory -bash: tar: command not found -bash: grep: command not found -bash: cat: command not found -bash: find: command not found I am not sure what has happened, I have no sudo, cd or any normal commands. The only way I have been able to get to any of the main directories is through the go to folder command in finder and try to find the file to no avail. To top it all off I think I created a file that might be causing the issue, I wanted to edit the .bash_profile so I typed sudo nano ./bash_profile This open a new file in nano which I think was then saved. After this I opened the real .bash_profile to add in the path for node.js. If I can get to the .bash_profile I think I can get it back on track but I can't find it, should I reinstall bash? If so how would I do that on a mac, I tried using brew install bash to which I get -bash: brew: command not found I am really stuck if anyone can help I would be really appreciated. Many thanks

    Read the article

  • How to remotely open gedit with SFTP URL in Gnome through SSH?

    - by Álvaro Justen
    My setup is weird and I can't change it now. I have two machines: local-machine: it's my desktop running Ubuntu with Gnome remote-machine: it's one virtual machine, also running Ubuntu but without X In both machines I have my private and public SSH keys. I need to run SSH from remote-machine to local-machine and run gedit (in local-machine, under the default $DISPLAY) but openning a file in remote-machine throught SFTP. Something like this: myuser@remote-machine:~$ ssh local-machine "DISPLAY=:0.0 gedit sftp://remote-machine/some/file" The command above doesn't work. gedit shows this message: Could not open the file sftp://remote-machine/some/file. gedit cannot handle sftp: locations. Note that: /some/file exists on remote-machine. I can SSH normally from remote-machine to local-machine using my SSH key without any problems! I can run the command DISPLAY=:0.0 gedit sftp://remote-machine/some/file in a terminal on local-machine and gedit opens the file on remote-machine without any problems - but the terminal in which I executed the command is running in DISPLAY :0 (really, it's gnome-terminal). I also tried -t option of SSH client (to force pseudo-tty allocation) but it didn't work. If I try to run DISPLAY=:0.0 gedit sftp://remote-machine/some/file in local-machine but under a tty (for example in tty1, by pressing <Ctrl>+<Alt>+<F1>) it doesn't not work - I get the same error when running from remote-machine. I found that if I pass the environment variable DBUS_SESSION_BUS_ADDRESS with a correct value, it works! So, if I do something like that: myuser@local-machine:~$ env | grep DBUS_SESSION_BUS_ADDRESS > env.txt myuser@local-machine:~$ scp env.txt remote-machine: and then: myuser@remote-machine:~$ ssh local-machine "DISPLAY=:0.0 $(cat env.txt) gedit sftp://remote-machine/some/file" it works! The problem is that I'm not on local-machine so I can't get the correct value for this env variable. Is there any other way to make this work?

    Read the article

  • How to get the permissions right for /dev/raw1394

    - by Mark0978
    I recently upgraded one of my ubuntu machines to Karmic and I'm having trouble getting the permissions of /dev/raw1394 set to 0666. They only thing this machine is used for is recording audio from a firepod which uses /dev/raw1394 via jackd and there are no other FireWire devices connected, so security around this device is not really an issue. If I run as root, everything works as expected, but I have some folks that run the recorder that I don't want to have root access. However, I can't figure out which lines setup the perms I've tied this: /etc/udev/permissions.d/raw1394.rules:raw1394:root:root:0666 And I have this setup (default install) /lib/udev/rules.d/75-persistent-net-generator.rules:SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" /lib/udev/rules.d/75-cd-aliases-generator.rules:# the "path" of usb/ieee1394 devices changes frequently, use "id" /lib/udev/rules.d/75-cd-aliases-generator.rules:ACTION=="add", SUBSYSTEM=="block", SUBSYSTEMS=="usb|ieee1394", ENV{ID_CDROM}=="?*", ENV{GENERATED}!="?*", \ /lib/udev/rules.d/60-persistent-storage-tape.rules:KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" /lib/udev/rules.d/50-udev-default.rules:# FireWire (deprecated dv1394 and video1394 drivers) /lib/udev/rules.d/50-udev-default.rules:KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n", GROUP="video" /lib/udev/rules.d/50-udev-default.rules:KERNEL=="video1394-[0-9]*", NAME="video1394/%n", GROUP="video" /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" /lib/udev/rules.d/60-persistent-storage.rules:KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" And I find these lines in /var/log/syslog Apr 30 09:11:30 record kernel: [ 3.284010] ieee1394: Node added: ID:BUS[0-00:1023] GUID[000a9200c7062266] Apr 30 09:11:30 record kernel: [ 3.284195] ieee1394: Host added: ID:BUS[0-01:1023] GUID[00d0035600a97b9f] Apr 30 09:11:30 record kernel: [ 18.372791] ieee1394: raw1394: /dev/raw1394 device initialized What I can't figure out, is which line actually creates that raw1394 device in the first place. How do you get /dev/raw1394 to have permissions 0666?

    Read the article

  • uWSGI cannot find "application" using Flask and Virtualenv

    - by skyler
    Using uWSGI to serve a simple wsgi app, (a simple "Hello, World") my configuration works, but when I try to run a Flask app, I get this in uWSGI's error logs: current working directory: /opt/python-env/coefficient/lib/python2.6/site-packages writing pidfile to /var/run/uwsgi.pid detected binary path: /opt/uwsgi/uwsgi setuid() to 497 your memory page size is 4096 bytes detected max file descriptor number: 1024 lock engine: pthread robust mutexes uwsgi socket 0 bound to TCP address 127.0.0.1:3031 fd 3 Python version: 2.6.6 (r266:84292, Jun 18 2012, 14:18:47) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] Set PythonHome to /opt/python-env/coefficient/ *** Python threads support is disabled. You can enable it with --enable-threads *** Python main interpreter initialized at 0xbed3b0 your server socket listen backlog is limited to 100 connections *** Operational MODE: single process *** added /opt/python-env/coefficient/lib/python2.6/site-packages/ to pythonpath. unable to find "application" callable in file /var/www/coefficient/flask.py unable to load app 0 (mountpoint='') (callable not found or import error) *** no app loaded. going in full dynamic mode *** *** uWSGI is running in multiple interpreter mode ***` Note in particular this part of the log: unable to find "application" callable in file /var/www/coefficient/flask.py unable to load app 0 (mountpoint='') (callable not found or import error) **no app loaded. going in full dynamic mode** This is my Flask app: from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello, World, from Flask!" Before I added my Virtualenv's pythonpath to my configuration file, I was getting an ImportError for Flask. I solved this though, I believe (I'm not receiving errors about it anymore) and here is my complete configuration file: uwsgi: #socket: /tmp/uwsgi.sock socket: 127.0.0.1:3031 daemonize: /var/log/uwsgi.log pidfile: /var/run/uwsgi.pid master: true vacuum: true #wsgi-file: /var/www/coefficient/coefficient.py wsgi-file: /var/www/coefficient/flask.py processes: 1 virtualenv: /opt/python-env/coefficient/ pythonpath: /opt/python-env/coefficient/lib/python2.6/site-packages This is how I start uWSGI, from an rc script: /opt/uwsgi/uwsgi --yaml /etc/uwsgi/conf.yaml --uid uwsgi And if I try to view the Flask program in a browser, I get this: **uWSGI Error** Python application not found Any help is appreciated.

    Read the article

  • trying to install lync 2010 and experiecing an error with central management store

    - by Itai Ganot
    I'm trying to install Lync 2010 and i'm getting stuck in the stage where i have to install or point to the local configuration store. I've tried finding it in the domain and without luck, any recommendations? PS C:\Users\Administrator.ASUTA> Get-csconfigurationstorelocation WARNING: No Configuration Store location has been set. PS C:\Users\Administrator.ASUTA> Get-CsComputer "$env:computername.$env:userdnsd omain" Get-CsComputer : Cannot find location of Central Management Store in Active Dir ectory. At line:1 char:15 + Get-CsComputer <<<< "$env:computername.$env:userdnsdomain" + CategoryInfo : ResourceUnavailable: (:) [Get-CsComputer], Manag ementStoreNotFoundException + FullyQualifiedErrorId : ManagementStoreNotFound,Microsoft.Rtc.Management .Xds.GetComputerCmdlet PS C:\Users\Administrator.ASUTA>

    Read the article

  • ssh connection operation timed out using rsync

    - by Mark Molina
    I use rsync to backup my remote server on my local device but when I combine it with a cron job my ssh times out. Just to be clear, the data is stored on a remote server and I want it stored on my local server. The backup request must be sent from my local server to the remote server. The command for backup up the data is working when I just type it in terminal like this: rsync -chavzP --stats USERNAME@IPADDRES: PATH_TO_BACKUP LOCAL_PATH_TO_BACKUP but when I combine it with a cron job like this: 10 11 * * * rsync -chavzP --stats USERNAME@IP_ADDRESS: PATH_TO_BACKUP LOCAL_PATH_TO_BACKUP the ssh connection times out. When the cronjob executes it send a mail to the root user with the output like this: From local.xx.xx.xx Tue Jul 2 11:20:17 2013 X-Original-To: username Delivered-To: [email protected] From: [email protected] (Cron Daemon) To: [email protected] Subject: Cron <username@server> rsync -chavzP --stats USERNAME@IPADDRES: PATH_TO_BACKUP LOCAL_PATH_TO_BACKUP X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=username> X-Cron-Env: <USER=username> X-Cron-Env: <HOME=/Users/username> Date: Tue, 2 Jul 2013 11:20:17 +0200 (CEST) ssh: connect to host IP_ADDRESS port XX: Operation timed out rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-42/rsync/io.c(452) [receiver=2.6.9] So the rsync command is working when just typed in terminal but not when used by a cronjob. Can anybody explain this?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >