Search Results

Search found 273 results on 11 pages for 'seh hui felix leong'.

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

  • Add jar to apache felix in Pom file?

    - by drozzy
    How can I add a jar to my bundle in Apache Felix? I am using maven, with maven-bundle-plugin to manage my bundles in OBR for me. But I am not sure where to declare the dependency inside my POM on the jar, so that maven correctly compiles it into the final bundle. This is how my plugin looks in pom: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.1.0</version> <extensions>true</extensions> <configuration> <instructions> <Bundle-Category>sample</Bundle-Category> <Bundle-SymbolicName>${artifactId} </Bundle-SymbolicName> <Export-Package> //blahblah </Export-Package> </instructions> <!-- OBR --> <remoteOBR>repo-rel</remoteOBR> <prefixUrl>file:///C:/Users/blah/Projects/Eclipse3.6-RCP-64/Felix/obr-repo/releases</prefixUrl> <ignoreLock>true</ignoreLock> </configuration>

    Read the article

  • Felix Baumgartner Skydives from the Edge of Space [Video]

    - by Jason Fitzpatrick
    Yesterday Felix Baumgartner broke the record for highest skydive by leaping out of a capsule 128,100 feet above the Earth. Check out his jump in the following videos. After flying to an altitude of 39,045 meters (128,100 feet) in a helium-filled balloon, Felix Baumgartner completed a record breaking jump for the ages from the edge of space, exactly 65 years after Chuck Yeager first broke the sound barrier flying in an experimental rocket-powered airplane. Felix reached a maximum of speed of 1,342.8 km/h (833mph) through the near vacuum of the stratosphere before being slowed by the atmosphere later during his 4:20 minute long freefall. The 43-year-old Austrian skydiving expert also broke two other world records (highest freefall, highest manned balloon flight), leaving the one for the longest freefall to project mentor Col. Joe Kittinger. The above video is a 2 minute highlight reel of the ascent and jump; check out the full 15 minute descent video here. For an in-depth look at the technology used to keep Baumgartner safe during his record setting journey, hit up the link below. The Tech Behind Felix Baumgartner’s Stratospheric Skydive [ExtremeTech] HTG Explains: What is the Windows Page File and Should You Disable It? How To Get a Better Wireless Signal and Reduce Wireless Network Interference How To Troubleshoot Internet Connection Problems

    Read the article

  • Android app (with felix) crashes with LinearAlloc exceeded capacity

    - by user1106000
    I am running apache felix and an osgi app on android (3.2). This works pretty well so far, but I have rather large chunks of data to load into the application (osgi bundles). The problem with that is that when I load the biggest chunk of data I get LinearAlloc exceeded capacity The error seems to come from LinearAlloc.c \#define DEFAULT_MAX_LENGTH (4*1024*1024) if (nextOffset > pHdr->mapLength) { /* * We don't have to abort here. We could fall back on the system * malloc(), and have our "free" call figure out what to do. Only * works if the users of these functions actually free everything * they allocate. */ LOGE("LinearAlloc exceeded capacity, last=%d\n", (int) size); dvmAbort(); } afaik in 3.2/4.x it is even 8*1024*1024, but I still hit that limit. I'm looking to get better insight on what causes this problem and how I might possibly be able to fix it. Any help would be appreciated.

    Read the article

  • OSGI classcast exception on felix

    - by Nico
    Hi, i'm fairly new to osgi and am trying to get a functional proof of concept together. The setup is that my common api is created in a bundle creatively named common-api.jar with no bundle activator, but it exports all it's interfaces. the one of interest in this situation is DatabaseService.java. I then have a Second bundle called systemx-database-service. That implements the database service interface. this works fine as in the activator of the implementation bundle i test the connection to the database and select some arbitraty values. I also register the service i want to be available to the other bundle's like so: context.registerService(DatabaseService.class.getName(), new SystemDatabaseServiceImpl(context), new Properties()); The basic idea being when you look for a service reference for a Database service you'll get back the SystemDatabaseService implementation. When i do a inspect service the output it this: -> inspect s c 69 System Database Service (69) provides services: ---------------------------------------------- objectClass = za.co.xxx.xxx.common.api.DatabaseService service.id = 39 which would lead me to believe that if i do this in a test bundle: context.getService(context.getServiceReference(DatabaseService.class)); i should get back an instance of DatabaseService.class, but alas no such luck. it simply seems like it cannot find the service. stick with me here my story gets stranger. figuring there is no where to go but up i wrote this monstrosity: for (Bundle bundle : bundles) { if (bundle.getSymbolicName().equals("za.co.xxx.xxx.database-service")) { ServiceReference[] registeredServices = bundle.getRegisteredServices(); for (ServiceReference ref : registeredServices) { DatabaseService service = (DatabaseService) context.getService(ref); // use service here. } } } } now i can actually see the service reference, but i get this error java.lang.ClassCastException: za.co.xxx.xxx.database.service.impl.SystemDatabaseServiceImpl cannot be cast to za.co.xxx.xx.common.api.DatabaseService which is crazy since the implementation clearly implements the interface! Any help would be appreciated. Please keep in mind i'm very new at the osgi way of thinking so my whole approach here might be flawed. oh. if anyone wants the manifests i can post them. and i'm using the maven-bnd-plugin to build and executing on felix. thanks Nico

    Read the article

  • Glassfish V3 won't start

    - by Zakaria
    Hi everybody, I installed NetBeans 6.8 and tried to run the GlasshFish V3 server. I'm working under Windows Vista 32 Bits. First, it won't run. Then I modified the c:\Windows\System32\drivers\etc\hosts file and put the following line into it: 127.0.0.1 localhost And when I run the GlasshFish V3 Server, no error is showing but only "INFOs" are displayed: 3 avr. 2010 19:23:19 com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Felix platform Welcome to Felix ================ INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:24 CEST 2010 INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:25 CEST 2010 INFO: Grizzly Framework 1.9.18-k started in: 423ms listening on port 35127 INFO: GlassFish v3 (74.2) startup time : Felix(4456ms) startup services(1709ms) total(6165ms) INFO: Grizzly Framework 1.9.18-k started in: 459ms listening on port 35116 INFO: Grizzly Framework 1.9.18-k started in: 428ms listening on port 35155 INFO: Grizzly Framework 1.9.18-k started in: 470ms listening on port 35160 INFO: Grizzly Framework 1.9.18-k started in: 513ms listening on port 35159 INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider = org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider@5be8f4 INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 INFO: Binding RMI port to *:35165 INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://PC-de-Charlotte:35165/jndi/rmi://PC-de-Charlotte:35165/jmxrmi INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started INFO: Grizzly Framework 1.9.18-k started in: 150ms listening on port 35159 INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\sges-v3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-330907148519261411, felix.fileinstall.filter = null} INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-2938963288421854459, felix.fileinstall.filter = null} INFO: Grizzly Framework 1.9.18-k started in: 95ms listening on port 35160 INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: Installed C:\Program Files\sges-v3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-6474085409014899009, felix.fileinstall.filter = null} And there is no message such as "Glassfish started"! So, when I try to access to the admin web interface: localhost:4848 or localhost:8080 or localhost:8181 , It doesn't work. What should I do? Thank you very much, Regards.

    Read the article

  • Glassfish V3 won't start

    - by Thierry
    I installed NetBeans 6.8 and tried to run the GlasshFish V3 server. I'm working under Windows Vista 32 Bits. First, it won't run. Then I modified the c:\Windows\System32\drivers\etc\hosts file and put the following line into it: 127.0.0.1 localhost And when I run the GlasshFish V3 Server, no error is showing but only "INFOs" are displayed: 3 avr. 2010 19:23:19 com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Felix platform Welcome to Felix ================ INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:24 CEST 2010 INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:25 CEST 2010 INFO: Grizzly Framework 1.9.18-k started in: 423ms listening on port 35127 INFO: GlassFish v3 (74.2) startup time : Felix(4456ms) startup services(1709ms) total(6165ms) INFO: Grizzly Framework 1.9.18-k started in: 459ms listening on port 35116 INFO: Grizzly Framework 1.9.18-k started in: 428ms listening on port 35155 INFO: Grizzly Framework 1.9.18-k started in: 470ms listening on port 35160 INFO: Grizzly Framework 1.9.18-k started in: 513ms listening on port 35159 INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider = org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider@5be8f4 INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 INFO: Binding RMI port to *:35165 INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://PC-de-Charlotte:35165/jndi/rmi://PC-de-Charlotte:35165/jmxrmi INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started INFO: Grizzly Framework 1.9.18-k started in: 150ms listening on port 35159 INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\sges-v3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-330907148519261411, felix.fileinstall.filter = null} INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-2938963288421854459, felix.fileinstall.filter = null} INFO: Grizzly Framework 1.9.18-k started in: 95ms listening on port 35160 INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: Installed C:\Program Files\sges-v3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-6474085409014899009, felix.fileinstall.filter = null} And there is no message such as "Glassfish started"! So, when I try to access to the admin web interface: localhost:4848 or localhost:8080 or localhost:8181 , It doesn't work. What should I do? Thank you very much, Regards.

    Read the article

  • How to configure a system-wide package in osgi?

    - by cheng81
    I need to made available a library to some bundles. This library makes use of RMI, so it needs (as far as I know, at least) to use the system class loader in order to work (I tried to "osgi-fy" the library, which results in classcastexceptions at runtime). So what I did was to remove the dependencies from the bundles that use that library, compile them with the library included in the property jars.extra.classpath (in the build.properties of the eclipse project). Then I added org.osgi.framework.bootdelegation=com.blipsystems.* in the felix configuration file and started the felix container with the followin command line: java -classpath lib/blipnetapi.jar -jar bin/felix.jar ..which in turns throwed a NoClassDefFoundException for a class of the blipnetapi.jar library: ERROR: Error starting file:/home/frza/felix/load/BlipnetApiOsgiService_1.0.0.1.jar (org.osgi.framework.BundleException: Activator start error in bundle BlipnetApiOsgiService [30].) java.lang.NoClassDefFoundError: com/blipsystems/blipnet/api/util/BlipNetSecurityManager at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3525) at org.apache.felix.framework.Felix.activateBundle(Felix.java:1694) at org.apache.felix.framework.Felix.startBundle(Felix.java:1621) at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1076) at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.blipsystems.blipnet.api.util.BlipNetSecurityManager at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:726) at org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1631) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 11 more So my question is: am I missing something? I did something wrong?

    Read the article

  • Producing Mini Dumps for _caught_ SEH exceptions in mixed code DLL

    - by Assaf Lavie
    I'm trying to use code similar to clrdump to create mini dumps in my managed process. This managed process invokes C++/CLI code which invokes some native C++ static lib code, wherein SEH exceptions may be thrown (e.g. the occasional access violation). C# WinForms -> C++/CLI DLL -> Static C++ Lib -> ACCESS VIOLATION Our policy is to produce mini dumps for all SEH exceptions (caught & uncaught) and then translate them to C++ exceptions to be handled by application code. This works for purely native processes just fine; but when the application is a C# application - not so much. The only way I see to produce dumps from SEH exceptions in a C# process is to not catch them - and then, as unhandled exceptions, use the Application.ThreadException handler to create a mini dump. The alternative is to let the CLR translate the SEH exception into a .Net exception and catch it (e.g. System.AccessViolationException) - but that would mean no dump is created, and information is lost (stack trace information in Exception isn't as rich as the mini dump). So how can I handle SEH exceptions by both creating a minidump and translating the exception into a .Net exception so that my application may try to recover?

    Read the article

  • Glassfish V3 won't start

    - by Zakaria
    Hi everybody, I installed NetBeans 6.8 and tried to run the GlasshFish V3 server. I'm working under Windows Vista 32 Bits. First, it won't run. Then I modified the c:\Windows\System32\drivers\etc\hosts file and put the following line into it: 127.0.0.1 localhost And when I run the GlasshFish V3 Server, no error is showing but only "INFOs" are displayed: 3 avr. 2010 19:23:19 com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Felix platform Welcome to Felix ================ INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:24 CEST 2010 INFO: Starting Grizzly Framework 1.9.18-k - Sat Apr 03 19:23:25 CEST 2010 INFO: Grizzly Framework 1.9.18-k started in: 423ms listening on port 35127 INFO: GlassFish v3 (74.2) startup time : Felix(4456ms) startup services(1709ms) total(6165ms) INFO: Grizzly Framework 1.9.18-k started in: 459ms listening on port 35116 INFO: Grizzly Framework 1.9.18-k started in: 428ms listening on port 35155 INFO: Grizzly Framework 1.9.18-k started in: 470ms listening on port 35160 INFO: Grizzly Framework 1.9.18-k started in: 513ms listening on port 35159 INFO: javassist.util.proxy.ProxyFactory.classLoaderProvider = org.glassfish.weld.WeldActivator$GlassFishClassLoaderProvider@5be8f4 INFO: Hibernate Validator bean-validator-3.0-JBoss-4.0.2 INFO: Binding RMI port to *:35165 INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. INFO: JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://PC-de-Charlotte:35165/jndi/rmi://PC-de-Charlotte:35165/jmxrmi INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate INFO: [Thread[GlassFish Kernel Main Thread,5,main]] started INFO: Grizzly Framework 1.9.18-k started in: 150ms listening on port 35159 INFO: Perform lazy SSL initialization for the listener 'http-listener-2' INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Program Files\sges-v3\glassfish\modules\autostart, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-330907148519261411, felix.fileinstall.filter = null} INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-2938963288421854459, felix.fileinstall.filter = null} INFO: Grizzly Framework 1.9.18-k started in: 95ms listening on port 35160 INFO: Updating configuration from org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: Installed C:\Program Files\sges-v3\glassfish\modules\autostart\org.apache.felix.fileinstall-autodeploy-bundles.cfg INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = C:\Users\Charlotte\.netbeans\6.8\GlassFish_v3\autodeploy\bundles, felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, felix.fileinstall.tmpdir = C:\Users\CHARLO~1\AppData\Local\Temp\fileinstall-6474085409014899009, felix.fileinstall.filter = null} And there is no message such as "Glassfish started"! So, when I try to access to the admin web interface: localhost:4848 or localhost:8080 or localhost:8181 , It doesn't work. What should I do? Thank you very much, Regards.

    Read the article

  • Manual stack backtrace on Windows mobile (SEH)

    - by caahab
    Following situation: I'm developing an windows mobile application using the sdk 6. Target machine is a nautiz x7. To improve the error reporting I want to catch the structured exceptions (SEH) and do a stack backtrace to store some information for analysis. So far I have the information where the exception was thrown (windows core.dll) and I can backtrace the return adresses thru the stack. But what I want to know is, which instruction in my code caused the exception? Does anyone know how to use the available exception and context information to get the appropriate function/instruction address? Unfortunately windows mobile 6 sdk for pocketpc does not support all the helper functions to do stackwalks or mini dumps.

    Read the article

  • Starting Wicket web application with OSGi HTTP Service

    - by Jaime Soriano
    I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias", "/"); props.put("init.applicationClassName", MainApplication.class.getName()); registration = context.registerService(Servlet.class.getName(), new WicketServlet(), props); In both cases it fails when I deploy it using Pax Runner and Felix (mvn package install pax:run -Dframework=felix -Dprofiles=log,config), the exception seems to be related with the ClassLoader: [Jetty HTTP Service] ERROR org.apache.felix.http.whiteboard - Failed to register servlet org.apache.wicket.WicketRuntimeException: Unable to create application of class es.warp.sample.HTTPLocalGUI.MainApplication .... .... at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) .... .... I have tried to export everything in the bundle and it does the same. The strangest thing is that it works perfectly if I deploy it using Equinox (mvn package install pax:run -Dframework=felix -Dprofiles=log,config). It seems to be a visibilty issue, but I don't know how to fix it, am I doing something wrong? Should I try to extend WicketServlet to take control on the instantiation of the application? Or maybe using an application Factory? Any light is welcomed.

    Read the article

  • Correct For Loop Design

    - by Yttrill
    What is the correct design for a for loop? Felix currently uses if len a > 0 do for var i in 0 upto len a - 1 do println a.[i]; done done which is inclusive of the upper bound. This is necessary to support the full range of values of a typical integer type. However the for loop shown does not support zero length arrays, hence the special test, nor will the subtraction of 1 work convincingly if the length of the array is equal to the number of integers. (I say convincingly because it may be that 0 - 1 = maxval: this is true in C for unsigned int, but are you sure it is true for unsigned char without thinking carefully about integral promotions?) The actual implementation of the for loop by my compiler does correctly handle 0 but this requires two tests to implement the loop: continue: if not (i <= bound) goto break body if i == bound goto break ++i goto continue break: Throw in the hand coded zero check in the array example and three tests are needed. If the loop were exclusive it would handle zero properly, avoiding the special test, but there'd be no way to express the upper bound of an array with maximum size. Note the C way of doing this: for(i=0; predicate(i); increment(i)) has the same problem. The predicate is tested after the increment, but the terminating increment is not universally valid! There is a general argument that a simple exclusive loop is enough: promote the index to a large type to prevent overflow, and assume no one will ever loop to the maximum value of this type.. but I'm not entirely convinced: if you promoted to C's size_t and looped from the second largest value to the largest you'd get an infinite loop!

    Read the article

  • Basis of definitions

    - by Yttrill
    Let us suppose we have a set of functions which characterise something: in the OO world methods characterising a type. In mathematics these are propositions and we have two kinds: axioms and lemmas. Axioms are assumptions, lemmas are easily derived from them. In C++ axioms are pure virtual functions. Here's the problem: there's more than one way to axiomatise a system. Given a set of propositions or methods, a subset of the propositions which is necessary and sufficient to derive all the others is called a basis. So too, for methods or functions, we have a desired set which must be defined, and typically every one has one or more definitions in terms of the others, and we require the programmer to provide instance definitions which are sufficient to allow all the others to be defined, and, if there is an overspecification, then it is consistent. Let me give an example (in Felix, Haskell code would be similar): class Eq[t] { virtual fun ==(x:t,y:t):bool => eq(x,y); virtual fun eq(x:t, y:t)=> x == y; virtual fun != (x:t,y:t):bool => not (x == y); axiom reflex(x:t): x == x; axiom sym(x:t, y:t): (x == y) == (y == x); axiom trans(x:t, y:t, z:t): implies(x == y and y == z, x == z); } Here it is clear: the programmer must define either == or eq or both. If both are defined, the definitions must be equivalent. Failing to define one doesn't cause a compiler error, it causes an infinite loop at run time. Defining both inequivalently doesn't cause an error either, it is just inconsistent. Note the axioms specified constrain the semantics of any definition. Given a definition of == either directly or via a definition of eq, then != is defined automatically, although the programmer might replace the default with something more efficient, clearly such an overspecification has to be consistent. Please note, == could also be defined in terms of !=, but we didn't do that. A characterisation of a partial or total order is more complex. It is much more demanding since there is a combinatorial explosion of possible bases. There is an reason to desire overspecification: performance. There also another reason: choice and convenience. So here, there are several questions: one is how to check semantics are obeyed and I am not looking for an answer here (way too hard!). The other question is: How can we specify, and check, that an instance provides at least a basis? And a much harder question: how can we provide several default definitions which depend on the basis chosen?

    Read the article

  • C++ and system exceptions

    - by Abyx
    Why standard C++ doesn't respect system (foreign or hardware) exceptions? E.g. when null pointer dereference occurs, stack isn't unwound, destructors aren't called, and RAII doesn't work. The common advice is "to use system API". But on certain systems, specifically Win32, this doesn't work. To enable stack unwinding for this C++ code // class Foo; // void bar(const Foo&); bar(Foo(1, 2)); one should generate something like this C code Foo tempFoo; Foo_ctor(&tempFoo); __try { bar(&tempFoo); } __finally { Foo_dtor(&tempFoo); } Foo_dtor(&tempFoo); and it's impossible to implement this as C++ library. Upd: Standard doesn't forbid handling system exceptions. But it seems that popular compilers like g++ doesn't respect system exceptions on any platforms just because standard doesn't require this. The only thing that I want - is to use RAII to make code readable and program reliable. I don't want to put hand-crafted try\finally around every call to unknown code. For example in this reusable code, AbstractA::foo is such unknown code: void func(AbstractA* a, AbstractB* b) { TempFile file; a->foo(b, file); } Maybe one will pass to func such implementation of AbstractA, which every Friday will not check if b is NULL, so access violation will happen, application will terminate and temporary file will not be deleted. How many months uses will suffer because of this issue, until either author of func or author of AbstractA will do something with it? Related: Is `catch(...) { throw; }` a bad practice?

    Read the article

  • Maven: Unresolved references to [org.osgi.service.http]

    - by Simone Vellei
    I'm trying to create a bundle using HttpService for register Servlet using maven-bundle-plugin. The pom.xml of the project is: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>felix-tutorial</groupId> <artifactId>example-1</artifactId> <version>1.0</version> <packaging>bundle</packaging> <name>Apache Felix Tutorial Example 1</name> <description>Apache Felix Tutorial Example 1</description> <!-- Build Configuration --> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${pom.groupId}.${pom.artifactId}</Bundle-SymbolicName> <Bundle-Name>Service listener example</Bundle-Name> <Bundle-Description>A bundle that displays messages at startup and when service events occur</Bundle-Description> <Bundle-Vendor>Apache Felix</Bundle-Vendor> <Bundle-Version>1.0.0</Bundle-Version> <Bundle-Activator>tutorial.example1.Activator</Bundle-Activator> <Import-Package>org.osgi.framework;version="1.0.0", javax.servlet, javax.servlet.http</Import-Package> </instructions> </configuration> </plugin> </plugins> </build> <!-- Dependecies Management --> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.framework</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.api</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.base</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.bridge</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.bundle</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.proxy</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.whiteboard</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.osgi</groupId> <artifactId>osgi_R4_compendium</artifactId> <version>1.0</version> </dependency> </dependencies> </project> "mvn install" command returns the following error: [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Apache Felix Tutorial Example 1 [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jar Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.pom Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.pom Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.pom Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-interpolation/1.6/plexus-interpolation-1.6.jar Downloading: http://repo1.maven.org/maven2/org/apache/maven/shared/maven-filtering/1.0-beta-2/maven-filtering-1.0-beta-2.jar [INFO] [resources:resources {execution: default-resources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\eclipse\ws\stripes-bundle\src\main\resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory C:\eclipse\ws\stripes-bundle\src\test\resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\eclipse\ws\stripes-bundle\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.beanopoly.stripes.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [bundle:bundle {execution: default-bundle}] [ERROR] Error building bundle felix-tutorial:example-1:bundle:1.0 : Unresolved references to [org.osgi.service.http] by class(es) on the Bundle-Classpath[Jar:do [ERROR] Error(s) found in bundle configuration [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error(s) found in bundle configuration [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 12 seconds [INFO] Finished at: Sat Mar 27 13:11:47 CET 2010 [INFO] Final Memory: 12M/21M [INFO] ------------------------------------------------------------------------

    Read the article

  • How can I catch an invalid fgetpos call as a C++ exception on Windows?

    - by Brent Arias
    In Visual C++ 2008, I want to "catch" an exception generated as shown here: try { int foo = 20; ::fgetpos(0, (fpos_t*)&foo); } //... Here are adjustments I've made to attempt a successful catch: SEH is activated (/eha) I've added a catch(...) I've added a _set_se_translator vector. I've added/adjusted to SEH syntax: __try / __except(EXCEPTION_EXECUTE_HANDLER) In short, I've tried "everything in the book" and I still can't catch the exception. If I replace the call to ::fgetpos with int hey = foo / 0 then suddenly all of the above techniques work as expected. So the exception I'm dealing with from ::fgetpos is somehow "extra special." Can someone explain why this ::fgetpos error seems uncatchable, and how to work around it? update When executed in the VS IDE, the output window doesn't name an exception. All it says is this: Microsoft Visual Studio C Runtime Library has detected a fatal error in MyProgram.exe. Not very helpful. When I run the console app from the command line, I get a crash dialogue. The "problem details" section of the dialogue includes this information: Problem Event Name: BEX Exception Offset:0002fd30 Exception Code: c0000417 Exception Data: 00000000 Additional Information 1:69ad Additional Information 2:69addfb19767b2221c8e3e7a5cd2f4ae Additional Information 3:b1ff Additional Information 4:b1ffca30cadddc78c19f19b6d150997f

    Read the article

  • Migrating to OSGi?

    - by Paul McKenzie
    We're currently running server-side java apps on windows using JavaServiceWrapper and this has been a good solution for us. We have a small number of Spring-based lightweight applications. But now we need to look at introducing some modularity into our services. To that end I have been thinking about OSGi. I need to know which OSGi containers are ready for prime-time production use in a medium-ish load environment? Eclipse Equinox 3.5.xKnopflerfish 3.xApache Felix 2.xAnything else?

    Read the article

  • Windows32 API: "mov edi,edi" on function entry?

    - by Ira Baxter
    I'm stepping through Structured Error Handling recovery code in Windows 7 (e.g, what happens after SEH handler is done and passes back "CONTINUE" code). Here's a function which is called: 7783BD9F mov edi,edi 7783BDA1 push ebp 7783BDA2 mov ebp,esp 7783BDA4 push 1 7783BDA6 push dword ptr [ebp+0Ch] 7783BDA9 push dword ptr [ebp+8] 7783BDAC call 778692DF 7783BDB1 pop ebp 7783BDB2 ret 8 I'm used to the function prolog of "push ebp/mov ebp,esp". What's the purpose of the "mov edi,edi"?

    Read the article

  • warning C6242: A jump out of this try-block forces local unwind

    - by Benjamin
    When we use SEH with __finally block, if we do return in __try block, it causes a local unwind. To Local unwind, the system need to approximately 1000 instructions. The local unwind causes a warning C6242. MSDN suggests using __leave keyword(with saving a return value). But I don't think it's a good idea. If we save a return value and leave the block, there will be many mistakes. Is the waring really necessary? What do you prefer?

    Read the article

  • Windows Structured Exception Handling: simple test program will not compile.

    - by Jon
    #include <windows.h> int main() { int* i = (int*)malloc(sizeof(int)); *i = 5; __try { free(i); free(i); } __except { return -1; } return 0; } I am trying to learn more about windows SEH. My first test program is giving me some real trouble. I have looked at the msdn documentation and I am still not really sure what I have wrong. I am getting the following errors when I try to compile this program: error C2059: syntax error : '{' error C2143: syntax error : missing ';' before '{' both on line 15. Thanks.

    Read the article

  • Knopflerfish packaging

    - by Jens
    Hello, I am at the moment creating a matrix which is showing how far Knopflerfish, Equinox and Felix are OSGi 4.2 compliant. So far I looked at the Knopflerfish documentation (Link 1, Link 2) to get an idea of how much of the Core and Compendium specs are actually implemented. The core specification seems to be fully implemented, although there are some inconsistent statements about the Security Layer and the Declarative Services. What makes me wonder is how much of all the Compendium specs are implemented: Remote Services Log Service Http Service Device Access Configuration Admin Service Metatype Service Preferences Service User Admin Service Wire Admin Service IO Connector Service Initial Provisioning UPnP Device Service Declarative Services Event Admin Service Deployment Admin Auto Configuration Application Admin DMT Admin Service Monitor Admin Service Foreign Application Access Blueprint Container Tracker XML Parser Service Position Measurement and State Execution Environment To find out more I downloaded (Download page) the source code of Knopflerfish and had a look at it. It looks like some parts of the spec are implemented through the "original" framework provided by the OSGi Alliance (org.osgi.*). One example is the UPnP package: Does this mean that missing parts which are not directly implemented by Knopflerfish are added through the "original" OSGi framework? And does this also apply to other frameworks like Felix or Equinox?

    Read the article

  • How to profile the execution of an OSGi deployment?

    - by Jaime Soriano
    I'm starting the development of an OSGi bundle for an application that will be deployed in a device with some hardware limitations. I'd like to know how could I profile the execution of that bundle to be always sure that it's going to fit with its dependencies in the final device. It would be nice to have a profiler to know how much memory is each bundle using, to localize bottle necks and to compare different implementations of the same service. Is there any profiler for OSGi deployments or should I use a general Java profiler? For developing I'm using Pax runner with Apache felix to run the bundle and maven to manage project dependencies and building.

    Read the article

  • Trouble understanding the whole OSGi web eco system

    - by Jens
    Hello, I am pretty new to the whole Java and OSGi world and I have trouble understanding the eco system of a OSGi web application. To be more precise I am at the moment trying to understand how all the parts of the eco system are related to each other: OSGi Framework (e.g. Apache Felix, Equinox, Knoplerfish) OSGi Runtime (e.g. Spring DM Server, Pax Runner, Apache Karaf) Web Extender (e.g. Pax Web Extender, Spring Web Extender) Web Container (e.g. Apache Tomcat, Jetty) To give you a visual representation of my actual understanding of their relationship check out this image: As far as I know the OSGi Framework is a implementation of the OSGi specification. The runtime is a distribution which adds additional functionality on top of the OSGi specification like logging for instance. Since there seem to be some differences in the classpath mechanism of OSGi and web containers like Tomcat you need some kind of translator. This part is handled by the "Web Extender". Would you please clarify this whole thing for me? Am I understanding everything correct?

    Read the article

  • Error while deploying a web application in OSGI container using pax web

    - by RaulDM
    Hello I am trying to deploy a web application in a Felix container. I have all the required configuration done with my web app like the setting up of the manifest headers: Webapp-Context: Bundle-ClassPath: Bundle-Activator: Import-Package: Bundle-SymbolicName: etc The Pax bundles that I have dropped in the same container are: pax-web-service-0.6.0.jar pax-web-jsp-0.7.1.jar pax-web-extender-war-0.7.1.jar pax-logging-service-1.5.0.jar pax-logging-api-1.5.0.jar Though it had been written in the pax web site that pax-web-service is included in pax-war-extender, it seems without pax-web-service bundle, all other bundles become handicapped. I had removed the other pax bundles like pax-web-extender-whiteboard-0.7.1.jar pax-web-jetty-0.7.1.jar, as I have not seen any usefulness of those. The pax-web-jetty-0.7.1.jar even does not get start up. it has dependencies which it could not be able to resolve from any one of the bundle provided by PAX. My browser is displaying: HTTP ERROR 403 Problem accessing /adminmodule/. Reason: FORBIDDEN Powered by Jetty:// while the Console log says: [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - REQUEST /adminmodule/ on org.mortbay.jetty.HttpConnection@1e94001 [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.model.ServerModel - Matching [/adminmodule/]... [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.model.ServerModel - Path [/adminmodule/] matched to {pattern=/adminmodule/.*,model=ResourceModel{id=org.ops4j.pax.web.service.internal.model.ResourceModel-2,name=,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/adminmodule,alias=/,name=},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.internal.model.ContextModel-1,name=adminmodule,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@11710be,contextParams={webapp.context=adminmodule}}}} [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.HttpServiceContext - Handling request for [/adminmodule/] using http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@11710be] [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - sessionManager=org.mortbay.jetty.servlet.HashSessionManager@19c6163 [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - session=null [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - servlet= [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - chain=org.ops4j.pax.web.service.internal.model.FilterModel-3- [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - servlet holder= [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - call filter org.ops4j.pax.web.service.internal.model.FilterModel-3 [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.WelcomeFilesFilter - Apply welcome files filter... [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.WelcomeFilesFilter - Servlet path: / [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.service.internal.WelcomeFilesFilter - Path info: null [5884890@qtp-16567002-0 - /adminmodule/] INFO org.ops4j.pax.web.service.internal.HttpServiceContext - getting resource: [/adminmodule.jsp] [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext - Searching bundle [com.cisco.zaloni.gwt.admin [1]] for resource [/adminmodule.jsp], normalized to [adminmodule.jsp] [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext - Resource not found [5884890@qtp-16567002-0 - /adminmodule/] INFO org.ops4j.pax.web.service.internal.HttpServiceContext - found resource: null [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - call servlet [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext - Searching bundle [com.cisco.zaloni.gwt.admin [1]] for resource [/], normalized to [/] [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext - Resource found as url [bundle://1.0:1/] [5884890@qtp-16567002-0 - /adminmodule/] DEBUG org.mortbay.jetty - RESPONSE /adminmodule/ 403 It is really frustrating. please help. as I am new to OSGI. Raul

    Read the article

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