How 2 better build this Expression?

As you can see in the code below a null means don't use this object in the criteria. Conditionally building an Expression like this is rather cumbersome. There has got to be a better way to do this!
ExpressionBuilder builder = new ExpressionBuilder();
Expression expression = null;
if (name != null) {
expression = builder.get("name").equal(name);
if (age != null) {
if (expression == null) {
expression = builder.get("age").equal(age);
else {
expression = expression.and(builder.get("age").equal(age));
Collection persons = null;
if (expression == null) {
session.readAllObjects(Person.class);
else {
session.readAllObjects(Person.class, expression);

One thing that may help is that expression.and will allow you to pass in null (just returns the expression).
So...>>
ExpressionBuilder builder = new ExpressionBuilder();
Expression expression = null;
if (name != null) {
expression = builder.get("name").equal(name);
if (age != null) {
expression = (builder.get("age").equal(age)).and(expression);
Collection persons = session.readAllObjects(Person.class, expression);
You can also use query by example, which makes simple queries much simpler.

Similar Messages

  • How do I build an expression for a multi-element in-list?

    How do I build an expression for a multi-element in-list? For example:
    SELECT * FROM employees
    WHERE (first_name, last_name, email) IN
    (('Guy', 'Himuro', 'GHIMURO'),('Karen', 'Colmenares', 'KCOLMENA'))
    Passing a Vector to Expression.in(Vector) where each element is a Vector of values itself will result in the appropriate expression for the values clause, but how to I get the columns to be considered together, that is, how do I get the "(first_name, last_name, email)" part?
    Steve

    Steve,
    I do not believe this is currently supported in the TopLink expression framework. Your best bet at this point will be to use custom SQL.
    Doug

  • How do I build this array?

    I have a vi that generates two time intervals in ms. One interval is between the time a light turns on and button 1 is released (time 1). The other interval is the time between the same release and the press of button 2 (time 2).
    The vi loops through the light flashing/button press sequence until the number of set trials equals
    the number of correct trials.
    I want to build an array that records time 1 and time 2 for each trial. Something like this
    0.1200 1.3123
    0.2400 1.8979
    0.3423 2.4567
    etc.
    The way I've got it, the array ends up being just time 1 and time 2 from the last trial.
    0.3423 2.4567
    How do I set this up to do what I want.
    My vi is attached.
    Attachments:
    newredconstant.vi ‏99 KB

    Hope this help!
    Cheers!
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    Array.vi ‏26 KB

  • How can i use this expression in DECODE function?

    My PNO table formart is
    PNO PDate PCount
    P001 08/27/05 09:45 20
    P001 08/27/05 09:50 10
    P002 08/27/05 03:40 20
    P003 08/28/05 11:00 20
    P003 09/28/05 10:00 20
    P003 08/27/05 11:00 10
    P003 09/27/05 04:00 50
    I want to display total pcount for shift1(morning) and shift2(evening) & the date is 08/27/05
    PNO Shift1(08/27/2005 08:00 to 12:30) Shift2(08/27/2005 02:00 to 05:30)
    P001 30 0
    P002 0 20
    P004 10 50
    So for shift1 condition is:
    pdate>=08/27/2005 08:00 and pdate<=08/27/2005 12:30
    So for shift2 condition is:
    pdate>=08/27/2005 02:00 and pdate<=08/27/2005 05:30
    If i tried to give this expression in decode function , its not working.
    Please give me the sql query to solve this problem.
    Millions of thanks in advacne

    forgot to paste the output for a given date.
    SQL> create table pno
      2  (pno    varchar2(32)
      3  ,pdate  date
      4  ,pcount number)
      5  /
    Table created.
    SQL>
    SQL> insert into pno values('P001', to_Date('08/27/05 09:45', 'mm/dd/yy hh:mi') ,20)
      2  /
    1 row created.
    SQL> insert into pno values('P001', to_Date('08/27/05 09:50', 'mm/dd/yy hh:mi') ,10)
      2  /
    1 row created.
    SQL> insert into pno values('P002', to_Date('08/27/05 03:40', 'mm/dd/yy hh:mi') ,20)
      2  /
    1 row created.
    SQL>
    SQL> insert into pno values('P003', to_Date('08/28/05 11:00', 'mm/dd/yy hh:mi') ,20)
      2  /
    1 row created.
    SQL> insert into pno values('P003', to_Date('09/28/05 10:00', 'mm/dd/yy hh:mi') ,20)
      2  /
    1 row created.
    SQL> insert into pno values('P003', to_Date('08/27/05 11:00', 'mm/dd/yy hh:mi') ,10)
      2  /
    1 row created.
    SQL> insert into pno values('P003', to_Date('09/27/05 04:00', 'mm/dd/yy hh:mi') ,50)
      2  /
    1 row created.
    SQL> select pno,sum(pcount) "Morning Shift Count"
      2  from pno
      3  where to_char(pdate, 'mm/dd/yyyy hh:mi') >= '08/27/2005 08:00'
      4    and to_char(pdate, 'mm/dd/yyyy hh:mi') <='08/27/2005 12:30'
      5  group by pno
      6  /
    PNO                              Morning Shift Count                           
    P001                                              30                           
    P003                                              10                           
    SQL> select pno,sum(pcount) "Evening Shift Count"
      2  from pno
      3  where to_char(pdate, 'mm/dd/yyyy hh:mi') >= '08/27/2005 02:00'
      4    and to_char(pdate, 'mm/dd/yyyy hh:mi') <='08/27/2005 05:30'
      5  group by pno
      6  /
    PNO                              Evening Shift Count                           
    P002                                              20                           

  • How can I build this in Flash?

    I am trying to figure out how to build the scrolling sideshow
    navigation on the
    Washington Post.com
    homepage.
    It's Right below "Diversions" and right above "Ways You Can
    Get Us". Currently it has a picture of Imus on the pane. I like how
    three pictures are shown with captions and a link as well as the
    data looks like it's pulled from an XML file.
    Any pointers to tutorials or commercial products like it
    would be appreciated.
    Thanks,
    Bob

    For the moving things with the mouse side of things, look
    into startDrag() and stopDrag().
    For the motion of things relative to the mouse, you need to
    have code that continuously monitors the position of the mouse (x
    and y values) and adjusts the positions of an object (or in your
    example, several of them). For the continuous montioring you would
    use some form of an onEnterFrame code (AS version dependent). What
    this does is continuously fire at the frame rate of the movie in
    the frame that it is assigned.
    Specific answers to your questions depend on which version of
    actionscript you are using, but if you do a search in Google for
    the terms I've used here (startDrag, mouseX, onEnterFrame, etc)
    prefixed with the version of actionscript you plan to use, then you
    should find plenty of info to review (example: search Google for
    "AS3 startDrag").
    I'd say search the Flash help docs, but they are usually only
    good if you know the correct name of properties/methods before you
    search, which change between AS versions. For instance, if you
    serached the AS3 help docs for onEnterFrame, you'd end up finding
    something like what you would want, but that's only because they
    happened to have an example where they created a function by that
    name. The actual monitoring is done using an event listener with
    Event.ENTER_FRAME as the event type. In AS2, onEnterFrame is a
    genuine language element... a method of the MovieClip class.

  • How Do I Build This in the Portal?

    I am a new to SAP Enterprise Portal and have some little Java development experience. I have built a Java system using Sun One Studio and Tomcat that includes the following:
    1. A JSP that presents a table of customers to a sales rep, allowing them to search on customer name, city, state and/or zip code.
    2. A Java module to act as controller, receiving the JSP as input, passing the selection parms to the XML module, receiving an ArrayList of customer objects in return and then re-displaying the JSP.
    3. A Java XML module that uses the SAX classes to read through an XML file, selecting customers based on the specified criteria.
    4. A helper class that creates customer objects passed in the ArrayList.
    I have searched through SDN and have read a lot of material, and am now asking for some advice. How should this be designed and programmed so that it will execute within SAP Enterprise Portal 6.0? Is NetWeaver Developer Studio the proper tool to use?
    I can provide more information, if necessary.
    Any help you give me would be greatly appreciated!

    Thanks for your reply!
    I've already down-loaded NWDS and have built two applications - one launches iNotes (Notes WebMail) and the other applies an XSLT against an XML file (an adaptation of one of the entries in SDN).
    But with regard to the design - what approach should I use? Based on what I described above (experience with JSP and servlets) creating an Abstract Portal Component doesn't seem right, and neither does creating a Dynpro app.
    Anybody else have any ideas? Is there any rough equivalent to the JSP/servlet design?
    Much appreciated!

  • How do I build this gallery?

    Hi,
    I am trying to build a gallery for myself, and as a beginner,
    I pretty much have no idea what I am doing.
    I want there to be a large image, below that a menu bar, and
    in the middle of that a few thumbnails. I want buttons to make the
    thumbnails slide along to the next set. (so, 1-5, then 6-10, etc.
    The link below has what I am trying to achieve (go into site,
    then into a gallery)
    Gallery Example
    Can anyone point me in the right direction? I would really
    appreciate it.
    Thanks,
    Hugh

    Hope this help!
    Cheers!
    Ian F
    Since LabVIEW 5.1... 7.1.1... 2009, 2010
    依恩与LabVIEW
    LVVILIB.blogspot.com
    Attachments:
    Array.vi ‏26 KB

  • How can I build this cluster? I don't like the one I have created (too big)

    Hi everybody, I'm working with a Vision VI and the trouble is that I need to create a cluster to connect it to a terminal called Settings of the Vision VI (IMAQ Count objects). These settings includes booleans, long and unsigned word type values. I've seen this one in a pdf document:
    I like how it looks because it's in a reduced space.
    This is the one I've created:
    (Please ignore the red numbers 1 and 2)
    And the block diagram looks like this:
    If someone knows how make a VI as the first image, please post it.
    Thank you so much for your answers and comments.
    P.S. I use LabView 2009, maybe some features are not availables in newers versions.
    Impossible is nothing
    Solved!
    Go to Solution.

    You did not create a cluster, just some individual controls that you are bundling in the code. that's not the same!
    I would recommend a combination approach from what we heard so far.
    First, create a control on the subVI input. Now we know it has the correct type.
    Right-click each control you don't like and replace it with one from a different palette (modern, classic, system), making sure you keep the same datatype. Keep the wire connected to the subVI. If the wire breaks, you picked a wrong datatype. simply undo and try again. (This way, the cluster order should not change).
    Now rearrange the controls the way you want.
    Here's are two quick examples I just made from scratch.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    Settings.PNG ‏17 KB

  • How do I build this applet?

    I want to put a drag and drop design interface on my site like this one:
    http://www.ezbeads.com/cgi-bin/design.htm
    I am new to Java. What is the best way to create something like this? Is it easily learned? Or is there an applet out there that might work?
    Thanks,
    DC

    What is your goal ? If you need to develope using a secure tool then you should begin using C++ for basic trainment and as a second step begin to develope small applications on JAVA.
    In the site http://www.sun.com you maybe find tutorial for use and learn Java. Java is easy if you know oriented objects model.
    Good luck. Every people begin with the same question "Is Java easy to learn ...?"

  • Help in building an Expression

    Hi,
    Would really appreciate help on this one.
    I am trying to write an expression that generates the following SQL:
    select count (*)
    from ntf_messages a, ga_languages b, ga_language_code c
    where a.language_id = b.language_id
    and b.language_code_id = c.language_code_id
    and length(a.MESSAGE_TEXT) > 1 * (1120/c.BITS_PER_CHARACTER)
    This is a simple 3 tables join with a mathematical expression that I am not sure how to implement - I was trying to use the ExpressionMath.divide(..) method, but it divides an expression by a number and not a number by expression..
    My objects' structures is:
    I have a notificationMessage object that has a m_messageText member of type String (mapped to a.MESSAGE_TEXT) and a m_Language member which is an embedde object of type Language.
    The language object has got an m_languageCode member which is an embedded object of type LanguageCode.
    The languageCode object has got a member m_bitsPerCharacter which is of type int and is mapped to the table field BITS_PER_CHARACTER of the table: ga_language_code.
    I was trying to write something in the form of:
    ExpressionBuilder builder = new ExpressionBuilder(NotificationMsg.class);
    ReportQuery reportQuery = new ReportQuery();
    reportQuery.setReferenceClass(NotificationMsg.class);
    reportQuery.setSelectionCriteria(builder.get("m_messageText").length().greaterThan(1 * 1120 / builder.get("m_language.m_languageCode.m_bitsPerCharacter")) );
    But this is wrong since I am dividing a number by expression, and obviously it cannot be done.
    Thanks in advance for any help in building this expression,
    Michal

    I was trying to use the ExpressionMath.divide(..) method, but it divides an expression by a number and not a number by expression..This method also takes an Expression and Object parameter, which can be another expression. You can also use the Expression.value(Object) method to create an expression from a number.
    reportQuery.setSelectionCriteria(builder.get("m_messageText").length().greaterThan(1 * 1120 / builder.get("m_language.m_languageCode.m_bitsPerCharacter")) );Try,
    reportQuery.setSelectionCriteria(
    builder.get("m_messageText").length().greaterThan(
    ExpressionMath.multiply(
    ExpressionMath.divide(
    builder.value(1),
    builder.get("m_language.m_languageCode.m_bitsPerCharacter")),
    1)));

  • Any ideas how to better troubleshoot VPN issue?

    Hi,
    I've recently upgraded my WLAN router to a brand new AVM FRITZ!Box WLAN 7390, in part for its VPN capabilities.
    So far, I've been unable to create a working connection.
    AVM's VPN is based on Cisco IPSec, and they provide a step-by-step procedure on how configure a Mac-based VPN connection (http://www.avm.de/de/Service/Service-Portale/Service-Portal/VPN_Interoperabilita et/16206.php - unfortunately only available in German, sorry). Following it, I still can't get it to work. Contacting their support I got first the same procedure and after pointing out I already followed it a "we don't support other vendors".
    Funny enough, I got a second VPN connection to my work's VPN server just fine, though admittedly there we have a true Cisco box.
    My initial setup was based on a 192.x.x.x net on my AVM, I could establish a VPN connection but coudn't ping/ssh/http/you-name-the-protocol in either direction. Our companies net is a 10.x.x.x net so, and as I have also VMware fusion running on my Mac with DHCP enabled on a different 192.x.x.x net plus a third 192.x.x.x net from my Wifi access I decided to reconfigure my AVM net to a 172.x.x.x net and stop VMware services for the tests (ie simplify as much as I could to help troubleshoot).
    Alas, instead of being able to establish a non-working VPN connection, now I ain't able to get the tunnel up. IKE Phase 1 completes but Phase 2 doesn't.
    Here's the relevant section from kernel.log:
    Dec 30 11:47:57 jupiter configd[16]: IPSec connecting to server <myservernameismybusiness>.dyndns.info
    Dec 30 11:47:57 jupiter configd[16]: SCNC: start, triggered by SystemUIServer, type IPSec, status 0
    Dec 30 11:47:57 jupiter configd[16]: IPSec Phase1 starting.
    Dec 30 11:47:57 jupiter racoon[1910]: IPSec connecting to server 77.x.x.x
    Dec 30 11:47:57 jupiter racoon[1910]: Connecting.
    Dec 30 11:47:57 jupiter racoon[1910]: IPSec Phase1 started (Initiated by me).
    Dec 30 11:47:57 jupiter racoon[1910]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
    Dec 30 11:47:58 jupiter racoon[1910]: IKEv1 Phase1 AUTH: success. (Initiator, Aggressive-Mode Message 2).
    Dec 30 11:47:58 jupiter racoon[1910]: IKE Packet: receive success. (Initiator, Aggressive-Mode message 2).
    Dec 30 11:47:58 jupiter racoon[1910]: IKEv1 Phase1 Initiator: success. (Initiator, Aggressive-Mode).
    Dec 30 11:47:58 jupiter racoon[1910]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 3).
    Dec 30 11:47:58 jupiter racoon[1910]: IKE Packet: transmit success. (Information message).
    Dec 30 11:47:58 jupiter racoon[1910]: IKEv1 Information-Notice: transmit success. (ISAKMP-SA).
    Dec 30 11:47:58 jupiter racoon[1910]: IPSec Phase1 established (Initiated by me).
    Dec 30 11:47:58 jupiter racoon[1910]: IPSec Extended Authentication requested.
    Dec 30 11:47:58 jupiter configd[16]: IPSec requesting Extended Authentication.
    Dec 30 11:48:01 jupiter configd[16]: IPSec sending Extended Authentication.
    Dec 30 11:48:01 jupiter racoon[1910]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 11:48:01 jupiter racoon[1910]: IPSec Extended Authentication sent.
    Dec 30 11:48:02 jupiter racoon[1910]: IKEv1 XAUTH: success. (XAUTH Status is OK).
    Dec 30 11:48:02 jupiter racoon[1910]: IPSec Extended Authentication Passed.
    Dec 30 11:48:02 jupiter racoon[1910]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 11:48:02 jupiter racoon[1910]: IKEv1 Config: retransmited. (Mode-Config retransmit).
    Dec 30 11:48:02 jupiter racoon[1910]: IPSec Network Configuration requested.
    Dec 30 11:48:03 jupiter racoon[1910]: IPSec Network Configuration established.
    Dec 30 11:48:03 jupiter racoon[1910]: IKE Packet: receive success. (MODE-Config).
    Dec 30 11:48:03 jupiter configd[16]: IPSec Network Configuration started.
    Dec 30 11:48:03 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-ADDRESS = 172.77.7.14.
    Dec 30 11:48:03 jupiter configd[16]: IPSec Network Configuration: SAVE-PASSWORD = 1.
    Dec 30 11:48:03 jupiter configd[16]: IPSec Network Configuration: DEFAULT-ROUTE = local-address 172.77.7.14/32.
    Dec 30 11:48:03 jupiter configd[16]: host_gateway: write routing socket failed, command 2, No such process
    Dec 30 11:48:03 jupiter configd[16]: IPSec Phase2 starting.
    Dec 30 11:48:03 jupiter configd[16]: IPSec Network Configuration established.
    Dec 30 11:48:03 jupiter configd[16]: IPSec Phase1 established.
    Dec 30 11:48:03 jupiter configd[16]: event_callback: Address added. previous interface setting (name: en1, address: 192.168.43.242), current interface setting (name: utun0, family: 1001, address: 172.77.7.14, subnet: 255.255.255.255, destination: 172.77.7.14).
    Dec 30 11:48:03 jupiter racoon[1910]: IPSec Phase2 started (Initiated by me).
    Dec 30 11:48:03 jupiter racoon[1910]: IKE Packet: transmit success. (Initiator, Quick-Mode message 1).
    Dec 30 11:48:03 jupiter configd[16]: network configuration changed.
    Dec 30 11:48:03 jupiter configd[16]: IPSec port-mapping update for en1 ignored: VPN is the Primary interface. Public Address: ac4d070e, Protocol: None, Private Port: 0, Public Port: 0
    Dec 30 11:48:03 jupiter configd[16]:
    Dec 30 11:48:03 jupiter configd[16]: setting hostname to "jupiter.local"
    Dec 30 11:48:03 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:06 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:07 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:09 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:09 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:12 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:13 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:15 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:15 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:18 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:18 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:21 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:21 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:24 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:25 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:27 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:27 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:30 jupiter racoon[1910]: IKE Packet: transmit success. (Phase2 Retransmit).
    Dec 30 11:48:30 jupiter racoon[1910]: IKE Packet: receive success. (Information message).
    Dec 30 11:48:33 jupiter configd[16]: IPSec disconnecting from server 77.x.x.x
    Dec 30 11:48:33 jupiter racoon[1910]: IPSec disconnecting from server 77.x.x.x
    Dec 30 11:48:33 jupiter racoon[1910]: IKE Packet: transmit success. (Information message).
    Dec 30 11:48:33 jupiter racoon[1910]: IKEv1 Information-Notice: transmit success. (Delete ISAKMP-SA).
    Dec 30 11:48:33 jupiter configd[16]: SCNC Controller: service_ending_verify_primaryservice, waiting for PrimaryService. status = 1
    Dec 30 11:48:33 jupiter configd[16]:
    Dec 30 11:48:33 jupiter configd[16]: network configuration changed.
    Dec 30 11:48:33 jupiter configd[16]: SCNC Controller: ipv4_state_changed, done waiting for ServiceID.
    Dec 30 11:48:33 jupiter configd[16]:
    Dec 30 11:48:33 jupiter configd[16]: setting hostname to "jupiter"
    When connecting to my work-place it looks like:
    Dec 30 12:33:14 jupiter configd[16]: IPSec connecting to server <mycompanyismybusiness>.ch
    Dec 30 12:33:14 jupiter configd[16]: SCNC: start, triggered by SystemUIServer, type IPSec, status 0
    Dec 30 12:33:14 jupiter configd[16]: IPSec Phase1 starting.
    Dec 30 12:33:14 jupiter racoon[1976]: IPSec connecting to server 62.x.x.x
    Dec 30 12:33:14 jupiter racoon[1976]: Connecting.
    Dec 30 12:33:14 jupiter racoon[1976]: IPSec Phase1 started (Initiated by me).
    Dec 30 12:33:14 jupiter racoon[1976]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
    Dec 30 12:33:14 jupiter racoon[1976]: IKEv1 Phase1 AUTH: success. (Initiator, Aggressive-Mode Message 2).
    Dec 30 12:33:14 jupiter racoon[1976]: IKE Packet: receive success. (Initiator, Aggressive-Mode message 2).
    Dec 30 12:33:14 jupiter racoon[1976]: IKEv1 Phase1 Initiator: success. (Initiator, Aggressive-Mode).
    Dec 30 12:33:14 jupiter racoon[1976]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 3).
    Dec 30 12:33:14 jupiter racoon[1976]: IPSec Phase1 established (Initiated by me).
    Dec 30 12:33:15 jupiter racoon[1976]: IPSec Extended Authentication requested.
    Dec 30 12:33:15 jupiter configd[16]: IPSec requesting Extended Authentication.
    Dec 30 12:33:21 jupiter configd[16]: IPSec sending Extended Authentication.
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Extended Authentication sent.
    Dec 30 12:33:21 jupiter racoon[1976]: IKEv1 XAUTH: success. (XAUTH Status is OK).
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Extended Authentication Passed.
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 12:33:21 jupiter racoon[1976]: IKEv1 Config: retransmited. (Mode-Config retransmit).
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Network Configuration requested.
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Network Configuration established.
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: receive success. (MODE-Config).
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration started.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-ADDRESS = 10.100.1.18.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-MASK = 255.255.255.0.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: SAVE-PASSWORD = 1.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-DNS = 10.100.1.129.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: SPLIT-INCLUDE.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration: DEF-DOMAIN = iw.local.
    Dec 30 12:33:21 jupiter configd[16]: host_gateway: write routing socket failed, command 2, No such process
    Dec 30 12:33:21 jupiter configd[16]: installed route: (address 10.100.1.0, gateway 10.100.1.18)
    Dec 30 12:33:21 jupiter configd[16]: IPSec Phase2 starting.
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Phase2 started (Initiated by me).
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: transmit success. (Initiator, Quick-Mode message 1).
    Dec 30 12:33:21 jupiter configd[16]: IPSec Network Configuration established.
    Dec 30 12:33:21 jupiter configd[16]: IPSec Phase1 established.
    Dec 30 12:33:21 jupiter configd[16]: event_callback: Address added. previous interface setting (name: en1, address: 192.168.43.242), current interface setting (name: utun0, family: 1001, address: 10.100.1.18, subnet: 255.255.255.0, destination: 10.100.1.18).
    Dec 30 12:33:21 jupiter configd[16]: network configuration changed.
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: receive success. (Initiator, Quick-Mode message 2).
    Dec 30 12:33:21 jupiter racoon[1976]: IKE Packet: transmit success. (Initiator, Quick-Mode message 3).
    Dec 30 12:33:21 jupiter racoon[1976]: IKEv1 Phase2 Initiator: success. (Initiator, Quick-Mode).
    Dec 30 12:33:21 jupiter racoon[1976]: IPSec Phase2 established (Initiated by me).
    Dec 30 12:33:21 jupiter configd[16]: IPSec Phase2 established.
    An earlies test in a Starbucks around here had the same result, during looking at the netstat -nr output I found I got onto a 10.x.x.x net on the Wifi and still could connect to the (different) 10.x.x.x net at work.
    My TCP/IP Networking course was around 2000, but the default route seen in the non-working log section looks like bullsh*t to me anyhow: DEFAULT-ROUTE = local-address 172.77.7.14/32
    On the other hand, the Phase 2 message seem to indicate a different mode for Phase 2 between the working and the non-working one.
    This is from the exported config of my AVM box:
    **** CFGFILE:vpn.cfg
    * /var/flash/vpn.cfg
    * Wed Dec 28 16:01:09 2011
    vpncfg {
            connections {
                    enabled = yes;
                    conn_type = conntype_user;
                    name = "[email protected]";
                    always_renew = no;
                    reject_not_encrypted = no;
                    dont_filter_netbios = yes;
                    localip = 0.0.0.0;
                    local_virtualip = 0.0.0.0;
                    remoteip = 0.0.0.0;
                    remote_virtualip = 172.77.7.14;
                    remoteid {
                            key_id = "<mykeyismybusiness>";
                    mode = phase1_mode_aggressive;
                    phase1ss = "all/all/all";
                    keytype = connkeytype_pre_shared;
                    key = "<mykeyismybusiness>";
                    cert_do_server_auth = no;
                    use_nat_t = no;
                    use_xauth = yes;
                    xauth {
                            valid = yes;
                            username = "<myuserismybusiness>";
                            passwd = "<mypasswordismybusiness>";
                    use_cfgmode = no;
                    phase2localid {
                            ipnet {
                                    ipaddr = 0.0.0.0;
                                    mask = 0.0.0.0;
                    phase2remoteid {
                            ipaddr = 172.22.7.14;
                    phase2ss = "esp-all-all/ah-none/comp-all/no-pfs";
                    accesslist =
                                 "permit ip 172.22.7.0 255.255.255.240 172.22.7.14 255.255.255.255";
            ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
                                "udp 0.0.0.0:4500 0.0.0.0:4500";
    // EOF
    **** END OF FILE ****
    I also noticed an extra "IPSec port-mapping update for en1 ignored" message in the non-working log section, but I'm not sure a) how significant that might be, and b) how to find out what the ignored update might have been to decide whether not ignoring it would help.
    A quick test with the AnyConnect Client from Cisco didn't help either, apparently it establishes an https connection first as I got a window which certificate details from my QNAP behind the AVM Box (I got a port forward for https to it)
    So I'm looking for any ideas how to better troubleshoot this VPN issue...
    Many thanks in advance!
    BR,
    Alex

    Ok, found a small typo in my config (had at one point a 172.77.7.14 instead of the 172.22.7.14), no I can also connect from the 172.x.x.x net but still no ping etc. The relevant section of the log looks now like this:
    Dec 30 16:44:27 jupiter configd[16]: IPSec connecting to server <myservernameismybusiness>.dyndns.info
    Dec 30 16:44:27 jupiter configd[16]: SCNC: start, triggered by SystemUIServer, type IPSec, status 0
    Dec 30 16:44:28 jupiter configd[16]: IPSec Phase1 starting.
    Dec 30 16:44:28 jupiter racoon[2183]: IPSec connecting to server 77.x.x.x
    Dec 30 16:44:28 jupiter racoon[2183]: Connecting.
    Dec 30 16:44:28 jupiter racoon[2183]: IPSec Phase1 started (Initiated by me).
    Dec 30 16:44:28 jupiter racoon[2183]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 1).
    Dec 30 16:44:28 jupiter racoon[2183]: IKEv1 Phase1 AUTH: success. (Initiator, Aggressive-Mode Message 2).
    Dec 30 16:44:28 jupiter racoon[2183]: IKE Packet: receive success. (Initiator, Aggressive-Mode message 2).
    Dec 30 16:44:28 jupiter racoon[2183]: IKEv1 Phase1 Initiator: success. (Initiator, Aggressive-Mode).
    Dec 30 16:44:28 jupiter racoon[2183]: IKE Packet: transmit success. (Initiator, Aggressive-Mode message 3).
    Dec 30 16:44:28 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:44:28 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (ISAKMP-SA).
    Dec 30 16:44:28 jupiter racoon[2183]: IPSec Phase1 established (Initiated by me).
    Dec 30 16:44:28 jupiter racoon[2183]: IPSec Extended Authentication requested.
    Dec 30 16:44:28 jupiter configd[16]: IPSec requesting Extended Authentication.
    Dec 30 16:44:31 jupiter configd[16]: IPSec sending Extended Authentication.
    Dec 30 16:44:31 jupiter racoon[2183]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 16:44:31 jupiter racoon[2183]: IPSec Extended Authentication sent.
    Dec 30 16:44:32 jupiter racoon[2183]: IKEv1 XAUTH: success. (XAUTH Status is OK).
    Dec 30 16:44:32 jupiter racoon[2183]: IPSec Extended Authentication Passed.
    Dec 30 16:44:32 jupiter racoon[2183]: IKE Packet: transmit success. (Mode-Config message).
    Dec 30 16:44:32 jupiter racoon[2183]: IKEv1 Config: retransmited. (Mode-Config retransmit).
    Dec 30 16:44:32 jupiter racoon[2183]: IPSec Network Configuration requested.
    Dec 30 16:44:33 jupiter racoon[2183]: IPSec Network Configuration established.
    Dec 30 16:44:33 jupiter racoon[2183]: IKE Packet: receive success. (MODE-Config).
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration started.
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-ADDRESS = 172.22.7.14.
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration: SAVE-PASSWORD = 1.
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration: INTERNAL-IP4-DNS = 172.22.7.1.
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration: DEFAULT-ROUTE = local-address 172.22.7.14/32.
    Dec 30 16:44:33 jupiter configd[16]: host_gateway: write routing socket failed, command 2, No such process
    Dec 30 16:44:33 jupiter configd[16]: IPSec Phase2 starting.
    Dec 30 16:44:33 jupiter racoon[2183]: IPSec Phase2 started (Initiated by me).
    Dec 30 16:44:33 jupiter racoon[2183]: IKE Packet: transmit success. (Initiator, Quick-Mode message 1).
    Dec 30 16:44:33 jupiter configd[16]: IPSec Network Configuration established.
    Dec 30 16:44:33 jupiter configd[16]: IPSec Phase1 established.
    Dec 30 16:44:33 jupiter configd[16]: event_callback: Address added. previous interface setting (name: en1, address: 192.168.43.242), current interface setting (name: utun0, family: 1001, address: 172.22.7.14, subnet: 255.255.255.255, destination: 172.22.7.14).
    Dec 30 16:44:33 jupiter configd[16]: network configuration changed.
    Dec 30 16:44:33 jupiter racoon[2183]: IKE Packet: receive success. (Initiator, Quick-Mode message 2).
    Dec 30 16:44:33 jupiter racoon[2183]: IKE Packet: transmit success. (Initiator, Quick-Mode message 3).
    Dec 30 16:44:33 jupiter racoon[2183]: IKEv1 Phase2 Initiator: success. (Initiator, Quick-Mode).
    Dec 30 16:44:33 jupiter racoon[2183]: IPSec Phase2 established (Initiated by me).
    Dec 30 16:44:33 jupiter configd[16]: IPSec Phase2 established.
    Dec 30 16:44:43 jupiter racoon[2183]: IKE Packet: receive failed. (MODE-Config).
    Dec 30 16:44:48 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:44:48 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:44:48 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:44:48 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:44:48 jupiter racoon[2183]: IKE Packet: receive success. (Information message).
    Dec 30 16:45:03 jupiter configd[16]: setting hostname to "jupiter.local"
    followed by lots of:
    Dec 30 16:45:03 jupiter racoon[2183]: IKE Packet: receive failed. (MODE-Config).
    Dec 30 16:45:08 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:45:08 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:45:08 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:45:08 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:45:08 jupiter racoon[2183]: IKE Packet: receive success. (Information message).
    Dec 30 16:45:28 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:45:28 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:45:28 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:45:29 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:45:29 jupiter racoon[2183]: IKE Packet: receive success. (Information message).
    Dec 30 16:45:49 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:45:49 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:45:49 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:45:50 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:45:50 jupiter racoon[2183]: IKE Packet: receive success. (Information message).
    Dec 30 16:46:10 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:46:10 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:46:10 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:46:10 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:46:10 jupiter racoon[2183]: IKE Packet: receive success. (Information message).
    Dec 30 16:46:30 jupiter racoon[2183]: IKE Packet: transmit success. (Information message).
    Dec 30 16:46:30 jupiter racoon[2183]: IKEv1 Information-Notice: transmit success. (R-U-THERE?).
    Dec 30 16:46:30 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: request transmitted. (Initiator DPD Request).
    Dec 30 16:46:30 jupiter racoon[2183]: IKEv1 Dead-Peer-Detection: response received. (Initiator DPD Response).
    Dec 30 16:46:30 jupiter racoon[2183]: IKE Packet: receive success. (Information message).

  • How do I get this beta IOS 7.0.2 JUNK TO WORK with my iPod touch 5???

    How do I get this beta IOS 7.0.2 JUNK TO WORK with my iPod touch 5?? I was prefectly happy with my iPod until I got the notice to upgrade itunes to 11.1 and would you like to upgrade your iPod from IOS 6 to IOS 7. And like an idiot I took the little green pill and pushed the button. Now I can't open iTunes, some apps; like the Lindsey Sterling app, Safari and Disney don't work either (not that I care about the Disney one, but, it's part of the base setup, you'd think "IT" would work!) almost anything with video links will not open, iCloud can't find me. All I get is that annoying white screen. I'M NOT HAPPY! I could have bought a Windows machine for a lot less money and have the same problems!?! (I'll bet Mr. Jobs is spinning like a top right now!)  And I have goggled-- found a few fixes: re-install, restore, etc. found one that stated to get iTunes back to go into the iPods setting by double ckicking the home button go to iTunes app and sign out, then sign in again-- those options didn't work. JEM24

    If you restored to factory settings/new iPod via iTunes (Not via Settings>General>Reset>Erase all Content and Setting) and still have the problem that indicates a hardware problem.
    Make an appointment at the Genius Bar of an Apple store..
      Apple Retail Store - Genius Bar

  • So i got ios 7 in beta on my ipod touch, now several months later, it says my ipod touch needs to be activated. it wont activate over  wifi or when connected to itunes. how can i fix this?

    so i got ios 7 in beta on my ipod touch, now several months later, it says my ipod touch needs to be activated. it wont activate over  wifi or when connected to itunes. how can i fix this?

    You say you have iOS 7 beta. If you are a developer you have access to the private OS 7 developer's forum
    iOS 7 Developer forum- Apple Developer
    Otherwise you are on your own since you have a bootleg copy
    PSA: iOS 7 If you're not a developer, don't install developer betas on your iPhone | TUAW - The Unofficial Apple Weblog

  • How can I use an Express database build with RAA in Express Objects???

    Hello, everybody!
    I have installed Express Server and Client on my computer. I've build an Express database With Relational Access Manager mapping data from an Oracle database.
    Now I want to use this express database in Oracle Express Objects.
    I understand that an express database build with understand can be used by defining a connection to Express Server and using the option Relational Access Manager Connection.
    But, I didn't understand the settings of this option. I open the settings window and there it is :
    - the MASTER DATABASE Box where I have to write the name of the CUBE from the express database build with understand?
    - the RDC File Box : what do I have to write here? I've read the HELP but I didn't understood. There is no file with the RDC extension in my computer.
    Thank you for your help!
    Anca.
    [email protected]

    you can extend it, very easly, with an Airport Express.
    once you connect the AExpress, on the App Airport Utility, in Wireless tab choose to "Extent a Network", you will be able to select your Network enter your Network Password and it is done
    i have 2 AExpress to extend my signal and also to Airplay to Remote Speakers and works perfectly
    good luck

  • How do i get this effect in the video 0:7 - 0:8 That the lines come together and build a logo? pls h

    How do i get this effect in the video 0:7 - 0:8 That the lines come together and build a logo? pls help me      http://www.youtube.com/watch?v=mfU8bZDKAMQ&list=HL1352499622&feature=mh_lolz

    This looks like the final logo was created with several layers probably in Illustrator, then the file was most likely imported into After Effects and revealed by animating mask paths.

Maybe you are looking for

  • Cant send email from new iphone

    Hey I hope the following will make sense.? I got an new phone and have "added" my hotmail account to the mail. It accepts my email address and password. I can receive emails however I am unable to send emails. When I attempted to send an email a mess

  • Vendor invoice number

    where should i enter the vendor invoice number during invoice verification i am not able to see any where the vendor invoice number which i entered in invoice verification Pls guide me

  • Adding a shared mailbox in OWA

    Is there a way we can add a shared mailbox in OWA as an additional mailbox along with primary mailbox just as we do in outlook ? Please suggest. Aditya Mediratta

  • Oracle 9i/10g On windows 2003

    Hi All, I have to install oracle 9i and oracle 10g on windows 2003. Can any one tell me, 1. Is there any known bug? 2. Do i need to take care of anything? or any suggestion for how to achieve this. Thanks in advance for your help. Akshay.

  • Exported 4:3, looks like 16:9 in iDVD

    I finished a project in FCP in 4:3, burned a QT that is 4:3 (720x480), and brought it into iDVD. I tried using an iDVD theme that is widescreen (and keeping my 4:3 aspect ratio when prompted to choose 4:3 or 16:9), and I made sure that 4:3 was select