HingeJoint Problem

I am trying to joint two boxes.But the hammer box always fly away or fall down. Joint always failed
I want them joint like this:

here is the code:
Node holderNode=PhysicsTestHelper.createPhysicsTestNode(assetManager, new BoxCollisionShape(new Vector3f(0.01f, 0.1f, 1f)),0);
holderNode.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(-1f,0.2f,0f);
rootNode.attachChild(holderNode);
getPhysicsSpace().add(holderNode);

    Node hammerNode=PhysicsTestHelper.createPhysicsTestNode(assetManager, new BoxCollisionShape(new Vector3f( 0.5f, 0.1f, 1f)),1f);
    hammerNode.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(-0.5f,0,0);
    rootNode.attachChild(hammerNode);
    getPhysicsSpace().add(hammerNode);

    joint=new HingeJoint(holderNode.getControl(RigidBodyControl.class), hammerNode.getControl(RigidBodyControl.class),new Vector3f(0,-0.1f,0),new Vector3f(-0.5f,0.1f,0f),Vector3f.UNIT_Z, Vector3f.UNIT_Z);
    getPhysicsSpace().add(joint);